Sha256: 0bb173257ba3df51403102af692c5711e7c352457704c0a89d4eec80325bdd97
Contents?: true
Size: 1.42 KB
Versions: 6
Compression:
Stored size: 1.42 KB
Contents
<% namespace ||= nil %> <% after_namespace ||= nil %> <% if !resource.is_a?(Column) && ( can?(:destroy, resource) || can?(:edit, resource) || ( resource.respond_to?(:state_events) && resource.state_events.select{|event| can? event, resource }.any? ) ) %> <div class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"><%= t('general.actions') %></a> <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> <% if can? :destroy, resource %> <li> <% working_resource = namespace.present? ? [namespace, resource] : resource %> <%= link_to( t('general.destroy'), polymorphic_or_resource_path(working_resource), id: "#{resource.class.name.tableize.singularize}_#{resource.id}", method: :delete, data: { confirm: t('general.questions.are_you_sure') }, onclick: "delete_link('#{resource.class.name.tableize.singularize}_#{resource.id}'); return false;" ) %> </li> <% end %> <% if can? :edit, resource %> <li><%= link_to t('general.edit'), eval("edit_#{(namespace.present? ? namespace.to_s + '_' : '')}#{type.gsub('/', '_').singularize}#{after_namespace.present? ? '_' + after_namespace : ''}_path(resource)") %></li> <% end %> <% links = event_links_for_resource(resource, type) %> <% if links.any? %> <li class="divider"></li> <%= render 'shared/resource/event_elements', links: links %> <% end %> </ul> </div> <% end %>
Version data entries
6 entries across 6 versions & 1 rubygems