<% icns = {activate: "checkmark", deactivate: "close", release: "earth"} %> <% clss = {activate: "success", deactivate: "danger", release: "info"} %> <% %w(activate release deactivate).each do |state| %> <% if locale.state.trigger?(state.to_sym) %> <%= link_to raw(""), url_for( controller: "/magic_locales/locales", action: :trigger, id: locale, state: state), class: "btn btn-#{clss[state]} btn-sm", title: t("magic_locales.triggers.#{state}") %> <% end %> <% end %>