Show More
@@ -1,220 +1,220 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <div class="panel panel-default"> |
|
3 | <div class="panel panel-default"> | |
4 | <div class="panel-heading"> |
|
4 | <div class="panel-heading"> | |
5 | <h3 class="panel-title">${_('Repository Group Permissions: {}').format(c.repo_group.name)}</h3> |
|
5 | <h3 class="panel-title">${_('Repository Group Permissions: {}').format(c.repo_group.name)}</h3> | |
6 | </div> |
|
6 | </div> | |
7 | <div class="panel-body"> |
|
7 | <div class="panel-body"> | |
8 | ${h.secure_form(h.route_path('edit_repo_group_perms_update', repo_group_name=c.repo_group.group_name), request=request)} |
|
8 | ${h.secure_form(h.route_path('edit_repo_group_perms_update', repo_group_name=c.repo_group.group_name), request=request)} | |
9 | <table id="permissions_manage" class="rctable permissions"> |
|
9 | <table id="permissions_manage" class="rctable permissions"> | |
10 | <tr> |
|
10 | <tr> | |
11 | <th class="td-radio">${_('None')}</th> |
|
11 | <th class="td-radio">${_('None')}</th> | |
12 | <th class="td-radio">${_('Read')}</th> |
|
12 | <th class="td-radio">${_('Read')}</th> | |
13 | <th class="td-radio">${_('Write')}</th> |
|
13 | <th class="td-radio">${_('Write')}</th> | |
14 | <th class="td-radio">${_('Admin')}</th> |
|
14 | <th class="td-radio">${_('Admin')}</th> | |
15 | <th class="td-owner">${_('User/User Group')}</th> |
|
15 | <th class="td-owner">${_('User/User Group')}</th> | |
16 | <th class="td-action"></th> |
|
16 | <th class="td-action"></th> | |
17 | <th class="td-action"></th> |
|
17 | <th class="td-action"></th> | |
18 | </tr> |
|
18 | </tr> | |
19 | ## USERS |
|
19 | ## USERS | |
20 | %for _user in c.repo_group.permissions(): |
|
20 | %for _user in c.repo_group.permissions(): | |
21 | ## super admin/owner row |
|
21 | ## super admin/owner row | |
22 | %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None): |
|
22 | %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None): | |
23 | <tr class="perm_admin_row"> |
|
23 | <tr class="perm_admin_row"> | |
24 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td> |
|
24 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td> | |
25 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td> |
|
25 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td> | |
26 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td> |
|
26 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td> | |
27 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td> |
|
27 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td> | |
28 | <td class="td-user"> |
|
28 | <td class="td-user"> | |
29 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} |
|
29 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} | |
30 | ${h.link_to_user(_user.username)} |
|
30 | ${h.link_to_user(_user.username)} | |
31 | %if getattr(_user, 'admin_row', None): |
|
31 | %if getattr(_user, 'admin_row', None): | |
32 |
(${_('super |
|
32 | (${_('super-admin')}) | |
33 | %endif |
|
33 | %endif | |
34 | %if getattr(_user, 'owner_row', None): |
|
34 | %if getattr(_user, 'owner_row', None): | |
35 | (${_('owner')}) |
|
35 | (${_('owner')}) | |
36 | %endif |
|
36 | %endif | |
37 | </td> |
|
37 | </td> | |
38 | <td></td> |
|
38 | <td></td> | |
39 | <td class="quick_repo_menu"> |
|
39 | <td class="quick_repo_menu"> | |
40 | % if c.rhodecode_user.is_admin: |
|
40 | % if c.rhodecode_user.is_admin: | |
41 | <i class="icon-more"></i> |
|
41 | <i class="icon-more"></i> | |
42 | <div class="menu_items_container" style="display: none;"> |
|
42 | <div class="menu_items_container" style="display: none;"> | |
43 | <ul class="menu_items"> |
|
43 | <ul class="menu_items"> | |
44 | <li> |
|
44 | <li> | |
45 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))} |
|
45 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))} | |
46 | </li> |
|
46 | </li> | |
47 | </ul> |
|
47 | </ul> | |
48 | </div> |
|
48 | </div> | |
49 | % endif |
|
49 | % endif | |
50 | </td> |
|
50 | </td> | |
51 | </tr> |
|
51 | </tr> | |
52 | %else: |
|
52 | %else: | |
53 | <tr> |
|
53 | <tr> | |
54 | ##forbid revoking permission from yourself, except if you're an super admin |
|
54 | ##forbid revoking permission from yourself, except if you're an super admin | |
55 | %if c.rhodecode_user.user_id != _user.user_id or c.rhodecode_user.is_admin: |
|
55 | %if c.rhodecode_user.user_id != _user.user_id or c.rhodecode_user.is_admin: | |
56 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.none', checked=_user.permission=='group.none')}</td> |
|
56 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.none', checked=_user.permission=='group.none')}</td> | |
57 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.read', checked=_user.permission=='group.read')}</td> |
|
57 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.read', checked=_user.permission=='group.read')}</td> | |
58 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.write', checked=_user.permission=='group.write')}</td> |
|
58 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.write', checked=_user.permission=='group.write')}</td> | |
59 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.admin', checked=_user.permission=='group.admin')}</td> |
|
59 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.admin', checked=_user.permission=='group.admin')}</td> | |
60 | <td class="td-user"> |
|
60 | <td class="td-user"> | |
61 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} |
|
61 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} | |
62 | <span class="user"> |
|
62 | <span class="user"> | |
63 | % if _user.username == h.DEFAULT_USER: |
|
63 | % if _user.username == h.DEFAULT_USER: | |
64 | ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span> |
|
64 | ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span> | |
65 | % else: |
|
65 | % else: | |
66 | ${h.link_to_user(_user.username)} |
|
66 | ${h.link_to_user(_user.username)} | |
67 | %if getattr(_user, 'duplicate_perm', None): |
|
67 | %if getattr(_user, 'duplicate_perm', None): | |
68 | (${_('inactive duplicate')}) |
|
68 | (${_('inactive duplicate')}) | |
69 | %endif |
|
69 | %endif | |
70 | % endif |
|
70 | % endif | |
71 | </span> |
|
71 | </span> | |
72 | </td> |
|
72 | </td> | |
73 | <td class="td-action"> |
|
73 | <td class="td-action"> | |
74 | %if _user.username != h.DEFAULT_USER: |
|
74 | %if _user.username != h.DEFAULT_USER: | |
75 | <span class="btn btn-link btn-danger revoke_perm" |
|
75 | <span class="btn btn-link btn-danger revoke_perm" | |
76 | member="${_user.user_id}" member_type="user"> |
|
76 | member="${_user.user_id}" member_type="user"> | |
77 | ${_('Remove')} |
|
77 | ${_('Remove')} | |
78 | </span> |
|
78 | </span> | |
79 | %endif |
|
79 | %endif | |
80 | </td> |
|
80 | </td> | |
81 | <td class="quick_repo_menu"> |
|
81 | <td class="quick_repo_menu"> | |
82 | % if c.rhodecode_user.is_admin: |
|
82 | % if c.rhodecode_user.is_admin: | |
83 | <i class="icon-more"></i> |
|
83 | <i class="icon-more"></i> | |
84 | <div class="menu_items_container" style="display: none;"> |
|
84 | <div class="menu_items_container" style="display: none;"> | |
85 | <ul class="menu_items"> |
|
85 | <ul class="menu_items"> | |
86 | <li> |
|
86 | <li> | |
87 | % if _user.username == h.DEFAULT_USER: |
|
87 | % if _user.username == h.DEFAULT_USER: | |
88 | ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-groups-permissions'))} |
|
88 | ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-groups-permissions'))} | |
89 | % else: |
|
89 | % else: | |
90 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))} |
|
90 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))} | |
91 | % endif |
|
91 | % endif | |
92 | </li> |
|
92 | </li> | |
93 | </ul> |
|
93 | </ul> | |
94 | </div> |
|
94 | </div> | |
95 | % endif |
|
95 | % endif | |
96 | </td> |
|
96 | </td> | |
97 | %else: |
|
97 | %else: | |
98 | ## special case for currently logged-in user permissions, we make sure he cannot take his own permissions |
|
98 | ## special case for currently logged-in user permissions, we make sure he cannot take his own permissions | |
99 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.none', disabled="disabled")}</td> |
|
99 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.none', disabled="disabled")}</td> | |
100 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.read', disabled="disabled")}</td> |
|
100 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.read', disabled="disabled")}</td> | |
101 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.write', disabled="disabled")}</td> |
|
101 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.write', disabled="disabled")}</td> | |
102 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.admin', disabled="disabled")}</td> |
|
102 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.admin', disabled="disabled")}</td> | |
103 | <td class="td-user"> |
|
103 | <td class="td-user"> | |
104 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} |
|
104 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} | |
105 | <span class="user"> |
|
105 | <span class="user"> | |
106 | % if _user.username == h.DEFAULT_USER: |
|
106 | % if _user.username == h.DEFAULT_USER: | |
107 | ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span> |
|
107 | ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span> | |
108 | % else: |
|
108 | % else: | |
109 | ${h.link_to_user(_user.username)} |
|
109 | ${h.link_to_user(_user.username)} | |
110 | %if getattr(_user, 'duplicate_perm', None): |
|
110 | %if getattr(_user, 'duplicate_perm', None): | |
111 | (${_('inactive duplicate')}) |
|
111 | (${_('inactive duplicate')}) | |
112 | %endif |
|
112 | %endif | |
113 | % endif |
|
113 | % endif | |
114 | <span class="user-perm-help-text">(${_('delegated admin')})</span> |
|
114 | <span class="user-perm-help-text">(${_('delegated admin')})</span> | |
115 | </span> |
|
115 | </span> | |
116 | </td> |
|
116 | </td> | |
117 | <td></td> |
|
117 | <td></td> | |
118 | <td class="quick_repo_menu"> |
|
118 | <td class="quick_repo_menu"> | |
119 | % if c.rhodecode_user.is_admin: |
|
119 | % if c.rhodecode_user.is_admin: | |
120 | <i class="icon-more"></i> |
|
120 | <i class="icon-more"></i> | |
121 | <div class="menu_items_container" style="display: none;"> |
|
121 | <div class="menu_items_container" style="display: none;"> | |
122 | <ul class="menu_items"> |
|
122 | <ul class="menu_items"> | |
123 | <li> |
|
123 | <li> | |
124 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))} |
|
124 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))} | |
125 | </li> |
|
125 | </li> | |
126 | </ul> |
|
126 | </ul> | |
127 | </div> |
|
127 | </div> | |
128 | % endif |
|
128 | % endif | |
129 | </td> |
|
129 | </td> | |
130 | %endif |
|
130 | %endif | |
131 | </tr> |
|
131 | </tr> | |
132 | %endif |
|
132 | %endif | |
133 | %endfor |
|
133 | %endfor | |
134 |
|
134 | |||
135 | ## USER GROUPS |
|
135 | ## USER GROUPS | |
136 | %for _user_group in c.repo_group.permission_user_groups(with_members=True): |
|
136 | %for _user_group in c.repo_group.permission_user_groups(with_members=True): | |
137 | <tr id="id${id(_user_group.users_group_name)}"> |
|
137 | <tr id="id${id(_user_group.users_group_name)}"> | |
138 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.none', checked=_user_group.permission=='group.none')}</td> |
|
138 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.none', checked=_user_group.permission=='group.none')}</td> | |
139 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.read', checked=_user_group.permission=='group.read')}</td> |
|
139 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.read', checked=_user_group.permission=='group.read')}</td> | |
140 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.write', checked=_user_group.permission=='group.write')}</td> |
|
140 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.write', checked=_user_group.permission=='group.write')}</td> | |
141 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.admin', checked=_user_group.permission=='group.admin')}</td> |
|
141 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.admin', checked=_user_group.permission=='group.admin')}</td> | |
142 | <td class="td-componentname"> |
|
142 | <td class="td-componentname"> | |
143 | ${base.user_group_icon(_user_group, tooltip=True)} |
|
143 | ${base.user_group_icon(_user_group, tooltip=True)} | |
144 |
|
144 | |||
145 | %if c.is_super_admin: |
|
145 | %if c.is_super_admin: | |
146 | <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}"> |
|
146 | <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}"> | |
147 | ${_user_group.users_group_name} |
|
147 | ${_user_group.users_group_name} | |
148 | </a> |
|
148 | </a> | |
149 | %else: |
|
149 | %else: | |
150 | ${h.link_to_group(_user_group.users_group_name)} |
|
150 | ${h.link_to_group(_user_group.users_group_name)} | |
151 | %endif |
|
151 | %endif | |
152 | (${_('members')}: ${len(_user_group.members)}) |
|
152 | (${_('members')}: ${len(_user_group.members)}) | |
153 | </td> |
|
153 | </td> | |
154 | <td class="td-action"> |
|
154 | <td class="td-action"> | |
155 | <span class="btn btn-link btn-danger revoke_perm" |
|
155 | <span class="btn btn-link btn-danger revoke_perm" | |
156 | member="${_user_group.users_group_id}" member_type="user_group"> |
|
156 | member="${_user_group.users_group_id}" member_type="user_group"> | |
157 | ${_('Remove')} |
|
157 | ${_('Remove')} | |
158 | </span> |
|
158 | </span> | |
159 | </td> |
|
159 | </td> | |
160 | <td class="quick_repo_menu"> |
|
160 | <td class="quick_repo_menu"> | |
161 | % if c.rhodecode_user.is_admin: |
|
161 | % if c.rhodecode_user.is_admin: | |
162 | <i class="icon-more"></i> |
|
162 | <i class="icon-more"></i> | |
163 | <div class="menu_items_container" style="display: none;"> |
|
163 | <div class="menu_items_container" style="display: none;"> | |
164 | <ul class="menu_items"> |
|
164 | <ul class="menu_items"> | |
165 | <li> |
|
165 | <li> | |
166 | ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='repositories-groups-permissions'))} |
|
166 | ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='repositories-groups-permissions'))} | |
167 | </li> |
|
167 | </li> | |
168 | </ul> |
|
168 | </ul> | |
169 | </div> |
|
169 | </div> | |
170 | % endif |
|
170 | % endif | |
171 | </td> |
|
171 | </td> | |
172 | </tr> |
|
172 | </tr> | |
173 | %endfor |
|
173 | %endfor | |
174 |
|
174 | |||
175 | <tr class="new_members" id="add_perm_input"></tr> |
|
175 | <tr class="new_members" id="add_perm_input"></tr> | |
176 | <tr> |
|
176 | <tr> | |
177 | <td></td> |
|
177 | <td></td> | |
178 | <td></td> |
|
178 | <td></td> | |
179 | <td></td> |
|
179 | <td></td> | |
180 | <td></td> |
|
180 | <td></td> | |
181 | <td></td> |
|
181 | <td></td> | |
182 | <td> |
|
182 | <td> | |
183 | <span id="add_perm" class="link"> |
|
183 | <span id="add_perm" class="link"> | |
184 | ${_('Add user/user group')} |
|
184 | ${_('Add user/user group')} | |
185 | </span> |
|
185 | </span> | |
186 | </td> |
|
186 | </td> | |
187 | <td></td> |
|
187 | <td></td> | |
188 | </tr> |
|
188 | </tr> | |
189 | </table> |
|
189 | </table> | |
190 |
|
190 | |||
191 | <div class="fields"> |
|
191 | <div class="fields"> | |
192 | <div class="field"> |
|
192 | <div class="field"> | |
193 | <div class="label label-radio"> |
|
193 | <div class="label label-radio"> | |
194 | ${_('Apply to children')}: |
|
194 | ${_('Apply to children')}: | |
195 | </div> |
|
195 | </div> | |
196 | <div class="radios"> |
|
196 | <div class="radios"> | |
197 | ${h.radio('recursive', 'none', label=_('None'), checked="checked")} |
|
197 | ${h.radio('recursive', 'none', label=_('None'), checked="checked")} | |
198 | ${h.radio('recursive', 'groups', label=_('Repository Groups'))} |
|
198 | ${h.radio('recursive', 'groups', label=_('Repository Groups'))} | |
199 | ${h.radio('recursive', 'repos', label=_('Repositories'))} |
|
199 | ${h.radio('recursive', 'repos', label=_('Repositories'))} | |
200 | ${h.radio('recursive', 'all', label=_('Both'))} |
|
200 | ${h.radio('recursive', 'all', label=_('Both'))} | |
201 | <span class="help-block">${_('Set or revoke permissions to selected types of children of this group, including non-private repositories and other groups if chosen.')}</span> |
|
201 | <span class="help-block">${_('Set or revoke permissions to selected types of children of this group, including non-private repositories and other groups if chosen.')}</span> | |
202 | </div> |
|
202 | </div> | |
203 | </div> |
|
203 | </div> | |
204 | </div> |
|
204 | </div> | |
205 | <div class="buttons"> |
|
205 | <div class="buttons"> | |
206 | ${h.submit('save',_('Save'),class_="btn btn-primary")} |
|
206 | ${h.submit('save',_('Save'),class_="btn btn-primary")} | |
207 | ${h.reset('reset',_('Reset'),class_="btn btn-danger")} |
|
207 | ${h.reset('reset',_('Reset'),class_="btn btn-danger")} | |
208 | </div> |
|
208 | </div> | |
209 | ${h.end_form()} |
|
209 | ${h.end_form()} | |
210 | </div> |
|
210 | </div> | |
211 | </div> |
|
211 | </div> | |
212 | <script type="text/javascript"> |
|
212 | <script type="text/javascript"> | |
213 | $('#add_perm').on('click', function(e){ |
|
213 | $('#add_perm').on('click', function(e){ | |
214 | addNewPermInput($(this), 'group'); |
|
214 | addNewPermInput($(this), 'group'); | |
215 | }); |
|
215 | }); | |
216 | $('.revoke_perm').on('click', function(e){ |
|
216 | $('.revoke_perm').on('click', function(e){ | |
217 | markRevokePermInput($(this), 'group'); |
|
217 | markRevokePermInput($(this), 'group'); | |
218 | }); |
|
218 | }); | |
219 | quick_repo_menu(); |
|
219 | quick_repo_menu(); | |
220 | </script> |
|
220 | </script> |
@@ -1,222 +1,222 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <div class="panel panel-default"> |
|
3 | <div class="panel panel-default"> | |
4 | <div class="panel-heading"> |
|
4 | <div class="panel-heading"> | |
5 | <h3 class="panel-title">${_('Repository Access Permissions')}</h3> |
|
5 | <h3 class="panel-title">${_('Repository Access Permissions')}</h3> | |
6 | </div> |
|
6 | </div> | |
7 | <div class="panel-body"> |
|
7 | <div class="panel-body"> | |
8 | ${h.secure_form(h.route_path('edit_repo_perms', repo_name=c.repo_name), request=request)} |
|
8 | ${h.secure_form(h.route_path('edit_repo_perms', repo_name=c.repo_name), request=request)} | |
9 | <table id="permissions_manage" class="rctable permissions"> |
|
9 | <table id="permissions_manage" class="rctable permissions"> | |
10 | <tr> |
|
10 | <tr> | |
11 | <th class="td-radio">${_('None')}</th> |
|
11 | <th class="td-radio">${_('None')}</th> | |
12 | <th class="td-radio">${_('Read')}</th> |
|
12 | <th class="td-radio">${_('Read')}</th> | |
13 | <th class="td-radio">${_('Write')}</th> |
|
13 | <th class="td-radio">${_('Write')}</th> | |
14 | <th class="td-radio">${_('Admin')}</th> |
|
14 | <th class="td-radio">${_('Admin')}</th> | |
15 | <th class="td-owner">${_('User/User Group')}</th> |
|
15 | <th class="td-owner">${_('User/User Group')}</th> | |
16 | <th class="td-action"></th> |
|
16 | <th class="td-action"></th> | |
17 | <th class="td-action"></th> |
|
17 | <th class="td-action"></th> | |
18 | </tr> |
|
18 | </tr> | |
19 | ## USERS |
|
19 | ## USERS | |
20 | %for _user in c.rhodecode_db_repo.permissions(): |
|
20 | %for _user in c.rhodecode_db_repo.permissions(): | |
21 | %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None): |
|
21 | %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None): | |
22 | <tr class="perm_admin_row"> |
|
22 | <tr class="perm_admin_row"> | |
23 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td> |
|
23 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td> | |
24 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td> |
|
24 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td> | |
25 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td> |
|
25 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td> | |
26 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td> |
|
26 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td> | |
27 | <td class="td-user"> |
|
27 | <td class="td-user"> | |
28 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} |
|
28 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} | |
29 | ${h.link_to_user(_user.username)} |
|
29 | ${h.link_to_user(_user.username)} | |
30 | %if getattr(_user, 'admin_row', None): |
|
30 | %if getattr(_user, 'admin_row', None): | |
31 |
(${_('super |
|
31 | (${_('super-admin')}) | |
32 | %endif |
|
32 | %endif | |
33 | %if getattr(_user, 'owner_row', None): |
|
33 | %if getattr(_user, 'owner_row', None): | |
34 | (${_('owner')}) |
|
34 | (${_('owner')}) | |
35 | %endif |
|
35 | %endif | |
36 | </td> |
|
36 | </td> | |
37 | <td></td> |
|
37 | <td></td> | |
38 | <td class="quick_repo_menu"> |
|
38 | <td class="quick_repo_menu"> | |
39 | % if c.rhodecode_user.is_admin: |
|
39 | % if c.rhodecode_user.is_admin: | |
40 | <i class="icon-more"></i> |
|
40 | <i class="icon-more"></i> | |
41 | <div class="menu_items_container" style="display: none;"> |
|
41 | <div class="menu_items_container" style="display: none;"> | |
42 | <ul class="menu_items"> |
|
42 | <ul class="menu_items"> | |
43 | <li> |
|
43 | <li> | |
44 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))} |
|
44 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))} | |
45 | </li> |
|
45 | </li> | |
46 | </ul> |
|
46 | </ul> | |
47 | </div> |
|
47 | </div> | |
48 | % endif |
|
48 | % endif | |
49 | </td> |
|
49 | </td> | |
50 | </tr> |
|
50 | </tr> | |
51 | %elif _user.username == h.DEFAULT_USER and c.rhodecode_db_repo.private: |
|
51 | %elif _user.username == h.DEFAULT_USER and c.rhodecode_db_repo.private: | |
52 | <tr> |
|
52 | <tr> | |
53 | <td colspan="4"> |
|
53 | <td colspan="4"> | |
54 | <span class="private_repo_msg"> |
|
54 | <span class="private_repo_msg"> | |
55 | <strong title="${h.tooltip(_user.permission)}">${_('private repository')}</strong> |
|
55 | <strong title="${h.tooltip(_user.permission)}">${_('private repository')}</strong> | |
56 | </span> |
|
56 | </span> | |
57 | </td> |
|
57 | </td> | |
58 | <td class="private_repo_msg"> |
|
58 | <td class="private_repo_msg"> | |
59 | ${base.gravatar(h.DEFAULT_USER_EMAIL, 16)} |
|
59 | ${base.gravatar(h.DEFAULT_USER_EMAIL, 16)} | |
60 | ${h.DEFAULT_USER} - ${_('only users/user groups explicitly added here will have access')}</td> |
|
60 | ${h.DEFAULT_USER} - ${_('only users/user groups explicitly added here will have access')}</td> | |
61 | <td></td> |
|
61 | <td></td> | |
62 | <td class="quick_repo_menu"> |
|
62 | <td class="quick_repo_menu"> | |
63 | % if c.rhodecode_user.is_admin: |
|
63 | % if c.rhodecode_user.is_admin: | |
64 | <i class="icon-more"></i> |
|
64 | <i class="icon-more"></i> | |
65 | <div class="menu_items_container" style="display: none;"> |
|
65 | <div class="menu_items_container" style="display: none;"> | |
66 | <ul class="menu_items"> |
|
66 | <ul class="menu_items"> | |
67 | <li> |
|
67 | <li> | |
68 | ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))} |
|
68 | ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))} | |
69 | </li> |
|
69 | </li> | |
70 | </ul> |
|
70 | </ul> | |
71 | </div> |
|
71 | </div> | |
72 | % endif |
|
72 | % endif | |
73 | </td> |
|
73 | </td> | |
74 | </tr> |
|
74 | </tr> | |
75 | %else: |
|
75 | %else: | |
76 | <% used_by_n_rules = len(getattr(_user, 'branch_rules', None) or []) %> |
|
76 | <% used_by_n_rules = len(getattr(_user, 'branch_rules', None) or []) %> | |
77 | <tr> |
|
77 | <tr> | |
78 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.none', checked=_user.permission=='repository.none', disabled="disabled" if (used_by_n_rules and _user.username != h.DEFAULT_USER) else None)}</td> |
|
78 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.none', checked=_user.permission=='repository.none', disabled="disabled" if (used_by_n_rules and _user.username != h.DEFAULT_USER) else None)}</td> | |
79 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.read', checked=_user.permission=='repository.read', disabled="disabled" if (used_by_n_rules and _user.username != h.DEFAULT_USER) else None)}</td> |
|
79 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.read', checked=_user.permission=='repository.read', disabled="disabled" if (used_by_n_rules and _user.username != h.DEFAULT_USER) else None)}</td> | |
80 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.write', checked=_user.permission=='repository.write')}</td> |
|
80 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.write', checked=_user.permission=='repository.write')}</td> | |
81 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.admin', checked=_user.permission=='repository.admin')}</td> |
|
81 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.admin', checked=_user.permission=='repository.admin')}</td> | |
82 | <td class="td-user"> |
|
82 | <td class="td-user"> | |
83 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} |
|
83 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} | |
84 | <span class="user"> |
|
84 | <span class="user"> | |
85 | % if _user.username == h.DEFAULT_USER: |
|
85 | % if _user.username == h.DEFAULT_USER: | |
86 | ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span> |
|
86 | ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span> | |
87 | % else: |
|
87 | % else: | |
88 | ${h.link_to_user(_user.username)} |
|
88 | ${h.link_to_user(_user.username)} | |
89 | %if getattr(_user, 'duplicate_perm', None): |
|
89 | %if getattr(_user, 'duplicate_perm', None): | |
90 | (${_('inactive duplicate')}) |
|
90 | (${_('inactive duplicate')}) | |
91 | %endif |
|
91 | %endif | |
92 | %if getattr(_user, 'branch_rules', None): |
|
92 | %if getattr(_user, 'branch_rules', None): | |
93 | % if used_by_n_rules == 1: |
|
93 | % if used_by_n_rules == 1: | |
94 | (${_('used by {} branch rule, requires write+ permissions').format(used_by_n_rules)}) |
|
94 | (${_('used by {} branch rule, requires write+ permissions').format(used_by_n_rules)}) | |
95 | % else: |
|
95 | % else: | |
96 | (${_('used by {} branch rules, requires write+ permissions').format(used_by_n_rules)}) |
|
96 | (${_('used by {} branch rules, requires write+ permissions').format(used_by_n_rules)}) | |
97 | % endif |
|
97 | % endif | |
98 | %endif |
|
98 | %endif | |
99 | % endif |
|
99 | % endif | |
100 | </span> |
|
100 | </span> | |
101 | </td> |
|
101 | </td> | |
102 | <td class="td-action"> |
|
102 | <td class="td-action"> | |
103 | %if _user.username != h.DEFAULT_USER and getattr(_user, 'branch_rules', None) is None: |
|
103 | %if _user.username != h.DEFAULT_USER and getattr(_user, 'branch_rules', None) is None: | |
104 | <span class="btn btn-link btn-danger revoke_perm" |
|
104 | <span class="btn btn-link btn-danger revoke_perm" | |
105 | member="${_user.user_id}" member_type="user"> |
|
105 | member="${_user.user_id}" member_type="user"> | |
106 | ${_('Remove')} |
|
106 | ${_('Remove')} | |
107 | </span> |
|
107 | </span> | |
108 | %elif _user.username == h.DEFAULT_USER: |
|
108 | %elif _user.username == h.DEFAULT_USER: | |
109 | <span class="tooltip btn btn-link btn-default" onclick="enablePrivateRepo(); return false" title="${_('Private repositories are only visible to people explicitly added as collaborators.')}"> |
|
109 | <span class="tooltip btn btn-link btn-default" onclick="enablePrivateRepo(); return false" title="${_('Private repositories are only visible to people explicitly added as collaborators.')}"> | |
110 | ${_('set private mode')} |
|
110 | ${_('set private mode')} | |
111 | </span> |
|
111 | </span> | |
112 | %endif |
|
112 | %endif | |
113 | </td> |
|
113 | </td> | |
114 | <td class="quick_repo_menu"> |
|
114 | <td class="quick_repo_menu"> | |
115 | % if c.rhodecode_user.is_admin: |
|
115 | % if c.rhodecode_user.is_admin: | |
116 | <i class="icon-more"></i> |
|
116 | <i class="icon-more"></i> | |
117 | <div class="menu_items_container" style="display: none;"> |
|
117 | <div class="menu_items_container" style="display: none;"> | |
118 | <ul class="menu_items"> |
|
118 | <ul class="menu_items"> | |
119 | <li> |
|
119 | <li> | |
120 | % if _user.username == h.DEFAULT_USER: |
|
120 | % if _user.username == h.DEFAULT_USER: | |
121 | ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))} |
|
121 | ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))} | |
122 | % else: |
|
122 | % else: | |
123 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))} |
|
123 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))} | |
124 | % endif |
|
124 | % endif | |
125 | </li> |
|
125 | </li> | |
126 | </ul> |
|
126 | </ul> | |
127 | </div> |
|
127 | </div> | |
128 | % endif |
|
128 | % endif | |
129 | </td> |
|
129 | </td> | |
130 | </tr> |
|
130 | </tr> | |
131 | %endif |
|
131 | %endif | |
132 | %endfor |
|
132 | %endfor | |
133 |
|
133 | |||
134 | ## USER GROUPS |
|
134 | ## USER GROUPS | |
135 | %for _user_group in c.rhodecode_db_repo.permission_user_groups(with_members=True): |
|
135 | %for _user_group in c.rhodecode_db_repo.permission_user_groups(with_members=True): | |
136 | <tr> |
|
136 | <tr> | |
137 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.none', checked=_user_group.permission=='repository.none')}</td> |
|
137 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.none', checked=_user_group.permission=='repository.none')}</td> | |
138 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.read', checked=_user_group.permission=='repository.read')}</td> |
|
138 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.read', checked=_user_group.permission=='repository.read')}</td> | |
139 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.write', checked=_user_group.permission=='repository.write')}</td> |
|
139 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.write', checked=_user_group.permission=='repository.write')}</td> | |
140 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.admin', checked=_user_group.permission=='repository.admin')}</td> |
|
140 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.admin', checked=_user_group.permission=='repository.admin')}</td> | |
141 | <td class="td-componentname"> |
|
141 | <td class="td-componentname"> | |
142 | ${base.user_group_icon(_user_group, tooltip=True)} |
|
142 | ${base.user_group_icon(_user_group, tooltip=True)} | |
143 | %if c.is_super_admin: |
|
143 | %if c.is_super_admin: | |
144 | <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}"> |
|
144 | <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}"> | |
145 | ${_user_group.users_group_name} |
|
145 | ${_user_group.users_group_name} | |
146 | </a> |
|
146 | </a> | |
147 | %else: |
|
147 | %else: | |
148 | ${h.link_to_group(_user_group.users_group_name)} |
|
148 | ${h.link_to_group(_user_group.users_group_name)} | |
149 | %endif |
|
149 | %endif | |
150 | (${_('members')}: ${len(_user_group.members)}) |
|
150 | (${_('members')}: ${len(_user_group.members)}) | |
151 | </td> |
|
151 | </td> | |
152 | <td class="td-action"> |
|
152 | <td class="td-action"> | |
153 | <span class="btn btn-link btn-danger revoke_perm" |
|
153 | <span class="btn btn-link btn-danger revoke_perm" | |
154 | member="${_user_group.users_group_id}" member_type="user_group"> |
|
154 | member="${_user_group.users_group_id}" member_type="user_group"> | |
155 | ${_('Remove')} |
|
155 | ${_('Remove')} | |
156 | </span> |
|
156 | </span> | |
157 | </td> |
|
157 | </td> | |
158 | <td class="quick_repo_menu"> |
|
158 | <td class="quick_repo_menu"> | |
159 | % if c.rhodecode_user.is_admin: |
|
159 | % if c.rhodecode_user.is_admin: | |
160 | <i class="icon-more"></i> |
|
160 | <i class="icon-more"></i> | |
161 | <div class="menu_items_container" style="display: none;"> |
|
161 | <div class="menu_items_container" style="display: none;"> | |
162 | <ul class="menu_items"> |
|
162 | <ul class="menu_items"> | |
163 | <li> |
|
163 | <li> | |
164 | ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='repositories-permissions'))} |
|
164 | ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='repositories-permissions'))} | |
165 | </li> |
|
165 | </li> | |
166 | </ul> |
|
166 | </ul> | |
167 | </div> |
|
167 | </div> | |
168 | % endif |
|
168 | % endif | |
169 | </td> |
|
169 | </td> | |
170 | </tr> |
|
170 | </tr> | |
171 | %endfor |
|
171 | %endfor | |
172 | <tr class="new_members" id="add_perm_input"></tr> |
|
172 | <tr class="new_members" id="add_perm_input"></tr> | |
173 |
|
173 | |||
174 | <tr> |
|
174 | <tr> | |
175 | <td></td> |
|
175 | <td></td> | |
176 | <td></td> |
|
176 | <td></td> | |
177 | <td></td> |
|
177 | <td></td> | |
178 | <td></td> |
|
178 | <td></td> | |
179 | <td></td> |
|
179 | <td></td> | |
180 | <td> |
|
180 | <td> | |
181 | <span id="add_perm" class="link"> |
|
181 | <span id="add_perm" class="link"> | |
182 | ${_('Add user/user group')} |
|
182 | ${_('Add user/user group')} | |
183 | </span> |
|
183 | </span> | |
184 | </td> |
|
184 | </td> | |
185 | <td></td> |
|
185 | <td></td> | |
186 | </tr> |
|
186 | </tr> | |
187 |
|
187 | |||
188 | </table> |
|
188 | </table> | |
189 |
|
189 | |||
190 | <div class="buttons"> |
|
190 | <div class="buttons"> | |
191 | ${h.submit('save',_('Save'),class_="btn btn-primary")} |
|
191 | ${h.submit('save',_('Save'),class_="btn btn-primary")} | |
192 | ${h.reset('reset',_('Reset'),class_="btn btn-danger")} |
|
192 | ${h.reset('reset',_('Reset'),class_="btn btn-danger")} | |
193 | </div> |
|
193 | </div> | |
194 | ${h.end_form()} |
|
194 | ${h.end_form()} | |
195 | </div> |
|
195 | </div> | |
196 | </div> |
|
196 | </div> | |
197 |
|
197 | |||
198 | <script type="text/javascript"> |
|
198 | <script type="text/javascript"> | |
199 | $('#add_perm').on('click', function(e){ |
|
199 | $('#add_perm').on('click', function(e){ | |
200 | addNewPermInput($(this), 'repository'); |
|
200 | addNewPermInput($(this), 'repository'); | |
201 | }); |
|
201 | }); | |
202 | $('.revoke_perm').on('click', function(e){ |
|
202 | $('.revoke_perm').on('click', function(e){ | |
203 | markRevokePermInput($(this), 'repository'); |
|
203 | markRevokePermInput($(this), 'repository'); | |
204 | }); |
|
204 | }); | |
205 | quick_repo_menu(); |
|
205 | quick_repo_menu(); | |
206 |
|
206 | |||
207 | var enablePrivateRepo = function () { |
|
207 | var enablePrivateRepo = function () { | |
208 | var postData = { |
|
208 | var postData = { | |
209 | 'csrf_token': CSRF_TOKEN |
|
209 | 'csrf_token': CSRF_TOKEN | |
210 | }; |
|
210 | }; | |
211 |
|
211 | |||
212 | var success = function(o) { |
|
212 | var success = function(o) { | |
213 | var defaultUrl = pyroutes.url('edit_repo_perms', {"repo_name": templateContext.repo_name}); |
|
213 | var defaultUrl = pyroutes.url('edit_repo_perms', {"repo_name": templateContext.repo_name}); | |
214 | window.location = o.redirect_url || defaultUrl; |
|
214 | window.location = o.redirect_url || defaultUrl; | |
215 | }; |
|
215 | }; | |
216 |
|
216 | |||
217 | ajaxPOST( |
|
217 | ajaxPOST( | |
218 | pyroutes.url('edit_repo_perms_set_private', {"repo_name": templateContext.repo_name}), |
|
218 | pyroutes.url('edit_repo_perms_set_private', {"repo_name": templateContext.repo_name}), | |
219 | postData, |
|
219 | postData, | |
220 | success); |
|
220 | success); | |
221 | } |
|
221 | } | |
222 | </script> |
|
222 | </script> |
@@ -1,207 +1,207 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <div class="panel panel-default"> |
|
3 | <div class="panel panel-default"> | |
4 | <div class="panel-heading"> |
|
4 | <div class="panel-heading"> | |
5 | <h3 class="panel-title">${_('User Group Permissions')}</h3> |
|
5 | <h3 class="panel-title">${_('User Group Permissions')}</h3> | |
6 | </div> |
|
6 | </div> | |
7 | <div class="panel-body"> |
|
7 | <div class="panel-body"> | |
8 | ${h.secure_form(h.route_path('edit_user_group_perms_update', user_group_id=c.user_group.users_group_id), request=request)} |
|
8 | ${h.secure_form(h.route_path('edit_user_group_perms_update', user_group_id=c.user_group.users_group_id), request=request)} | |
9 | <table id="permissions_manage" class="rctable permissions"> |
|
9 | <table id="permissions_manage" class="rctable permissions"> | |
10 | <tr> |
|
10 | <tr> | |
11 | <th class="td-radio">${_('None')}</th> |
|
11 | <th class="td-radio">${_('None')}</th> | |
12 | <th class="td-radio">${_('Read')}</th> |
|
12 | <th class="td-radio">${_('Read')}</th> | |
13 | <th class="td-radio">${_('Write')}</th> |
|
13 | <th class="td-radio">${_('Write')}</th> | |
14 | <th class="td-radio">${_('Admin')}</th> |
|
14 | <th class="td-radio">${_('Admin')}</th> | |
15 | <th>${_('User/User Group')}</th> |
|
15 | <th>${_('User/User Group')}</th> | |
16 | <th class="td-action"></th> |
|
16 | <th class="td-action"></th> | |
17 | <th class="td-action"></th> |
|
17 | <th class="td-action"></th> | |
18 | </tr> |
|
18 | </tr> | |
19 | ## USERS |
|
19 | ## USERS | |
20 | %for _user in c.user_group.permissions(): |
|
20 | %for _user in c.user_group.permissions(): | |
21 | ## super admin/owner row |
|
21 | ## super admin/owner row | |
22 | %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None): |
|
22 | %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None): | |
23 | <tr class="perm_admin_row"> |
|
23 | <tr class="perm_admin_row"> | |
24 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td> |
|
24 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td> | |
25 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td> |
|
25 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td> | |
26 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td> |
|
26 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td> | |
27 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td> |
|
27 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td> | |
28 | <td class="td-user"> |
|
28 | <td class="td-user"> | |
29 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} |
|
29 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} | |
30 | <span class="user"> |
|
30 | <span class="user"> | |
31 | ${h.link_to_user(_user.username)} |
|
31 | ${h.link_to_user(_user.username)} | |
32 | %if getattr(_user, 'admin_row', None): |
|
32 | %if getattr(_user, 'admin_row', None): | |
33 |
(${_('super |
|
33 | (${_('super-admin')}) | |
34 | %endif |
|
34 | %endif | |
35 | %if getattr(_user, 'owner_row', None): |
|
35 | %if getattr(_user, 'owner_row', None): | |
36 | (${_('owner')}) |
|
36 | (${_('owner')}) | |
37 | %endif |
|
37 | %endif | |
38 | </span> |
|
38 | </span> | |
39 | </td> |
|
39 | </td> | |
40 | <td></td> |
|
40 | <td></td> | |
41 | <td class="quick_repo_menu"> |
|
41 | <td class="quick_repo_menu"> | |
42 | % if c.rhodecode_user.is_admin: |
|
42 | % if c.rhodecode_user.is_admin: | |
43 | <i class="icon-more"></i> |
|
43 | <i class="icon-more"></i> | |
44 | <div class="menu_items_container" style="display: none;"> |
|
44 | <div class="menu_items_container" style="display: none;"> | |
45 | <ul class="menu_items"> |
|
45 | <ul class="menu_items"> | |
46 | <li> |
|
46 | <li> | |
47 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))} |
|
47 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))} | |
48 | </li> |
|
48 | </li> | |
49 | </ul> |
|
49 | </ul> | |
50 | </div> |
|
50 | </div> | |
51 | % endif |
|
51 | % endif | |
52 | </td> |
|
52 | </td> | |
53 | </tr> |
|
53 | </tr> | |
54 | %else: |
|
54 | %else: | |
55 | ##forbid revoking permission from yourself, except if you're an super admin |
|
55 | ##forbid revoking permission from yourself, except if you're an super admin | |
56 | <tr> |
|
56 | <tr> | |
57 | %if c.rhodecode_user.user_id != _user.user_id or c.rhodecode_user.is_admin: |
|
57 | %if c.rhodecode_user.user_id != _user.user_id or c.rhodecode_user.is_admin: | |
58 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.none')}</td> |
|
58 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.none')}</td> | |
59 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.read')}</td> |
|
59 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.read')}</td> | |
60 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.write')}</td> |
|
60 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.write')}</td> | |
61 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.admin')}</td> |
|
61 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.admin')}</td> | |
62 | <td class="td-user"> |
|
62 | <td class="td-user"> | |
63 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} |
|
63 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} | |
64 | <span class="user"> |
|
64 | <span class="user"> | |
65 | % if _user.username == h.DEFAULT_USER: |
|
65 | % if _user.username == h.DEFAULT_USER: | |
66 | ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span> |
|
66 | ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span> | |
67 | % else: |
|
67 | % else: | |
68 | ${h.link_to_user(_user.username)} |
|
68 | ${h.link_to_user(_user.username)} | |
69 | %if getattr(_user, 'duplicate_perm', None): |
|
69 | %if getattr(_user, 'duplicate_perm', None): | |
70 | (${_('inactive duplicate')}) |
|
70 | (${_('inactive duplicate')}) | |
71 | %endif |
|
71 | %endif | |
72 | % endif |
|
72 | % endif | |
73 | </span> |
|
73 | </span> | |
74 | </td> |
|
74 | </td> | |
75 | <td class="td-action"> |
|
75 | <td class="td-action"> | |
76 | %if _user.username != h.DEFAULT_USER: |
|
76 | %if _user.username != h.DEFAULT_USER: | |
77 | <span class="btn btn-link btn-danger revoke_perm" |
|
77 | <span class="btn btn-link btn-danger revoke_perm" | |
78 | member="${_user.user_id}" member_type="user"> |
|
78 | member="${_user.user_id}" member_type="user"> | |
79 | ${_('Remove')} |
|
79 | ${_('Remove')} | |
80 | </span> |
|
80 | </span> | |
81 | %endif |
|
81 | %endif | |
82 | </td> |
|
82 | </td> | |
83 | <td class="quick_repo_menu"> |
|
83 | <td class="quick_repo_menu"> | |
84 | % if c.rhodecode_user.is_admin: |
|
84 | % if c.rhodecode_user.is_admin: | |
85 | <i class="icon-more"></i> |
|
85 | <i class="icon-more"></i> | |
86 | <div class="menu_items_container" style="display: none;"> |
|
86 | <div class="menu_items_container" style="display: none;"> | |
87 | <ul class="menu_items"> |
|
87 | <ul class="menu_items"> | |
88 | <li> |
|
88 | <li> | |
89 | % if _user.username == h.DEFAULT_USER: |
|
89 | % if _user.username == h.DEFAULT_USER: | |
90 | ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='user-groups-permissions'))} |
|
90 | ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='user-groups-permissions'))} | |
91 | % else: |
|
91 | % else: | |
92 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))} |
|
92 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))} | |
93 | % endif |
|
93 | % endif | |
94 | </li> |
|
94 | </li> | |
95 | </ul> |
|
95 | </ul> | |
96 | </div> |
|
96 | </div> | |
97 | % endif |
|
97 | % endif | |
98 | </td> |
|
98 | </td> | |
99 | %else: |
|
99 | %else: | |
100 | ## special case for currently logged-in user permissions, we make sure he cannot take his own permissions |
|
100 | ## special case for currently logged-in user permissions, we make sure he cannot take his own permissions | |
101 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.none', disabled="disabled")}</td> |
|
101 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.none', disabled="disabled")}</td> | |
102 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.read', disabled="disabled")}</td> |
|
102 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.read', disabled="disabled")}</td> | |
103 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.write', disabled="disabled")}</td> |
|
103 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.write', disabled="disabled")}</td> | |
104 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.admin', disabled="disabled")}</td> |
|
104 | <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.admin', disabled="disabled")}</td> | |
105 | <td class="td-user"> |
|
105 | <td class="td-user"> | |
106 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} |
|
106 | ${base.gravatar(_user.email, 16, user=_user, tooltip=True)} | |
107 | <span class="user"> |
|
107 | <span class="user"> | |
108 | % if _user.username == h.DEFAULT_USER: |
|
108 | % if _user.username == h.DEFAULT_USER: | |
109 | ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span> |
|
109 | ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span> | |
110 | % else: |
|
110 | % else: | |
111 | ${h.link_to_user(_user.username)} |
|
111 | ${h.link_to_user(_user.username)} | |
112 | %if getattr(_user, 'duplicate_perm', None): |
|
112 | %if getattr(_user, 'duplicate_perm', None): | |
113 | (${_('inactive duplicate')}) |
|
113 | (${_('inactive duplicate')}) | |
114 | %endif |
|
114 | %endif | |
115 | % endif |
|
115 | % endif | |
116 | <span class="user-perm-help-text">(${_('delegated admin')})</span> |
|
116 | <span class="user-perm-help-text">(${_('delegated admin')})</span> | |
117 | </span> |
|
117 | </span> | |
118 | </td> |
|
118 | </td> | |
119 | <td></td> |
|
119 | <td></td> | |
120 | <td class="quick_repo_menu"> |
|
120 | <td class="quick_repo_menu"> | |
121 | % if c.rhodecode_user.is_admin: |
|
121 | % if c.rhodecode_user.is_admin: | |
122 | <i class="icon-more"></i> |
|
122 | <i class="icon-more"></i> | |
123 | <div class="menu_items_container" style="display: none;"> |
|
123 | <div class="menu_items_container" style="display: none;"> | |
124 | <ul class="menu_items"> |
|
124 | <ul class="menu_items"> | |
125 | <li> |
|
125 | <li> | |
126 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))} |
|
126 | ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))} | |
127 | </li> |
|
127 | </li> | |
128 | </ul> |
|
128 | </ul> | |
129 | </div> |
|
129 | </div> | |
130 | % endif |
|
130 | % endif | |
131 | </td> |
|
131 | </td> | |
132 | %endif |
|
132 | %endif | |
133 | </tr> |
|
133 | </tr> | |
134 | %endif |
|
134 | %endif | |
135 | %endfor |
|
135 | %endfor | |
136 |
|
136 | |||
137 | ## USER GROUPS |
|
137 | ## USER GROUPS | |
138 | %for _user_group in c.user_group.permission_user_groups(with_members=True): |
|
138 | %for _user_group in c.user_group.permission_user_groups(with_members=True): | |
139 | <tr> |
|
139 | <tr> | |
140 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.none')}</td> |
|
140 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.none')}</td> | |
141 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.read')}</td> |
|
141 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.read')}</td> | |
142 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.write')}</td> |
|
142 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.write')}</td> | |
143 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.admin')}</td> |
|
143 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.admin')}</td> | |
144 | <td class="td-user"> |
|
144 | <td class="td-user"> | |
145 | <i class="icon-user-group"></i> |
|
145 | <i class="icon-user-group"></i> | |
146 | %if c.is_super_admin: |
|
146 | %if c.is_super_admin: | |
147 | <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}"> |
|
147 | <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}"> | |
148 | ${_user_group.users_group_name} |
|
148 | ${_user_group.users_group_name} | |
149 | </a> |
|
149 | </a> | |
150 | %else: |
|
150 | %else: | |
151 | ${h.link_to_group(_user_group.users_group_name)} |
|
151 | ${h.link_to_group(_user_group.users_group_name)} | |
152 | %endif |
|
152 | %endif | |
153 | (${_('members')}: ${len(_user_group.members)}) |
|
153 | (${_('members')}: ${len(_user_group.members)}) | |
154 | </td> |
|
154 | </td> | |
155 | <td class="td-action"> |
|
155 | <td class="td-action"> | |
156 | <span class="btn btn-link btn-danger revoke_perm" |
|
156 | <span class="btn btn-link btn-danger revoke_perm" | |
157 | member="${_user_group.users_group_id}" member_type="user_group"> |
|
157 | member="${_user_group.users_group_id}" member_type="user_group"> | |
158 | ${_('Remove')} |
|
158 | ${_('Remove')} | |
159 | </span> |
|
159 | </span> | |
160 | </td> |
|
160 | </td> | |
161 | <td class="quick_repo_menu"> |
|
161 | <td class="quick_repo_menu"> | |
162 | % if c.rhodecode_user.is_admin: |
|
162 | % if c.rhodecode_user.is_admin: | |
163 | <i class="icon-more"></i> |
|
163 | <i class="icon-more"></i> | |
164 | <div class="menu_items_container" style="display: none;"> |
|
164 | <div class="menu_items_container" style="display: none;"> | |
165 | <ul class="menu_items"> |
|
165 | <ul class="menu_items"> | |
166 | <li> |
|
166 | <li> | |
167 | ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='user-groups-permissions'))} |
|
167 | ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='user-groups-permissions'))} | |
168 | </li> |
|
168 | </li> | |
169 | </ul> |
|
169 | </ul> | |
170 | </div> |
|
170 | </div> | |
171 | % endif |
|
171 | % endif | |
172 | </td> |
|
172 | </td> | |
173 | </tr> |
|
173 | </tr> | |
174 | %endfor |
|
174 | %endfor | |
175 | <tr class="new_members" id="add_perm_input"></tr> |
|
175 | <tr class="new_members" id="add_perm_input"></tr> | |
176 | <tr> |
|
176 | <tr> | |
177 | <td></td> |
|
177 | <td></td> | |
178 | <td></td> |
|
178 | <td></td> | |
179 | <td></td> |
|
179 | <td></td> | |
180 | <td></td> |
|
180 | <td></td> | |
181 | <td></td> |
|
181 | <td></td> | |
182 | <td> |
|
182 | <td> | |
183 | <span id="add_perm" class="link"> |
|
183 | <span id="add_perm" class="link"> | |
184 | ${_('Add user/user group')} |
|
184 | ${_('Add user/user group')} | |
185 | </span> |
|
185 | </span> | |
186 | </td> |
|
186 | </td> | |
187 | <td></td> |
|
187 | <td></td> | |
188 | </tr> |
|
188 | </tr> | |
189 | </table> |
|
189 | </table> | |
190 |
|
190 | |||
191 | <div class="buttons"> |
|
191 | <div class="buttons"> | |
192 | ${h.submit('save',_('Save'),class_="btn btn-primary")} |
|
192 | ${h.submit('save',_('Save'),class_="btn btn-primary")} | |
193 | ${h.reset('reset',_('Reset'),class_="btn btn-danger")} |
|
193 | ${h.reset('reset',_('Reset'),class_="btn btn-danger")} | |
194 | </div> |
|
194 | </div> | |
195 | ${h.end_form()} |
|
195 | ${h.end_form()} | |
196 | </div> |
|
196 | </div> | |
197 | </div> |
|
197 | </div> | |
198 |
|
198 | |||
199 | <script type="text/javascript"> |
|
199 | <script type="text/javascript"> | |
200 | $('#add_perm').on('click', function(e){ |
|
200 | $('#add_perm').on('click', function(e){ | |
201 | addNewPermInput($(this), 'usergroup'); |
|
201 | addNewPermInput($(this), 'usergroup'); | |
202 | }); |
|
202 | }); | |
203 | $('.revoke_perm').on('click', function(e){ |
|
203 | $('.revoke_perm').on('click', function(e){ | |
204 | markRevokePermInput($(this), 'usergroup'); |
|
204 | markRevokePermInput($(this), 'usergroup'); | |
205 | }); |
|
205 | }); | |
206 | quick_repo_menu() |
|
206 | quick_repo_menu() | |
207 | </script> |
|
207 | </script> |
@@ -1,161 +1,161 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <div class="panel panel-default user-profile"> |
|
3 | <div class="panel panel-default user-profile"> | |
4 | <div class="panel-heading"> |
|
4 | <div class="panel-heading"> | |
5 | <h3 class="panel-title">${_('User Profile')}</h3> |
|
5 | <h3 class="panel-title">${_('User Profile')}</h3> | |
6 | </div> |
|
6 | </div> | |
7 | <div class="panel-body"> |
|
7 | <div class="panel-body"> | |
8 | <div class="user-profile-content"> |
|
8 | <div class="user-profile-content"> | |
9 | ${h.secure_form(h.route_path('user_update', user_id=c.user.user_id), class_='form', request=request)} |
|
9 | ${h.secure_form(h.route_path('user_update', user_id=c.user.user_id), class_='form', request=request)} | |
10 | <% readonly = None %> |
|
10 | <% readonly = None %> | |
11 | <% disabled = "" %> |
|
11 | <% disabled = "" %> | |
12 | %if c.extern_type != 'rhodecode': |
|
12 | %if c.extern_type != 'rhodecode': | |
13 | <% readonly = "readonly" %> |
|
13 | <% readonly = "readonly" %> | |
14 | <% disabled = " disabled" %> |
|
14 | <% disabled = " disabled" %> | |
15 | <div class="alert-warning" style="margin:0px 0px 20px 0px; padding: 10px"> |
|
15 | <div class="alert-warning" style="margin:0px 0px 20px 0px; padding: 10px"> | |
16 | <strong>${_('This user was created from external source (%s). Editing some of the settings is limited.' % c.extern_type)}</strong> |
|
16 | <strong>${_('This user was created from external source (%s). Editing some of the settings is limited.' % c.extern_type)}</strong> | |
17 | </div> |
|
17 | </div> | |
18 | %endif |
|
18 | %endif | |
19 | <div class="form"> |
|
19 | <div class="form"> | |
20 | <div class="fields"> |
|
20 | <div class="fields"> | |
21 | <div class="field"> |
|
21 | <div class="field"> | |
22 | <div class="label photo"> |
|
22 | <div class="label photo"> | |
23 | ${_('Photo')}: |
|
23 | ${_('Photo')}: | |
24 | </div> |
|
24 | </div> | |
25 | <div class="input profile"> |
|
25 | <div class="input profile"> | |
26 | %if c.visual.use_gravatar: |
|
26 | %if c.visual.use_gravatar: | |
27 | ${base.gravatar(c.user.email, 100)} |
|
27 | ${base.gravatar(c.user.email, 100)} | |
28 | <p class="help-block">${_('Change the avatar at')} <a href="http://gravatar.com">gravatar.com</a>.</p> |
|
28 | <p class="help-block">${_('Change the avatar at')} <a href="http://gravatar.com">gravatar.com</a>.</p> | |
29 | %else: |
|
29 | %else: | |
30 | ${base.gravatar(c.user.email, 100)} |
|
30 | ${base.gravatar(c.user.email, 100)} | |
31 | %endif |
|
31 | %endif | |
32 | </div> |
|
32 | </div> | |
33 | </div> |
|
33 | </div> | |
34 | <div class="field"> |
|
34 | <div class="field"> | |
35 | <div class="label"> |
|
35 | <div class="label"> | |
36 | ${_('Username')}: |
|
36 | ${_('Username')}: | |
37 | </div> |
|
37 | </div> | |
38 | <div class="input"> |
|
38 | <div class="input"> | |
39 | ${h.text('username', class_='%s medium' % disabled, readonly=readonly)} |
|
39 | ${h.text('username', class_='%s medium' % disabled, readonly=readonly)} | |
40 | </div> |
|
40 | </div> | |
41 | </div> |
|
41 | </div> | |
42 | <div class="field"> |
|
42 | <div class="field"> | |
43 | <div class="label"> |
|
43 | <div class="label"> | |
44 | <label for="name">${_('First Name')}:</label> |
|
44 | <label for="name">${_('First Name')}:</label> | |
45 | </div> |
|
45 | </div> | |
46 | <div class="input"> |
|
46 | <div class="input"> | |
47 | ${h.text('firstname', class_="medium")} |
|
47 | ${h.text('firstname', class_="medium")} | |
48 | </div> |
|
48 | </div> | |
49 | </div> |
|
49 | </div> | |
50 |
|
50 | |||
51 | <div class="field"> |
|
51 | <div class="field"> | |
52 | <div class="label"> |
|
52 | <div class="label"> | |
53 | <label for="lastname">${_('Last Name')}:</label> |
|
53 | <label for="lastname">${_('Last Name')}:</label> | |
54 | </div> |
|
54 | </div> | |
55 | <div class="input"> |
|
55 | <div class="input"> | |
56 | ${h.text('lastname', class_="medium")} |
|
56 | ${h.text('lastname', class_="medium")} | |
57 | </div> |
|
57 | </div> | |
58 | </div> |
|
58 | </div> | |
59 |
|
59 | |||
60 | <div class="field"> |
|
60 | <div class="field"> | |
61 | <div class="label"> |
|
61 | <div class="label"> | |
62 | <label for="email">${_('Email')}:</label> |
|
62 | <label for="email">${_('Email')}:</label> | |
63 | </div> |
|
63 | </div> | |
64 | <div class="input"> |
|
64 | <div class="input"> | |
65 | ## we should be able to edit email ! |
|
65 | ## we should be able to edit email ! | |
66 | ${h.text('email', class_="medium")} |
|
66 | ${h.text('email', class_="medium")} | |
67 | </div> |
|
67 | </div> | |
68 | </div> |
|
68 | </div> | |
69 | <div class="field"> |
|
69 | <div class="field"> | |
70 | <div class="label"> |
|
70 | <div class="label"> | |
71 | <label for="description">${_('Description')}:</label> |
|
71 | <label for="description">${_('Description')}:</label> | |
72 | </div> |
|
72 | </div> | |
73 | <div class="input textarea editor"> |
|
73 | <div class="input textarea editor"> | |
74 | ${h.textarea('description', rows=10, class_="medium")} |
|
74 | ${h.textarea('description', rows=10, class_="medium")} | |
75 | <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %> |
|
75 | <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %> | |
76 | <span class="help-block">${_('Plain text format with support of {metatags}. Add a README file for longer descriptions').format(metatags=metatags_url)|n}</span> |
|
76 | <span class="help-block">${_('Plain text format with support of {metatags}. Add a README file for longer descriptions').format(metatags=metatags_url)|n}</span> | |
77 | <span id="meta-tags-desc" style="display: none"> |
|
77 | <span id="meta-tags-desc" style="display: none"> | |
78 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
78 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> | |
79 | ${dt.metatags_help()} |
|
79 | ${dt.metatags_help()} | |
80 | </span> |
|
80 | </span> | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label"> |
|
84 | <div class="label"> | |
85 | ${_('New Password')}: |
|
85 | ${_('New Password')}: | |
86 | </div> |
|
86 | </div> | |
87 | <div class="input"> |
|
87 | <div class="input"> | |
88 | ${h.password('new_password',class_='%s medium' % disabled,autocomplete="off",readonly=readonly)} |
|
88 | ${h.password('new_password',class_='%s medium' % disabled,autocomplete="off",readonly=readonly)} | |
89 | </div> |
|
89 | </div> | |
90 | </div> |
|
90 | </div> | |
91 | <div class="field"> |
|
91 | <div class="field"> | |
92 | <div class="label"> |
|
92 | <div class="label"> | |
93 | ${_('New Password Confirmation')}: |
|
93 | ${_('New Password Confirmation')}: | |
94 | </div> |
|
94 | </div> | |
95 | <div class="input"> |
|
95 | <div class="input"> | |
96 | ${h.password('password_confirmation',class_="%s medium" % disabled,autocomplete="off",readonly=readonly)} |
|
96 | ${h.password('password_confirmation',class_="%s medium" % disabled,autocomplete="off",readonly=readonly)} | |
97 | </div> |
|
97 | </div> | |
98 | </div> |
|
98 | </div> | |
99 | <div class="field"> |
|
99 | <div class="field"> | |
100 | <div class="label-text"> |
|
100 | <div class="label-text"> | |
101 | ${_('Active')}: |
|
101 | ${_('Active')}: | |
102 | </div> |
|
102 | </div> | |
103 | <div class="input user-checkbox"> |
|
103 | <div class="input user-checkbox"> | |
104 | ${h.checkbox('active',value=True)} |
|
104 | ${h.checkbox('active',value=True)} | |
105 | </div> |
|
105 | </div> | |
106 | </div> |
|
106 | </div> | |
107 | <div class="field"> |
|
107 | <div class="field"> | |
108 | <div class="label-text"> |
|
108 | <div class="label-text"> | |
109 |
${_('Super |
|
109 | ${_('Super-admin')}: | |
110 | </div> |
|
110 | </div> | |
111 | <div class="input user-checkbox"> |
|
111 | <div class="input user-checkbox"> | |
112 | ${h.checkbox('admin',value=True)} |
|
112 | ${h.checkbox('admin',value=True)} | |
113 | </div> |
|
113 | </div> | |
114 | </div> |
|
114 | </div> | |
115 | <div class="field"> |
|
115 | <div class="field"> | |
116 | <div class="label-text"> |
|
116 | <div class="label-text"> | |
117 | ${_('Authentication type')}: |
|
117 | ${_('Authentication type')}: | |
118 | </div> |
|
118 | </div> | |
119 | <div class="input"> |
|
119 | <div class="input"> | |
120 | ${h.select('extern_type', c.extern_type, c.allowed_extern_types)} |
|
120 | ${h.select('extern_type', c.extern_type, c.allowed_extern_types)} | |
121 | <p class="help-block">${_('When user was created using an external source. He is bound to authentication using this method.')}</p> |
|
121 | <p class="help-block">${_('When user was created using an external source. He is bound to authentication using this method.')}</p> | |
122 | </div> |
|
122 | </div> | |
123 | </div> |
|
123 | </div> | |
124 | <div class="field"> |
|
124 | <div class="field"> | |
125 | <div class="label-text"> |
|
125 | <div class="label-text"> | |
126 | ${_('Name in Source of Record')}: |
|
126 | ${_('Name in Source of Record')}: | |
127 | </div> |
|
127 | </div> | |
128 | <div class="input"> |
|
128 | <div class="input"> | |
129 | <p>${c.extern_name}</p> |
|
129 | <p>${c.extern_name}</p> | |
130 | ${h.hidden('extern_name', readonly="readonly")} |
|
130 | ${h.hidden('extern_name', readonly="readonly")} | |
131 | </div> |
|
131 | </div> | |
132 | </div> |
|
132 | </div> | |
133 | <div class="field"> |
|
133 | <div class="field"> | |
134 | <div class="label"> |
|
134 | <div class="label"> | |
135 | ${_('Language')}: |
|
135 | ${_('Language')}: | |
136 | </div> |
|
136 | </div> | |
137 | <div class="input"> |
|
137 | <div class="input"> | |
138 | ## allowed_languages is defined in the users.py |
|
138 | ## allowed_languages is defined in the users.py | |
139 | ## c.language comes from base.py as a default language |
|
139 | ## c.language comes from base.py as a default language | |
140 | ${h.select('language', c.language, c.allowed_languages)} |
|
140 | ${h.select('language', c.language, c.allowed_languages)} | |
141 | <p class="help-block">${h.literal(_('User interface language. Help translate %(rc_link)s into your language.') % {'rc_link': h.link_to('RhodeCode Enterprise', h.route_url('rhodecode_translations'))})}</p> |
|
141 | <p class="help-block">${h.literal(_('User interface language. Help translate %(rc_link)s into your language.') % {'rc_link': h.link_to('RhodeCode Enterprise', h.route_url('rhodecode_translations'))})}</p> | |
142 | </div> |
|
142 | </div> | |
143 | </div> |
|
143 | </div> | |
144 | <div class="buttons"> |
|
144 | <div class="buttons"> | |
145 | ${h.submit('save', _('Save'), class_="btn")} |
|
145 | ${h.submit('save', _('Save'), class_="btn")} | |
146 | ${h.reset('reset', _('Reset'), class_="btn")} |
|
146 | ${h.reset('reset', _('Reset'), class_="btn")} | |
147 | </div> |
|
147 | </div> | |
148 | </div> |
|
148 | </div> | |
149 | </div> |
|
149 | </div> | |
150 | ${h.end_form()} |
|
150 | ${h.end_form()} | |
151 | </div> |
|
151 | </div> | |
152 | </div> |
|
152 | </div> | |
153 | </div> |
|
153 | </div> | |
154 |
|
154 | |||
155 | <script> |
|
155 | <script> | |
156 | $('#language').select2({ |
|
156 | $('#language').select2({ | |
157 | 'containerCssClass': "drop-menu", |
|
157 | 'containerCssClass': "drop-menu", | |
158 | 'dropdownCssClass': "drop-menu-dropdown", |
|
158 | 'dropdownCssClass': "drop-menu-dropdown", | |
159 | 'dropdownAutoWidth': true |
|
159 | 'dropdownAutoWidth': true | |
160 | }); |
|
160 | }); | |
161 | </script> |
|
161 | </script> |
@@ -1,126 +1,126 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.mako"/> |
|
2 | <%inherit file="/base/base.mako"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Users administration')} |
|
5 | ${_('Users administration')} | |
6 | %if c.rhodecode_name: |
|
6 | %if c.rhodecode_name: | |
7 | · ${h.branding(c.rhodecode_name)} |
|
7 | · ${h.branding(c.rhodecode_name)} | |
8 | %endif |
|
8 | %endif | |
9 | </%def> |
|
9 | </%def> | |
10 |
|
10 | |||
11 | <%def name="breadcrumbs_links()"></%def> |
|
11 | <%def name="breadcrumbs_links()"></%def> | |
12 |
|
12 | |||
13 | <%def name="menu_bar_nav()"> |
|
13 | <%def name="menu_bar_nav()"> | |
14 | ${self.menu_items(active='admin')} |
|
14 | ${self.menu_items(active='admin')} | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 | <%def name="menu_bar_subnav()"> |
|
17 | <%def name="menu_bar_subnav()"> | |
18 | ${self.admin_menu(active='users')} |
|
18 | ${self.admin_menu(active='users')} | |
19 | </%def> |
|
19 | </%def> | |
20 |
|
20 | |||
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 |
|
22 | |||
23 | <div class="box"> |
|
23 | <div class="box"> | |
24 |
|
24 | |||
25 | <div class="title"> |
|
25 | <div class="title"> | |
26 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/> |
|
26 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/> | |
27 | <span id="user_count">0</span> |
|
27 | <span id="user_count">0</span> | |
28 |
|
28 | |||
29 | <ul class="links"> |
|
29 | <ul class="links"> | |
30 | <li> |
|
30 | <li> | |
31 | <a href="${h.route_path('users_new')}" class="btn btn-small btn-success">${_(u'Add User')}</a> |
|
31 | <a href="${h.route_path('users_new')}" class="btn btn-small btn-success">${_(u'Add User')}</a> | |
32 | </li> |
|
32 | </li> | |
33 | </ul> |
|
33 | </ul> | |
34 | </div> |
|
34 | </div> | |
35 |
|
35 | |||
36 | <div id="repos_list_wrap"> |
|
36 | <div id="repos_list_wrap"> | |
37 | <table id="user_list_table" class="display"></table> |
|
37 | <table id="user_list_table" class="display"></table> | |
38 | </div> |
|
38 | </div> | |
39 | </div> |
|
39 | </div> | |
40 |
|
40 | |||
41 | <script type="text/javascript"> |
|
41 | <script type="text/javascript"> | |
42 |
|
42 | |||
43 | $(document).ready(function() { |
|
43 | $(document).ready(function() { | |
44 | var $userListTable = $('#user_list_table'); |
|
44 | var $userListTable = $('#user_list_table'); | |
45 | // user list |
|
45 | // user list | |
46 | $userListTable.DataTable({ |
|
46 | $userListTable.DataTable({ | |
47 | processing: true, |
|
47 | processing: true, | |
48 | serverSide: true, |
|
48 | serverSide: true, | |
49 | ajax: { |
|
49 | ajax: { | |
50 | "url": "${h.route_path('users_data')}", |
|
50 | "url": "${h.route_path('users_data')}", | |
51 | "dataSrc": function ( json ) { |
|
51 | "dataSrc": function ( json ) { | |
52 | var filteredCount = json.recordsFiltered; |
|
52 | var filteredCount = json.recordsFiltered; | |
53 | var filteredInactiveCount = json.recordsFilteredInactive; |
|
53 | var filteredInactiveCount = json.recordsFilteredInactive; | |
54 | var totalInactive = json.recordsTotalInactive; |
|
54 | var totalInactive = json.recordsTotalInactive; | |
55 | var total = json.recordsTotal; |
|
55 | var total = json.recordsTotal; | |
56 |
|
56 | |||
57 | var _text = _gettext( |
|
57 | var _text = _gettext( | |
58 | "{0} ({1} inactive) of {2} users ({3} inactive)").format( |
|
58 | "{0} ({1} inactive) of {2} users ({3} inactive)").format( | |
59 | filteredCount, filteredInactiveCount, total, totalInactive); |
|
59 | filteredCount, filteredInactiveCount, total, totalInactive); | |
60 |
|
60 | |||
61 | if(total === filteredCount){ |
|
61 | if(total === filteredCount){ | |
62 | _text = _gettext( |
|
62 | _text = _gettext( | |
63 | "{0} users ({1} inactive)").format(total, totalInactive); |
|
63 | "{0} users ({1} inactive)").format(total, totalInactive); | |
64 | } |
|
64 | } | |
65 | $('#user_count').text(_text); |
|
65 | $('#user_count').text(_text); | |
66 | return json.data; |
|
66 | return json.data; | |
67 | } |
|
67 | } | |
68 | }, |
|
68 | }, | |
69 | dom: 'rtp', |
|
69 | dom: 'rtp', | |
70 | pageLength: ${c.visual.admin_grid_items}, |
|
70 | pageLength: ${c.visual.admin_grid_items}, | |
71 | order: [[ 0, "asc" ]], |
|
71 | order: [[ 0, "asc" ]], | |
72 | columns: [ |
|
72 | columns: [ | |
73 | { data: {"_": "username", |
|
73 | { data: {"_": "username", | |
74 | "sort": "username"}, title: "${_('Username')}", className: "td-user" }, |
|
74 | "sort": "username"}, title: "${_('Username')}", className: "td-user" }, | |
75 | { data: {"_": "email", |
|
75 | { data: {"_": "email", | |
76 | "sort": "email"}, title: "${_('Email')}", className: "td-email" }, |
|
76 | "sort": "email"}, title: "${_('Email')}", className: "td-email" }, | |
77 | { data: {"_": "first_name", |
|
77 | { data: {"_": "first_name", | |
78 | "sort": "first_name"}, title: "${_('First Name')}", className: "td-user" }, |
|
78 | "sort": "first_name"}, title: "${_('First Name')}", className: "td-user" }, | |
79 | { data: {"_": "last_name", |
|
79 | { data: {"_": "last_name", | |
80 | "sort": "last_name"}, title: "${_('Last Name')}", className: "td-user" }, |
|
80 | "sort": "last_name"}, title: "${_('Last Name')}", className: "td-user" }, | |
81 | { data: {"_": "last_activity", |
|
81 | { data: {"_": "last_activity", | |
82 | "sort": "last_activity", |
|
82 | "sort": "last_activity", | |
83 | "type": Number}, title: "${_('Last activity')}", className: "td-time" }, |
|
83 | "type": Number}, title: "${_('Last activity')}", className: "td-time" }, | |
84 | { data: {"_": "active", |
|
84 | { data: {"_": "active", | |
85 | "sort": "active"}, title: "${_('Active')}", className: "td-active" }, |
|
85 | "sort": "active"}, title: "${_('Active')}", className: "td-active" }, | |
86 | { data: {"_": "admin", |
|
86 | { data: {"_": "admin", | |
87 |
"sort": "admin"}, title: "${_('Super |
|
87 | "sort": "admin"}, title: "${_('Super-admin')}", className: "td-admin" }, | |
88 | { data: {"_": "extern_type", |
|
88 | { data: {"_": "extern_type", | |
89 | "sort": "extern_type"}, title: "${_('Auth type')}", className: "td-type" }, |
|
89 | "sort": "extern_type"}, title: "${_('Auth type')}", className: "td-type" }, | |
90 | { data: {"_": "action", |
|
90 | { data: {"_": "action", | |
91 | "sort": "action"}, title: "${_('Action')}", className: "td-action", orderable: false } |
|
91 | "sort": "action"}, title: "${_('Action')}", className: "td-action", orderable: false } | |
92 | ], |
|
92 | ], | |
93 | language: { |
|
93 | language: { | |
94 | paginate: DEFAULT_GRID_PAGINATION, |
|
94 | paginate: DEFAULT_GRID_PAGINATION, | |
95 | sProcessing: _gettext('loading...'), |
|
95 | sProcessing: _gettext('loading...'), | |
96 | emptyTable: _gettext("No users available yet.") |
|
96 | emptyTable: _gettext("No users available yet.") | |
97 | }, |
|
97 | }, | |
98 |
|
98 | |||
99 | "createdRow": function ( row, data, index ) { |
|
99 | "createdRow": function ( row, data, index ) { | |
100 | if (!data['active_raw']){ |
|
100 | if (!data['active_raw']){ | |
101 | $(row).addClass('closed') |
|
101 | $(row).addClass('closed') | |
102 | } |
|
102 | } | |
103 | } |
|
103 | } | |
104 | }); |
|
104 | }); | |
105 |
|
105 | |||
106 | $userListTable.on('xhr.dt', function(e, settings, json, xhr){ |
|
106 | $userListTable.on('xhr.dt', function(e, settings, json, xhr){ | |
107 | $userListTable.css('opacity', 1); |
|
107 | $userListTable.css('opacity', 1); | |
108 | }); |
|
108 | }); | |
109 |
|
109 | |||
110 | $userListTable.on('preXhr.dt', function(e, settings, data){ |
|
110 | $userListTable.on('preXhr.dt', function(e, settings, data){ | |
111 | $userListTable.css('opacity', 0.3); |
|
111 | $userListTable.css('opacity', 0.3); | |
112 | }); |
|
112 | }); | |
113 |
|
113 | |||
114 | // filter |
|
114 | // filter | |
115 | $('#q_filter').on('keyup', |
|
115 | $('#q_filter').on('keyup', | |
116 | $.debounce(250, function() { |
|
116 | $.debounce(250, function() { | |
117 | $userListTable.DataTable().search( |
|
117 | $userListTable.DataTable().search( | |
118 | $('#q_filter').val() |
|
118 | $('#q_filter').val() | |
119 | ).draw(); |
|
119 | ).draw(); | |
120 | }) |
|
120 | }) | |
121 | ); |
|
121 | ); | |
122 |
|
122 | |||
123 | }); |
|
123 | }); | |
124 | </script> |
|
124 | </script> | |
125 |
|
125 | |||
126 | </%def> |
|
126 | </%def> |
@@ -1,1139 +1,1139 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | <%! |
|
3 | <%! | |
4 | ## base64 filter e.g ${ example | base64 } |
|
4 | ## base64 filter e.g ${ example | base64 } | |
5 | def base64(text): |
|
5 | def base64(text): | |
6 | import base64 |
|
6 | import base64 | |
7 | from rhodecode.lib.helpers import safe_str |
|
7 | from rhodecode.lib.helpers import safe_str | |
8 | return base64.encodestring(safe_str(text)) |
|
8 | return base64.encodestring(safe_str(text)) | |
9 | %> |
|
9 | %> | |
10 |
|
10 | |||
11 | <%inherit file="root.mako"/> |
|
11 | <%inherit file="root.mako"/> | |
12 |
|
12 | |||
13 | <%include file="/ejs_templates/templates.html"/> |
|
13 | <%include file="/ejs_templates/templates.html"/> | |
14 |
|
14 | |||
15 | <div class="outerwrapper"> |
|
15 | <div class="outerwrapper"> | |
16 | <!-- HEADER --> |
|
16 | <!-- HEADER --> | |
17 | <div class="header"> |
|
17 | <div class="header"> | |
18 | <div id="header-inner" class="wrapper"> |
|
18 | <div id="header-inner" class="wrapper"> | |
19 | <div id="logo"> |
|
19 | <div id="logo"> | |
20 | <div class="logo-wrapper"> |
|
20 | <div class="logo-wrapper"> | |
21 | <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-60x60.png')}" alt="RhodeCode"/></a> |
|
21 | <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-60x60.png')}" alt="RhodeCode"/></a> | |
22 | </div> |
|
22 | </div> | |
23 | % if c.rhodecode_name: |
|
23 | % if c.rhodecode_name: | |
24 | <div class="branding"> |
|
24 | <div class="branding"> | |
25 | <a href="${h.route_path('home')}">${h.branding(c.rhodecode_name)}</a> |
|
25 | <a href="${h.route_path('home')}">${h.branding(c.rhodecode_name)}</a> | |
26 | </div> |
|
26 | </div> | |
27 | % endif |
|
27 | % endif | |
28 | </div> |
|
28 | </div> | |
29 | <!-- MENU BAR NAV --> |
|
29 | <!-- MENU BAR NAV --> | |
30 | ${self.menu_bar_nav()} |
|
30 | ${self.menu_bar_nav()} | |
31 | <!-- END MENU BAR NAV --> |
|
31 | <!-- END MENU BAR NAV --> | |
32 | </div> |
|
32 | </div> | |
33 | </div> |
|
33 | </div> | |
34 | ${self.menu_bar_subnav()} |
|
34 | ${self.menu_bar_subnav()} | |
35 | <!-- END HEADER --> |
|
35 | <!-- END HEADER --> | |
36 |
|
36 | |||
37 | <!-- CONTENT --> |
|
37 | <!-- CONTENT --> | |
38 | <div id="content" class="wrapper"> |
|
38 | <div id="content" class="wrapper"> | |
39 |
|
39 | |||
40 | <rhodecode-toast id="notifications"></rhodecode-toast> |
|
40 | <rhodecode-toast id="notifications"></rhodecode-toast> | |
41 |
|
41 | |||
42 | <div class="main"> |
|
42 | <div class="main"> | |
43 | ${next.main()} |
|
43 | ${next.main()} | |
44 | </div> |
|
44 | </div> | |
45 | </div> |
|
45 | </div> | |
46 | <!-- END CONTENT --> |
|
46 | <!-- END CONTENT --> | |
47 |
|
47 | |||
48 | </div> |
|
48 | </div> | |
49 | <!-- FOOTER --> |
|
49 | <!-- FOOTER --> | |
50 | <div id="footer"> |
|
50 | <div id="footer"> | |
51 | <div id="footer-inner" class="title wrapper"> |
|
51 | <div id="footer-inner" class="title wrapper"> | |
52 | <div> |
|
52 | <div> | |
53 | <p class="footer-link-right"> |
|
53 | <p class="footer-link-right"> | |
54 | % if c.visual.show_version: |
|
54 | % if c.visual.show_version: | |
55 | RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition} |
|
55 | RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition} | |
56 | % endif |
|
56 | % endif | |
57 | © 2010-${h.datetime.today().year}, <a href="${h.route_url('rhodecode_official')}" target="_blank">RhodeCode GmbH</a>. All rights reserved. |
|
57 | © 2010-${h.datetime.today().year}, <a href="${h.route_url('rhodecode_official')}" target="_blank">RhodeCode GmbH</a>. All rights reserved. | |
58 | % if c.visual.rhodecode_support_url: |
|
58 | % if c.visual.rhodecode_support_url: | |
59 | <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a> |
|
59 | <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a> | |
60 | % endif |
|
60 | % endif | |
61 | </p> |
|
61 | </p> | |
62 | <% sid = 'block' if request.GET.get('showrcid') else 'none' %> |
|
62 | <% sid = 'block' if request.GET.get('showrcid') else 'none' %> | |
63 | <p class="server-instance" style="display:${sid}"> |
|
63 | <p class="server-instance" style="display:${sid}"> | |
64 | ## display hidden instance ID if specially defined |
|
64 | ## display hidden instance ID if specially defined | |
65 | % if c.rhodecode_instanceid: |
|
65 | % if c.rhodecode_instanceid: | |
66 | ${_('RhodeCode instance id: {}').format(c.rhodecode_instanceid)} |
|
66 | ${_('RhodeCode instance id: {}').format(c.rhodecode_instanceid)} | |
67 | % endif |
|
67 | % endif | |
68 | </p> |
|
68 | </p> | |
69 | </div> |
|
69 | </div> | |
70 | </div> |
|
70 | </div> | |
71 | </div> |
|
71 | </div> | |
72 |
|
72 | |||
73 | <!-- END FOOTER --> |
|
73 | <!-- END FOOTER --> | |
74 |
|
74 | |||
75 | ### MAKO DEFS ### |
|
75 | ### MAKO DEFS ### | |
76 |
|
76 | |||
77 | <%def name="menu_bar_subnav()"> |
|
77 | <%def name="menu_bar_subnav()"> | |
78 | </%def> |
|
78 | </%def> | |
79 |
|
79 | |||
80 | <%def name="breadcrumbs(class_='breadcrumbs')"> |
|
80 | <%def name="breadcrumbs(class_='breadcrumbs')"> | |
81 | <div class="${class_}"> |
|
81 | <div class="${class_}"> | |
82 | ${self.breadcrumbs_links()} |
|
82 | ${self.breadcrumbs_links()} | |
83 | </div> |
|
83 | </div> | |
84 | </%def> |
|
84 | </%def> | |
85 |
|
85 | |||
86 | <%def name="admin_menu(active=None)"> |
|
86 | <%def name="admin_menu(active=None)"> | |
87 |
|
87 | |||
88 | <div id="context-bar"> |
|
88 | <div id="context-bar"> | |
89 | <div class="wrapper"> |
|
89 | <div class="wrapper"> | |
90 | <div class="title"> |
|
90 | <div class="title"> | |
91 | <div class="title-content"> |
|
91 | <div class="title-content"> | |
92 | <div class="title-main"> |
|
92 | <div class="title-main"> | |
93 | % if c.is_super_admin: |
|
93 | % if c.is_super_admin: | |
94 |
${_('Super |
|
94 | ${_('Super-admin Panel')} | |
95 | % else: |
|
95 | % else: | |
96 | ${_('Delegated Admin Panel')} |
|
96 | ${_('Delegated Admin Panel')} | |
97 | % endif |
|
97 | % endif | |
98 | </div> |
|
98 | </div> | |
99 | </div> |
|
99 | </div> | |
100 | </div> |
|
100 | </div> | |
101 |
|
101 | |||
102 | <ul id="context-pages" class="navigation horizontal-list"> |
|
102 | <ul id="context-pages" class="navigation horizontal-list"> | |
103 |
|
103 | |||
104 |
## super |
|
104 | ## super-admin case | |
105 | % if c.is_super_admin: |
|
105 | % if c.is_super_admin: | |
106 | <li class="${h.is_active('audit_logs', active)}"><a href="${h.route_path('admin_audit_logs')}">${_('Admin audit logs')}</a></li> |
|
106 | <li class="${h.is_active('audit_logs', active)}"><a href="${h.route_path('admin_audit_logs')}">${_('Admin audit logs')}</a></li> | |
107 | <li class="${h.is_active('repositories', active)}"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li> |
|
107 | <li class="${h.is_active('repositories', active)}"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li> | |
108 | <li class="${h.is_active('repository_groups', active)}"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li> |
|
108 | <li class="${h.is_active('repository_groups', active)}"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li> | |
109 | <li class="${h.is_active('users', active)}"><a href="${h.route_path('users')}">${_('Users')}</a></li> |
|
109 | <li class="${h.is_active('users', active)}"><a href="${h.route_path('users')}">${_('Users')}</a></li> | |
110 | <li class="${h.is_active('user_groups', active)}"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li> |
|
110 | <li class="${h.is_active('user_groups', active)}"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li> | |
111 | <li class="${h.is_active('permissions', active)}"><a href="${h.route_path('admin_permissions_application')}">${_('Permissions')}</a></li> |
|
111 | <li class="${h.is_active('permissions', active)}"><a href="${h.route_path('admin_permissions_application')}">${_('Permissions')}</a></li> | |
112 | <li class="${h.is_active('authentication', active)}"><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li> |
|
112 | <li class="${h.is_active('authentication', active)}"><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li> | |
113 | <li class="${h.is_active('integrations', active)}"><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li> |
|
113 | <li class="${h.is_active('integrations', active)}"><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li> | |
114 | <li class="${h.is_active('defaults', active)}"><a href="${h.route_path('admin_defaults_repositories')}">${_('Defaults')}</a></li> |
|
114 | <li class="${h.is_active('defaults', active)}"><a href="${h.route_path('admin_defaults_repositories')}">${_('Defaults')}</a></li> | |
115 | <li class="${h.is_active('settings', active)}"><a href="${h.route_path('admin_settings')}">${_('Settings')}</a></li> |
|
115 | <li class="${h.is_active('settings', active)}"><a href="${h.route_path('admin_settings')}">${_('Settings')}</a></li> | |
116 |
|
116 | |||
117 | ## delegated admin |
|
117 | ## delegated admin | |
118 | % elif c.is_delegated_admin: |
|
118 | % elif c.is_delegated_admin: | |
119 | <% |
|
119 | <% | |
120 | repositories=c.auth_user.repositories_admin or c.can_create_repo |
|
120 | repositories=c.auth_user.repositories_admin or c.can_create_repo | |
121 | repository_groups=c.auth_user.repository_groups_admin or c.can_create_repo_group |
|
121 | repository_groups=c.auth_user.repository_groups_admin or c.can_create_repo_group | |
122 | user_groups=c.auth_user.user_groups_admin or c.can_create_user_group |
|
122 | user_groups=c.auth_user.user_groups_admin or c.can_create_user_group | |
123 | %> |
|
123 | %> | |
124 |
|
124 | |||
125 | %if repositories: |
|
125 | %if repositories: | |
126 | <li class="${h.is_active('repositories', active)} local-admin-repos"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li> |
|
126 | <li class="${h.is_active('repositories', active)} local-admin-repos"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li> | |
127 | %endif |
|
127 | %endif | |
128 | %if repository_groups: |
|
128 | %if repository_groups: | |
129 | <li class="${h.is_active('repository_groups', active)} local-admin-repo-groups"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li> |
|
129 | <li class="${h.is_active('repository_groups', active)} local-admin-repo-groups"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li> | |
130 | %endif |
|
130 | %endif | |
131 | %if user_groups: |
|
131 | %if user_groups: | |
132 | <li class="${h.is_active('user_groups', active)} local-admin-user-groups"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li> |
|
132 | <li class="${h.is_active('user_groups', active)} local-admin-user-groups"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li> | |
133 | %endif |
|
133 | %endif | |
134 | % endif |
|
134 | % endif | |
135 | </ul> |
|
135 | </ul> | |
136 |
|
136 | |||
137 | </div> |
|
137 | </div> | |
138 | <div class="clear"></div> |
|
138 | <div class="clear"></div> | |
139 | </div> |
|
139 | </div> | |
140 | </%def> |
|
140 | </%def> | |
141 |
|
141 | |||
142 | <%def name="dt_info_panel(elements)"> |
|
142 | <%def name="dt_info_panel(elements)"> | |
143 | <dl class="dl-horizontal"> |
|
143 | <dl class="dl-horizontal"> | |
144 | %for dt, dd, title, show_items in elements: |
|
144 | %for dt, dd, title, show_items in elements: | |
145 | <dt>${dt}:</dt> |
|
145 | <dt>${dt}:</dt> | |
146 | <dd title="${h.tooltip(title)}"> |
|
146 | <dd title="${h.tooltip(title)}"> | |
147 | %if callable(dd): |
|
147 | %if callable(dd): | |
148 | ## allow lazy evaluation of elements |
|
148 | ## allow lazy evaluation of elements | |
149 | ${dd()} |
|
149 | ${dd()} | |
150 | %else: |
|
150 | %else: | |
151 | ${dd} |
|
151 | ${dd} | |
152 | %endif |
|
152 | %endif | |
153 | %if show_items: |
|
153 | %if show_items: | |
154 | <span class="btn-collapse" data-toggle="item-${h.md5_safe(dt)[:6]}-details">${_('Show More')} </span> |
|
154 | <span class="btn-collapse" data-toggle="item-${h.md5_safe(dt)[:6]}-details">${_('Show More')} </span> | |
155 | %endif |
|
155 | %endif | |
156 | </dd> |
|
156 | </dd> | |
157 |
|
157 | |||
158 | %if show_items: |
|
158 | %if show_items: | |
159 | <div class="collapsable-content" data-toggle="item-${h.md5_safe(dt)[:6]}-details" style="display: none"> |
|
159 | <div class="collapsable-content" data-toggle="item-${h.md5_safe(dt)[:6]}-details" style="display: none"> | |
160 | %for item in show_items: |
|
160 | %for item in show_items: | |
161 | <dt></dt> |
|
161 | <dt></dt> | |
162 | <dd>${item}</dd> |
|
162 | <dd>${item}</dd> | |
163 | %endfor |
|
163 | %endfor | |
164 | </div> |
|
164 | </div> | |
165 | %endif |
|
165 | %endif | |
166 |
|
166 | |||
167 | %endfor |
|
167 | %endfor | |
168 | </dl> |
|
168 | </dl> | |
169 | </%def> |
|
169 | </%def> | |
170 |
|
170 | |||
171 | <%def name="tr_info_entry(element)"> |
|
171 | <%def name="tr_info_entry(element)"> | |
172 | <% key, val, title, show_items = element %> |
|
172 | <% key, val, title, show_items = element %> | |
173 |
|
173 | |||
174 | <tr> |
|
174 | <tr> | |
175 | <td style="vertical-align: top">${key}</td> |
|
175 | <td style="vertical-align: top">${key}</td> | |
176 | <td title="${h.tooltip(title)}"> |
|
176 | <td title="${h.tooltip(title)}"> | |
177 | %if callable(val): |
|
177 | %if callable(val): | |
178 | ## allow lazy evaluation of elements |
|
178 | ## allow lazy evaluation of elements | |
179 | ${val()} |
|
179 | ${val()} | |
180 | %else: |
|
180 | %else: | |
181 | ${val} |
|
181 | ${val} | |
182 | %endif |
|
182 | %endif | |
183 | %if show_items: |
|
183 | %if show_items: | |
184 | <div class="collapsable-content" data-toggle="item-${h.md5_safe(val)[:6]}-details" style="display: none"> |
|
184 | <div class="collapsable-content" data-toggle="item-${h.md5_safe(val)[:6]}-details" style="display: none"> | |
185 | % for item in show_items: |
|
185 | % for item in show_items: | |
186 | <dt></dt> |
|
186 | <dt></dt> | |
187 | <dd>${item}</dd> |
|
187 | <dd>${item}</dd> | |
188 | % endfor |
|
188 | % endfor | |
189 | </div> |
|
189 | </div> | |
190 | %endif |
|
190 | %endif | |
191 | </td> |
|
191 | </td> | |
192 | <td style="vertical-align: top"> |
|
192 | <td style="vertical-align: top"> | |
193 | %if show_items: |
|
193 | %if show_items: | |
194 | <span class="btn-collapse" data-toggle="item-${h.md5_safe(val)[:6]}-details">${_('Show More')} </span> |
|
194 | <span class="btn-collapse" data-toggle="item-${h.md5_safe(val)[:6]}-details">${_('Show More')} </span> | |
195 | %endif |
|
195 | %endif | |
196 | </td> |
|
196 | </td> | |
197 | </tr> |
|
197 | </tr> | |
198 |
|
198 | |||
199 | </%def> |
|
199 | </%def> | |
200 |
|
200 | |||
201 | <%def name="gravatar(email, size=16, tooltip=False, tooltip_alt=None, user=None)"> |
|
201 | <%def name="gravatar(email, size=16, tooltip=False, tooltip_alt=None, user=None)"> | |
202 | <% |
|
202 | <% | |
203 | if size > 16: |
|
203 | if size > 16: | |
204 | gravatar_class = ['gravatar','gravatar-large'] |
|
204 | gravatar_class = ['gravatar','gravatar-large'] | |
205 | else: |
|
205 | else: | |
206 | gravatar_class = ['gravatar'] |
|
206 | gravatar_class = ['gravatar'] | |
207 |
|
207 | |||
208 | data_hovercard_url = '' |
|
208 | data_hovercard_url = '' | |
209 | data_hovercard_alt = tooltip_alt.replace('<', '<').replace('>', '>') if tooltip_alt else '' |
|
209 | data_hovercard_alt = tooltip_alt.replace('<', '<').replace('>', '>') if tooltip_alt else '' | |
210 |
|
210 | |||
211 | if tooltip: |
|
211 | if tooltip: | |
212 | gravatar_class += ['tooltip-hovercard'] |
|
212 | gravatar_class += ['tooltip-hovercard'] | |
213 |
|
213 | |||
214 | if tooltip and user: |
|
214 | if tooltip and user: | |
215 | if user.username == h.DEFAULT_USER: |
|
215 | if user.username == h.DEFAULT_USER: | |
216 | gravatar_class.pop(-1) |
|
216 | gravatar_class.pop(-1) | |
217 | else: |
|
217 | else: | |
218 | data_hovercard_url = request.route_path('hovercard_user', user_id=getattr(user, 'user_id', '')) |
|
218 | data_hovercard_url = request.route_path('hovercard_user', user_id=getattr(user, 'user_id', '')) | |
219 | gravatar_class = ' '.join(gravatar_class) |
|
219 | gravatar_class = ' '.join(gravatar_class) | |
220 |
|
220 | |||
221 | %> |
|
221 | %> | |
222 | <%doc> |
|
222 | <%doc> | |
223 | TODO: johbo: For now we serve double size images to make it smooth |
|
223 | TODO: johbo: For now we serve double size images to make it smooth | |
224 | for retina. This is how it worked until now. Should be replaced |
|
224 | for retina. This is how it worked until now. Should be replaced | |
225 | with a better solution at some point. |
|
225 | with a better solution at some point. | |
226 | </%doc> |
|
226 | </%doc> | |
227 |
|
227 | |||
228 | <img class="${gravatar_class}" height="${size}" width="${size}" data-hovercard-url="${data_hovercard_url}" data-hovercard-alt="${data_hovercard_alt}" src="${h.gravatar_url(email, size * 2)}" /> |
|
228 | <img class="${gravatar_class}" height="${size}" width="${size}" data-hovercard-url="${data_hovercard_url}" data-hovercard-alt="${data_hovercard_alt}" src="${h.gravatar_url(email, size * 2)}" /> | |
229 | </%def> |
|
229 | </%def> | |
230 |
|
230 | |||
231 |
|
231 | |||
232 | <%def name="gravatar_with_user(contact, size=16, show_disabled=False, tooltip=False)"> |
|
232 | <%def name="gravatar_with_user(contact, size=16, show_disabled=False, tooltip=False)"> | |
233 | <% |
|
233 | <% | |
234 | email = h.email_or_none(contact) |
|
234 | email = h.email_or_none(contact) | |
235 | rc_user = h.discover_user(contact) |
|
235 | rc_user = h.discover_user(contact) | |
236 | %> |
|
236 | %> | |
237 |
|
237 | |||
238 | <div class="rc-user"> |
|
238 | <div class="rc-user"> | |
239 | ${self.gravatar(email, size, tooltip=tooltip, tooltip_alt=contact, user=rc_user)} |
|
239 | ${self.gravatar(email, size, tooltip=tooltip, tooltip_alt=contact, user=rc_user)} | |
240 | <span class="${('user user-disabled' if show_disabled else 'user')}"> ${h.link_to_user(rc_user or contact)}</span> |
|
240 | <span class="${('user user-disabled' if show_disabled else 'user')}"> ${h.link_to_user(rc_user or contact)}</span> | |
241 | </div> |
|
241 | </div> | |
242 | </%def> |
|
242 | </%def> | |
243 |
|
243 | |||
244 |
|
244 | |||
245 | <%def name="user_group_icon(user_group=None, size=16, tooltip=False)"> |
|
245 | <%def name="user_group_icon(user_group=None, size=16, tooltip=False)"> | |
246 | <% |
|
246 | <% | |
247 | if (size > 16): |
|
247 | if (size > 16): | |
248 | gravatar_class = 'icon-user-group-alt' |
|
248 | gravatar_class = 'icon-user-group-alt' | |
249 | else: |
|
249 | else: | |
250 | gravatar_class = 'icon-user-group-alt' |
|
250 | gravatar_class = 'icon-user-group-alt' | |
251 |
|
251 | |||
252 | if tooltip: |
|
252 | if tooltip: | |
253 | gravatar_class += ' tooltip-hovercard' |
|
253 | gravatar_class += ' tooltip-hovercard' | |
254 |
|
254 | |||
255 | data_hovercard_url = request.route_path('hovercard_user_group', user_group_id=user_group.users_group_id) |
|
255 | data_hovercard_url = request.route_path('hovercard_user_group', user_group_id=user_group.users_group_id) | |
256 | %> |
|
256 | %> | |
257 | <%doc> |
|
257 | <%doc> | |
258 | TODO: johbo: For now we serve double size images to make it smooth |
|
258 | TODO: johbo: For now we serve double size images to make it smooth | |
259 | for retina. This is how it worked until now. Should be replaced |
|
259 | for retina. This is how it worked until now. Should be replaced | |
260 | with a better solution at some point. |
|
260 | with a better solution at some point. | |
261 | </%doc> |
|
261 | </%doc> | |
262 |
|
262 | |||
263 | <i style="font-size: ${size}px" class="${gravatar_class} x-icon-size-${size}" data-hovercard-url="${data_hovercard_url}"></i> |
|
263 | <i style="font-size: ${size}px" class="${gravatar_class} x-icon-size-${size}" data-hovercard-url="${data_hovercard_url}"></i> | |
264 | </%def> |
|
264 | </%def> | |
265 |
|
265 | |||
266 | <%def name="repo_page_title(repo_instance)"> |
|
266 | <%def name="repo_page_title(repo_instance)"> | |
267 | <div class="title-content repo-title"> |
|
267 | <div class="title-content repo-title"> | |
268 |
|
268 | |||
269 | <div class="title-main"> |
|
269 | <div class="title-main"> | |
270 | ## SVN/HG/GIT icons |
|
270 | ## SVN/HG/GIT icons | |
271 | %if h.is_hg(repo_instance): |
|
271 | %if h.is_hg(repo_instance): | |
272 | <i class="icon-hg"></i> |
|
272 | <i class="icon-hg"></i> | |
273 | %endif |
|
273 | %endif | |
274 | %if h.is_git(repo_instance): |
|
274 | %if h.is_git(repo_instance): | |
275 | <i class="icon-git"></i> |
|
275 | <i class="icon-git"></i> | |
276 | %endif |
|
276 | %endif | |
277 | %if h.is_svn(repo_instance): |
|
277 | %if h.is_svn(repo_instance): | |
278 | <i class="icon-svn"></i> |
|
278 | <i class="icon-svn"></i> | |
279 | %endif |
|
279 | %endif | |
280 |
|
280 | |||
281 | ## public/private |
|
281 | ## public/private | |
282 | %if repo_instance.private: |
|
282 | %if repo_instance.private: | |
283 | <i class="icon-repo-private"></i> |
|
283 | <i class="icon-repo-private"></i> | |
284 | %else: |
|
284 | %else: | |
285 | <i class="icon-repo-public"></i> |
|
285 | <i class="icon-repo-public"></i> | |
286 | %endif |
|
286 | %endif | |
287 |
|
287 | |||
288 | ## repo name with group name |
|
288 | ## repo name with group name | |
289 | ${h.breadcrumb_repo_link(repo_instance)} |
|
289 | ${h.breadcrumb_repo_link(repo_instance)} | |
290 |
|
290 | |||
291 | ## Context Actions |
|
291 | ## Context Actions | |
292 | <div class="pull-right"> |
|
292 | <div class="pull-right"> | |
293 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
293 | %if c.rhodecode_user.username != h.DEFAULT_USER: | |
294 | <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_uid, _query=dict(auth_token=c.rhodecode_user.feed_token))}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a> |
|
294 | <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_uid, _query=dict(auth_token=c.rhodecode_user.feed_token))}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a> | |
295 |
|
295 | |||
296 | <a href="#WatchRepo" onclick="toggleFollowingRepo(this, templateContext.repo_id); return false" title="${_('Watch this Repository and actions on it in your personalized journal')}" class="btn btn-sm ${('watching' if c.repository_is_user_following else '')}"> |
|
296 | <a href="#WatchRepo" onclick="toggleFollowingRepo(this, templateContext.repo_id); return false" title="${_('Watch this Repository and actions on it in your personalized journal')}" class="btn btn-sm ${('watching' if c.repository_is_user_following else '')}"> | |
297 | % if c.repository_is_user_following: |
|
297 | % if c.repository_is_user_following: | |
298 | <i class="icon-eye-off"></i>${_('Unwatch')} |
|
298 | <i class="icon-eye-off"></i>${_('Unwatch')} | |
299 | % else: |
|
299 | % else: | |
300 | <i class="icon-eye"></i>${_('Watch')} |
|
300 | <i class="icon-eye"></i>${_('Watch')} | |
301 | % endif |
|
301 | % endif | |
302 |
|
302 | |||
303 | </a> |
|
303 | </a> | |
304 | %else: |
|
304 | %else: | |
305 | <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_uid)}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a> |
|
305 | <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_uid)}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a> | |
306 | %endif |
|
306 | %endif | |
307 | </div> |
|
307 | </div> | |
308 |
|
308 | |||
309 | </div> |
|
309 | </div> | |
310 |
|
310 | |||
311 | ## FORKED |
|
311 | ## FORKED | |
312 | %if repo_instance.fork: |
|
312 | %if repo_instance.fork: | |
313 | <p class="discreet"> |
|
313 | <p class="discreet"> | |
314 | <i class="icon-code-fork"></i> ${_('Fork of')} |
|
314 | <i class="icon-code-fork"></i> ${_('Fork of')} | |
315 | ${h.link_to_if(c.has_origin_repo_read_perm,repo_instance.fork.repo_name, h.route_path('repo_summary', repo_name=repo_instance.fork.repo_name))} |
|
315 | ${h.link_to_if(c.has_origin_repo_read_perm,repo_instance.fork.repo_name, h.route_path('repo_summary', repo_name=repo_instance.fork.repo_name))} | |
316 | </p> |
|
316 | </p> | |
317 | %endif |
|
317 | %endif | |
318 |
|
318 | |||
319 | ## IMPORTED FROM REMOTE |
|
319 | ## IMPORTED FROM REMOTE | |
320 | %if repo_instance.clone_uri: |
|
320 | %if repo_instance.clone_uri: | |
321 | <p class="discreet"> |
|
321 | <p class="discreet"> | |
322 | <i class="icon-code-fork"></i> ${_('Clone from')} |
|
322 | <i class="icon-code-fork"></i> ${_('Clone from')} | |
323 | <a href="${h.safe_str(h.hide_credentials(repo_instance.clone_uri))}">${h.hide_credentials(repo_instance.clone_uri)}</a> |
|
323 | <a href="${h.safe_str(h.hide_credentials(repo_instance.clone_uri))}">${h.hide_credentials(repo_instance.clone_uri)}</a> | |
324 | </p> |
|
324 | </p> | |
325 | %endif |
|
325 | %endif | |
326 |
|
326 | |||
327 | ## LOCKING STATUS |
|
327 | ## LOCKING STATUS | |
328 | %if repo_instance.locked[0]: |
|
328 | %if repo_instance.locked[0]: | |
329 | <p class="locking_locked discreet"> |
|
329 | <p class="locking_locked discreet"> | |
330 | <i class="icon-repo-lock"></i> |
|
330 | <i class="icon-repo-lock"></i> | |
331 | ${_('Repository locked by %(user)s') % {'user': h.person_by_id(repo_instance.locked[0])}} |
|
331 | ${_('Repository locked by %(user)s') % {'user': h.person_by_id(repo_instance.locked[0])}} | |
332 | </p> |
|
332 | </p> | |
333 | %elif repo_instance.enable_locking: |
|
333 | %elif repo_instance.enable_locking: | |
334 | <p class="locking_unlocked discreet"> |
|
334 | <p class="locking_unlocked discreet"> | |
335 | <i class="icon-repo-unlock"></i> |
|
335 | <i class="icon-repo-unlock"></i> | |
336 | ${_('Repository not locked. Pull repository to lock it.')} |
|
336 | ${_('Repository not locked. Pull repository to lock it.')} | |
337 | </p> |
|
337 | </p> | |
338 | %endif |
|
338 | %endif | |
339 |
|
339 | |||
340 | </div> |
|
340 | </div> | |
341 | </%def> |
|
341 | </%def> | |
342 |
|
342 | |||
343 | <%def name="repo_menu(active=None)"> |
|
343 | <%def name="repo_menu(active=None)"> | |
344 | <% |
|
344 | <% | |
345 | ## determine if we have "any" option available |
|
345 | ## determine if we have "any" option available | |
346 | can_lock = h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking |
|
346 | can_lock = h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking | |
347 | has_actions = can_lock |
|
347 | has_actions = can_lock | |
348 |
|
348 | |||
349 | %> |
|
349 | %> | |
350 | % if c.rhodecode_db_repo.archived: |
|
350 | % if c.rhodecode_db_repo.archived: | |
351 | <div class="alert alert-warning text-center"> |
|
351 | <div class="alert alert-warning text-center"> | |
352 | <strong>${_('This repository has been archived. It is now read-only.')}</strong> |
|
352 | <strong>${_('This repository has been archived. It is now read-only.')}</strong> | |
353 | </div> |
|
353 | </div> | |
354 | % endif |
|
354 | % endif | |
355 |
|
355 | |||
356 | <!--- REPO CONTEXT BAR --> |
|
356 | <!--- REPO CONTEXT BAR --> | |
357 | <div id="context-bar"> |
|
357 | <div id="context-bar"> | |
358 | <div class="wrapper"> |
|
358 | <div class="wrapper"> | |
359 |
|
359 | |||
360 | <div class="title"> |
|
360 | <div class="title"> | |
361 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
361 | ${self.repo_page_title(c.rhodecode_db_repo)} | |
362 | </div> |
|
362 | </div> | |
363 |
|
363 | |||
364 | <ul id="context-pages" class="navigation horizontal-list"> |
|
364 | <ul id="context-pages" class="navigation horizontal-list"> | |
365 | <li class="${h.is_active('summary', active)}"><a class="menulink" href="${h.route_path('repo_summary', repo_name=c.repo_name)}"><div class="menulabel">${_('Summary')}</div></a></li> |
|
365 | <li class="${h.is_active('summary', active)}"><a class="menulink" href="${h.route_path('repo_summary', repo_name=c.repo_name)}"><div class="menulabel">${_('Summary')}</div></a></li> | |
366 | <li class="${h.is_active('commits', active)}"><a class="menulink" href="${h.route_path('repo_commits', repo_name=c.repo_name)}"><div class="menulabel">${_('Commits')}</div></a></li> |
|
366 | <li class="${h.is_active('commits', active)}"><a class="menulink" href="${h.route_path('repo_commits', repo_name=c.repo_name)}"><div class="menulabel">${_('Commits')}</div></a></li> | |
367 | <li class="${h.is_active('files', active)}"><a class="menulink" href="${h.route_path('repo_files', repo_name=c.repo_name, commit_id=c.rhodecode_db_repo.landing_rev[1], f_path='')}"><div class="menulabel">${_('Files')}</div></a></li> |
|
367 | <li class="${h.is_active('files', active)}"><a class="menulink" href="${h.route_path('repo_files', repo_name=c.repo_name, commit_id=c.rhodecode_db_repo.landing_rev[1], f_path='')}"><div class="menulabel">${_('Files')}</div></a></li> | |
368 | <li class="${h.is_active('compare', active)}"><a class="menulink" href="${h.route_path('repo_compare_select',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a></li> |
|
368 | <li class="${h.is_active('compare', active)}"><a class="menulink" href="${h.route_path('repo_compare_select',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a></li> | |
369 |
|
369 | |||
370 | ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()" |
|
370 | ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()" | |
371 | %if c.rhodecode_db_repo.repo_type in ['git','hg']: |
|
371 | %if c.rhodecode_db_repo.repo_type in ['git','hg']: | |
372 | <li class="${h.is_active('showpullrequest', active)}"> |
|
372 | <li class="${h.is_active('showpullrequest', active)}"> | |
373 | <a class="menulink" href="${h.route_path('pullrequest_show_all', repo_name=c.repo_name)}" title="${h.tooltip(_('Show Pull Requests for %s') % c.repo_name)}"> |
|
373 | <a class="menulink" href="${h.route_path('pullrequest_show_all', repo_name=c.repo_name)}" title="${h.tooltip(_('Show Pull Requests for %s') % c.repo_name)}"> | |
374 | <div class="menulabel"> |
|
374 | <div class="menulabel"> | |
375 | ${_('Pull Requests')} <span class="menulink-counter">${c.repository_pull_requests}</span> |
|
375 | ${_('Pull Requests')} <span class="menulink-counter">${c.repository_pull_requests}</span> | |
376 | </div> |
|
376 | </div> | |
377 | </a> |
|
377 | </a> | |
378 | </li> |
|
378 | </li> | |
379 | %endif |
|
379 | %endif | |
380 |
|
380 | |||
381 | <li class="${h.is_active('artifacts', active)}"> |
|
381 | <li class="${h.is_active('artifacts', active)}"> | |
382 | <a class="menulink" href="${h.route_path('repo_artifacts_list',repo_name=c.repo_name)}"> |
|
382 | <a class="menulink" href="${h.route_path('repo_artifacts_list',repo_name=c.repo_name)}"> | |
383 | <div class="menulabel"> |
|
383 | <div class="menulabel"> | |
384 | ${_('Artifacts')} <span class="menulink-counter">${c.repository_artifacts}</span> |
|
384 | ${_('Artifacts')} <span class="menulink-counter">${c.repository_artifacts}</span> | |
385 | </div> |
|
385 | </div> | |
386 | </a> |
|
386 | </a> | |
387 | </li> |
|
387 | </li> | |
388 |
|
388 | |||
389 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
389 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): | |
390 | <li class="${h.is_active('settings', active)}"><a class="menulink" href="${h.route_path('edit_repo',repo_name=c.repo_name)}"><div class="menulabel">${_('Repository Settings')}</div></a></li> |
|
390 | <li class="${h.is_active('settings', active)}"><a class="menulink" href="${h.route_path('edit_repo',repo_name=c.repo_name)}"><div class="menulabel">${_('Repository Settings')}</div></a></li> | |
391 | %endif |
|
391 | %endif | |
392 |
|
392 | |||
393 | <li class="${h.is_active('options', active)}"> |
|
393 | <li class="${h.is_active('options', active)}"> | |
394 | % if has_actions: |
|
394 | % if has_actions: | |
395 | <a class="menulink dropdown"> |
|
395 | <a class="menulink dropdown"> | |
396 | <div class="menulabel">${_('Options')}<div class="show_more"></div></div> |
|
396 | <div class="menulabel">${_('Options')}<div class="show_more"></div></div> | |
397 | </a> |
|
397 | </a> | |
398 | <ul class="submenu"> |
|
398 | <ul class="submenu"> | |
399 | %if can_lock: |
|
399 | %if can_lock: | |
400 | %if c.rhodecode_db_repo.locked[0]: |
|
400 | %if c.rhodecode_db_repo.locked[0]: | |
401 | <li><a class="locking_del" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Unlock Repository')}</a></li> |
|
401 | <li><a class="locking_del" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Unlock Repository')}</a></li> | |
402 | %else: |
|
402 | %else: | |
403 | <li><a class="locking_add" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Lock Repository')}</a></li> |
|
403 | <li><a class="locking_add" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Lock Repository')}</a></li> | |
404 | %endif |
|
404 | %endif | |
405 | %endif |
|
405 | %endif | |
406 | </ul> |
|
406 | </ul> | |
407 | % else: |
|
407 | % else: | |
408 | <a class="menulink disabled"> |
|
408 | <a class="menulink disabled"> | |
409 | <div class="menulabel">${_('Options')}<div class="show_more"></div></div> |
|
409 | <div class="menulabel">${_('Options')}<div class="show_more"></div></div> | |
410 | </a> |
|
410 | </a> | |
411 | % endif |
|
411 | % endif | |
412 | </li> |
|
412 | </li> | |
413 |
|
413 | |||
414 | </ul> |
|
414 | </ul> | |
415 | </div> |
|
415 | </div> | |
416 | <div class="clear"></div> |
|
416 | <div class="clear"></div> | |
417 | </div> |
|
417 | </div> | |
418 |
|
418 | |||
419 | <!--- REPO END CONTEXT BAR --> |
|
419 | <!--- REPO END CONTEXT BAR --> | |
420 |
|
420 | |||
421 | </%def> |
|
421 | </%def> | |
422 |
|
422 | |||
423 | <%def name="repo_group_page_title(repo_group_instance)"> |
|
423 | <%def name="repo_group_page_title(repo_group_instance)"> | |
424 | <div class="title-content"> |
|
424 | <div class="title-content"> | |
425 | <div class="title-main"> |
|
425 | <div class="title-main"> | |
426 | ## Repository Group icon |
|
426 | ## Repository Group icon | |
427 | <i class="icon-repo-group"></i> |
|
427 | <i class="icon-repo-group"></i> | |
428 |
|
428 | |||
429 | ## repo name with group name |
|
429 | ## repo name with group name | |
430 | ${h.breadcrumb_repo_group_link(repo_group_instance)} |
|
430 | ${h.breadcrumb_repo_group_link(repo_group_instance)} | |
431 | </div> |
|
431 | </div> | |
432 |
|
432 | |||
433 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
433 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> | |
434 | <div class="repo-group-desc discreet"> |
|
434 | <div class="repo-group-desc discreet"> | |
435 | ${dt.repo_group_desc(repo_group_instance.description_safe, repo_group_instance.personal, c.visual.stylify_metatags)} |
|
435 | ${dt.repo_group_desc(repo_group_instance.description_safe, repo_group_instance.personal, c.visual.stylify_metatags)} | |
436 | </div> |
|
436 | </div> | |
437 |
|
437 | |||
438 | </div> |
|
438 | </div> | |
439 | </%def> |
|
439 | </%def> | |
440 |
|
440 | |||
441 |
|
441 | |||
442 | <%def name="repo_group_menu(active=None)"> |
|
442 | <%def name="repo_group_menu(active=None)"> | |
443 | <% |
|
443 | <% | |
444 | gr_name = c.repo_group.group_name if c.repo_group else None |
|
444 | gr_name = c.repo_group.group_name if c.repo_group else None | |
445 | # create repositories with write permission on group is set to true |
|
445 | # create repositories with write permission on group is set to true | |
446 | group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'group admin index page') |
|
446 | group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'group admin index page') | |
447 |
|
447 | |||
448 | %> |
|
448 | %> | |
449 |
|
449 | |||
450 |
|
450 | |||
451 | <!--- REPO GROUP CONTEXT BAR --> |
|
451 | <!--- REPO GROUP CONTEXT BAR --> | |
452 | <div id="context-bar"> |
|
452 | <div id="context-bar"> | |
453 | <div class="wrapper"> |
|
453 | <div class="wrapper"> | |
454 | <div class="title"> |
|
454 | <div class="title"> | |
455 | ${self.repo_group_page_title(c.repo_group)} |
|
455 | ${self.repo_group_page_title(c.repo_group)} | |
456 | </div> |
|
456 | </div> | |
457 |
|
457 | |||
458 | <ul id="context-pages" class="navigation horizontal-list"> |
|
458 | <ul id="context-pages" class="navigation horizontal-list"> | |
459 | <li class="${h.is_active('home', active)}"> |
|
459 | <li class="${h.is_active('home', active)}"> | |
460 | <a class="menulink" href="${h.route_path('repo_group_home', repo_group_name=c.repo_group.group_name)}"><div class="menulabel">${_('Group Home')}</div></a> |
|
460 | <a class="menulink" href="${h.route_path('repo_group_home', repo_group_name=c.repo_group.group_name)}"><div class="menulabel">${_('Group Home')}</div></a> | |
461 | </li> |
|
461 | </li> | |
462 | % if c.is_super_admin or group_admin: |
|
462 | % if c.is_super_admin or group_admin: | |
463 | <li class="${h.is_active('settings', active)}"> |
|
463 | <li class="${h.is_active('settings', active)}"> | |
464 | <a class="menulink" href="${h.route_path('edit_repo_group',repo_group_name=c.repo_group.group_name)}" title="${_('You have admin right to this group, and can edit it')}"><div class="menulabel">${_('Group Settings')}</div></a> |
|
464 | <a class="menulink" href="${h.route_path('edit_repo_group',repo_group_name=c.repo_group.group_name)}" title="${_('You have admin right to this group, and can edit it')}"><div class="menulabel">${_('Group Settings')}</div></a> | |
465 | </li> |
|
465 | </li> | |
466 | % endif |
|
466 | % endif | |
467 |
|
467 | |||
468 | </ul> |
|
468 | </ul> | |
469 | </div> |
|
469 | </div> | |
470 | <div class="clear"></div> |
|
470 | <div class="clear"></div> | |
471 | </div> |
|
471 | </div> | |
472 |
|
472 | |||
473 | <!--- REPO GROUP CONTEXT BAR --> |
|
473 | <!--- REPO GROUP CONTEXT BAR --> | |
474 |
|
474 | |||
475 | </%def> |
|
475 | </%def> | |
476 |
|
476 | |||
477 |
|
477 | |||
478 | <%def name="usermenu(active=False)"> |
|
478 | <%def name="usermenu(active=False)"> | |
479 | <% |
|
479 | <% | |
480 | not_anonymous = c.rhodecode_user.username != h.DEFAULT_USER |
|
480 | not_anonymous = c.rhodecode_user.username != h.DEFAULT_USER | |
481 |
|
481 | |||
482 | gr_name = c.repo_group.group_name if (hasattr(c, 'repo_group') and c.repo_group) else None |
|
482 | gr_name = c.repo_group.group_name if (hasattr(c, 'repo_group') and c.repo_group) else None | |
483 | # create repositories with write permission on group is set to true |
|
483 | # create repositories with write permission on group is set to true | |
484 |
|
484 | |||
485 | can_fork = c.is_super_admin or h.HasPermissionAny('hg.fork.repository')() |
|
485 | can_fork = c.is_super_admin or h.HasPermissionAny('hg.fork.repository')() | |
486 | create_on_write = h.HasPermissionAny('hg.create.write_on_repogroup.true')() |
|
486 | create_on_write = h.HasPermissionAny('hg.create.write_on_repogroup.true')() | |
487 | group_write = h.HasRepoGroupPermissionAny('group.write')(gr_name, 'can write into group index page') |
|
487 | group_write = h.HasRepoGroupPermissionAny('group.write')(gr_name, 'can write into group index page') | |
488 | group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'group admin index page') |
|
488 | group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'group admin index page') | |
489 |
|
489 | |||
490 | can_create_repos = c.is_super_admin or c.can_create_repo |
|
490 | can_create_repos = c.is_super_admin or c.can_create_repo | |
491 | can_create_repo_groups = c.is_super_admin or c.can_create_repo_group |
|
491 | can_create_repo_groups = c.is_super_admin or c.can_create_repo_group | |
492 |
|
492 | |||
493 | can_create_repos_in_group = c.is_super_admin or group_admin or (group_write and create_on_write) |
|
493 | can_create_repos_in_group = c.is_super_admin or group_admin or (group_write and create_on_write) | |
494 | can_create_repo_groups_in_group = c.is_super_admin or group_admin |
|
494 | can_create_repo_groups_in_group = c.is_super_admin or group_admin | |
495 | %> |
|
495 | %> | |
496 |
|
496 | |||
497 | % if not_anonymous: |
|
497 | % if not_anonymous: | |
498 | <% |
|
498 | <% | |
499 | default_target_group = dict() |
|
499 | default_target_group = dict() | |
500 | if c.rhodecode_user.personal_repo_group: |
|
500 | if c.rhodecode_user.personal_repo_group: | |
501 | default_target_group = dict(parent_group=c.rhodecode_user.personal_repo_group.group_id) |
|
501 | default_target_group = dict(parent_group=c.rhodecode_user.personal_repo_group.group_id) | |
502 | %> |
|
502 | %> | |
503 |
|
503 | |||
504 | ## create action |
|
504 | ## create action | |
505 | <li> |
|
505 | <li> | |
506 | <a href="#create-actions" onclick="return false;" class="menulink childs"> |
|
506 | <a href="#create-actions" onclick="return false;" class="menulink childs"> | |
507 | <i class="tooltip icon-plus-circled" title="${_('Create')}"></i> |
|
507 | <i class="tooltip icon-plus-circled" title="${_('Create')}"></i> | |
508 | </a> |
|
508 | </a> | |
509 |
|
509 | |||
510 | <div class="action-menu submenu"> |
|
510 | <div class="action-menu submenu"> | |
511 |
|
511 | |||
512 | <ol> |
|
512 | <ol> | |
513 | ## scope of within a repository |
|
513 | ## scope of within a repository | |
514 | % if hasattr(c, 'rhodecode_db_repo') and c.rhodecode_db_repo: |
|
514 | % if hasattr(c, 'rhodecode_db_repo') and c.rhodecode_db_repo: | |
515 | <li class="submenu-title">${_('This Repository')}</li> |
|
515 | <li class="submenu-title">${_('This Repository')}</li> | |
516 | <li> |
|
516 | <li> | |
517 | <a href="${h.route_path('pullrequest_new',repo_name=c.repo_name)}">${_('Create Pull Request')}</a> |
|
517 | <a href="${h.route_path('pullrequest_new',repo_name=c.repo_name)}">${_('Create Pull Request')}</a> | |
518 | </li> |
|
518 | </li> | |
519 | % if can_fork: |
|
519 | % if can_fork: | |
520 | <li> |
|
520 | <li> | |
521 | <a href="${h.route_path('repo_fork_new',repo_name=c.repo_name,_query=default_target_group)}">${_('Fork this repository')}</a> |
|
521 | <a href="${h.route_path('repo_fork_new',repo_name=c.repo_name,_query=default_target_group)}">${_('Fork this repository')}</a> | |
522 | </li> |
|
522 | </li> | |
523 | % endif |
|
523 | % endif | |
524 | % endif |
|
524 | % endif | |
525 |
|
525 | |||
526 | ## scope of within repository groups |
|
526 | ## scope of within repository groups | |
527 | % if hasattr(c, 'repo_group') and c.repo_group and (can_create_repos_in_group or can_create_repo_groups_in_group): |
|
527 | % if hasattr(c, 'repo_group') and c.repo_group and (can_create_repos_in_group or can_create_repo_groups_in_group): | |
528 | <li class="submenu-title">${_('This Repository Group')}</li> |
|
528 | <li class="submenu-title">${_('This Repository Group')}</li> | |
529 |
|
529 | |||
530 | % if can_create_repos_in_group: |
|
530 | % if can_create_repos_in_group: | |
531 | <li> |
|
531 | <li> | |
532 | <a href="${h.route_path('repo_new',_query=dict(parent_group=c.repo_group.group_id))}">${_('New Repository')}</a> |
|
532 | <a href="${h.route_path('repo_new',_query=dict(parent_group=c.repo_group.group_id))}">${_('New Repository')}</a> | |
533 | </li> |
|
533 | </li> | |
534 | % endif |
|
534 | % endif | |
535 |
|
535 | |||
536 | % if can_create_repo_groups_in_group: |
|
536 | % if can_create_repo_groups_in_group: | |
537 | <li> |
|
537 | <li> | |
538 | <a href="${h.route_path('repo_group_new',_query=dict(parent_group=c.repo_group.group_id))}">${_(u'New Repository Group')}</a> |
|
538 | <a href="${h.route_path('repo_group_new',_query=dict(parent_group=c.repo_group.group_id))}">${_(u'New Repository Group')}</a> | |
539 | </li> |
|
539 | </li> | |
540 | % endif |
|
540 | % endif | |
541 | % endif |
|
541 | % endif | |
542 |
|
542 | |||
543 | ## personal group |
|
543 | ## personal group | |
544 | % if c.rhodecode_user.personal_repo_group: |
|
544 | % if c.rhodecode_user.personal_repo_group: | |
545 | <li class="submenu-title">Personal Group</li> |
|
545 | <li class="submenu-title">Personal Group</li> | |
546 |
|
546 | |||
547 | <li> |
|
547 | <li> | |
548 | <a href="${h.route_path('repo_new',_query=dict(parent_group=c.rhodecode_user.personal_repo_group.group_id))}" >${_('New Repository')} </a> |
|
548 | <a href="${h.route_path('repo_new',_query=dict(parent_group=c.rhodecode_user.personal_repo_group.group_id))}" >${_('New Repository')} </a> | |
549 | </li> |
|
549 | </li> | |
550 |
|
550 | |||
551 | <li> |
|
551 | <li> | |
552 | <a href="${h.route_path('repo_group_new',_query=dict(parent_group=c.rhodecode_user.personal_repo_group.group_id))}">${_('New Repository Group')} </a> |
|
552 | <a href="${h.route_path('repo_group_new',_query=dict(parent_group=c.rhodecode_user.personal_repo_group.group_id))}">${_('New Repository Group')} </a> | |
553 | </li> |
|
553 | </li> | |
554 | % endif |
|
554 | % endif | |
555 |
|
555 | |||
556 | ## Global actions |
|
556 | ## Global actions | |
557 | <li class="submenu-title">RhodeCode</li> |
|
557 | <li class="submenu-title">RhodeCode</li> | |
558 | % if can_create_repos: |
|
558 | % if can_create_repos: | |
559 | <li> |
|
559 | <li> | |
560 | <a href="${h.route_path('repo_new')}" >${_('New Repository')}</a> |
|
560 | <a href="${h.route_path('repo_new')}" >${_('New Repository')}</a> | |
561 | </li> |
|
561 | </li> | |
562 | % endif |
|
562 | % endif | |
563 |
|
563 | |||
564 | % if can_create_repo_groups: |
|
564 | % if can_create_repo_groups: | |
565 | <li> |
|
565 | <li> | |
566 | <a href="${h.route_path('repo_group_new')}" >${_(u'New Repository Group')}</a> |
|
566 | <a href="${h.route_path('repo_group_new')}" >${_(u'New Repository Group')}</a> | |
567 | </li> |
|
567 | </li> | |
568 | % endif |
|
568 | % endif | |
569 |
|
569 | |||
570 | <li> |
|
570 | <li> | |
571 | <a href="${h.route_path('gists_new')}">${_(u'New Gist')}</a> |
|
571 | <a href="${h.route_path('gists_new')}">${_(u'New Gist')}</a> | |
572 | </li> |
|
572 | </li> | |
573 |
|
573 | |||
574 | </ol> |
|
574 | </ol> | |
575 |
|
575 | |||
576 | </div> |
|
576 | </div> | |
577 | </li> |
|
577 | </li> | |
578 |
|
578 | |||
579 | ## notifications |
|
579 | ## notifications | |
580 | <li> |
|
580 | <li> | |
581 | <a class="${('empty' if c.unread_notifications == 0 else '')}" href="${h.route_path('notifications_show_all')}"> |
|
581 | <a class="${('empty' if c.unread_notifications == 0 else '')}" href="${h.route_path('notifications_show_all')}"> | |
582 | ${c.unread_notifications} |
|
582 | ${c.unread_notifications} | |
583 | </a> |
|
583 | </a> | |
584 | </li> |
|
584 | </li> | |
585 | % endif |
|
585 | % endif | |
586 |
|
586 | |||
587 | ## USER MENU |
|
587 | ## USER MENU | |
588 | <li id="quick_login_li" class="${'active' if active else ''}"> |
|
588 | <li id="quick_login_li" class="${'active' if active else ''}"> | |
589 | % if c.rhodecode_user.username == h.DEFAULT_USER: |
|
589 | % if c.rhodecode_user.username == h.DEFAULT_USER: | |
590 | <a id="quick_login_link" class="menulink childs" href="${h.route_path('login', _query={'came_from': h.current_route_path(request)})}"> |
|
590 | <a id="quick_login_link" class="menulink childs" href="${h.route_path('login', _query={'came_from': h.current_route_path(request)})}"> | |
591 | ${gravatar(c.rhodecode_user.email, 20)} |
|
591 | ${gravatar(c.rhodecode_user.email, 20)} | |
592 | <span class="user"> |
|
592 | <span class="user"> | |
593 | <span>${_('Sign in')}</span> |
|
593 | <span>${_('Sign in')}</span> | |
594 | </span> |
|
594 | </span> | |
595 | </a> |
|
595 | </a> | |
596 | % else: |
|
596 | % else: | |
597 | ## logged in user |
|
597 | ## logged in user | |
598 | <a id="quick_login_link" class="menulink childs"> |
|
598 | <a id="quick_login_link" class="menulink childs"> | |
599 | ${gravatar(c.rhodecode_user.email, 20)} |
|
599 | ${gravatar(c.rhodecode_user.email, 20)} | |
600 | <span class="user"> |
|
600 | <span class="user"> | |
601 | <span class="menu_link_user">${c.rhodecode_user.username}</span> |
|
601 | <span class="menu_link_user">${c.rhodecode_user.username}</span> | |
602 | <div class="show_more"></div> |
|
602 | <div class="show_more"></div> | |
603 | </span> |
|
603 | </span> | |
604 | </a> |
|
604 | </a> | |
605 | ## subnav with menu for logged in user |
|
605 | ## subnav with menu for logged in user | |
606 | <div class="user-menu submenu"> |
|
606 | <div class="user-menu submenu"> | |
607 | <div id="quick_login"> |
|
607 | <div id="quick_login"> | |
608 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
608 | %if c.rhodecode_user.username != h.DEFAULT_USER: | |
609 | <div class=""> |
|
609 | <div class=""> | |
610 | <div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div> |
|
610 | <div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div> | |
611 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> |
|
611 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> | |
612 | <div class="email">${c.rhodecode_user.email}</div> |
|
612 | <div class="email">${c.rhodecode_user.email}</div> | |
613 | </div> |
|
613 | </div> | |
614 | <div class=""> |
|
614 | <div class=""> | |
615 | <ol class="links"> |
|
615 | <ol class="links"> | |
616 | <li>${h.link_to(_(u'My account'),h.route_path('my_account_profile'))}</li> |
|
616 | <li>${h.link_to(_(u'My account'),h.route_path('my_account_profile'))}</li> | |
617 | % if c.rhodecode_user.personal_repo_group: |
|
617 | % if c.rhodecode_user.personal_repo_group: | |
618 | <li>${h.link_to(_(u'My personal group'), h.route_path('repo_group_home', repo_group_name=c.rhodecode_user.personal_repo_group.group_name))}</li> |
|
618 | <li>${h.link_to(_(u'My personal group'), h.route_path('repo_group_home', repo_group_name=c.rhodecode_user.personal_repo_group.group_name))}</li> | |
619 | % endif |
|
619 | % endif | |
620 | <li>${h.link_to(_(u'Pull Requests'), h.route_path('my_account_pullrequests'))}</li> |
|
620 | <li>${h.link_to(_(u'Pull Requests'), h.route_path('my_account_pullrequests'))}</li> | |
621 |
|
621 | |||
622 | % if c.debug_style: |
|
622 | % if c.debug_style: | |
623 | <li> |
|
623 | <li> | |
624 | <a class="menulink" title="${_('Style')}" href="${h.route_path('debug_style_home')}"> |
|
624 | <a class="menulink" title="${_('Style')}" href="${h.route_path('debug_style_home')}"> | |
625 | <div class="menulabel">${_('[Style]')}</div> |
|
625 | <div class="menulabel">${_('[Style]')}</div> | |
626 | </a> |
|
626 | </a> | |
627 | </li> |
|
627 | </li> | |
628 | % endif |
|
628 | % endif | |
629 |
|
629 | |||
630 | ## bookmark-items |
|
630 | ## bookmark-items | |
631 | <li class="bookmark-items"> |
|
631 | <li class="bookmark-items"> | |
632 | ${_('Bookmarks')} |
|
632 | ${_('Bookmarks')} | |
633 | <div class="pull-right"> |
|
633 | <div class="pull-right"> | |
634 | <a href="${h.route_path('my_account_bookmarks')}"> |
|
634 | <a href="${h.route_path('my_account_bookmarks')}"> | |
635 |
|
635 | |||
636 | <i class="icon-cog"></i> |
|
636 | <i class="icon-cog"></i> | |
637 | </a> |
|
637 | </a> | |
638 | </div> |
|
638 | </div> | |
639 | </li> |
|
639 | </li> | |
640 | % if not c.bookmark_items: |
|
640 | % if not c.bookmark_items: | |
641 | <li> |
|
641 | <li> | |
642 | <a href="${h.route_path('my_account_bookmarks')}">${_('No Bookmarks yet.')}</a> |
|
642 | <a href="${h.route_path('my_account_bookmarks')}">${_('No Bookmarks yet.')}</a> | |
643 | </li> |
|
643 | </li> | |
644 | % endif |
|
644 | % endif | |
645 | % for item in c.bookmark_items: |
|
645 | % for item in c.bookmark_items: | |
646 | <li> |
|
646 | <li> | |
647 | % if item.repository: |
|
647 | % if item.repository: | |
648 | <div> |
|
648 | <div> | |
649 | <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}"> |
|
649 | <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}"> | |
650 | <code>${item.position}</code> |
|
650 | <code>${item.position}</code> | |
651 | % if item.repository.repo_type == 'hg': |
|
651 | % if item.repository.repo_type == 'hg': | |
652 | <i class="icon-hg" title="${_('Repository')}" style="font-size: 16px"></i> |
|
652 | <i class="icon-hg" title="${_('Repository')}" style="font-size: 16px"></i> | |
653 | % elif item.repository.repo_type == 'git': |
|
653 | % elif item.repository.repo_type == 'git': | |
654 | <i class="icon-git" title="${_('Repository')}" style="font-size: 16px"></i> |
|
654 | <i class="icon-git" title="${_('Repository')}" style="font-size: 16px"></i> | |
655 | % elif item.repository.repo_type == 'svn': |
|
655 | % elif item.repository.repo_type == 'svn': | |
656 | <i class="icon-svn" title="${_('Repository')}" style="font-size: 16px"></i> |
|
656 | <i class="icon-svn" title="${_('Repository')}" style="font-size: 16px"></i> | |
657 | % endif |
|
657 | % endif | |
658 | ${(item.title or h.shorter(item.repository.repo_name, 30))} |
|
658 | ${(item.title or h.shorter(item.repository.repo_name, 30))} | |
659 | </a> |
|
659 | </a> | |
660 | </div> |
|
660 | </div> | |
661 | % elif item.repository_group: |
|
661 | % elif item.repository_group: | |
662 | <div> |
|
662 | <div> | |
663 | <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}"> |
|
663 | <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}"> | |
664 | <code>${item.position}</code> |
|
664 | <code>${item.position}</code> | |
665 | <i class="icon-repo-group" title="${_('Repository group')}" style="font-size: 14px"></i> |
|
665 | <i class="icon-repo-group" title="${_('Repository group')}" style="font-size: 14px"></i> | |
666 | ${(item.title or h.shorter(item.repository_group.group_name, 30))} |
|
666 | ${(item.title or h.shorter(item.repository_group.group_name, 30))} | |
667 | </a> |
|
667 | </a> | |
668 | </div> |
|
668 | </div> | |
669 | % else: |
|
669 | % else: | |
670 | <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}"> |
|
670 | <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}"> | |
671 | <code>${item.position}</code> |
|
671 | <code>${item.position}</code> | |
672 | ${item.title} |
|
672 | ${item.title} | |
673 | </a> |
|
673 | </a> | |
674 | % endif |
|
674 | % endif | |
675 | </li> |
|
675 | </li> | |
676 | % endfor |
|
676 | % endfor | |
677 |
|
677 | |||
678 | <li class="logout"> |
|
678 | <li class="logout"> | |
679 | ${h.secure_form(h.route_path('logout'), request=request)} |
|
679 | ${h.secure_form(h.route_path('logout'), request=request)} | |
680 | ${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")} |
|
680 | ${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")} | |
681 | ${h.end_form()} |
|
681 | ${h.end_form()} | |
682 | </li> |
|
682 | </li> | |
683 | </ol> |
|
683 | </ol> | |
684 | </div> |
|
684 | </div> | |
685 | %endif |
|
685 | %endif | |
686 | </div> |
|
686 | </div> | |
687 | </div> |
|
687 | </div> | |
688 |
|
688 | |||
689 | % endif |
|
689 | % endif | |
690 | </li> |
|
690 | </li> | |
691 | </%def> |
|
691 | </%def> | |
692 |
|
692 | |||
693 | <%def name="menu_items(active=None)"> |
|
693 | <%def name="menu_items(active=None)"> | |
694 |
|
694 | |||
695 | <ul id="quick" class="main_nav navigation horizontal-list"> |
|
695 | <ul id="quick" class="main_nav navigation horizontal-list"> | |
696 | ## notice box for important system messages |
|
696 | ## notice box for important system messages | |
697 | <li style="display: none"> |
|
697 | <li style="display: none"> | |
698 | <a class="notice-box" href="#openNotice" onclick="return false"> |
|
698 | <a class="notice-box" href="#openNotice" onclick="return false"> | |
699 | <div class="menulabel-notice" > |
|
699 | <div class="menulabel-notice" > | |
700 | 0 |
|
700 | 0 | |
701 | </div> |
|
701 | </div> | |
702 | </a> |
|
702 | </a> | |
703 | </li> |
|
703 | </li> | |
704 |
|
704 | |||
705 | ## Main filter |
|
705 | ## Main filter | |
706 | <li> |
|
706 | <li> | |
707 | <div class="menulabel main_filter_box"> |
|
707 | <div class="menulabel main_filter_box"> | |
708 | <div class="main_filter_input_box"> |
|
708 | <div class="main_filter_input_box"> | |
709 | <ul class="searchItems"> |
|
709 | <ul class="searchItems"> | |
710 |
|
710 | |||
711 | <li class="searchTag searchTagIcon"> |
|
711 | <li class="searchTag searchTagIcon"> | |
712 | <i class="icon-search"></i> |
|
712 | <i class="icon-search"></i> | |
713 | </li> |
|
713 | </li> | |
714 |
|
714 | |||
715 | % if c.template_context['search_context']['repo_id']: |
|
715 | % if c.template_context['search_context']['repo_id']: | |
716 | <li class="searchTag searchTagFilter searchTagHidable" > |
|
716 | <li class="searchTag searchTagFilter searchTagHidable" > | |
717 | ##<a href="${h.route_path('search_repo',repo_name=c.template_context['search_context']['repo_name'])}"> |
|
717 | ##<a href="${h.route_path('search_repo',repo_name=c.template_context['search_context']['repo_name'])}"> | |
718 | <span class="tag"> |
|
718 | <span class="tag"> | |
719 | This repo |
|
719 | This repo | |
720 | <a href="#removeGoToFilter" onclick="removeGoToFilter(); return false"><i class="icon-cancel-circled"></i></a> |
|
720 | <a href="#removeGoToFilter" onclick="removeGoToFilter(); return false"><i class="icon-cancel-circled"></i></a> | |
721 | </span> |
|
721 | </span> | |
722 | ##</a> |
|
722 | ##</a> | |
723 | </li> |
|
723 | </li> | |
724 | % elif c.template_context['search_context']['repo_group_id']: |
|
724 | % elif c.template_context['search_context']['repo_group_id']: | |
725 | <li class="searchTag searchTagFilter searchTagHidable"> |
|
725 | <li class="searchTag searchTagFilter searchTagHidable"> | |
726 | ##<a href="${h.route_path('search_repo_group',repo_group_name=c.template_context['search_context']['repo_group_name'])}"> |
|
726 | ##<a href="${h.route_path('search_repo_group',repo_group_name=c.template_context['search_context']['repo_group_name'])}"> | |
727 | <span class="tag"> |
|
727 | <span class="tag"> | |
728 | This group |
|
728 | This group | |
729 | <a href="#removeGoToFilter" onclick="removeGoToFilter(); return false"><i class="icon-cancel-circled"></i></a> |
|
729 | <a href="#removeGoToFilter" onclick="removeGoToFilter(); return false"><i class="icon-cancel-circled"></i></a> | |
730 | </span> |
|
730 | </span> | |
731 | ##</a> |
|
731 | ##</a> | |
732 | </li> |
|
732 | </li> | |
733 | % endif |
|
733 | % endif | |
734 |
|
734 | |||
735 | <li class="searchTagInput"> |
|
735 | <li class="searchTagInput"> | |
736 | <input class="main_filter_input" id="main_filter" size="25" type="text" name="main_filter" placeholder="${_('search / go to...')}" value="" /> |
|
736 | <input class="main_filter_input" id="main_filter" size="25" type="text" name="main_filter" placeholder="${_('search / go to...')}" value="" /> | |
737 | </li> |
|
737 | </li> | |
738 | <li class="searchTag searchTagHelp"> |
|
738 | <li class="searchTag searchTagHelp"> | |
739 | <a href="#showFilterHelp" onclick="showMainFilterBox(); return false">?</a> |
|
739 | <a href="#showFilterHelp" onclick="showMainFilterBox(); return false">?</a> | |
740 | </li> |
|
740 | </li> | |
741 | </ul> |
|
741 | </ul> | |
742 | </div> |
|
742 | </div> | |
743 | </div> |
|
743 | </div> | |
744 |
|
744 | |||
745 | <div id="main_filter_help" style="display: none"> |
|
745 | <div id="main_filter_help" style="display: none"> | |
746 | - Use '/' key to quickly access this field. |
|
746 | - Use '/' key to quickly access this field. | |
747 |
|
747 | |||
748 | - Enter a name of repository, or repository group for quick search. |
|
748 | - Enter a name of repository, or repository group for quick search. | |
749 |
|
749 | |||
750 | - Prefix query to allow special search: |
|
750 | - Prefix query to allow special search: | |
751 |
|
751 | |||
752 | user:admin, to search for usernames, always global |
|
752 | user:admin, to search for usernames, always global | |
753 |
|
753 | |||
754 | user_group:devops, to search for user groups, always global |
|
754 | user_group:devops, to search for user groups, always global | |
755 |
|
755 | |||
756 | commit:efced4, to search for commits, scoped to repositories or groups |
|
756 | commit:efced4, to search for commits, scoped to repositories or groups | |
757 |
|
757 | |||
758 | file:models.py, to search for file paths, scoped to repositories or groups |
|
758 | file:models.py, to search for file paths, scoped to repositories or groups | |
759 |
|
759 | |||
760 | % if c.template_context['search_context']['repo_id']: |
|
760 | % if c.template_context['search_context']['repo_id']: | |
761 | For advanced full text search visit: <a href="${h.route_path('search_repo',repo_name=c.template_context['search_context']['repo_name'])}">repository search</a> |
|
761 | For advanced full text search visit: <a href="${h.route_path('search_repo',repo_name=c.template_context['search_context']['repo_name'])}">repository search</a> | |
762 | % elif c.template_context['search_context']['repo_group_id']: |
|
762 | % elif c.template_context['search_context']['repo_group_id']: | |
763 | For advanced full text search visit: <a href="${h.route_path('search_repo_group',repo_group_name=c.template_context['search_context']['repo_group_name'])}">repository group search</a> |
|
763 | For advanced full text search visit: <a href="${h.route_path('search_repo_group',repo_group_name=c.template_context['search_context']['repo_group_name'])}">repository group search</a> | |
764 | % else: |
|
764 | % else: | |
765 | For advanced full text search visit: <a href="${h.route_path('search')}">global search</a> |
|
765 | For advanced full text search visit: <a href="${h.route_path('search')}">global search</a> | |
766 | % endif |
|
766 | % endif | |
767 | </div> |
|
767 | </div> | |
768 | </li> |
|
768 | </li> | |
769 |
|
769 | |||
770 | ## ROOT MENU |
|
770 | ## ROOT MENU | |
771 | <li class="${h.is_active('home', active)}"> |
|
771 | <li class="${h.is_active('home', active)}"> | |
772 | <a class="menulink" title="${_('Home')}" href="${h.route_path('home')}"> |
|
772 | <a class="menulink" title="${_('Home')}" href="${h.route_path('home')}"> | |
773 | <div class="menulabel">${_('Home')}</div> |
|
773 | <div class="menulabel">${_('Home')}</div> | |
774 | </a> |
|
774 | </a> | |
775 | </li> |
|
775 | </li> | |
776 |
|
776 | |||
777 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
777 | %if c.rhodecode_user.username != h.DEFAULT_USER: | |
778 | <li class="${h.is_active('journal', active)}"> |
|
778 | <li class="${h.is_active('journal', active)}"> | |
779 | <a class="menulink" title="${_('Show activity journal')}" href="${h.route_path('journal')}"> |
|
779 | <a class="menulink" title="${_('Show activity journal')}" href="${h.route_path('journal')}"> | |
780 | <div class="menulabel">${_('Journal')}</div> |
|
780 | <div class="menulabel">${_('Journal')}</div> | |
781 | </a> |
|
781 | </a> | |
782 | </li> |
|
782 | </li> | |
783 | %else: |
|
783 | %else: | |
784 | <li class="${h.is_active('journal', active)}"> |
|
784 | <li class="${h.is_active('journal', active)}"> | |
785 | <a class="menulink" title="${_('Show Public activity journal')}" href="${h.route_path('journal_public')}"> |
|
785 | <a class="menulink" title="${_('Show Public activity journal')}" href="${h.route_path('journal_public')}"> | |
786 | <div class="menulabel">${_('Public journal')}</div> |
|
786 | <div class="menulabel">${_('Public journal')}</div> | |
787 | </a> |
|
787 | </a> | |
788 | </li> |
|
788 | </li> | |
789 | %endif |
|
789 | %endif | |
790 |
|
790 | |||
791 | <li class="${h.is_active('gists', active)}"> |
|
791 | <li class="${h.is_active('gists', active)}"> | |
792 | <a class="menulink childs" title="${_('Show Gists')}" href="${h.route_path('gists_show')}"> |
|
792 | <a class="menulink childs" title="${_('Show Gists')}" href="${h.route_path('gists_show')}"> | |
793 | <div class="menulabel">${_('Gists')}</div> |
|
793 | <div class="menulabel">${_('Gists')}</div> | |
794 | </a> |
|
794 | </a> | |
795 | </li> |
|
795 | </li> | |
796 |
|
796 | |||
797 | % if c.is_super_admin or c.is_delegated_admin: |
|
797 | % if c.is_super_admin or c.is_delegated_admin: | |
798 | <li class="${h.is_active('admin', active)}"> |
|
798 | <li class="${h.is_active('admin', active)}"> | |
799 | <a class="menulink childs" title="${_('Admin settings')}" href="${h.route_path('admin_home')}"> |
|
799 | <a class="menulink childs" title="${_('Admin settings')}" href="${h.route_path('admin_home')}"> | |
800 | <div class="menulabel">${_('Admin')} </div> |
|
800 | <div class="menulabel">${_('Admin')} </div> | |
801 | </a> |
|
801 | </a> | |
802 | </li> |
|
802 | </li> | |
803 | % endif |
|
803 | % endif | |
804 |
|
804 | |||
805 | ## render extra user menu |
|
805 | ## render extra user menu | |
806 | ${usermenu(active=(active=='my_account'))} |
|
806 | ${usermenu(active=(active=='my_account'))} | |
807 |
|
807 | |||
808 | </ul> |
|
808 | </ul> | |
809 |
|
809 | |||
810 | <script type="text/javascript"> |
|
810 | <script type="text/javascript"> | |
811 | var visualShowPublicIcon = "${c.visual.show_public_icon}" == "True"; |
|
811 | var visualShowPublicIcon = "${c.visual.show_public_icon}" == "True"; | |
812 |
|
812 | |||
813 | var formatRepoResult = function(result, container, query, escapeMarkup) { |
|
813 | var formatRepoResult = function(result, container, query, escapeMarkup) { | |
814 | return function(data, escapeMarkup) { |
|
814 | return function(data, escapeMarkup) { | |
815 | if (!data.repo_id){ |
|
815 | if (!data.repo_id){ | |
816 | return data.text; // optgroup text Repositories |
|
816 | return data.text; // optgroup text Repositories | |
817 | } |
|
817 | } | |
818 |
|
818 | |||
819 | var tmpl = ''; |
|
819 | var tmpl = ''; | |
820 | var repoType = data['repo_type']; |
|
820 | var repoType = data['repo_type']; | |
821 | var repoName = data['text']; |
|
821 | var repoName = data['text']; | |
822 |
|
822 | |||
823 | if(data && data.type == 'repo'){ |
|
823 | if(data && data.type == 'repo'){ | |
824 | if(repoType === 'hg'){ |
|
824 | if(repoType === 'hg'){ | |
825 | tmpl += '<i class="icon-hg"></i> '; |
|
825 | tmpl += '<i class="icon-hg"></i> '; | |
826 | } |
|
826 | } | |
827 | else if(repoType === 'git'){ |
|
827 | else if(repoType === 'git'){ | |
828 | tmpl += '<i class="icon-git"></i> '; |
|
828 | tmpl += '<i class="icon-git"></i> '; | |
829 | } |
|
829 | } | |
830 | else if(repoType === 'svn'){ |
|
830 | else if(repoType === 'svn'){ | |
831 | tmpl += '<i class="icon-svn"></i> '; |
|
831 | tmpl += '<i class="icon-svn"></i> '; | |
832 | } |
|
832 | } | |
833 | if(data['private']){ |
|
833 | if(data['private']){ | |
834 | tmpl += '<i class="icon-lock" ></i> '; |
|
834 | tmpl += '<i class="icon-lock" ></i> '; | |
835 | } |
|
835 | } | |
836 | else if(visualShowPublicIcon){ |
|
836 | else if(visualShowPublicIcon){ | |
837 | tmpl += '<i class="icon-unlock-alt"></i> '; |
|
837 | tmpl += '<i class="icon-unlock-alt"></i> '; | |
838 | } |
|
838 | } | |
839 | } |
|
839 | } | |
840 | tmpl += escapeMarkup(repoName); |
|
840 | tmpl += escapeMarkup(repoName); | |
841 | return tmpl; |
|
841 | return tmpl; | |
842 |
|
842 | |||
843 | }(result, escapeMarkup); |
|
843 | }(result, escapeMarkup); | |
844 | }; |
|
844 | }; | |
845 |
|
845 | |||
846 | var formatRepoGroupResult = function(result, container, query, escapeMarkup) { |
|
846 | var formatRepoGroupResult = function(result, container, query, escapeMarkup) { | |
847 | return function(data, escapeMarkup) { |
|
847 | return function(data, escapeMarkup) { | |
848 | if (!data.repo_group_id){ |
|
848 | if (!data.repo_group_id){ | |
849 | return data.text; // optgroup text Repositories |
|
849 | return data.text; // optgroup text Repositories | |
850 | } |
|
850 | } | |
851 |
|
851 | |||
852 | var tmpl = ''; |
|
852 | var tmpl = ''; | |
853 | var repoGroupName = data['text']; |
|
853 | var repoGroupName = data['text']; | |
854 |
|
854 | |||
855 | if(data){ |
|
855 | if(data){ | |
856 |
|
856 | |||
857 | tmpl += '<i class="icon-repo-group"></i> '; |
|
857 | tmpl += '<i class="icon-repo-group"></i> '; | |
858 |
|
858 | |||
859 | } |
|
859 | } | |
860 | tmpl += escapeMarkup(repoGroupName); |
|
860 | tmpl += escapeMarkup(repoGroupName); | |
861 | return tmpl; |
|
861 | return tmpl; | |
862 |
|
862 | |||
863 | }(result, escapeMarkup); |
|
863 | }(result, escapeMarkup); | |
864 | }; |
|
864 | }; | |
865 |
|
865 | |||
866 | var escapeRegExChars = function (value) { |
|
866 | var escapeRegExChars = function (value) { | |
867 | return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); |
|
867 | return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); | |
868 | }; |
|
868 | }; | |
869 |
|
869 | |||
870 | var getRepoIcon = function(repo_type) { |
|
870 | var getRepoIcon = function(repo_type) { | |
871 | if (repo_type === 'hg') { |
|
871 | if (repo_type === 'hg') { | |
872 | return '<i class="icon-hg"></i> '; |
|
872 | return '<i class="icon-hg"></i> '; | |
873 | } |
|
873 | } | |
874 | else if (repo_type === 'git') { |
|
874 | else if (repo_type === 'git') { | |
875 | return '<i class="icon-git"></i> '; |
|
875 | return '<i class="icon-git"></i> '; | |
876 | } |
|
876 | } | |
877 | else if (repo_type === 'svn') { |
|
877 | else if (repo_type === 'svn') { | |
878 | return '<i class="icon-svn"></i> '; |
|
878 | return '<i class="icon-svn"></i> '; | |
879 | } |
|
879 | } | |
880 | return '' |
|
880 | return '' | |
881 | }; |
|
881 | }; | |
882 |
|
882 | |||
883 | var autocompleteMainFilterFormatResult = function (data, value, org_formatter) { |
|
883 | var autocompleteMainFilterFormatResult = function (data, value, org_formatter) { | |
884 |
|
884 | |||
885 | if (value.split(':').length === 2) { |
|
885 | if (value.split(':').length === 2) { | |
886 | value = value.split(':')[1] |
|
886 | value = value.split(':')[1] | |
887 | } |
|
887 | } | |
888 |
|
888 | |||
889 | var searchType = data['type']; |
|
889 | var searchType = data['type']; | |
890 | var searchSubType = data['subtype']; |
|
890 | var searchSubType = data['subtype']; | |
891 | var valueDisplay = data['value_display']; |
|
891 | var valueDisplay = data['value_display']; | |
892 | var valueIcon = data['value_icon']; |
|
892 | var valueIcon = data['value_icon']; | |
893 |
|
893 | |||
894 | var pattern = '(' + escapeRegExChars(value) + ')'; |
|
894 | var pattern = '(' + escapeRegExChars(value) + ')'; | |
895 |
|
895 | |||
896 | valueDisplay = Select2.util.escapeMarkup(valueDisplay); |
|
896 | valueDisplay = Select2.util.escapeMarkup(valueDisplay); | |
897 |
|
897 | |||
898 | // highlight match |
|
898 | // highlight match | |
899 | if (searchType != 'text') { |
|
899 | if (searchType != 'text') { | |
900 | valueDisplay = valueDisplay.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>'); |
|
900 | valueDisplay = valueDisplay.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>'); | |
901 | } |
|
901 | } | |
902 |
|
902 | |||
903 | var icon = ''; |
|
903 | var icon = ''; | |
904 |
|
904 | |||
905 | if (searchType === 'hint') { |
|
905 | if (searchType === 'hint') { | |
906 | icon += '<i class="icon-repo-group"></i> '; |
|
906 | icon += '<i class="icon-repo-group"></i> '; | |
907 | } |
|
907 | } | |
908 | // full text search/hints |
|
908 | // full text search/hints | |
909 | else if (searchType === 'search') { |
|
909 | else if (searchType === 'search') { | |
910 | if (valueIcon === undefined) { |
|
910 | if (valueIcon === undefined) { | |
911 | icon += '<i class="icon-more"></i> '; |
|
911 | icon += '<i class="icon-more"></i> '; | |
912 | } else { |
|
912 | } else { | |
913 | icon += valueIcon + ' '; |
|
913 | icon += valueIcon + ' '; | |
914 | } |
|
914 | } | |
915 |
|
915 | |||
916 | if (searchSubType !== undefined && searchSubType == 'repo') { |
|
916 | if (searchSubType !== undefined && searchSubType == 'repo') { | |
917 | valueDisplay += '<div class="pull-right tag">repository</div>'; |
|
917 | valueDisplay += '<div class="pull-right tag">repository</div>'; | |
918 | } |
|
918 | } | |
919 | else if (searchSubType !== undefined && searchSubType == 'repo_group') { |
|
919 | else if (searchSubType !== undefined && searchSubType == 'repo_group') { | |
920 | valueDisplay += '<div class="pull-right tag">repo group</div>'; |
|
920 | valueDisplay += '<div class="pull-right tag">repo group</div>'; | |
921 | } |
|
921 | } | |
922 | } |
|
922 | } | |
923 | // repository |
|
923 | // repository | |
924 | else if (searchType === 'repo') { |
|
924 | else if (searchType === 'repo') { | |
925 |
|
925 | |||
926 | var repoIcon = getRepoIcon(data['repo_type']); |
|
926 | var repoIcon = getRepoIcon(data['repo_type']); | |
927 | icon += repoIcon; |
|
927 | icon += repoIcon; | |
928 |
|
928 | |||
929 | if (data['private']) { |
|
929 | if (data['private']) { | |
930 | icon += '<i class="icon-lock" ></i> '; |
|
930 | icon += '<i class="icon-lock" ></i> '; | |
931 | } |
|
931 | } | |
932 | else if (visualShowPublicIcon) { |
|
932 | else if (visualShowPublicIcon) { | |
933 | icon += '<i class="icon-unlock-alt"></i> '; |
|
933 | icon += '<i class="icon-unlock-alt"></i> '; | |
934 | } |
|
934 | } | |
935 | } |
|
935 | } | |
936 | // repository groups |
|
936 | // repository groups | |
937 | else if (searchType === 'repo_group') { |
|
937 | else if (searchType === 'repo_group') { | |
938 | icon += '<i class="icon-repo-group"></i> '; |
|
938 | icon += '<i class="icon-repo-group"></i> '; | |
939 | } |
|
939 | } | |
940 | // user group |
|
940 | // user group | |
941 | else if (searchType === 'user_group') { |
|
941 | else if (searchType === 'user_group') { | |
942 | icon += '<i class="icon-group"></i> '; |
|
942 | icon += '<i class="icon-group"></i> '; | |
943 | } |
|
943 | } | |
944 | // user |
|
944 | // user | |
945 | else if (searchType === 'user') { |
|
945 | else if (searchType === 'user') { | |
946 | icon += '<img class="gravatar" src="{0}"/>'.format(data['icon_link']); |
|
946 | icon += '<img class="gravatar" src="{0}"/>'.format(data['icon_link']); | |
947 | } |
|
947 | } | |
948 | // commit |
|
948 | // commit | |
949 | else if (searchType === 'commit') { |
|
949 | else if (searchType === 'commit') { | |
950 | var repo_data = data['repo_data']; |
|
950 | var repo_data = data['repo_data']; | |
951 | var repoIcon = getRepoIcon(repo_data['repository_type']); |
|
951 | var repoIcon = getRepoIcon(repo_data['repository_type']); | |
952 | if (repoIcon) { |
|
952 | if (repoIcon) { | |
953 | icon += repoIcon; |
|
953 | icon += repoIcon; | |
954 | } else { |
|
954 | } else { | |
955 | icon += '<i class="icon-tag"></i>'; |
|
955 | icon += '<i class="icon-tag"></i>'; | |
956 | } |
|
956 | } | |
957 | } |
|
957 | } | |
958 | // file |
|
958 | // file | |
959 | else if (searchType === 'file') { |
|
959 | else if (searchType === 'file') { | |
960 | var repo_data = data['repo_data']; |
|
960 | var repo_data = data['repo_data']; | |
961 | var repoIcon = getRepoIcon(repo_data['repository_type']); |
|
961 | var repoIcon = getRepoIcon(repo_data['repository_type']); | |
962 | if (repoIcon) { |
|
962 | if (repoIcon) { | |
963 | icon += repoIcon; |
|
963 | icon += repoIcon; | |
964 | } else { |
|
964 | } else { | |
965 | icon += '<i class="icon-tag"></i>'; |
|
965 | icon += '<i class="icon-tag"></i>'; | |
966 | } |
|
966 | } | |
967 | } |
|
967 | } | |
968 | // generic text |
|
968 | // generic text | |
969 | else if (searchType === 'text') { |
|
969 | else if (searchType === 'text') { | |
970 | icon = ''; |
|
970 | icon = ''; | |
971 | } |
|
971 | } | |
972 |
|
972 | |||
973 | var tmpl = '<div class="ac-container-wrap">{0}{1}</div>'; |
|
973 | var tmpl = '<div class="ac-container-wrap">{0}{1}</div>'; | |
974 | return tmpl.format(icon, valueDisplay); |
|
974 | return tmpl.format(icon, valueDisplay); | |
975 | }; |
|
975 | }; | |
976 |
|
976 | |||
977 | var handleSelect = function(element, suggestion) { |
|
977 | var handleSelect = function(element, suggestion) { | |
978 | if (suggestion.type === "hint") { |
|
978 | if (suggestion.type === "hint") { | |
979 | // we skip action |
|
979 | // we skip action | |
980 | $('#main_filter').focus(); |
|
980 | $('#main_filter').focus(); | |
981 | } |
|
981 | } | |
982 | else if (suggestion.type === "text") { |
|
982 | else if (suggestion.type === "text") { | |
983 | // we skip action |
|
983 | // we skip action | |
984 | $('#main_filter').focus(); |
|
984 | $('#main_filter').focus(); | |
985 |
|
985 | |||
986 | } else { |
|
986 | } else { | |
987 | window.location = suggestion['url']; |
|
987 | window.location = suggestion['url']; | |
988 | } |
|
988 | } | |
989 | }; |
|
989 | }; | |
990 |
|
990 | |||
991 | var autocompleteMainFilterResult = function (suggestion, originalQuery, queryLowerCase) { |
|
991 | var autocompleteMainFilterResult = function (suggestion, originalQuery, queryLowerCase) { | |
992 | if (queryLowerCase.split(':').length === 2) { |
|
992 | if (queryLowerCase.split(':').length === 2) { | |
993 | queryLowerCase = queryLowerCase.split(':')[1] |
|
993 | queryLowerCase = queryLowerCase.split(':')[1] | |
994 | } |
|
994 | } | |
995 | if (suggestion.type === "text") { |
|
995 | if (suggestion.type === "text") { | |
996 | // special case we don't want to "skip" display for |
|
996 | // special case we don't want to "skip" display for | |
997 | return true |
|
997 | return true | |
998 | } |
|
998 | } | |
999 | return suggestion.value_display.toLowerCase().indexOf(queryLowerCase) !== -1; |
|
999 | return suggestion.value_display.toLowerCase().indexOf(queryLowerCase) !== -1; | |
1000 | }; |
|
1000 | }; | |
1001 |
|
1001 | |||
1002 | var cleanContext = { |
|
1002 | var cleanContext = { | |
1003 | repo_view_type: null, |
|
1003 | repo_view_type: null, | |
1004 |
|
1004 | |||
1005 | repo_id: null, |
|
1005 | repo_id: null, | |
1006 | repo_name: "", |
|
1006 | repo_name: "", | |
1007 |
|
1007 | |||
1008 | repo_group_id: null, |
|
1008 | repo_group_id: null, | |
1009 | repo_group_name: null |
|
1009 | repo_group_name: null | |
1010 | }; |
|
1010 | }; | |
1011 | var removeGoToFilter = function () { |
|
1011 | var removeGoToFilter = function () { | |
1012 | $('.searchTagHidable').hide(); |
|
1012 | $('.searchTagHidable').hide(); | |
1013 | $('#main_filter').autocomplete( |
|
1013 | $('#main_filter').autocomplete( | |
1014 | 'setOptions', {params:{search_context: cleanContext}}); |
|
1014 | 'setOptions', {params:{search_context: cleanContext}}); | |
1015 | }; |
|
1015 | }; | |
1016 |
|
1016 | |||
1017 | $('#main_filter').autocomplete({ |
|
1017 | $('#main_filter').autocomplete({ | |
1018 | serviceUrl: pyroutes.url('goto_switcher_data'), |
|
1018 | serviceUrl: pyroutes.url('goto_switcher_data'), | |
1019 | params: { |
|
1019 | params: { | |
1020 | "search_context": templateContext.search_context |
|
1020 | "search_context": templateContext.search_context | |
1021 | }, |
|
1021 | }, | |
1022 | minChars:2, |
|
1022 | minChars:2, | |
1023 | maxHeight:400, |
|
1023 | maxHeight:400, | |
1024 | deferRequestBy: 300, //miliseconds |
|
1024 | deferRequestBy: 300, //miliseconds | |
1025 | tabDisabled: true, |
|
1025 | tabDisabled: true, | |
1026 | autoSelectFirst: false, |
|
1026 | autoSelectFirst: false, | |
1027 | containerClass: 'autocomplete-qfilter-suggestions', |
|
1027 | containerClass: 'autocomplete-qfilter-suggestions', | |
1028 | formatResult: autocompleteMainFilterFormatResult, |
|
1028 | formatResult: autocompleteMainFilterFormatResult, | |
1029 | lookupFilter: autocompleteMainFilterResult, |
|
1029 | lookupFilter: autocompleteMainFilterResult, | |
1030 | onSelect: function (element, suggestion) { |
|
1030 | onSelect: function (element, suggestion) { | |
1031 | handleSelect(element, suggestion); |
|
1031 | handleSelect(element, suggestion); | |
1032 | return false; |
|
1032 | return false; | |
1033 | }, |
|
1033 | }, | |
1034 | onSearchError: function (element, query, jqXHR, textStatus, errorThrown) { |
|
1034 | onSearchError: function (element, query, jqXHR, textStatus, errorThrown) { | |
1035 | if (jqXHR !== 'abort') { |
|
1035 | if (jqXHR !== 'abort') { | |
1036 | alert("Error during search.\nError code: {0}".format(textStatus)); |
|
1036 | alert("Error during search.\nError code: {0}".format(textStatus)); | |
1037 | window.location = ''; |
|
1037 | window.location = ''; | |
1038 | } |
|
1038 | } | |
1039 | }, |
|
1039 | }, | |
1040 | onSearchStart: function (params) { |
|
1040 | onSearchStart: function (params) { | |
1041 | $('.searchTag.searchTagIcon').html('<i class="icon-spin animate-spin"></i>') |
|
1041 | $('.searchTag.searchTagIcon').html('<i class="icon-spin animate-spin"></i>') | |
1042 | }, |
|
1042 | }, | |
1043 | onSearchComplete: function (query, suggestions) { |
|
1043 | onSearchComplete: function (query, suggestions) { | |
1044 | $('.searchTag.searchTagIcon').html('<i class="icon-search"></i>') |
|
1044 | $('.searchTag.searchTagIcon').html('<i class="icon-search"></i>') | |
1045 | }, |
|
1045 | }, | |
1046 | }); |
|
1046 | }); | |
1047 |
|
1047 | |||
1048 | showMainFilterBox = function () { |
|
1048 | showMainFilterBox = function () { | |
1049 | $('#main_filter_help').toggle(); |
|
1049 | $('#main_filter_help').toggle(); | |
1050 | }; |
|
1050 | }; | |
1051 |
|
1051 | |||
1052 | $('#main_filter').on('keydown.autocomplete', function (e) { |
|
1052 | $('#main_filter').on('keydown.autocomplete', function (e) { | |
1053 |
|
1053 | |||
1054 | var BACKSPACE = 8; |
|
1054 | var BACKSPACE = 8; | |
1055 | var el = $(e.currentTarget); |
|
1055 | var el = $(e.currentTarget); | |
1056 | if(e.which === BACKSPACE){ |
|
1056 | if(e.which === BACKSPACE){ | |
1057 | var inputVal = el.val(); |
|
1057 | var inputVal = el.val(); | |
1058 | if (inputVal === ""){ |
|
1058 | if (inputVal === ""){ | |
1059 | removeGoToFilter() |
|
1059 | removeGoToFilter() | |
1060 | } |
|
1060 | } | |
1061 | } |
|
1061 | } | |
1062 | }); |
|
1062 | }); | |
1063 |
|
1063 | |||
1064 | </script> |
|
1064 | </script> | |
1065 | <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script> |
|
1065 | <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script> | |
1066 | </%def> |
|
1066 | </%def> | |
1067 |
|
1067 | |||
1068 | <div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
|
1068 | <div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
1069 | <div class="modal-dialog"> |
|
1069 | <div class="modal-dialog"> | |
1070 | <div class="modal-content"> |
|
1070 | <div class="modal-content"> | |
1071 | <div class="modal-header"> |
|
1071 | <div class="modal-header"> | |
1072 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
|
1072 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
1073 | <h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4> |
|
1073 | <h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4> | |
1074 | </div> |
|
1074 | </div> | |
1075 | <div class="modal-body"> |
|
1075 | <div class="modal-body"> | |
1076 | <div class="block-left"> |
|
1076 | <div class="block-left"> | |
1077 | <table class="keyboard-mappings"> |
|
1077 | <table class="keyboard-mappings"> | |
1078 | <tbody> |
|
1078 | <tbody> | |
1079 | <tr> |
|
1079 | <tr> | |
1080 | <th></th> |
|
1080 | <th></th> | |
1081 | <th>${_('Site-wide shortcuts')}</th> |
|
1081 | <th>${_('Site-wide shortcuts')}</th> | |
1082 | </tr> |
|
1082 | </tr> | |
1083 | <% |
|
1083 | <% | |
1084 | elems = [ |
|
1084 | elems = [ | |
1085 | ('/', 'Use quick search box'), |
|
1085 | ('/', 'Use quick search box'), | |
1086 | ('g h', 'Goto home page'), |
|
1086 | ('g h', 'Goto home page'), | |
1087 | ('g g', 'Goto my private gists page'), |
|
1087 | ('g g', 'Goto my private gists page'), | |
1088 | ('g G', 'Goto my public gists page'), |
|
1088 | ('g G', 'Goto my public gists page'), | |
1089 | ('g 0-9', 'Goto bookmarked items from 0-9'), |
|
1089 | ('g 0-9', 'Goto bookmarked items from 0-9'), | |
1090 | ('n r', 'New repository page'), |
|
1090 | ('n r', 'New repository page'), | |
1091 | ('n g', 'New gist page'), |
|
1091 | ('n g', 'New gist page'), | |
1092 | ] |
|
1092 | ] | |
1093 | %> |
|
1093 | %> | |
1094 | %for key, desc in elems: |
|
1094 | %for key, desc in elems: | |
1095 | <tr> |
|
1095 | <tr> | |
1096 | <td class="keys"> |
|
1096 | <td class="keys"> | |
1097 | <span class="key tag">${key}</span> |
|
1097 | <span class="key tag">${key}</span> | |
1098 | </td> |
|
1098 | </td> | |
1099 | <td>${desc}</td> |
|
1099 | <td>${desc}</td> | |
1100 | </tr> |
|
1100 | </tr> | |
1101 | %endfor |
|
1101 | %endfor | |
1102 | </tbody> |
|
1102 | </tbody> | |
1103 | </table> |
|
1103 | </table> | |
1104 | </div> |
|
1104 | </div> | |
1105 | <div class="block-left"> |
|
1105 | <div class="block-left"> | |
1106 | <table class="keyboard-mappings"> |
|
1106 | <table class="keyboard-mappings"> | |
1107 | <tbody> |
|
1107 | <tbody> | |
1108 | <tr> |
|
1108 | <tr> | |
1109 | <th></th> |
|
1109 | <th></th> | |
1110 | <th>${_('Repositories')}</th> |
|
1110 | <th>${_('Repositories')}</th> | |
1111 | </tr> |
|
1111 | </tr> | |
1112 | <% |
|
1112 | <% | |
1113 | elems = [ |
|
1113 | elems = [ | |
1114 | ('g s', 'Goto summary page'), |
|
1114 | ('g s', 'Goto summary page'), | |
1115 | ('g c', 'Goto changelog page'), |
|
1115 | ('g c', 'Goto changelog page'), | |
1116 | ('g f', 'Goto files page'), |
|
1116 | ('g f', 'Goto files page'), | |
1117 | ('g F', 'Goto files page with file search activated'), |
|
1117 | ('g F', 'Goto files page with file search activated'), | |
1118 | ('g p', 'Goto pull requests page'), |
|
1118 | ('g p', 'Goto pull requests page'), | |
1119 | ('g o', 'Goto repository settings'), |
|
1119 | ('g o', 'Goto repository settings'), | |
1120 | ('g O', 'Goto repository access permissions settings'), |
|
1120 | ('g O', 'Goto repository access permissions settings'), | |
1121 | ] |
|
1121 | ] | |
1122 | %> |
|
1122 | %> | |
1123 | %for key, desc in elems: |
|
1123 | %for key, desc in elems: | |
1124 | <tr> |
|
1124 | <tr> | |
1125 | <td class="keys"> |
|
1125 | <td class="keys"> | |
1126 | <span class="key tag">${key}</span> |
|
1126 | <span class="key tag">${key}</span> | |
1127 | </td> |
|
1127 | </td> | |
1128 | <td>${desc}</td> |
|
1128 | <td>${desc}</td> | |
1129 | </tr> |
|
1129 | </tr> | |
1130 | %endfor |
|
1130 | %endfor | |
1131 | </tbody> |
|
1131 | </tbody> | |
1132 | </table> |
|
1132 | </table> | |
1133 | </div> |
|
1133 | </div> | |
1134 | </div> |
|
1134 | </div> | |
1135 | <div class="modal-footer"> |
|
1135 | <div class="modal-footer"> | |
1136 | </div> |
|
1136 | </div> | |
1137 | </div><!-- /.modal-content --> |
|
1137 | </div><!-- /.modal-content --> | |
1138 | </div><!-- /.modal-dialog --> |
|
1138 | </div><!-- /.modal-dialog --> | |
1139 | </div><!-- /.modal --> |
|
1139 | </div><!-- /.modal --> |
@@ -1,372 +1,372 b'' | |||||
1 | ## snippet for displaying permissions overview for users |
|
1 | ## snippet for displaying permissions overview for users | |
2 | ## usage: |
|
2 | ## usage: | |
3 | ## <%namespace name="p" file="/base/perms_summary.mako"/> |
|
3 | ## <%namespace name="p" file="/base/perms_summary.mako"/> | |
4 | ## ${p.perms_summary(c.perm_user.permissions)} |
|
4 | ## ${p.perms_summary(c.perm_user.permissions)} | |
5 |
|
5 | |||
6 | <%def name="perms_summary(permissions, show_all=False, actions=True, side_link=None)"> |
|
6 | <%def name="perms_summary(permissions, show_all=False, actions=True, side_link=None)"> | |
7 | <% section_to_label = { |
|
7 | <% section_to_label = { | |
8 | 'global': 'Global Permissions', |
|
8 | 'global': 'Global Permissions', | |
9 | 'repository_branches': 'Repository Branch Rules', |
|
9 | 'repository_branches': 'Repository Branch Rules', | |
10 | 'repositories': 'Repository Access Permissions', |
|
10 | 'repositories': 'Repository Access Permissions', | |
11 | 'user_groups': 'User Group Permissions', |
|
11 | 'user_groups': 'User Group Permissions', | |
12 | 'repositories_groups': 'Repository Group Permissions', |
|
12 | 'repositories_groups': 'Repository Group Permissions', | |
13 | } %> |
|
13 | } %> | |
14 |
|
14 | |||
15 | <div id="perms" class="table fields"> |
|
15 | <div id="perms" class="table fields"> | |
16 | %for section in sorted(permissions.keys(), key=lambda item: {'global': 0, 'repository_branches': 1}.get(item, 1000)): |
|
16 | %for section in sorted(permissions.keys(), key=lambda item: {'global': 0, 'repository_branches': 1}.get(item, 1000)): | |
17 | <% total_counter = 0 %> |
|
17 | <% total_counter = 0 %> | |
18 |
|
18 | |||
19 | <div class="panel panel-default"> |
|
19 | <div class="panel panel-default"> | |
20 | <div class="panel-heading" id="${section.replace("_","-")}-permissions"> |
|
20 | <div class="panel-heading" id="${section.replace("_","-")}-permissions"> | |
21 | <h3 class="panel-title">${section_to_label.get(section, section)} - <span id="total_count_${section}"></span> |
|
21 | <h3 class="panel-title">${section_to_label.get(section, section)} - <span id="total_count_${section}"></span> | |
22 | <a class="permalink" href="#${section.replace("_","-")}-permissions"> ΒΆ</a> |
|
22 | <a class="permalink" href="#${section.replace("_","-")}-permissions"> ΒΆ</a> | |
23 | </h3> |
|
23 | </h3> | |
24 | % if side_link: |
|
24 | % if side_link: | |
25 | <div class="pull-right"> |
|
25 | <div class="pull-right"> | |
26 | <a href="${side_link}">${_('in JSON format')}</a> |
|
26 | <a href="${side_link}">${_('in JSON format')}</a> | |
27 | </div> |
|
27 | </div> | |
28 | % endif |
|
28 | % endif | |
29 | </div> |
|
29 | </div> | |
30 | <div class="panel-body"> |
|
30 | <div class="panel-body"> | |
31 | <div class="perms_section_head field"> |
|
31 | <div class="perms_section_head field"> | |
32 | <div class="radios"> |
|
32 | <div class="radios"> | |
33 | % if section == 'repository_branches': |
|
33 | % if section == 'repository_branches': | |
34 | <span class="permissions_boxes"> |
|
34 | <span class="permissions_boxes"> | |
35 | <span class="desc">${_('show')}: </span> |
|
35 | <span class="desc">${_('show')}: </span> | |
36 | ${h.checkbox('perms_filter_none_%s' % section, 'none', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='none')} <label for="${'perms_filter_none_{}'.format(section)}"><span class="perm_tag none">${_('none')}</span></label> |
|
36 | ${h.checkbox('perms_filter_none_%s' % section, 'none', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='none')} <label for="${'perms_filter_none_{}'.format(section)}"><span class="perm_tag none">${_('none')}</span></label> | |
37 | ${h.checkbox('perms_filter_merge_%s' % section, 'merge', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='merge')} <label for="${'perms_filter_merge_{}'.format(section)}"><span class="perm_tag merge">${_('merge')}</span></label> |
|
37 | ${h.checkbox('perms_filter_merge_%s' % section, 'merge', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='merge')} <label for="${'perms_filter_merge_{}'.format(section)}"><span class="perm_tag merge">${_('merge')}</span></label> | |
38 | ${h.checkbox('perms_filter_push_%s' % section, 'push', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='push')} <label for="${'perms_filter_push_{}'.format(section)}"> <span class="perm_tag push">${_('push')}</span></label> |
|
38 | ${h.checkbox('perms_filter_push_%s' % section, 'push', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='push')} <label for="${'perms_filter_push_{}'.format(section)}"> <span class="perm_tag push">${_('push')}</span></label> | |
39 | ${h.checkbox('perms_filter_push_force_%s' % section, 'push_force', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='push_force')} <label for="${'perms_filter_push_force_{}'.format(section)}"><span class="perm_tag push_force">${_('push force')}</span></label> |
|
39 | ${h.checkbox('perms_filter_push_force_%s' % section, 'push_force', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='push_force')} <label for="${'perms_filter_push_force_{}'.format(section)}"><span class="perm_tag push_force">${_('push force')}</span></label> | |
40 | </span> |
|
40 | </span> | |
41 | % elif section != 'global': |
|
41 | % elif section != 'global': | |
42 | <span class="permissions_boxes"> |
|
42 | <span class="permissions_boxes"> | |
43 | <span class="desc">${_('show')}: </span> |
|
43 | <span class="desc">${_('show')}: </span> | |
44 | ${h.checkbox('perms_filter_none_%s' % section, 'none', '', class_='perm_filter filter_%s' % section, section=section, perm_type='none')} <label for="${'perms_filter_none_{}'.format(section)}"><span class="perm_tag none">${_('none')}</span></label> |
|
44 | ${h.checkbox('perms_filter_none_%s' % section, 'none', '', class_='perm_filter filter_%s' % section, section=section, perm_type='none')} <label for="${'perms_filter_none_{}'.format(section)}"><span class="perm_tag none">${_('none')}</span></label> | |
45 | ${h.checkbox('perms_filter_read_%s' % section, 'read', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='read')} <label for="${'perms_filter_read_{}'.format(section)}"><span class="perm_tag read">${_('read')}</span></label> |
|
45 | ${h.checkbox('perms_filter_read_%s' % section, 'read', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='read')} <label for="${'perms_filter_read_{}'.format(section)}"><span class="perm_tag read">${_('read')}</span></label> | |
46 | ${h.checkbox('perms_filter_write_%s' % section, 'write', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='write')} <label for="${'perms_filter_write_{}'.format(section)}"> <span class="perm_tag write">${_('write')}</span></label> |
|
46 | ${h.checkbox('perms_filter_write_%s' % section, 'write', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='write')} <label for="${'perms_filter_write_{}'.format(section)}"> <span class="perm_tag write">${_('write')}</span></label> | |
47 | ${h.checkbox('perms_filter_admin_%s' % section, 'admin', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='admin')} <label for="${'perms_filter_admin_{}'.format(section)}"><span class="perm_tag admin">${_('admin')}</span></label> |
|
47 | ${h.checkbox('perms_filter_admin_%s' % section, 'admin', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='admin')} <label for="${'perms_filter_admin_{}'.format(section)}"><span class="perm_tag admin">${_('admin')}</span></label> | |
48 | </span> |
|
48 | </span> | |
49 | % endif |
|
49 | % endif | |
50 |
|
50 | |||
51 | </div> |
|
51 | </div> | |
52 | </div> |
|
52 | </div> | |
53 | <div class="field"> |
|
53 | <div class="field"> | |
54 | %if not permissions[section]: |
|
54 | %if not permissions[section]: | |
55 | <p class="empty_data help-block">${_('No permissions defined')}</p> |
|
55 | <p class="empty_data help-block">${_('No permissions defined')}</p> | |
56 | %else: |
|
56 | %else: | |
57 | <div id='tbl_list_wrap_${section}'> |
|
57 | <div id='tbl_list_wrap_${section}'> | |
58 | <table id="tbl_list_${section}" class="rctable"> |
|
58 | <table id="tbl_list_${section}" class="rctable"> | |
59 | ## global permission box |
|
59 | ## global permission box | |
60 | %if section == 'global': |
|
60 | %if section == 'global': | |
61 | <thead> |
|
61 | <thead> | |
62 | <tr> |
|
62 | <tr> | |
63 | <th colspan="2" class="left">${_('Permission')}</th> |
|
63 | <th colspan="2" class="left">${_('Permission')}</th> | |
64 | %if actions: |
|
64 | %if actions: | |
65 | <th colspan="2">${_('Edit Permission')}</th> |
|
65 | <th colspan="2">${_('Edit Permission')}</th> | |
66 | %endif |
|
66 | %endif | |
67 | </thead> |
|
67 | </thead> | |
68 | <tbody> |
|
68 | <tbody> | |
69 |
|
69 | |||
70 | <% |
|
70 | <% | |
71 | def get_section_perms(prefix, opts): |
|
71 | def get_section_perms(prefix, opts): | |
72 | _selected = [] |
|
72 | _selected = [] | |
73 | for op in opts: |
|
73 | for op in opts: | |
74 | if op.startswith(prefix) and not op.startswith('hg.create.write_on_repogroup'): |
|
74 | if op.startswith(prefix) and not op.startswith('hg.create.write_on_repogroup'): | |
75 | _selected.append(op) |
|
75 | _selected.append(op) | |
76 | admin = 'hg.admin' in opts |
|
76 | admin = 'hg.admin' in opts | |
77 | _selected_vals = [x.partition(prefix)[-1] for x in _selected] |
|
77 | _selected_vals = [x.partition(prefix)[-1] for x in _selected] | |
78 | return admin, _selected_vals, _selected |
|
78 | return admin, _selected_vals, _selected | |
79 | %> |
|
79 | %> | |
80 |
|
80 | |||
81 | <%def name="glob(lbl, val, val_lbl=None, edit_url=None, edit_global_url=None)"> |
|
81 | <%def name="glob(lbl, val, val_lbl=None, edit_url=None, edit_global_url=None)"> | |
82 | <tr> |
|
82 | <tr> | |
83 | <td class="td-tags"> |
|
83 | <td class="td-tags"> | |
84 | ${lbl} |
|
84 | ${lbl} | |
85 | </td> |
|
85 | </td> | |
86 | <td class="td-tags"> |
|
86 | <td class="td-tags"> | |
87 | %if val[0]: |
|
87 | %if val[0]: | |
88 | %if not val_lbl: |
|
88 | %if not val_lbl: | |
89 |
## super |
|
89 | ## super-admin case | |
90 | True |
|
90 | True | |
91 | %else: |
|
91 | %else: | |
92 | <span class="perm_tag admin">${val_lbl}.admin</span> |
|
92 | <span class="perm_tag admin">${val_lbl}.admin</span> | |
93 | %endif |
|
93 | %endif | |
94 | %else: |
|
94 | %else: | |
95 | %if not val_lbl: |
|
95 | %if not val_lbl: | |
96 | ${{'false': False, |
|
96 | ${{'false': False, | |
97 | 'true': True, |
|
97 | 'true': True, | |
98 | 'none': False, |
|
98 | 'none': False, | |
99 | 'repository': True}.get(val[1][0] if 0 < len(val[1]) else 'false')} |
|
99 | 'repository': True}.get(val[1][0] if 0 < len(val[1]) else 'false')} | |
100 | %else: |
|
100 | %else: | |
101 | <span class="perm_tag ${val[1][0]}">${val_lbl}.${val[1][0]}</span> |
|
101 | <span class="perm_tag ${val[1][0]}">${val_lbl}.${val[1][0]}</span> | |
102 | %endif |
|
102 | %endif | |
103 | %endif |
|
103 | %endif | |
104 | </td> |
|
104 | </td> | |
105 | %if actions: |
|
105 | %if actions: | |
106 |
|
106 | |||
107 | % if edit_url or edit_global_url: |
|
107 | % if edit_url or edit_global_url: | |
108 |
|
108 | |||
109 | <td class="td-action"> |
|
109 | <td class="td-action"> | |
110 | % if edit_url: |
|
110 | % if edit_url: | |
111 | <a href="${edit_url}">${_('edit')}</a> |
|
111 | <a href="${edit_url}">${_('edit')}</a> | |
112 | % else: |
|
112 | % else: | |
113 | - |
|
113 | - | |
114 | % endif |
|
114 | % endif | |
115 | </td> |
|
115 | </td> | |
116 |
|
116 | |||
117 | <td class="td-action"> |
|
117 | <td class="td-action"> | |
118 | % if edit_global_url: |
|
118 | % if edit_global_url: | |
119 | <a href="${edit_global_url}">${_('edit global')}</a> |
|
119 | <a href="${edit_global_url}">${_('edit global')}</a> | |
120 | % else: |
|
120 | % else: | |
121 | - |
|
121 | - | |
122 | % endif |
|
122 | % endif | |
123 | </td> |
|
123 | </td> | |
124 |
|
124 | |||
125 | % else: |
|
125 | % else: | |
126 | <td class="td-action"></td> |
|
126 | <td class="td-action"></td> | |
127 | <td class="td-action"> |
|
127 | <td class="td-action"> | |
128 | <a href="${h.route_path('admin_permissions_global')}">${_('edit global')}</a> |
|
128 | <a href="${h.route_path('admin_permissions_global')}">${_('edit global')}</a> | |
129 | <td class="td-action"> |
|
129 | <td class="td-action"> | |
130 | % endif |
|
130 | % endif | |
131 |
|
131 | |||
132 | %endif |
|
132 | %endif | |
133 | </tr> |
|
133 | </tr> | |
134 | </%def> |
|
134 | </%def> | |
135 |
|
135 | |||
136 | ${glob(_('Repository default permission'), get_section_perms('repository.', permissions[section]), 'repository', |
|
136 | ${glob(_('Repository default permission'), get_section_perms('repository.', permissions[section]), 'repository', | |
137 | edit_url=None, edit_global_url=h.route_path('admin_permissions_object'))} |
|
137 | edit_url=None, edit_global_url=h.route_path('admin_permissions_object'))} | |
138 |
|
138 | |||
139 | ${glob(_('Repository group default permission'), get_section_perms('group.', permissions[section]), 'group', |
|
139 | ${glob(_('Repository group default permission'), get_section_perms('group.', permissions[section]), 'group', | |
140 | edit_url=None, edit_global_url=h.route_path('admin_permissions_object'))} |
|
140 | edit_url=None, edit_global_url=h.route_path('admin_permissions_object'))} | |
141 |
|
141 | |||
142 | ${glob(_('User group default permission'), get_section_perms('usergroup.', permissions[section]), 'usergroup', |
|
142 | ${glob(_('User group default permission'), get_section_perms('usergroup.', permissions[section]), 'usergroup', | |
143 | edit_url=None, edit_global_url=h.route_path('admin_permissions_object'))} |
|
143 | edit_url=None, edit_global_url=h.route_path('admin_permissions_object'))} | |
144 |
|
144 | |||
145 |
${glob(_('Super |
|
145 | ${glob(_('Super-admin'), get_section_perms('hg.admin', permissions[section]), | |
146 | edit_url=h.route_path('user_edit', user_id=c.user.user_id, _anchor='admin'), edit_global_url=None)} |
|
146 | edit_url=h.route_path('user_edit', user_id=c.user.user_id, _anchor='admin'), edit_global_url=None)} | |
147 |
|
147 | |||
148 | ${glob(_('Inherit permissions'), get_section_perms('hg.inherit_default_perms.', permissions[section]), |
|
148 | ${glob(_('Inherit permissions'), get_section_perms('hg.inherit_default_perms.', permissions[section]), | |
149 | edit_url=h.route_path('user_edit_global_perms', user_id=c.user.user_id), edit_global_url=None)} |
|
149 | edit_url=h.route_path('user_edit_global_perms', user_id=c.user.user_id), edit_global_url=None)} | |
150 |
|
150 | |||
151 | ${glob(_('Create repositories'), get_section_perms('hg.create.', permissions[section]), |
|
151 | ${glob(_('Create repositories'), get_section_perms('hg.create.', permissions[section]), | |
152 | edit_url=h.route_path('user_edit_global_perms', user_id=c.user.user_id), edit_global_url=h.route_path('admin_permissions_object'))} |
|
152 | edit_url=h.route_path('user_edit_global_perms', user_id=c.user.user_id), edit_global_url=h.route_path('admin_permissions_object'))} | |
153 |
|
153 | |||
154 | ${glob(_('Fork repositories'), get_section_perms('hg.fork.', permissions[section]), |
|
154 | ${glob(_('Fork repositories'), get_section_perms('hg.fork.', permissions[section]), | |
155 | edit_url=h.route_path('user_edit_global_perms', user_id=c.user.user_id), edit_global_url=h.route_path('admin_permissions_object'))} |
|
155 | edit_url=h.route_path('user_edit_global_perms', user_id=c.user.user_id), edit_global_url=h.route_path('admin_permissions_object'))} | |
156 |
|
156 | |||
157 | ${glob(_('Create repository groups'), get_section_perms('hg.repogroup.create.', permissions[section]), |
|
157 | ${glob(_('Create repository groups'), get_section_perms('hg.repogroup.create.', permissions[section]), | |
158 | edit_url=h.route_path('user_edit_global_perms', user_id=c.user.user_id), edit_global_url=h.route_path('admin_permissions_object'))} |
|
158 | edit_url=h.route_path('user_edit_global_perms', user_id=c.user.user_id), edit_global_url=h.route_path('admin_permissions_object'))} | |
159 |
|
159 | |||
160 | ${glob(_('Create user groups'), get_section_perms('hg.usergroup.create.', permissions[section]), |
|
160 | ${glob(_('Create user groups'), get_section_perms('hg.usergroup.create.', permissions[section]), | |
161 | edit_url=h.route_path('user_edit_global_perms', user_id=c.user.user_id), edit_global_url=h.route_path('admin_permissions_object'))} |
|
161 | edit_url=h.route_path('user_edit_global_perms', user_id=c.user.user_id), edit_global_url=h.route_path('admin_permissions_object'))} | |
162 |
|
162 | |||
163 | </tbody> |
|
163 | </tbody> | |
164 | ## Branch perms |
|
164 | ## Branch perms | |
165 | %elif section == 'repository_branches': |
|
165 | %elif section == 'repository_branches': | |
166 | <thead> |
|
166 | <thead> | |
167 | <tr> |
|
167 | <tr> | |
168 | <th>${_('Name')}</th> |
|
168 | <th>${_('Name')}</th> | |
169 | <th>${_('Pattern')}</th> |
|
169 | <th>${_('Pattern')}</th> | |
170 | <th>${_('Permission')}</th> |
|
170 | <th>${_('Permission')}</th> | |
171 | %if actions: |
|
171 | %if actions: | |
172 | <th>${_('Edit Branch Permission')}</th> |
|
172 | <th>${_('Edit Branch Permission')}</th> | |
173 | %endif |
|
173 | %endif | |
174 | </thead> |
|
174 | </thead> | |
175 | <tbody class="section_${section}"> |
|
175 | <tbody class="section_${section}"> | |
176 | <% |
|
176 | <% | |
177 | def name_sorter(permissions): |
|
177 | def name_sorter(permissions): | |
178 | def custom_sorter(item): |
|
178 | def custom_sorter(item): | |
179 | return item[0] |
|
179 | return item[0] | |
180 | return sorted(permissions, key=custom_sorter) |
|
180 | return sorted(permissions, key=custom_sorter) | |
181 |
|
181 | |||
182 | def branch_sorter(permissions): |
|
182 | def branch_sorter(permissions): | |
183 | def custom_sorter(item): |
|
183 | def custom_sorter(item): | |
184 | ## none, merge, push, push_force |
|
184 | ## none, merge, push, push_force | |
185 | section = item[1].split('.')[-1] |
|
185 | section = item[1].split('.')[-1] | |
186 | section_importance = {'none': u'0', |
|
186 | section_importance = {'none': u'0', | |
187 | 'merge': u'1', |
|
187 | 'merge': u'1', | |
188 | 'push': u'2', |
|
188 | 'push': u'2', | |
189 | 'push_force': u'3'}.get(section) |
|
189 | 'push_force': u'3'}.get(section) | |
190 | ## sort by importance + name |
|
190 | ## sort by importance + name | |
191 | return section_importance + item[0] |
|
191 | return section_importance + item[0] | |
192 | return sorted(permissions, key=custom_sorter) |
|
192 | return sorted(permissions, key=custom_sorter) | |
193 | %> |
|
193 | %> | |
194 | %for k, section_perms in name_sorter(permissions[section].items()): |
|
194 | %for k, section_perms in name_sorter(permissions[section].items()): | |
195 | ## for display purposes, for non super-admins we need to check if shown |
|
195 | ## for display purposes, for non super-admins we need to check if shown | |
196 | ## repository is actually accessible for user |
|
196 | ## repository is actually accessible for user | |
197 | <% repo_perm = permissions['repositories'][k] %> |
|
197 | <% repo_perm = permissions['repositories'][k] %> | |
198 | % if repo_perm == 'repository.none' and not c.rhodecode_user.is_admin: |
|
198 | % if repo_perm == 'repository.none' and not c.rhodecode_user.is_admin: | |
199 | ## skip this entry |
|
199 | ## skip this entry | |
200 | <% continue %> |
|
200 | <% continue %> | |
201 | % endif |
|
201 | % endif | |
202 |
|
202 | |||
203 | <% total_counter +=1 %> |
|
203 | <% total_counter +=1 %> | |
204 | % for pattern, perm in branch_sorter(section_perms.items()): |
|
204 | % for pattern, perm in branch_sorter(section_perms.items()): | |
205 | <tr class="perm_row ${'{}_{}'.format(section, perm.split('.')[-1])}"> |
|
205 | <tr class="perm_row ${'{}_{}'.format(section, perm.split('.')[-1])}"> | |
206 | <td class="td-name"> |
|
206 | <td class="td-name"> | |
207 | <a href="${h.route_path('repo_summary',repo_name=k)}">${k}</a> |
|
207 | <a href="${h.route_path('repo_summary',repo_name=k)}">${k}</a> | |
208 | </td> |
|
208 | </td> | |
209 | <td>${pattern}</td> |
|
209 | <td>${pattern}</td> | |
210 | <td class="td-tags"> |
|
210 | <td class="td-tags"> | |
211 | ## TODO: calculate origin somehow |
|
211 | ## TODO: calculate origin somehow | |
212 | ## % for i, ((_pat, perm), origin) in enumerate((permissions[section].perm_origin_stack[k])): |
|
212 | ## % for i, ((_pat, perm), origin) in enumerate((permissions[section].perm_origin_stack[k])): | |
213 |
|
213 | |||
214 | <div> |
|
214 | <div> | |
215 | <% i = 0 %> |
|
215 | <% i = 0 %> | |
216 | <% origin = 'unknown' %> |
|
216 | <% origin = 'unknown' %> | |
217 | <% _css_class = i > 0 and 'perm_overriden' or '' %> |
|
217 | <% _css_class = i > 0 and 'perm_overriden' or '' %> | |
218 |
|
218 | |||
219 | <span class="${_css_class} perm_tag ${perm.split('.')[-1]}"> |
|
219 | <span class="${_css_class} perm_tag ${perm.split('.')[-1]}"> | |
220 | ${perm} |
|
220 | ${perm} | |
221 | ##(${origin}) |
|
221 | ##(${origin}) | |
222 | </span> |
|
222 | </span> | |
223 | </div> |
|
223 | </div> | |
224 | ## % endfor |
|
224 | ## % endfor | |
225 | </td> |
|
225 | </td> | |
226 | %if actions: |
|
226 | %if actions: | |
227 | <td class="td-action"> |
|
227 | <td class="td-action"> | |
228 | <a href="${h.route_path('edit_repo_perms_branch',repo_name=k)}">${_('edit')}</a> |
|
228 | <a href="${h.route_path('edit_repo_perms_branch',repo_name=k)}">${_('edit')}</a> | |
229 | </td> |
|
229 | </td> | |
230 | %endif |
|
230 | %endif | |
231 | </tr> |
|
231 | </tr> | |
232 | % endfor |
|
232 | % endfor | |
233 | %endfor |
|
233 | %endfor | |
234 | </tbody> |
|
234 | </tbody> | |
235 |
|
235 | |||
236 | ## Repos/Repo Groups/users groups perms |
|
236 | ## Repos/Repo Groups/users groups perms | |
237 | %else: |
|
237 | %else: | |
238 |
|
238 | |||
239 | ## none/read/write/admin permissions on groups/repos etc |
|
239 | ## none/read/write/admin permissions on groups/repos etc | |
240 | <thead> |
|
240 | <thead> | |
241 | <tr> |
|
241 | <tr> | |
242 | <th>${_('Name')}</th> |
|
242 | <th>${_('Name')}</th> | |
243 | <th>${_('Permission')}</th> |
|
243 | <th>${_('Permission')}</th> | |
244 | %if actions: |
|
244 | %if actions: | |
245 | <th>${_('Edit Permission')}</th> |
|
245 | <th>${_('Edit Permission')}</th> | |
246 | %endif |
|
246 | %endif | |
247 | </thead> |
|
247 | </thead> | |
248 | <tbody class="section_${section}"> |
|
248 | <tbody class="section_${section}"> | |
249 | <% |
|
249 | <% | |
250 | def sorter(permissions): |
|
250 | def sorter(permissions): | |
251 | def custom_sorter(item): |
|
251 | def custom_sorter(item): | |
252 | ## read/write/admin |
|
252 | ## read/write/admin | |
253 | section = item[1].split('.')[-1] |
|
253 | section = item[1].split('.')[-1] | |
254 | section_importance = {'none': u'0', |
|
254 | section_importance = {'none': u'0', | |
255 | 'read': u'1', |
|
255 | 'read': u'1', | |
256 | 'write':u'2', |
|
256 | 'write':u'2', | |
257 | 'admin':u'3'}.get(section) |
|
257 | 'admin':u'3'}.get(section) | |
258 | ## sort by group importance+name |
|
258 | ## sort by group importance+name | |
259 | return section_importance+item[0] |
|
259 | return section_importance+item[0] | |
260 | return sorted(permissions, key=custom_sorter) |
|
260 | return sorted(permissions, key=custom_sorter) | |
261 | %> |
|
261 | %> | |
262 | %for k, section_perm in sorter(permissions[section].items()): |
|
262 | %for k, section_perm in sorter(permissions[section].items()): | |
263 | <% perm_value = section_perm.split('.')[-1] %> |
|
263 | <% perm_value = section_perm.split('.')[-1] %> | |
264 | <% _css_class = 'display:none' if perm_value in ['none'] else '' %> |
|
264 | <% _css_class = 'display:none' if perm_value in ['none'] else '' %> | |
265 |
|
265 | |||
266 | %if perm_value != 'none' or show_all: |
|
266 | %if perm_value != 'none' or show_all: | |
267 | <tr class="perm_row ${'{}_{}'.format(section, section_perm.split('.')[-1])}" style="${_css_class}"> |
|
267 | <tr class="perm_row ${'{}_{}'.format(section, section_perm.split('.')[-1])}" style="${_css_class}"> | |
268 | <td class="td-name"> |
|
268 | <td class="td-name"> | |
269 | %if section == 'repositories': |
|
269 | %if section == 'repositories': | |
270 | <a href="${h.route_path('repo_summary',repo_name=k)}">${k}</a> |
|
270 | <a href="${h.route_path('repo_summary',repo_name=k)}">${k}</a> | |
271 | %elif section == 'repositories_groups': |
|
271 | %elif section == 'repositories_groups': | |
272 | <a href="${h.route_path('repo_group_home', repo_group_name=k)}">${k}</a> |
|
272 | <a href="${h.route_path('repo_group_home', repo_group_name=k)}">${k}</a> | |
273 | %elif section == 'user_groups': |
|
273 | %elif section == 'user_groups': | |
274 | ##<a href="${h.route_path('edit_user_group',user_group_id=k)}">${k}</a> |
|
274 | ##<a href="${h.route_path('edit_user_group',user_group_id=k)}">${k}</a> | |
275 | ${k} |
|
275 | ${k} | |
276 | %endif |
|
276 | %endif | |
277 | </td> |
|
277 | </td> | |
278 | <td class="td-tags"> |
|
278 | <td class="td-tags"> | |
279 | %if hasattr(permissions[section], 'perm_origin_stack'): |
|
279 | %if hasattr(permissions[section], 'perm_origin_stack'): | |
280 | <div> |
|
280 | <div> | |
281 | %for i, (perm, origin) in enumerate(reversed(permissions[section].perm_origin_stack[k])): |
|
281 | %for i, (perm, origin) in enumerate(reversed(permissions[section].perm_origin_stack[k])): | |
282 | <% _css_class = i > 0 and 'perm_overriden' or '' %> |
|
282 | <% _css_class = i > 0 and 'perm_overriden' or '' %> | |
283 | % if i > 0: |
|
283 | % if i > 0: | |
284 | <div style="color: #979797"> |
|
284 | <div style="color: #979797"> | |
285 | <i class="icon-arrow_up"></i> |
|
285 | <i class="icon-arrow_up"></i> | |
286 | ${_('overridden by')} |
|
286 | ${_('overridden by')} | |
287 | <i class="icon-arrow_up"></i> |
|
287 | <i class="icon-arrow_up"></i> | |
288 | </div> |
|
288 | </div> | |
289 | % endif |
|
289 | % endif | |
290 |
|
290 | |||
291 | <div> |
|
291 | <div> | |
292 | <span class="${_css_class} perm_tag ${perm.split('.')[-1]}"> |
|
292 | <span class="${_css_class} perm_tag ${perm.split('.')[-1]}"> | |
293 | ${perm} (${origin}) |
|
293 | ${perm} (${origin}) | |
294 | </span> |
|
294 | </span> | |
295 | </div> |
|
295 | </div> | |
296 |
|
296 | |||
297 | %endfor |
|
297 | %endfor | |
298 | </div> |
|
298 | </div> | |
299 | %else: |
|
299 | %else: | |
300 | <span class="perm_tag ${section_perm.split('.')[-1]}">${section_perm}</span> |
|
300 | <span class="perm_tag ${section_perm.split('.')[-1]}">${section_perm}</span> | |
301 | %endif |
|
301 | %endif | |
302 | </td> |
|
302 | </td> | |
303 | %if actions: |
|
303 | %if actions: | |
304 | <td class="td-action"> |
|
304 | <td class="td-action"> | |
305 | %if section == 'repositories': |
|
305 | %if section == 'repositories': | |
306 | <a href="${h.route_path('edit_repo_perms',repo_name=k,_anchor='permissions_manage')}">${_('edit')}</a> |
|
306 | <a href="${h.route_path('edit_repo_perms',repo_name=k,_anchor='permissions_manage')}">${_('edit')}</a> | |
307 | %elif section == 'repositories_groups': |
|
307 | %elif section == 'repositories_groups': | |
308 | <a href="${h.route_path('edit_repo_group_perms',repo_group_name=k,_anchor='permissions_manage')}">${_('edit')}</a> |
|
308 | <a href="${h.route_path('edit_repo_group_perms',repo_group_name=k,_anchor='permissions_manage')}">${_('edit')}</a> | |
309 | %elif section == 'user_groups': |
|
309 | %elif section == 'user_groups': | |
310 | ##<a href="${h.route_path('edit_user_group',user_group_id=k)}">${_('edit')}</a> |
|
310 | ##<a href="${h.route_path('edit_user_group',user_group_id=k)}">${_('edit')}</a> | |
311 | %endif |
|
311 | %endif | |
312 | </td> |
|
312 | </td> | |
313 | %endif |
|
313 | %endif | |
314 | </tr> |
|
314 | </tr> | |
315 | <% total_counter +=1 %> |
|
315 | <% total_counter +=1 %> | |
316 | %endif |
|
316 | %endif | |
317 |
|
317 | |||
318 | %endfor |
|
318 | %endfor | |
319 |
|
319 | |||
320 | <tr id="empty_${section}" class="noborder" style="display:none;"> |
|
320 | <tr id="empty_${section}" class="noborder" style="display:none;"> | |
321 | <td colspan="6">${_('No matching permission defined')}</td> |
|
321 | <td colspan="6">${_('No matching permission defined')}</td> | |
322 | </tr> |
|
322 | </tr> | |
323 |
|
323 | |||
324 | </tbody> |
|
324 | </tbody> | |
325 | %endif |
|
325 | %endif | |
326 | </table> |
|
326 | </table> | |
327 | </div> |
|
327 | </div> | |
328 | %endif |
|
328 | %endif | |
329 | </div> |
|
329 | </div> | |
330 | </div> |
|
330 | </div> | |
331 | </div> |
|
331 | </div> | |
332 |
|
332 | |||
333 | <script> |
|
333 | <script> | |
334 | $('#total_count_${section}').html(${total_counter}) |
|
334 | $('#total_count_${section}').html(${total_counter}) | |
335 | </script> |
|
335 | </script> | |
336 |
|
336 | |||
337 | %endfor |
|
337 | %endfor | |
338 | </div> |
|
338 | </div> | |
339 |
|
339 | |||
340 | <script> |
|
340 | <script> | |
341 | $(document).ready(function(){ |
|
341 | $(document).ready(function(){ | |
342 | var showEmpty = function(section){ |
|
342 | var showEmpty = function(section){ | |
343 | var visible = $('.section_{0} tr.perm_row:visible'.format(section)).length; |
|
343 | var visible = $('.section_{0} tr.perm_row:visible'.format(section)).length; | |
344 | if(visible === 0){ |
|
344 | if(visible === 0){ | |
345 | $('#empty_{0}'.format(section)).show(); |
|
345 | $('#empty_{0}'.format(section)).show(); | |
346 | } |
|
346 | } | |
347 | else{ |
|
347 | else{ | |
348 | $('#empty_{0}'.format(section)).hide(); |
|
348 | $('#empty_{0}'.format(section)).hide(); | |
349 | } |
|
349 | } | |
350 | }; |
|
350 | }; | |
351 |
|
351 | |||
352 | $('.perm_filter').on('change', function(e){ |
|
352 | $('.perm_filter').on('change', function(e){ | |
353 | var self = this; |
|
353 | var self = this; | |
354 | var section = $(this).attr('section'); |
|
354 | var section = $(this).attr('section'); | |
355 |
|
355 | |||
356 | var opts = {}; |
|
356 | var opts = {}; | |
357 | var elems = $('.filter_' + section).each(function(el){ |
|
357 | var elems = $('.filter_' + section).each(function(el){ | |
358 | var perm_type = $(this).attr('perm_type'); |
|
358 | var perm_type = $(this).attr('perm_type'); | |
359 | var checked = this.checked; |
|
359 | var checked = this.checked; | |
360 | opts[perm_type] = checked; |
|
360 | opts[perm_type] = checked; | |
361 | if(checked){ |
|
361 | if(checked){ | |
362 | $('.'+section+'_'+perm_type).show(); |
|
362 | $('.'+section+'_'+perm_type).show(); | |
363 | } |
|
363 | } | |
364 | else{ |
|
364 | else{ | |
365 | $('.'+section+'_'+perm_type).hide(); |
|
365 | $('.'+section+'_'+perm_type).hide(); | |
366 | } |
|
366 | } | |
367 | }); |
|
367 | }); | |
368 | showEmpty(section); |
|
368 | showEmpty(section); | |
369 | }) |
|
369 | }) | |
370 | }) |
|
370 | }) | |
371 | </script> |
|
371 | </script> | |
372 | </%def> |
|
372 | </%def> |
@@ -1,93 +1,93 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <!DOCTYPE html> |
|
2 | <!DOCTYPE html> | |
3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
4 | <head> |
|
4 | <head> | |
5 | <title>Error - ${c.error_message}</title> |
|
5 | <title>Error - ${c.error_message}</title> | |
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
7 | <meta name="robots" content="index, nofollow"/> |
|
7 | <meta name="robots" content="index, nofollow"/> | |
8 |
|
8 | |||
9 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
9 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
10 | %if c.redirect_time: |
|
10 | %if c.redirect_time: | |
11 | <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/> |
|
11 | <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/> | |
12 | %endif |
|
12 | %endif | |
13 |
|
13 | |||
14 | <link id="favicon" rel="shortcut icon" type="image/png" href="data:image/png;base64,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"> |
|
14 | <link id="favicon" rel="shortcut icon" type="image/png" href="data:image/png;base64,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"> | |
15 | <script src="${h.asset('js/vendors/webcomponentsjs/custom-elements-es5-adapter.js', ver=c.rhodecode_version_hash)}"></script> |
|
15 | <script src="${h.asset('js/vendors/webcomponentsjs/custom-elements-es5-adapter.js', ver=c.rhodecode_version_hash)}"></script> | |
16 | <script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-bundle.js', ver=c.rhodecode_version_hash)}"></script> |
|
16 | <script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-bundle.js', ver=c.rhodecode_version_hash)}"></script> | |
17 |
|
17 | |||
18 | <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/> |
|
18 | <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/> | |
19 | <style>body { background:#eeeeee; }</style> |
|
19 | <style>body { background:#eeeeee; }</style> | |
20 | <script type="text/javascript"> |
|
20 | <script type="text/javascript"> | |
21 | // register templateContext to pass template variables to JS |
|
21 | // register templateContext to pass template variables to JS | |
22 | var templateContext = {timeago: {}}; |
|
22 | var templateContext = {timeago: {}}; | |
23 | </script> |
|
23 | </script> | |
24 | <script type="text/javascript" src="${h.asset('js/scripts.min.js', ver=c.rhodecode_version_hash)}"></script> |
|
24 | <script type="text/javascript" src="${h.asset('js/scripts.min.js', ver=c.rhodecode_version_hash)}"></script> | |
25 | </head> |
|
25 | </head> | |
26 | <body> |
|
26 | <body> | |
27 |
|
27 | |||
28 | <div class="wrapper error_page"> |
|
28 | <div class="wrapper error_page"> | |
29 | <div class="sidebar"> |
|
29 | <div class="sidebar"> | |
30 | <a href="${h.route_path('home')}"><img class="error-page-logo" src="${h.asset('images/RhodeCode_Logo_Black.png')}" alt="RhodeCode"/></a> |
|
30 | <a href="${h.route_path('home')}"><img class="error-page-logo" src="${h.asset('images/RhodeCode_Logo_Black.png')}" alt="RhodeCode"/></a> | |
31 | </div> |
|
31 | </div> | |
32 | <div class="main-content"> |
|
32 | <div class="main-content"> | |
33 | <h1> |
|
33 | <h1> | |
34 | <span class="error-branding"> |
|
34 | <span class="error-branding"> | |
35 | ${h.branding(c.rhodecode_name)} |
|
35 | ${h.branding(c.rhodecode_name)} | |
36 | </span><br/> |
|
36 | </span><br/> | |
37 | ${c.error_message} |
|
37 | ${c.error_message} | |
38 | <br/> |
|
38 | <br/> | |
39 | <span class="error_message">${c.error_explanation}</span> |
|
39 | <span class="error_message">${c.error_explanation}</span> | |
40 | </h1> |
|
40 | </h1> | |
41 | % if c.messages: |
|
41 | % if c.messages: | |
42 | % for message in c.messages: |
|
42 | % for message in c.messages: | |
43 | <div class="alert alert-${message.category}">${message}</div> |
|
43 | <div class="alert alert-${message.category}">${message}</div> | |
44 | % endfor |
|
44 | % endfor | |
45 | % endif |
|
45 | % endif | |
46 | %if c.redirect_time: |
|
46 | %if c.redirect_time: | |
47 | <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p> |
|
47 | <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p> | |
48 | %endif |
|
48 | %endif | |
49 | <div class="inner-column"> |
|
49 | <div class="inner-column"> | |
50 | <h4>Possible Causes</h4> |
|
50 | <h4>Possible Causes</h4> | |
51 | <ul> |
|
51 | <ul> | |
52 | % if c.causes: |
|
52 | % if c.causes: | |
53 | %for cause in c.causes: |
|
53 | %for cause in c.causes: | |
54 | <li>${cause}</li> |
|
54 | <li>${cause}</li> | |
55 | %endfor |
|
55 | %endfor | |
56 | %else: |
|
56 | %else: | |
57 | <li>The resource may have been deleted.</li> |
|
57 | <li>The resource may have been deleted.</li> | |
58 | <li>You may not have access to this repository.</li> |
|
58 | <li>You may not have access to this repository.</li> | |
59 | <li>The link may be incorrect.</li> |
|
59 | <li>The link may be incorrect.</li> | |
60 | %endif |
|
60 | %endif | |
61 | </ul> |
|
61 | </ul> | |
62 | </div> |
|
62 | </div> | |
63 | <div class="inner-column"> |
|
63 | <div class="inner-column"> | |
64 | <h4>Support</h4> |
|
64 | <h4>Support</h4> | |
65 | <p>For help and support, go to the <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support Page')}</a>. |
|
65 | <p>For help and support, go to the <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support Page')}</a>. | |
66 | It may be useful to include your log file; see the log file locations <a href="${h.route_url('enterprise_log_file_locations')}">here</a>. |
|
66 | It may be useful to include your log file; see the log file locations <a href="${h.route_url('enterprise_log_file_locations')}">here</a>. | |
67 | </p> |
|
67 | </p> | |
68 |
|
68 | |||
69 | </div> |
|
69 | </div> | |
70 | <div class="inner-column"> |
|
70 | <div class="inner-column"> | |
71 | <h4>Documentation</h4> |
|
71 | <h4>Documentation</h4> | |
72 | <p>For more information, see <a href="${h.route_url('enterprise_docs')}">docs.rhodecode.com</a>.</p> |
|
72 | <p>For more information, see <a href="${h.route_url('enterprise_docs')}">docs.rhodecode.com</a>.</p> | |
73 | </div> |
|
73 | </div> | |
74 | </div> |
|
74 | </div> | |
75 |
|
75 | |||
76 | % if c.show_exception_id: |
|
76 | % if c.show_exception_id: | |
77 | <div class="sidebar" style="width: 130px"> |
|
77 | <div class="sidebar" style="width: 130px"> | |
78 |
|
78 | |||
79 | </div> |
|
79 | </div> | |
80 | <div class="main-content"> |
|
80 | <div class="main-content"> | |
81 | <p> |
|
81 | <p> | |
82 | <strong>Exception ID: <code><a href="${c.exception_id_url}">${c.exception_id}</a></code> </strong> <br/> |
|
82 | <strong>Exception ID: <code><a href="${c.exception_id_url}">${c.exception_id}</a></code> </strong> <br/> | |
83 |
|
83 | |||
84 |
Super |
|
84 | Super-admins can see detailed traceback information from this exception by checking the below Exception ID.<br/> | |
85 | Please include the above link for further details of this exception. |
|
85 | Please include the above link for further details of this exception. | |
86 | </p> |
|
86 | </p> | |
87 | </div> |
|
87 | </div> | |
88 | % endif |
|
88 | % endif | |
89 | </div> |
|
89 | </div> | |
90 |
|
90 | |||
91 | </body> |
|
91 | </body> | |
92 |
|
92 | |||
93 | </html> |
|
93 | </html> |
General Comments 0
You need to be logged in to leave comments.
Login now