55 lines
2.2 KiB
Text
Executable file
55 lines
2.2 KiB
Text
Executable file
<div class="news admin home">
|
|
<div class="primary header module">
|
|
<!--Descriptive page name, messages and instructions-->
|
|
<h2 class="heading"><%= link_to t(".page_heading"), admin_posts_path %></h2>
|
|
<div class="icon"></div>
|
|
<!--/descriptions-->
|
|
<!--subnav-->
|
|
<div class="navigation actions module" role="navigation">
|
|
<% if policy(@admin_post).edit? || policy(@admin_post).destroy? || (logged_in_as_admin? && @admin_post.find_all_comments.unreviewed_only.exists?) %>
|
|
<h4 class="landmark heading"><%= t(".navigation.admin.landmark") %></h4>
|
|
<ul class="management actions">
|
|
<% if policy(@admin_post).edit? %>
|
|
<li><%= link_to t(".navigation.admin.edit"), edit_admin_post_path(@admin_post) %></li>
|
|
<% end %>
|
|
<% if policy(@admin_post).destroy? %>
|
|
<li>
|
|
<%= link_to t(".navigation.admin.delete"),
|
|
@admin_post,
|
|
data: { confirm: t(".navigation.admin.confirm_delete") },
|
|
method: :delete %>
|
|
</li>
|
|
<% end %>
|
|
<% if @admin_post.find_all_comments.unreviewed_only.exists? %>
|
|
<li>
|
|
<%= link_to t(".navigation.admin.unreviewed_comments", count: @admin_post.find_all_comments.unreviewed_only.count),
|
|
unreviewed_admin_post_comments_path(@admin_post) %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
<% end %>
|
|
<h4 class="landmark heading"><%= t(".navigation.landmark") %></h4>
|
|
<ul class="actions">
|
|
<% if @previous_admin_post %>
|
|
<li><%= link_to t(".navigation.previous"), @previous_admin_post %></li>
|
|
<% end %>
|
|
<% if @next_admin_post %>
|
|
<li><%= link_to t(".navigation.next"), @next_admin_post %></li>
|
|
<% end %>
|
|
<li>
|
|
<%= link_to_rss admin_posts_path(:rss, language_id: @admin_post.language.short) %>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<!--/subnav-->
|
|
</div>
|
|
<!--main content-->
|
|
<div role="article" class="news module group">
|
|
<%= render "admin_post", admin_post: @admin_post %>
|
|
</div>
|
|
<!--/content-->
|
|
|
|
<!-- BEGIN comment section -->
|
|
<%= render "comments/commentable", commentable: @admin_post %>
|
|
<!-- END comment section -->
|
|
</div>
|