pagecontent/app/views/admin/page_contents/index.html.erb

35 lines
1012 B
Plaintext
Raw Normal View History

2014-05-06 09:20:15 +00:00
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @pages.each do |page| %>
<tr>
<td>
<a href="/<%= I18n.locale %><%= page.url %>" target="_blank"><%= page.name %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
2014-07-31 12:42:42 +00:00
<% if can_edit_or_delete?(page) %>
<li><a href="/admin/page_contents/new?page_id=<%= page.id.to_s %>"><%= t(:edit) %></a></li>
<% end %>
2014-05-06 09:20:15 +00:00
</ul>
</div>
</td>
2014-05-07 05:18:35 +00:00
<td><a href="/admin/page_contents/<%= page.id.to_s %>/view" ><%= page.page_contexts.last.version rescue nil %></a></td>
<td><%= format_value page.page_contexts.last.updated_at rescue nil %></td>
<td><%= User.find(page.page_contexts.last.update_user_id).user_name rescue nil %></td>
2014-05-06 09:20:15 +00:00
</tr>
<% end %>
</tbody>
</table>
2014-07-04 08:10:42 +00:00
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@pages), class: "pagination pagination-centered"
end
%>
2014-05-06 09:20:15 +00:00