Emi Matchu
4b9e11fc2a
This logic is copied from DTI 2020! Though I didn't include the part where we highlight trade matches yet!
30 lines
837 B
Text
30 lines
837 B
Text
- title t(".title.#{@type}")
|
|
- hide_title_header
|
|
|
|
= render partial: "items/item_header", locals: {item: @item}
|
|
|
|
%h2.item-page-subtitle= t(".title.#{@type}")
|
|
|
|
- if @trades.present?
|
|
%table.trades-table
|
|
%thead
|
|
%tr
|
|
%th= t(".table.headings.last_active")
|
|
%th= t(".table.headings.user.#{@type}")
|
|
%th= t(".table.headings.lists")
|
|
%tbody
|
|
- sorted_vaguely_by_trade_activity(@trades).each do |trade|
|
|
%tr
|
|
%td
|
|
= vague_trade_timestamp trade.user.last_trade_activity_at
|
|
%td= trade.user.name
|
|
%td
|
|
- if trade.lists.present?
|
|
%ul.trade-list-names
|
|
- trade.lists.each do |list|
|
|
%li= link_to list.name, user_closet_hangers_path(trade.user,
|
|
anchor: "closet-list-#{list.id}")
|
|
- else
|
|
%span.not-in-a-list= t(".table.not_in_a_list")
|
|
- else
|
|
%p= t(".no_trades_yet")
|