summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2019-03-15 10:09:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2019-03-15 10:09:28 +0000
commitb4c23f066e71978f36d8bd4aeae02be11385fcca (patch)
tree3555bb21efc0778859ea316c0a567f89c474502d /app/views
parent5da9cc59ee48b8e86b2836909ddff970cce76545 (diff)
downloadredmine-b4c23f066e71978f36d8bd4aeae02be11385fcca.tar.gz
redmine-b4c23f066e71978f36d8bd4aeae02be11385fcca.zip
Display details about inheritance when editing a member roles (#31032).
git-svn-id: http://svn.redmine.org/redmine/trunk@17968 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/members/_edit.html.erb3
-rw-r--r--app/views/principal_memberships/_edit.html.erb11
2 files changed, 9 insertions, 5 deletions
diff --git a/app/views/members/_edit.html.erb b/app/views/members/_edit.html.erb
index 91c340fec..e3c5ec747 100644
--- a/app/views/members/_edit.html.erb
+++ b/app/views/members/_edit.html.erb
@@ -9,12 +9,13 @@
role.id, @member.roles.to_a.include?(role),
:id => nil,
:disabled => !@member.role_editable?(role)) %> <%= role %>
+ <%= render_role_inheritance(@member, role) %>
</label><br />
<% end %>
</p>
<%= hidden_field_tag 'membership[role_ids][]', '', :id => nil %>
<p>
- <%= submit_tag l(:button_save), :class => "small" %>
+ <%= submit_tag l(:button_save) %>
<%= link_to_function l(:button_cancel),
"$('#member-#{@member.id}-roles').show(); $('#member-#{@member.id}-form').empty(); return false;" if request.xhr? %>
</p>
diff --git a/app/views/principal_memberships/_edit.html.erb b/app/views/principal_memberships/_edit.html.erb
index af05c4935..d0ab4f10a 100644
--- a/app/views/principal_memberships/_edit.html.erb
+++ b/app/views/principal_memberships/_edit.html.erb
@@ -1,12 +1,15 @@
-<%= form_for(:membership, :url => principal_membership_path(@principal, @membership),
+<%= form_for(@membership, :url => principal_membership_path(@principal, @membership),
+ :as => :membership,
:remote => request.xhr?,
:method => :put) do %>
<p>
<% @roles.each do |role| %>
<label>
- <%= check_box_tag 'membership[role_ids][]', role.id, @membership.roles.to_a.include?(role),
- :disabled => !@membership.role_editable?(role),
- :id => nil %> <%= role.name %>
+ <%= check_box_tag 'membership[role_ids][]',
+ role.id, @membership.roles.to_a.include?(role),
+ :id => nil,
+ :disabled => !@membership.role_editable?(role) %> <%= role.name %>
+ <%= render_role_inheritance(@membership, role) %>
</label><br />
<% end %>
</p>