2011-10-18 19:31:59 +01:00
|
|
|
.block
|
|
|
|
.secondary-navigation
|
|
|
|
%ul.wat-cf
|
|
|
|
%li.first.active= link_to t("layout.roles.list"), roles_path
|
|
|
|
%li= link_to t("layout.roles.new"), new_role_path
|
|
|
|
.content
|
|
|
|
%h2.title
|
|
|
|
= t("layout.roles.list_header")
|
|
|
|
.inner
|
2011-10-26 01:33:25 +01:00
|
|
|
.group
|
|
|
|
= button_to t("layout.roles.get_dump"), {:controller => :roles, :action => :get_dump},
|
|
|
|
{:style => 'float: left; margin-right: 30px'}
|
|
|
|
= form_tag url_for(:controller => :roles, :action => :load_from_dump), :multipart => true do
|
|
|
|
= label_tag :file, t("layout.roles.from_file") + ':'
|
|
|
|
= file_field_tag :file
|
|
|
|
= submit_tag t("layout.upload")
|
|
|
|
%br
|
|
|
|
-unless @roles.empty?
|
|
|
|
%table.table
|
|
|
|
%tr
|
|
|
|
%th.first ID
|
|
|
|
%th= t("activerecord.attributes.role.name")
|
2011-10-27 19:09:22 +01:00
|
|
|
%th= t("activerecord.attributes.role.to")
|
|
|
|
%th= t("activerecord.attributes.role.on")
|
|
|
|
%th= t("activerecord.attributes.role.use_default")
|
|
|
|
%th= t("activerecord.attributes.role.use_default_for_owner")
|
2011-10-26 01:33:25 +01:00
|
|
|
%th.last
|
|
|
|
- @roles.each do |role|
|
|
|
|
%tr{:class => cycle("odd", "even")}
|
|
|
|
%td
|
|
|
|
= role.id
|
|
|
|
%td
|
|
|
|
= link_to role.name, role_path(role)
|
2011-10-27 19:09:22 +01:00
|
|
|
%td
|
|
|
|
= (role.to and role.to != '') ? role.to : 'All'
|
|
|
|
%td
|
|
|
|
= (role.on and role.on != '') ? role.on : 'System'
|
|
|
|
%td
|
|
|
|
= (role.use_default) ? t("layout.yes_") : t("layout.no_")
|
|
|
|
%td
|
|
|
|
= (role.use_default_for_owner) ? t("layout.yes_") : t("layout.no_")
|
2011-10-26 01:33:25 +01:00
|
|
|
%td.last
|
|
|
|
#{link_to t("layout.show"), role_path(role)} | #{link_to t("layout.edit"), edit_role_path(role)} | #{link_to t("layout.delete"), role_path(role), :method => :delete, :confirm => t("layout.roles.confirm_delete")}
|
|
|
|
.actions-bar.wat-cf
|
|
|
|
.actions
|
|
|
|
-else
|
|
|
|
.inner
|
|
|
|
%label.label Роли отсутствуют,
|
|
|
|
= link_to "создать новую роль", new_role_path
|
2011-10-18 19:31:59 +01:00
|
|
|
- content_for :sidebar, render(:partial => 'sidebar')
|