##// END OF EJS Templates
permissions: add better helper block about default permissions, and corelation with anonymous access.
permissions: add better helper block about default permissions, and corelation with anonymous access.

File last commit:

r4134:cc0663d2 default
r4222:21ec1451 stable
Show More
users.mako
126 lines | 4.0 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()">
${_('Users 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='users')}
</%def>
templating: use .mako as extensions for template files.
r1282 <%def name="main()">
datagrid: fix some styling and processing text.
r1541
templating: use .mako as extensions for template files.
r1282 <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_count">0</span>
templating: use .mako as extensions for template files.
r1282 <ul class="links">
<li>
users: ported controllers from pylons into pyramid views.
r2114 <a href="${h.route_path('users_new')}" class="btn btn-small btn-success">${_(u'Add User')}</a>
templating: use .mako as extensions for template files.
r1282 </li>
</ul>
</div>
<div id="repos_list_wrap">
<table id="user_list_table" class="display"></table>
</div>
</div>
admin-users: moved grid browsing to pyramid....
r1520 <script type="text/javascript">
templating: use .mako as extensions for template files.
r1282 $(document).ready(function() {
admin-users: cleanup JS code.
r1648 var $userListTable = $('#user_list_table');
templating: use .mako as extensions for template files.
r1282 // user list
admin-users: cleanup JS code.
r1648 $userListTable.DataTable({
datagrid: fix some styling and processing text.
r1541 processing: true,
admin-users: moved grid browsing to pyramid....
r1520 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('users_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} users ({3} inactive)").format(
filteredCount, filteredInactiveCount, total, totalInactive);
if(total === filteredCount){
_text = _gettext(
"{0} users ({1} inactive)").format(total, totalInactive);
}
$('#user_count').text(_text);
return json.data;
}
},
templating: use .mako as extensions for template files.
r1282 dom: 'rtp',
pageLength: ${c.visual.admin_grid_items},
admin-users: moved grid browsing to pyramid....
r1520 order: [[ 0, "asc" ]],
templating: use .mako as extensions for template files.
r1282 columns: [
{ data: {"_": "username",
admin-users: moved grid browsing to pyramid....
r1520 "sort": "username"}, title: "${_('Username')}", className: "td-user" },
templating: use .mako as extensions for template files.
r1282 { data: {"_": "email",
"sort": "email"}, title: "${_('Email')}", className: "td-email" },
{ data: {"_": "first_name",
"sort": "first_name"}, title: "${_('First Name')}", className: "td-user" },
{ data: {"_": "last_name",
"sort": "last_name"}, title: "${_('Last Name')}", className: "td-user" },
{ data: {"_": "last_activity",
admin-users: moved grid browsing to pyramid....
r1520 "sort": "last_activity",
users: add sorting by last activity to the new users grid.
r1547 "type": Number}, title: "${_('Last activity')}", className: "td-time" },
templating: use .mako as extensions for template files.
r1282 { data: {"_": "active",
admin-users: moved grid browsing to pyramid....
r1520 "sort": "active"}, title: "${_('Active')}", className: "td-active" },
templating: use .mako as extensions for template files.
r1282 { data: {"_": "admin",
Bartlomiej Wolynczyk
ui: make super admin named consistently across ui.
r4134 "sort": "admin"}, title: "${_('Super-admin')}", className: "td-admin" },
templating: use .mako as extensions for template files.
r1282 { data: {"_": "extern_type",
"sort": "extern_type"}, title: "${_('Auth type')}", className: "td-type" },
{ data: {"_": "action",
admin-users: cleanup JS code.
r1648 "sort": "action"}, title: "${_('Action')}", className: "td-action", orderable: false }
templating: use .mako as extensions for template files.
r1282 ],
language: {
paginate: DEFAULT_GRID_PAGINATION,
datagrid: fix some styling and processing text.
r1541 sProcessing: _gettext('loading...'),
templating: use .mako as extensions for template files.
r1282 emptyTable: _gettext("No users available yet.")
},
admin-users: moved grid browsing to pyramid....
r1520
templating: use .mako as extensions for template files.
r1282 "createdRow": function ( row, data, index ) {
if (!data['active_raw']){
$(row).addClass('closed')
}
}
});
admin-users: cleanup JS code.
r1648 $userListTable.on('xhr.dt', function(e, settings, json, xhr){
$userListTable.css('opacity', 1);
admin-users: moved grid browsing to pyramid....
r1520 });
admin-users: cleanup JS code.
r1648 $userListTable.on('preXhr.dt', function(e, settings, data){
$userListTable.css('opacity', 0.3);
templating: use .mako as extensions for template files.
r1282 });
admin-users: moved grid browsing to pyramid....
r1520 // filter
$('#q_filter').on('keyup',
$.debounce(250, function() {
admin-users: cleanup JS code.
r1648 $userListTable.DataTable().search(
admin-users: moved grid browsing to pyramid....
r1520 $('#q_filter').val()
).draw();
})
);
templating: use .mako as extensions for template files.
r1282
});
</script>
</%def>