rosa-build/app/views/roles/show.html.haml

71 lines
2.4 KiB
Plaintext

.block
.secondary-navigation
%ul.wat-cf
%li.first= link_to t("layout.roles.list"), roles_path
%li= link_to t("layout.roles.new"), new_role_path
%li.active= link_to t("layout.roles.show"), role_path
.content
.inner
%p
%b
Id
\:
= @role.id
%p
%b
= t("activerecord.attributes.role.name")
\:
= @role.name
%p
%b
= t("activerecord.attributes.role.to")
\:
= (@role.to and @role.to.size > 0) ? @role.to : 'All'
%p
%b
= t("activerecord.attributes.role.on")
\:
= (@role.on and @role.on.size > 0) ? @role.on : 'System'
%p
%b
= t("activerecord.attributes.role.use_default")
\:
= (@role.use_default) ? t("layout.yes_") : t("layout.no_")
%p
%b
= t("activerecord.attributes.role.use_default_for_owner")
\:
= (@role.use_default_for_owner) ? t("layout.yes_") : t("layout.no_")
- unless @role.can_see.nil? or @role.can_see.empty?
%p
%b
= t("activerecord.attributes.role.can_see")
\:
%table.table
- @role.can_see.each_pair do |model, list|
%tr{:class => cycle('odd', 'even')}
%td{:style => 'width:25%'}
%b
=model
%td{:stule => 'width:75%'}
= list.join(', ')
-rights = @role.rights.by_controller
-unless rights.empty?
%p
%b
= t("activerecord.models.rights")
\:
- rights.each do |key, value|
%div{:style => 'float: left; width: 385px; margin-left: 10px; margin-top: 10px'}
%fieldset{:style => 'width: 95%; height: 100%; padding: 10px;'}
%legend= t("layout.menu.#{key}")
- value.each do |right|
%span= right.name
%br
%div{:style => 'clear: both'}
.wat-cf
= link_to image_tag("web-app-theme/icons/application_edit.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_role_path(@role), :class => "button"
= link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), role_path(@role), :method => "delete", :class => "button", :confirm => t("layout.users.confirm_delete")
- content_for :sidebar, render(:partial => 'sidebar')