]> git.openstreetmap.org Git - rails.git/blob - app/views/user_blocks/_blocks.html.erb
Merge pull request #179 from tomhughes/secondary-actions
[rails.git] / app / views / user_blocks / _blocks.html.erb
1 <table id="block_list" class="table table-borderless table-striped table-sm">
2   <thead>
3     <tr>
4       <% if show_user_name %>
5       <th><%= t ".display_name" %></th>
6       <% end %>
7       <% if show_creator_name %>
8       <th><%= t ".creator_name" %></th>
9       <% end %>
10       <th><%= t ".reason" %></th>
11       <th><%= t ".status" %></th>
12       <th><%= t ".revoker_name" %></th>
13       <th></th>
14       <th></th>
15       <% if show_revoke_link %>
16       <th></th>
17       <% end %>
18     </tr>
19   </thead>
20   <%= render :partial => "block", :locals => { :show_revoke_link => show_revoke_link, :show_user_name => show_user_name, :show_creator_name => show_creator_name }, :collection => @user_blocks %>
21 </table>
22
23 <nav class='secondary-actions'>
24   <ul>
25     <% if @user_blocks_pages.current_page.number > 1 -%>
26       <li><%= link_to t(".previous"), @params.merge(:page => @user_blocks_pages.current_page.number - 1) %></li>
27     <% else -%>
28       <li><%= t(".previous") %></li>
29     <% end -%>
30
31     <li><%= t(".showing_page", :page => @user_blocks_pages.current_page.number) %></li>
32
33     <% if @user_blocks_pages.current_page.number < @user_blocks_pages.page_count -%>
34       <li><%= link_to t(".next"), @params.merge(:page => @user_blocks_pages.current_page.number + 1) %></li>
35     <% else -%>
36       <li><%= t(".next") %></li>
37     <% end -%>
38   </ul>
39 </nav>