Show More
@@ -11,11 +11,14 b'' | |||
|
11 | 11 | 'user_groups': 'User Group Permissions', |
|
12 | 12 | 'repositories_groups': 'Repository Group Permissions', |
|
13 | 13 | } %> |
|
14 | ||
|
14 | 15 | <div id="perms" class="table fields"> |
|
15 | 16 | %for section in sorted(permissions.keys(), key=lambda item: {'global': 0, 'repository_branches': 1}.get(item, 1000)): |
|
17 | <% total_counter = 0 %> | |
|
18 | ||
|
16 | 19 | <div class="panel panel-default"> |
|
17 | 20 | <div class="panel-heading" id="${section.replace("_","-")}-permissions"> |
|
18 |
<h3 class="panel-title">${section_to_label.get(section, section)} - ${ |
|
|
21 | <h3 class="panel-title">${section_to_label.get(section, section)} - <span id="total_count_${section}"></span> | |
|
19 | 22 | <a class="permalink" href="#${section.replace("_","-")}-permissions"> ¶</a> |
|
20 | 23 | </h3> |
|
21 | 24 | % if side_link: |
@@ -189,6 +192,15 b'' | |||
|
189 | 192 | return sorted(permissions, key=custom_sorter) |
|
190 | 193 | %> |
|
191 | 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 | |
|
196 | ## repository is actually accessible for user | |
|
197 | <% repo_perm = permissions['repositories'][k] %> | |
|
198 | % if repo_perm == 'repository.none' and not c.rhodecode_user.is_admin: | |
|
199 | ## skip this entry | |
|
200 | <% continue %> | |
|
201 | % endif | |
|
202 | ||
|
203 | <% total_counter +=1 %> | |
|
192 | 204 |
|
|
193 | 205 | <tr class="perm_row ${'{}_{}'.format(section, perm.split('.')[-1])}"> |
|
194 | 206 | <td class="td-name"> |
@@ -300,7 +312,9 b'' | |||
|
300 | 312 | </td> |
|
301 | 313 | %endif |
|
302 | 314 | </tr> |
|
315 | <% total_counter +=1 %> | |
|
303 | 316 |
|
|
317 | ||
|
304 | 318 |
|
|
305 | 319 | |
|
306 | 320 | <tr id="empty_${section}" class="noborder" style="display:none;"> |
@@ -315,6 +329,11 b'' | |||
|
315 | 329 | </div> |
|
316 | 330 | </div> |
|
317 | 331 | </div> |
|
332 | ||
|
333 | <script> | |
|
334 | $('#total_count_${section}').html(${total_counter}) | |
|
335 | </script> | |
|
336 | ||
|
318 | 337 |
|
|
319 | 338 | </div> |
|
320 | 339 |
General Comments 0
You need to be logged in to leave comments.
Login now