##// END OF EJS Templates
security: fixed issues with exposing repository names using global PR redirection link...
security: fixed issues with exposing repository names using global PR redirection link logic. - Since redirect was created to repository which linked to the PR, users who didn't have permissions to those repos could still see the name in the url generated.

File last commit:

r3638:c1c37b0b merge new-ui
r4044:573a1043 default
Show More
user_groups.mako
118 lines | 3.7 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 ## -*- coding: utf-8 -*-
<%inherit file="/base/base.mako"/>
<%def name="title()">
${_('User groups administration')}
%if c.rhodecode_name:
&middot; ${h.branding(c.rhodecode_name)}
%endif
</%def>
nav: bring back quick filter and cleanup titles
r3589 <%def name="breadcrumbs_links()"></%def>
templating: use .mako as extensions for template files.
r1282
<%def name="menu_bar_nav()">
${self.menu_items(active='admin')}
</%def>
ui: navigation, fixed wrapping of new admin navigation items
r3566 <%def name="menu_bar_subnav()">
${self.admin_menu(active='user_groups')}
</%def>
templating: use .mako as extensions for template files.
r1282 <%def name="main()">
<div class="box">
<div class="title">
nav: bring back quick filter and cleanup titles
r3589 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
<span id="user_group_count">0</span>
templating: use .mako as extensions for template files.
r1282 <ul class="links">
auth: reduced usage of raw auth calls inside templates
r3587 %if c.can_create_user_group:
nav: bring back quick filter and cleanup titles
r3589 <li>
<a href="${h.route_path('user_groups_new')}" class="btn btn-small btn-success">${_(u'Add User Group')}</a>
</li>
templating: use .mako as extensions for template files.
r1282 %endif
</ul>
</div>
<div id="repos_list_wrap">
<table id="user_group_list_table" class="display"></table>
</div>
</div>
<script>
$(document).ready(function() {
Bartłomiej Wołyńczyk
admin users and admin users group: add number of inactive users/users_group, resolves #5454
r2727 var $userGroupsListTable = $('#user_group_list_table');
templating: use .mako as extensions for template files.
r1282
// user list
Bartłomiej Wołyńczyk
admin users and admin users group: add number of inactive users/users_group, resolves #5454
r2727 $userGroupsListTable.DataTable({
user-groups: moved the display of user group into a pyramid view
r1980 processing: true,
serverSide: true,
Bartłomiej Wołyńczyk
admin users and admin users group: add number of inactive users/users_group, resolves #5454
r2727 ajax: {
"url": "${h.route_path('user_groups_data')}",
"dataSrc": function (json) {
var filteredCount = json.recordsFiltered;
var filteredInactiveCount = json.recordsFilteredInactive;
var totalInactive = json.recordsTotalInactive;
var total = json.recordsTotal;
var _text = _gettext(
"{0} ({1} inactive) of {2} user groups ({3} inactive)").format(
filteredCount, filteredInactiveCount, total, totalInactive);
if (total === filteredCount) {
_text = _gettext(
"{0} user groups ({1} inactive)").format(total, totalInactive);
}
$('#user_group_count').text(_text);
return json.data;
},
},
templating: use .mako as extensions for template files.
r1282 dom: 'rtp',
pageLength: ${c.visual.admin_grid_items},
order: [[ 0, "asc" ]],
columns: [
user-groups: moved the display of user group into a pyramid view
r1980 { data: {"_": "users_group_name",
"sort": "users_group_name"}, title: "${_('Name')}", className: "td-componentname" },
{ data: {"_": "description",
"sort": "description"}, title: "${_('Description')}", className: "td-description" },
templating: use .mako as extensions for template files.
r1282 { data: {"_": "members",
user-groups: moved the display of user group into a pyramid view
r1980 "sort": "members"}, title: "${_('Members')}", className: "td-number" },
user-groups: added info, and new panel to control user group synchronization....
r1600 { data: {"_": "sync",
"sort": "sync"}, title: "${_('Sync')}", className: "td-sync" },
templating: use .mako as extensions for template files.
r1282 { data: {"_": "active",
user-groups: added info, and new panel to control user group synchronization....
r1600 "sort": "active"}, title: "${_('Active')}", className: "td-active" },
templating: use .mako as extensions for template files.
r1282 { data: {"_": "owner",
"sort": "owner"}, title: "${_('Owner')}", className: "td-user" },
{ data: {"_": "action",
user-groups: moved the display of user group into a pyramid view
r1980 "sort": "action"}, title: "${_('Action')}", className: "td-action", orderable: false}
templating: use .mako as extensions for template files.
r1282 ],
language: {
paginate: DEFAULT_GRID_PAGINATION,
user-groups: moved the display of user group into a pyramid view
r1980 sProcessing: _gettext('loading...'),
templating: use .mako as extensions for template files.
r1282 emptyTable: _gettext("No user groups available yet.")
}
});
Bartłomiej Wołyńczyk
admin users and admin users group: add number of inactive users/users_group, resolves #5454
r2727 $userGroupsListTable.on('xhr.dt', function(e, settings, json, xhr){
$userGroupsListTable.css('opacity', 1);
user-groups: moved the display of user group into a pyramid view
r1980 });
Bartłomiej Wołyńczyk
admin users and admin users group: add number of inactive users/users_group, resolves #5454
r2727 $userGroupsListTable.on('preXhr.dt', function(e, settings, data){
$userGroupsListTable.css('opacity', 0.3);
templating: use .mako as extensions for template files.
r1282 });
user-groups: moved the display of user group into a pyramid view
r1980 // filter
$('#q_filter').on('keyup',
$.debounce(250, function() {
user-groups: fixed in_ filters for large ammount of data.
r3624 $userGroupsListTable.DataTable().search(
user-groups: moved the display of user group into a pyramid view
r1980 $('#q_filter').val()
).draw();
})
);
templating: use .mako as extensions for template files.
r1282
});
</script>
</%def>