Users will still see their own trades in the list and in the counts, and support staff will still see them too!
47 lines
1.5 KiB
Text
47 lines
1.5 KiB
Text
- title t(".title.#{@type}")
|
|
- hide_title_header
|
|
|
|
= 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}
|
|
|
|
%h2.item-subpage-title= 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
|
|
- prev_trade = nil
|
|
- sorted_vaguely_by_trade_activity(@trades).each do |trade|
|
|
%tr
|
|
%td{
|
|
'data-is-same-as-prev': same_vague_trade_timestamp?(trade, prev_trade)
|
|
}
|
|
= vague_trade_timestamp trade
|
|
%td
|
|
= trade.user.name
|
|
- if support_staff? && trade.user.shadowbanned?
|
|
%abbr{title: "Shadowbanned (Hidden from most viewers; you can see because you're Support staff"} 🕶️ SBan
|
|
%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
|
|
= 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"
|
|
- prev_trade = trade
|
|
- else
|
|
%p= t(".no_trades_yet")
|
|
|
|
- content_for :stylesheets do
|
|
= page_stylesheet_link_tag "layouts/items"
|
|
= page_stylesheet_link_tag "item_trades/index"
|