Sha256: bef32aea2ccb778707cf859d10c6ccc03d1c352bfcd02580718a0517e9d24407

Contents?: true

Size: 1.1 KB

Versions: 129

Compression:

Stored size: 1.1 KB

Contents

<% content_for :page_title do %>
  <%= Spree.t(:roles) %>
<% end %>

<% content_for :page_actions do %>
  <%= button_link_to Spree.t(:new_role), new_object_url, class: "btn-success", icon: 'add', id: 'admin_new_role_link' %>
<% end if can? :create, Spree::Role %>

<% if @roles.any? %>
  <table class="table">
    <thead>
      <tr data-hook="admin_roles_index_headers">
        <th><%= Spree.t(:role_id) %></th>
        <th class="actions"></th>
      </tr>
    </thead>
    <tbody>
      <% @roles.each do |role|%>
        <tr id="<%= spree_dom_id role %>" data-hook="admin_roles_index_rows">
          <td><%= role.name %></td>
          <td class="actions text-right">
            <%= link_to_edit(role, no_text: true) if can? :edit, role %>
            <%= link_to_delete(role, no_text: true) if can? :destroy, role %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% else %>
  <div class="alert alert-warning">
    <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Role)) %>,
    <%= link_to(Spree.t(:add_one), new_object_url) if can? :create, Spree::Role %>!
  </div>
<% end %>

Version data entries

129 entries across 129 versions & 1 rubygems

Version Path
spree_backend-4.0.9 app/views/spree/admin/roles/index.html.erb
spree_backend-4.1.15 app/views/spree/admin/roles/index.html.erb
spree_backend-4.1.14 app/views/spree/admin/roles/index.html.erb
spree_backend-4.0.8 app/views/spree/admin/roles/index.html.erb
spree_backend-3.7.14.1 app/views/spree/admin/roles/index.html.erb
spree_backend-4.1.13.1 app/views/spree/admin/roles/index.html.erb
spree_backend-4.0.7.1 app/views/spree/admin/roles/index.html.erb
spree_backend-4.0.7 app/views/spree/admin/roles/index.html.erb
spree_backend-3.7.14 app/views/spree/admin/roles/index.html.erb
spree_backend-4.1.13 app/views/spree/admin/roles/index.html.erb
spree_backend-4.0.6 app/views/spree/admin/roles/index.html.erb
spree_backend-3.7.13 app/views/spree/admin/roles/index.html.erb
spree_backend-4.0.5 app/views/spree/admin/roles/index.html.erb
spree_backend-4.1.12 app/views/spree/admin/roles/index.html.erb
spree_backend-3.7.12 app/views/spree/admin/roles/index.html.erb
spree_backend-4.0.4 app/views/spree/admin/roles/index.html.erb
spree_backend-3.7.11 app/views/spree/admin/roles/index.html.erb
spree_backend-4.1.11 app/views/spree/admin/roles/index.html.erb
spree_backend-4.1.10 app/views/spree/admin/roles/index.html.erb
spree_backend-4.1.9 app/views/spree/admin/roles/index.html.erb