pagecontent/app/views/admin/wiki_pages/_index.html.erb

38 lines
1.2 KiB
Plaintext
Raw Normal View History

2016-08-24 13:28:22 +00:00
<table class="table table-striped table-hover main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @wikis.each do |page| %>
<tr>
<td>
<a href="" target="_blank"><%= page.title %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(page.page) %>
<li><a href="<%= edit_admin_wiki_page_path(page.id, :page_id => page.page.id) %>"><%= t(:edit) %></a></li>
<% end %>
</ul>
</div>
</td>
<td><%= format_value page.created_at rescue nil %></td>
<td><%= page.page.page_id rescue "" %></td>
<td><%= User.find(page.update_user_id).user_name rescue nil %></td>
</tr>
<% end %>
</tbody>
</table>
<div class="bottomnav clearfix">
<%= content_tag :div, paginate(@wikis), class: "pagination pagination-centered" %>
<div class="action pull-right">
<% if !@page.nil? && can_edit_or_delete?(@page) %>
<a href="<%= new_admin_wiki_page_path(:page_id => @page.id) %>" class="btn btn-small btn-info order-btn-class" id="edit-order-btn">Add</a>
<% end %>
</div>
</div>