Resourcified roles.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8145 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2011-12-09 23:29:58 +00:00
1 parent b127f9157d
commit 532a76f78c
10 files changed
+82 -57

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@
<h3><%= l(:label_permissions) %></h3>
<div class="box tabular" id="permissions">
<% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %>
<% perms_by_module = @role.setable_permissions.group_by {|p| p.project_module.to_s} %>
<% perms_by_module.keys.sort.each do |mod| %>
<fieldset><legend><%= mod.blank? ? l(:label_project) : l_or_humanize(mod, :prefix => 'project_module_') %></legend>
<% perms_by_module[mod].each do |permission| %>
+2 -2
View File
@@ -1,6 +1,6 @@
<h2><%= link_to l(:label_role_plural), :controller => 'roles', :action => 'index' %> &#187; <%=h @role.name %></h2>
<h2><%= link_to l(:label_role_plural), roles_path %> &#187; <%=h @role.name %></h2>
<% labelled_form_for :role, @role, :url => { :action => 'edit' }, :html => {:id => 'role_form'} do |f| %>
<% labelled_form_for @role do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
+6 -6
View File
@@ -1,5 +1,5 @@
<div class="contextual">
<%= link_to l(:label_role_new), {:action => 'new'}, :class => 'icon icon-add' %>
<%= link_to l(:label_role_new), new_role_path, :class => 'icon icon-add' %>
</div>
<h2><%=l(:label_role_plural)%></h2>
@@ -13,15 +13,15 @@
<tbody>
<% for role in @roles %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= content_tag(role.builtin? ? 'em' : 'span', link_to(h(role.name), :action => 'edit', :id => role)) %></td>
<td><%= content_tag(role.builtin? ? 'em' : 'span', link_to(h(role.name), edit_role_path(role))) %></td>
<td align="center" style="width:15%;">
<% unless role.builtin? %>
<%= reorder_links('role', {:action => 'edit', :id => role}) %>
<%= reorder_links('role', {:action => 'update', :id => role}, :put) %>
<% end %>
</td>
<td class="buttons">
<%= link_to(l(:button_delete), { :action => 'destroy', :id => role },
:method => :post,
<%= link_to(l(:button_delete), role_path(role),
:method => :delete,
:confirm => l(:text_are_you_sure),
:class => 'icon icon-del') unless role.builtin? %>
</td>
@@ -32,6 +32,6 @@
<p class="pagination"><%= pagination_links_full @role_pages %></p>
<p><%= link_to l(:label_permissions_report), :action => 'report' %></p>
<p><%= link_to l(:label_permissions_report), :action => 'permissions' %></p>
<% html_title(l(:label_role_plural)) -%>
+2 -2
View File
@@ -1,6 +1,6 @@
<h2><%= link_to l(:label_role_plural), :controller => 'roles', :action => 'index' %> &#187; <%=l(:label_role_new)%></h2>
<h2><%= link_to l(:label_role_plural), roles_path %> &#187; <%=l(:label_role_new)%></h2>
<% labelled_form_for :role, @role, :url => { :action => 'new' }, :html => {:id => 'role_form'} do |f| %>
<% labelled_form_for @role do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<% end %>
@@ -1,6 +1,6 @@
<h2><%= link_to l(:label_role_plural), :controller => 'roles', :action => 'index' %> &#187; <%=l(:label_permissions_report)%></h2>
<h2><%= link_to l(:label_role_plural), roles_path %> &#187; <%=l(:label_permissions_report)%></h2>
<% form_tag({:action => 'report'}, :id => 'permissions_form') do %>
<% form_tag(permissions_roles_path, :id => 'permissions_form') do %>
<%= hidden_field_tag 'permissions[0]', '', :id => nil %>
<div class="autoscroll">
<table class="list">