digital-archive/app/views/admin/digital_archives/_index.html.erb

50 lines
1.6 KiB
Plaintext
Raw Normal View History

2015-08-11 08:39:31 +00:00
<script>
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
</script>
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @digital_content_archives.each do |digital_archive| %>
<tr>
<td>
<a href="/zh_tw/DigitalArchive" target="_blank"><%= digital_archive.title %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(digital_archive) %>
<li><a href="/<%= I18n.locale.to_s %>/admin/digital_archives/<%= digital_archive.id.to_s %>/edit"><%= t(:edit) %></a></li>
<li><a href="<%=admin_digital_archive_path(digital_archive.id.to_s)%>" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
<td>
<%= digital_archive.character%>
</td>
<td>
<%= digital_archive.category.title rescue "" %>
<% if (digital_archive.category.disable rescue false) %>
<span class='label'><%= t(:disabled) %></span>
<% end %>
</td>
<td>
<%= digital_archive.location%>
</td>
<td><%= format_value digital_archive.item_date rescue nil %></td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@digital_content_archives), class: "pagination pagination-centered"
end
%>