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

32 lines
1023 B
Plaintext
Raw Permalink Normal View History

2024-11-15 10:20:00 +00:00
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @images.each do |image| %>
<tr>
<td>
<img src="<%= image.image.url %>" style="width:250px;" />
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(image) %>
<li><a href="<%= edit_admin_e_paper_image_path(image.id) %>"><%= t(:edit) %></a></li>
<li><a class="delete text-error" href="<%= admin_e_paper_image_path(image.id) %>" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag(:div, paginate(@images), class: "pagination pagination-centered") +
content_tag(:div, link_to(t(:new_),new_admin_e_paper_image_path, :class=>"btn btn-primary"), class: "pull-right")
end
%>