<% unless trades.empty? %>
  <h2><%= type %> trades</h2>

  <ul class="trades-list">
    <% trades.each do |trade| %>
      <li>
        <%= link_to trade.participants.first.user, user_path(trade.participants.first.user) %> 
        and
        <%= link_to trade.participants.second.user, user_path(trade.participants.second.user) %>: <%= link_to trade.agreement, trade_path(trade) %> 
      </li>
    <% end %>
  </ul>

  <%= paginate trades, param_name: pagination_param %>
<% end %>

<% unless trades.empty? %>
  <h2><%= type %> trades</h2>

  <ul class="trades-list">
    <% trades.each do |trade| %>
      <li>
        <%= link_to trade.participants.first.user, user_path(trade.participants.first.user) %> 
        and
        <%= link_to trade.participants.second.user, user_path(trade.participants.second.user) %><% if trade.agreement? %>: <%= link_to trade.agreement, trade_path(trade) %><% end %>
      </li>
    <% end %>
  </ul>

  <%= paginate trades, param_name: pagination_param %>
<% end %>

Fix formatting for blank agreements
Fix formatting for blank agreements
