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")
|
|
|
|
%th.last
|
|
|
|
- @roles.each do |role|
|
|
|
|
%tr{:class => cycle("odd", "even")}
|
|
|
|
%td
|
|
|
|
= role.id
|
|
|
|
%td
|
|
|
|
= link_to role.name, role_path(role)
|
|
|
|
%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')
|