Sha256: fa3e5eb5e7f3e798c1095159253d8ced615553a62f85c24366bc39c6f763104e

Contents?: true

Size: 1003 Bytes

Versions: 7

Compression:

Stored size: 1003 Bytes

Contents

<% if 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>
      <%= link_to(
        t('general.destroy'), resource, id: "area_#{resource.id}", method: :delete, 
        confirm: t('general.questions.are_you_sure'),
        onclick: "delete_link('#area_#{resource.id}'); return false;"
      )
      %>
    </li>
  <% end %>
  <% if can? :edit, resource %>    
    <li><%= link_to t('general.edit'), eval("edit_#{type.singularize}_path(resource)") %></li>
  <% end %>
  <% if resource.respond_to? :state_events %>
  <li class="divider"></li>
  <% end %>
  <%= render 'shared/resource/event_elements', resource: resource, type: type %>
  </ul>
</div>
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
voluntary-0.1.0.rc4 app/views/shared/resource/_actions.html.erb
voluntary-0.1.0.rc3 app/views/shared/resource/_actions.html.erb
voluntary-0.1.0.rc2 app/views/shared/resource/_actions.html.erb
voluntary-0.1.0.rc1 app/views/shared/resource/_actions.html.erb
voluntary-0.0.3 app/views/shared/resource/_actions.html.erb
voluntary-0.0.2 app/views/shared/resource/_actions.html.erb
voluntary-0.0.1 app/views/shared/resource/_actions.html.erb