epaper/app/views/admin/e_papers/_index.html.erb

43 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2019-05-28 15:54:32 +00:00
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @papers.each do |paper| %>
<tr>
<td>
<%= paper.category.title rescue "" %>
<% if (paper.category.disable rescue false) %>
<span class="label"><%= t(:disable) %></span>
<% end %>
</td>
<td>
<%= paper.title %>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(paper) %>
<li><a href="<%= edit_admin_e_paper_path(paper.id) %>"><%= t(:edit) %></a></li>
<li><a class="delete text-error" href="<%= admin_e_paper_path(paper.id) %>" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
<td>
<%= paper.period.strftime("%Y-%m-%d") rescue "" %>
</td>
<td>
<% paper.tags.each do |tag| %>
<span class="label label-warning"><%= tag.name %></span>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<div class="bottomnav clearfix" style="left: 81px;">
<%= content_tag :div, paginate(@papers), class: "pagination pagination-centered" %>
</div>