<% if user_can?('update_location_record') %>
<% if !['edit', 'update'].include?(controller.action_name) %>
<%= link_to I18n.t("actions.edit"), {:controller => :locations, :action => :edit, :id => @location.id}, :class => "btn btn-sm btn-primary" %>
<% end %> <% if ['edit', 'update'].include?(controller.action_name) %>
<%= link_to I18n.t("actions.revert"), {:controller => :locations, :action => :edit, :id => @location.id}, :class => "btn btn-sm btn-default" %> <%= I18n.t("actions.toolbar_disabled_message") %>
<% end %>
<%= button_delete_action url_for(:controller => :locations, :action => :delete, :id => @location.id), {:"data-message" => I18n.t("location._frontend.action.delete_confirm_message"),} %>
<% end %>