<% if user_can?('update_subject_record') %>
<% if ['new', 'create', 'edit', 'update'].include?(controller.action_name) %>
<% else %>
<%= link_to I18n.t("actions.edit"), {:controller => :subjects, :action => :edit, :id => @subject.id}, :class => "btn btn-sm btn-primary" %>
<% end %> <% if ['edit', 'update'].include?(controller.action_name) %>
<%= link_to I18n.t("actions.revert"), {:controller => :subjects, :action => :edit, :id => @subject.id}, :class => "btn btn-sm btn-default" %> <%= I18n.t("actions.toolbar_disabled_message") %>
<% end %>
<% if user_can?('merge_subject_record') %> <%= render_aspace_partial :partial => "shared/merge_dropdown", :locals => {:record => @subject, :controller => :subjects, :confirmation_title => I18n.t("actions.merge_confirm_title"), :confirmation_msg => I18n.t("actions.merge_subject_confirm_message", :source => @subject.title)} %> <% end %> <% if user_can?('delete_subject_record') %>
<%= button_delete_action url_for(:controller => :subjects, :action => :delete, :id => @subject.id) %>
<% end %>
<% end %>