2024-01-21 03:10:06 -08:00
|
|
|
- title t(".title.#{@type}")
|
|
|
|
- hide_title_header
|
|
|
|
|
2024-01-21 06:42:24 -08:00
|
|
|
= render partial: "items/item_header",
|
|
|
|
locals: {item: @item, trades: @item_trades,
|
|
|
|
current_subpage: "trades_#{@type}",
|
|
|
|
current_user_lists: @current_user_lists,
|
|
|
|
current_user_quantities: @current_user_quantities}
|
2024-01-21 03:38:02 -08:00
|
|
|
|
2024-01-21 04:40:25 -08:00
|
|
|
%h2.item-subpage-title= t(".title.#{@type}")
|
2024-01-21 03:10:06 -08:00
|
|
|
|
|
|
|
- if @trades.present?
|
2024-01-21 03:38:02 -08:00
|
|
|
%table.trades-table
|
2024-01-21 03:10:06 -08:00
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th= t(".table.headings.last_active")
|
|
|
|
%th= t(".table.headings.user.#{@type}")
|
|
|
|
%th= t(".table.headings.lists")
|
|
|
|
%tbody
|
2024-01-21 03:59:06 -08:00
|
|
|
- sorted_vaguely_by_trade_activity(@trades).each do |trade|
|
2024-01-21 03:10:06 -08:00
|
|
|
%tr
|
|
|
|
%td
|
2024-01-21 03:59:06 -08:00
|
|
|
= vague_trade_timestamp trade.user.last_trade_activity_at
|
2024-01-21 03:10:06 -08:00
|
|
|
%td= trade.user.name
|
|
|
|
%td
|
|
|
|
- if trade.lists.present?
|
2024-01-21 03:38:02 -08:00
|
|
|
%ul.trade-list-names
|
2024-01-21 03:10:06 -08:00
|
|
|
- trade.lists.each do |list|
|
2024-01-21 03:38:02 -08:00
|
|
|
%li= link_to list.name, user_closet_hangers_path(trade.user,
|
|
|
|
anchor: "closet-list-#{list.id}")
|
2024-01-21 03:10:06 -08:00
|
|
|
- else
|
2024-01-21 06:40:20 -08:00
|
|
|
= link_to t(".table.not_in_a_list.#{@type}"), user_closet_hangers_path(trade.user,
|
|
|
|
anchor: "closet-hangers-group-#{@type == :offering}"),
|
|
|
|
class: "not-in-a-list"
|
2024-01-21 03:10:06 -08:00
|
|
|
- else
|
|
|
|
%p= t(".no_trades_yet")
|
2024-09-09 18:48:08 -07:00
|
|
|
|
|
|
|
- content_for :stylesheets do
|
|
|
|
= page_stylesheet_link_tag "layouts/items"
|
|
|
|
= page_stylesheet_link_tag "item_trades/index"
|