Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: appengine/monorail/templates/project/people-detail-page.ezt

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 [define category_css]css/ph_detail.css[end]
2 [include "../framework/master-header.ezt" "showtabs"]
3
4 <a href="list">&lsaquo; Back to people list</a>
5
6 <form action="detail.do" method="POST" id="peopledetail">
7 <input type="hidden" name="token" value="[form_token]">
8 <input type="hidden" name="u" value="[member.user.user_id]">
9 <table cellspacing="8" class="rowmajor vt">
10 <tr>
11 <th width="1%">User:</th>
12 <td>[include "../framework/user-link.ezt" member.user]</td>
13 </tr>
14
15 <tr class="[if-any expand_perms]opened[else]closed[end]">
16 <th>Role:</th>
17 <td>
18 [# Show a widget if the current user is allowed to edit roles.]
19 [if-any perms.EditProject]
20 [define offer_role_select]Yes[end]
21 [else]
22 [define offer_role_select]No[end]
23 [end]
24 [# But, don't offer it if the user could remove himself as the last owner.]
25 [is total_num_owners "1"][if-any warn_abandonment]
26 [define offer_role_select]No[end]
27 [end][end]
28
29 [is offer_role_select "Yes"]
30 <select name="role">
31 <option [is member.role "Owner"]selected="selected"[end]
32 value="owner">Owner</option>
33 <option [is member.role "Committer"]selected="selected"[end]
34 value="committer">Committer</option>
35 <option [is member.role "Contributor"]selected="selected"[end]
36 value="contributor">Contributor</option>
37 </select>
38 [else]
39 [member.role]
40 [end]
41 <a class="ifClosed toggleHidden" href="#" id="show_permissions"
42 style="font-size:90%; margin-left:1em">Show permissions</a>
43 <a class="ifOpened toggleHidden" href="#" id="hide_permissions"
44 style="font-size:90%; margin-left:1em">Hide permissions</a>
45 [include "people-detail-perms-part.ezt"]
46 </td>
47 <td>
48 <div class="ifOpened tip" style="width:17em">
49 <b>Permissions</b> enable members to perform specific actions in
50 a project. Appropriate permissions are already defined for each
51 role: Owner, Committer, and Contributor. Additional permissions can
52 be granted to individual members, if needed.
53
54 <p>Most project owners will never need to grant any individual
55 member permissions. It is usually more important to describe
56 each member's duties in the notes.</p>
57
58 <div style="margin-top:.5em">
59 <a href="http://code.google.com/p/monorail/wiki/Permissions" target="new ">Learn more</a>
60 <a href="http://code.google.com/p/monorail/wiki/Permissions" target="new "><img src="/static/images/tearoff_icon.gif" width="16" height="16"></a>
61 </div>
62 </div>
63 </td>
64 </tr>
65
66
67 <tr>
68 <th>Notes:</th>
69 <td>
70 [if-any offer_edit_member_notes]
71 <div style="width:40em">
72 <textarea style="width:100%" rows="4" class="ifExpand" name="notes"
73 >[member.notes]</textarea>
74 </div>
75 [else]
76 [if-any member.notes][member.notes][else]----[end]
77 [end]
78
79 </td>
80 </tr>
81
82 [if-any offer_edit_perms offer_edit_member_notes]
83 <tr>
84 <th></th>
85 <td>
86 <input type="submit" name="submit" value="Save changes">
87 [if-any offer_remove_role]
88 <input type="submit" name="remove" value="Remove member"
89 style="margin-left:3em" id="remove_member">
90 [end]
91 </td>
92 </tr>
93 [end]
94
95 </table>
96 </form>
97
98
99 <script type="text/javascript" nonce="[nonce]">
100 runOnLoad(function() {
101 function _confirmRemove() {
102 [if-any warn_abandonment]
103 [is total_num_owners "1"]
104 alert('You cannot remove the last project owner.');
105 return false;
106 [else]
107 return confirm('Remove yourself?\nYou will be locked out of making further changes.');
108 [end]
109 [else]
110 return confirm('Remove member [format "js"][member.user.email][end]?');
111 [end]
112 }
113
114 if ($("remove_member"))
115 $("remove_member").addEventListener("click", function(event) {
116 if (!_confirmRemove())
117 event.preventDefault();
118 });
119
120 [if-any read_only][else]
121 if ($("show_permissions"))
122 $("show_permissions").addEventListener("click", function() {
123 _setPeoplePrefs("[projectname]", 1, "[xhr_token]");
124 });
125 if ($("hide_permissions"))
126 $("hide_permissions").addEventListener("click", function() {
127 _setPeoplePrefs("[projectname]", 0, "[xhr_token]");
128 });
129 [end]
130
131 });
132 </script>
133
134 [include "../framework/footer-script.ezt"]
135 [include "../framework/master-footer.ezt"]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698