Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/views/spree/admin/roles/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

<div class="alpha sixteen columns">
<div data-hook="name" class="field">
<%= f.label :name, Spree.t(:name) %>
<%= f.label :name, I18n.t('spree.name') %>
<%= f.text_field :name, :class => 'fullwidth' %>
</div>
</div>
<div class="alpha eight columns">
<%= label_tag nil, Spree.t(:display_permissions) %>
<%= label_tag nil, I18n.t('spree.display_permissions') %>
<ul>
<% Spree::PermissionSet.display_permissions.each do |permission| %>
<li>
Expand All @@ -31,7 +31,7 @@
</ul>
</div>
<div class="omega eight columns">
<%= label_tag nil, Spree.t(:management_permissions) %>
<%= label_tag nil, I18n.t('spree.management_permissions') %>
<ul>
<% Spree::PermissionSet.management_permissions.each do |permission| %>
<li>
Expand Down
4 changes: 2 additions & 2 deletions app/views/spree/admin/roles/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<% content_for :page_title do %>
<%= Spree.t(:editing_user_role) %>
<%= I18n.t('spree.editing_user_role') %>
<% end %>

<% content_for :page_actions do %>
<li>
<%= button_link_to Spree.t(:back_to_roles_list), spree.admin_roles_path, :icon => 'arrow-left' %>
<%= button_link_to I18n.t('spree.back_to_roles_list'), spree.admin_roles_path, :icon => 'arrow-left' %>
</li>
<% end %>

Expand Down
14 changes: 7 additions & 7 deletions app/views/spree/admin/roles/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<% content_for :page_title do %>
<%= Spree.t(:user_roles) %>
<%= I18n.t('spree.user_roles') %>
<% end %>

<% content_for :page_actions do %>
<% if can?(:admin, Spree::Role) && can?(:create, Spree::Role) %>
<li>
<%= button_link_to Spree.t(:new_user_role), new_admin_role_url, :icon => 'plus', :id => 'admin_new_role_link' %>
<%= button_link_to I18n.t('spree.new_user_role'), new_admin_role_url, :icon => 'plus', :id => 'admin_new_role_link' %>
</li>
<% end %>
<% end %>
Expand All @@ -19,15 +19,15 @@
</colgroup>
<thead>
<tr data-hook="role_header">
<th><%= Spree.t(:name) %></th>
<th><%= Spree.t(:permissions) %></th>
<th><%= I18n.t('spree.name') %></th>
<th><%= I18n.t('spree.permissions') %></th>
<th class="actions"></th>
</tr>
</thead>
<tbody>
<% @roles.non_base_roles.each do |role|%>
<tr id="<%= spree_dom_id role %>" data-hook="rate_row" class="<%= cycle('odd', 'even')%>">
<td class="align-center"><%=role.try(:name) || Spree.t(:not_available) %></td>
<td class="align-center"><%=role.try(:name) || I18n.t('spree.not_available') %></td>
<td class="align-center"><%= role.permission_sets.map(&:name).to_sentence %></td>
<td class="actions">
<% if can?(:update, role) %>
Expand All @@ -43,9 +43,9 @@
</table>
<% else %>
<div class="alpha twelve columns no-objects-found">
<%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/role')) %>
<%= I18n.t('spree.no_resource_found', resource: I18n.t(:other, scope: 'activerecord.models.spree/role')) %>
<% if can?(:create, Spree::TaxRate) %>
<%= link_to Spree.t(:add_one), spree.new_admin_role_path %>!
<%= link_to I18n.t('spree.add_one'), spree.new_admin_role_path %>!
<% end %>
</div>
<% end %>
4 changes: 2 additions & 2 deletions app/views/spree/admin/roles/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<% content_for :page_title do %>
<%= Spree.t(:new_user_role) %>
<%= I18n.t('spree.new_user_role') %>
<% end %>

<% content_for :page_actions do %>
<li>
<%= button_link_to Spree.t(:back_to_roles_list), spree.admin_roles_path, :icon => 'arrow-left' %>
<%= button_link_to I18n.t('spree.back_to_roles_list'), spree.admin_roles_path, :icon => 'arrow-left' %>
</li>
<% end %>

Expand Down