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

39 lines
1.3 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>
2019-11-28 08:38:55 +00:00
<a href="/<%= I18n.locale %><%= @page.url + '/?wiki=' + page.uid.to_s %>" target="_blank"><%= page.title %></a>
2016-08-24 13:28:22 +00:00
<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>
2019-11-28 08:38:55 +00:00
</div>