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

34 lines
1.1 KiB
Plaintext
Raw Normal View History

2014-05-05 11:33:35 +00:00
<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>
2020-12-26 14:29:23 +00:00
<td><%= link.category.title rescue "" %></td>
2014-05-05 11:33:35 +00:00
<td>
2021-04-01 09:23:35 +00:00
<a href="<%= link.url %>" target="_blank"><%= link.title.to_s.html_safe %></a>
2014-05-05 11:33:35 +00:00
<div class="quick-edit">
<ul class="nav nav-pills">
2014-07-31 12:43:16 +00:00
<% 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 %>
2014-05-05 11:33:35 +00:00
</ul>
</div>
</td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
2021-06-11 04:24:41 +00:00
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")
2014-05-05 11:33:35 +00:00
end
%>