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

41 lines
1.4 KiB
Plaintext

<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="/<%= I18n.locale %><%= @page.url + '/?wiki=' + page.uid.to_s %>" 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>
<a href="<%= wiki_parent_admin_page_content_path(:id => page.page_id.to_s) %>" target="_blank"><%= page.page.page_id rescue "" %></a>
</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>