1
0
Fork 0
forked from OpenNeo/impress
impress/app/views/items/show.html.haml

75 lines
2.7 KiB
Text
Raw Normal View History

2011-05-13 05:07:59 -07:00
- title @item.name
2011-07-26 15:56:14 -07:00
- canonical_path @item
2011-05-20 16:29:04 -07:00
= render partial: "item_header", locals: {item: @item}
2011-07-14 09:50:24 -07:00
%section#item-info-section
#item-info
%p= @item.description
#trade-hangers
- if Time.now < Date.new(2024, 1, 26)
%p
✨⏳️
%i We now only show recently-updated lists here!
⏳️✨
%p
%strong
= t '.trading_users.header.owned', count: @trades[:offering].size
= render_trades(@trades[:offering])
%span.toggle
%button.more= t '.trading_users.show_more'
%button.less= t '.trading_users.show_less'
%p
%strong
= t '.trading_users.header.wanted', count: @trades[:seeking].size
= render_trades(@trades[:seeking])
%span.toggle
%button.more= t '.trading_users.show_more'
%button.less= t '.trading_users.show_less'
- if user_signed_in?
#your-items-form
%h3
= t '.closet_hangers.header_html',
:user_items_link => link_to(t('your_items'),
user_closet_hangers_path(current_user))
= form_tag update_quantities_user_item_closet_hangers_path(:user_id => current_user, :item_id => @item), :method => :put do
#closet-hangers-ownership-groups
- @current_user_lists.each do |owned, lists|
%div
%h4= closet_lists_group_name(:you, owned)
%ul
- lists.each do |list|
%li
= number_field_tag "quantity[#{list.id}]",
@current_user_quantities[list.id], :min => 0
= label_tag "quantity[#{list.id}]", list.name
%li
= number_field_tag "quantity[#{owned}]",
@current_user_quantities[owned], :min => 0
- unless lists.empty?
= label_tag "quantity[#{owned}]",
t('closet_lists.unlisted_name'),
:class => 'unlisted'
- else
= label_tag "quantity[#{owned}]",
t('.closet_hangers.quantity_label')
= submit_tag t('.closet_hangers.submit')
2011-07-30 21:19:28 -07:00
#outfit-preview-root{'data-item-id': @item.id}
- unless @contributors_with_counts.empty?
#item-contributors
%header #{t '.contributors.header'}:
%ul
- @contributors_with_counts.each do |contributor, count|
%li= link_to(contributor.name, user_contributions_path(contributor)) + format_contribution_count(count)
%footer= t '.contributors.footer'
- content_for :javascripts do
= javascript_include_tag 'item-page', defer: true