42 lines
No EOL
1.3 KiB
Text
42 lines
No EOL
1.3 KiB
Text
<!--Descriptive page name, messages and instructions-->
|
|
<h2 class="heading">
|
|
<% if @user && @user == current_user && params[:refused] %>
|
|
<%= ts("Refused Gifts for %{recipient}", recipient: @user ? @user.login : h(@recipient_name)) %>
|
|
<% else %>
|
|
<%= ts("Gifts for %{recipient}", recipient: @user ? @user.login : h(@recipient_name)) %>
|
|
<% end %>
|
|
<%= @collection ? ts("in %{collection}", collection: h(@collection.title)) : "" %>
|
|
</h2>
|
|
<!--/descriptions-->
|
|
|
|
<!--subnavigation, sorting and actions-->
|
|
<% if @user && @user == current_user %>
|
|
<h3 class="landmark heading"><%= ts("Navigation") %></h3>
|
|
<ul class="navigation actions" role="navigation">
|
|
<li>
|
|
<%= span_if_current ts("Accepted Gifts"), user_gifts_path(@user), !(params[:refused]) %>
|
|
</li>
|
|
<li>
|
|
<%= span_if_current ts("Refused Gifts"), user_gifts_path(@user, refused: true) %>
|
|
</li>
|
|
</ul>
|
|
<% elsif !@user %>
|
|
<%= render 'gifts/gift_search' %>
|
|
<% end %>
|
|
<!--subnav-->
|
|
|
|
<% if @works.respond_to?(:total_pages) %>
|
|
<%= will_paginate @works %>
|
|
<% end %>
|
|
|
|
<!--main content-->
|
|
<h3 class="heading landmark"><%= ts("List of Gifts") %></h3>
|
|
<ul class="gift work index group">
|
|
<% for work in @works %>
|
|
<%= render 'gifts/gift_blurb', work: work, gift: work %>
|
|
<% end %>
|
|
</ul>
|
|
<!--/content-->
|
|
<% if @works.respond_to?(:total_pages) %>
|
|
<%= will_paginate @works %>
|
|
<% end %> |