<%= ts("Actions") %>
<% if @work || @admin_post %>
- <%= link_to '↑ '.html_safe + ts('Top'), "#main" %>
<% end %>
<% if @work && @previous_chapter %>
- <%= link_to '←'.html_safe + ts('Previous Chapter'), [@work, @previous_chapter, :anchor => "workskin"] %>
<% end %>
<% if @work && @next_chapter %>
- <%= link_to h(ts('Next Chapter')) + ' →'.html_safe, [@work, @next_chapter, :anchor => "workskin"] %>
<% end %>
<% if @previous_admin_post %>
- <%= link_to("Previous Post", @previous_admin_post) %>
<% end %>
<% if @next_admin_post %>
- <%= link_to("Next Post", @next_admin_post) %>
<% end %>
<% if @admin_post %>
- <%= link_to ts('Back to AO3 News Index'), admin_posts_path %>
<% end %>
<% if @work && !is_author_of?(@work) && !blocked_by?(@work) && !logged_in_as_admin? %>
-
<%= form_for(:kudo, url: kudos_path, html: { method: 'post', id: 'new_kudo' }) do |kudo_form| %>
<%= kudo_form.hidden_field :commentable_id, :value => @work.id %>
<%= kudo_form.hidden_field :commentable_type, :value => 'Work' %>
<%= kudo_form.submit ts("Applause! 👏"), :id => 'kudo_submit' %>
<% end %>
<% end %>
<% if @work && is_maintainer? %>
-
<% if current_user.archivist %>
<%= link_to t(".add_to_collections_link"), "#collection-form", class: "collection_item_form_placement_open" %>
<% elsif @work.allow_collection_invitation? %>
<%= link_to t(".invite_to_collections_link"), "#collection-form", class: "collection_item_form_placement_open" %>
<% end %>
<% end %>
<% if logged_in? && @work %>
-
<% @bookmark ||= bookmark_if_exists(commentable) %>
<%= link_to (@bookmark ? ts("Edit Bookmark") : ts("Bookmark")), "#bookmark-form", :class => "bookmark_form_placement_open" %>
<% end %>
<% if logged_in? && @work && marked_for_later?(@work) %>
-
<%= mark_as_read_link(@work) %>
<% end %>
<% if commentable.count_visible_comments > 0 && !commentable.is_a?(Tag) %>
<% end %>
<%= flash_div :kudos_error, :kudos_notice %>
<% if @work && (@chapter.blank? || @chapter.posted?) %>
<%= render "kudos/kudos", :kudos => @kudos, :guest_kudos_count => @work.guest_kudos_count, :commentable => @work %>
<% end %>
<%= flash_div :comment_error, :comment_notice %>
<% commentable_parent = find_parent(commentable) %>
<% if AdminSetting.current.guest_comments_off? && guest? %>
<%= t(".guest_comments_disabled") %>
<% elsif commentable_parent.is_a?(AdminPost) && commentable_parent.disable_all_comments? %>
<%= t(".permissions.admin_post.disable_all") %>
<% elsif commentable_parent.is_a?(AdminPost) && commentable_parent.disable_anon_comments? && !logged_in? %>
<%= t(".permissions.admin_post.disable_anon") %>
<%= t(".permissions.admin_post.alt_action", support_link: link_to(t(".permissions.admin_post.support_link"), new_feedback_report_path)).html_safe %>
<% elsif commentable_parent.is_a?(Work) && commentable_parent.disable_all_comments? %>
<%= t(".permissions.work.disable_all") %>
<% elsif commentable_parent.is_a?(Work) && commentable_parent.disable_anon_comments? && !logged_in? %>
<%= t(".permissions.work.disable_anon") %>
<%= t(".permissions.work.alt_action") %>
<% elsif commentable_parent.is_a?(Work) && commentable_parent.hidden_by_admin? %>
<%= t(".permissions.work.hidden") %>
<% elsif commentable_parent.is_a?(Work) && commentable_parent.in_unrevealed_collection %>
<%= t(".permissions.work.unrevealed") %>
<% elsif commentable_parent.is_a?(Work) && blocked_by?(commentable_parent) %>
<%= t(".blocked") %>
<% elsif logged_in_as_admin? %>
<%= t(".logged_as_admin") %>
<% else %>
<% end %>
<% if logged_in? && @work %>
<% if is_maintainer? && (@work.allow_collection_invitation? || current_user.archivist) %>
<%= render "collection_items/collection_item_form", :item => @work, :in_page => true %>
<% end %>
<% @bookmark ||= bookmark_if_exists(commentable) %>
<% bookmarkable = (commentable.respond_to?(:work) ? commentable.work : commentable) %>
<% if @bookmark %>
<%= render "bookmarks/bookmark_form", :bookmarkable => bookmarkable, :bookmark => @bookmark, :button_name => ts("Update"), :action => :update, :in_page => true %>
<% else %>
<%= render "bookmarks/bookmark_form", :bookmarkable => bookmarkable, :bookmark => Bookmark.new, :button_name => ts("Create"), :action => :create, :in_page => true %>
<% end %>
<% end %>