<% suppressible = true if suppressible.nil? supports_events = true if supports_events.nil? %>
<% if (suppressible && !record.suppressed) || !suppressible %> <% if !['edit', 'update', 'create'].include?(controller.action_name) %>
<%= link_to I18n.t("actions.edit"), parent_link, :class => "btn btn-sm btn-primary" %>
<% end %> <% if ['new', 'create', 'edit', 'update'].include?(controller.action_name) %>
<% end %> <% if ['edit', 'update'].include?(controller.action_name) %>
<%= link_to I18n.t("actions.revert"), parent_link, :class => "btn btn-sm btn-default" %> <%= I18n.t("actions.toolbar_disabled_message") %>
<% end %> <% end %>
<% if user_can?('update_event_record') && supports_events && ((suppressible && !record.suppressed) || !suppressible ) %> <%= render_aspace_partial :partial => "shared/event_dropdown", :locals => {:record => record} %> <% end %> <% if suppressible && user_can?('suppress_archival_record') %>
<% if record.suppressed %> <%= button_confirm_action I18n.t("actions.unsuppress"), url_for(:action => :unsuppress, :id => record.id), { :class => "btn btn-sm unsuppress-record", :"data-title" => I18n.t("actions.unsuppress_confirm_title"), :"data-message" => I18n.t("actions.unsuppress_confirm_message"), :"data-confirm-btn-label" => "#{I18n.t("actions.unsuppress")}" } %> <% else %> <%= button_confirm_action I18n.t("actions.suppress"), url_for(:action => :suppress, :id => record.id), { :class => "btn btn-sm btn-warning suppress-record", :"data-title" => I18n.t("actions.suppress_confirm_title"), :"data-message" => I18n.t("actions.suppress_confirm_message"), :"data-confirm-btn-label" => "#{I18n.t("actions.suppress")}", :"data-confirm-btn-class" => "btn-warning" } %> <% end %>
<% end %> <% if user_can?('delete_archival_record') %>
<%= button_delete_action url_for(:action => :delete, :id => record.id) %>
<% end %>