publication/app/views/admin/publications/show.html.erb

82 lines
2.2 KiB
Plaintext
Raw Normal View History

2018-10-04 02:47:23 +00:00
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "lib/jquery-ui-sortable.min" %>
<% end %>
<% content_for :page_specific_css do %>
<style type="text/css">
.order-list{
list-style: none;
}
.order-list-chapter i{
font-size: 20px;
cursor: move;
}
.order-list-chapter h4{
display: inline-block;
margin-left: 30px;
}
#sort-chapter-modal .modal-body {
max-height: 60vh;
}
#sort-chapter-modal .modal-body .order-list-chapter img {
width: 150px;
margin: 0 0 10px 10px;
}
</style>
<% end %>
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @chapters.each do |chapter| %>
<tr>
<td>
<%= chapter.title %>
<% if can_edit_or_delete?(@banner) %>
<div class="quick-edit">
<ul class="nav nav-pills">
<li><a href="<%= edit_admin_chapter_path(chapter.id, page: params[:page]) %>"><%= t(:edit) %></a></li>
<li><a href="<%= admin_chapter_path(chapter.id, page: params[:page]) %>" class="delete text-error" data-method="delete" data-confirm="Are you sure?" ><%= t(:delete_) %></a></li>
</ul>
</div>
<% end %>
</td>
2023-06-23 10:25:35 +00:00
<td>
<ul class="tags-groups">
<% chapter.tags.each do |tag| %>
<li class="label"><%= tag.name %></li>
<% end %>
</ul>
</td>
2018-10-04 02:47:23 +00:00
<td>
<%= chapter.author %>
</td>
<td>
<%= chapter.page %>
2018-10-04 09:44:54 +00:00
</td>
2018-10-04 02:47:23 +00:00
<td>
2023-06-23 10:25:35 +00:00
<%= chapter.keywords %>
2018-10-04 09:44:54 +00:00
</td>
2018-10-04 02:47:23 +00:00
</tr>
<% end %>
</tbody>
</table>
2023-06-04 14:41:53 +00:00
<% if can_edit_or_delete?(@publication) %>
2018-10-04 02:47:23 +00:00
<div class="bottomnav clearfix" style="left: 81px;">
<div class="action pull-right">
2023-06-04 14:41:53 +00:00
<%= link_to t("publications.add_chapter"), new_admin_chapter_path(page: params[:page], publication_id: @publication.id), class: "btn btn-primary" %>
2018-10-04 02:47:23 +00:00
</div>
<%= content_tag :div, paginate(@chapters), class: "pagination pagination-centered" %>
</div>
<% end %>