<h2><%= @trade %></h2>

<% if @trade.completed? || @trade.participant(current_user) %>
  <ul>
    <% @trade.participants.each do |participant| %>
      <li class><%= participant.other_participant.user %> said: <%= participant.feedback %></li>
    <% end %>
  </ul>
<% elsif @trade.waiting_for_approval? current_user %>
  <div id="trade-approval">
    This trade is pending your approval.  Please select Yes or No:

    <ul id="trade-yes-no">
      <li><%= link_to "Yes", trade_participants_path(@trade), method: :post %></li>
      <li><%= link_to "No", trade_path(@trade), method: :delete %></li>
    </ul>
  <br style="clear: both;"/> <%# XXX ick %>
  </div>
<% elsif @trade.waiting_to_give_feedback?  current_user %>
  <% participant = @trade.participant(current_user) %>

  <ul class="trade-actions">
    <li><%= link_to "update shipping info", edit_trade_participant_path(@trade, participant) %></li>
    <li><%= link_to "leave feedback and complete trade", edit_trade_participant_path(@trade, participant.other_participant) %></li>
  </ul>
  <br style="clear: both;"/> <%# XXX ick %>
<% end %>

<h2><%= @trade %></h2>

<% if @trade.completed? || @trade.participant(current_user) %>
  <ul>
    <% @trade.participants.each do |participant| %>
      <li class><%= participant.other_participant.user %> said: <%= participant.feedback %></li>
    <% end %>
  </ul>
<% end %>
  
  
<% if @trade.waiting_for_approval? current_user %>
  <div id="trade-approval">
    This trade is pending your approval.  Please select Yes or No:

    <ul id="trade-yes-no">
      <li><%= link_to "Yes", trade_participants_path(@trade), method: :post %></li>
      <li><%= link_to "No", trade_path(@trade), method: :delete %></li>
    </ul>
    <br style="clear: both;"/> <%# XXX ick %>
  </div>
<% elsif @trade.waiting_to_give_feedback? current_user %>
  <% participant = @trade.participant(current_user) %>

  <ul class="trade-actions">
    <li><%= link_to "update shipping info", edit_trade_participant_path(@trade, participant) %></li>
    <li><%= link_to "leave feedback and complete trade", edit_trade_participant_path(@trade, participant.other_participant) %></li>
  </ul>
  <br style="clear: both;"/> <%# XXX ick %>
<% end %>

Correct logic for show actions
Correct logic for show actions
