links/app/views/admin/web_resources/_index.html.erb

34 lines
1.1 KiB
Plaintext

<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @links.each do |link| %>
<tr>
<td><%= link.status_for_table %></td>
<td><%= link.category.title rescue "" %></td>
<td>
<a href="<%= link.url %>" target="_blank"><%= link.title.to_s.html_safe %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(link) %>
<li><a href="/admin/web_resources/<%=link.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="#" class="delete text-error" rel="/admin/web_resources/<%=link.id.to_s%>"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag(:div, paginate(@links), class: "pagination pagination-centered") +
content_tag(:div, link_to(t(:new_),new_admin_web_resource_path, :class=>"btn btn-primary"), class: "pull-right")
end
%>