Files @ ae5ac36cdf83
Branch filter:

Location: kallithea/rhodecode/templates/admin/users/users.html - annotation

Mads Kiilerich
pull request: use unionrepo instead of outgoing

This makes it possible to look the 'moving target' symbols up in the right repo.

Using a revset with the right revisions also removes the need for pruning
changesets that are outside the requested range.

It will also not be confused by changesets that for some reason has been pulled
to the repo but haven't been merged yet. They are going to be 'merged' by the
'pull' request and should thus be a part of what is reviewed.
1e757ac98988
1e757ac98988
1e757ac98988
1e757ac98988
a1ec653f5f95
1e757ac98988
1e757ac98988
1e757ac98988
80d837028c40
1e757ac98988
1e757ac98988
1e757ac98988
b4f401524060
1e757ac98988
1e757ac98988
1e757ac98988
1e757ac98988
1e757ac98988
1e757ac98988
d5e42c00f3c1
1e757ac98988
1e757ac98988
663f4f26776a
1e757ac98988
f91d3f9b7230
1e757ac98988
1e757ac98988
80d837028c40
80d837028c40
1e757ac98988
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
b4f401524060
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
4eef5eeb81a3
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
d5e42c00f3c1
80d837028c40
80d837028c40
80d837028c40
b4f401524060
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
d5e42c00f3c1
80d837028c40
b4f401524060
80d837028c40
80d837028c40
80d837028c40
4eef5eeb81a3
b4f401524060
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
d5e42c00f3c1
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
d5e42c00f3c1
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
80d837028c40
d5e42c00f3c1
80d837028c40
80d837028c40
1e757ac98988
## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>

<%def name="title()">
    ${_('Users administration')} - ${c.rhodecode_name}
</%def>

<%def name="breadcrumbs_links()">
    <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="user_count">0</span> ${_('users')}
</%def>

<%def name="page_nav()">
    ${self.menu('admin')}
</%def>

<%def name="main()">
<div class="box">
    <!-- box / title -->
    <div class="title">
        ${self.breadcrumbs()}
        <ul class="links">
          <li>
            <span>${h.link_to(_(u'Add new user'),h.url('new_user'))}</span>
          </li>
        </ul>
    </div>
    <!-- end box / title -->
    <div class="table yui-skin-sam" id="users_list_wrap"></div>
    <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
</div>

<script>
  var url = "${h.url('formatted_users', format='json')}";
  var data = ${c.data|n};
  var myDataSource = new YAHOO.util.DataSource(data);
  myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;

  myDataSource.responseSchema = {
      resultsList: "records",
      fields: [
          {key: "gravatar"},
          {key: "raw_username"},
          {key: "username"},
          {key: "firstname"},
          {key: "lastname"},
          {key: "last_login"},
          {key: "last_login_raw"},
          {key: "active"},
          {key: "admin"},
          {key: "ldap"},
          {key: "action"},
      ]
   };
  myDataSource.doBeforeCallback = function(req,raw,res,cb) {
      // This is the filter function
      var data     = res.results || [],
          filtered = [],
          i,l;

      if (req) {
          req = req.toLowerCase();
          for (i = 0; i<data.length; i++) {
              var pos = data[i].raw_username.toLowerCase().indexOf(req)
              if (pos != -1) {
                  filtered.push(data[i]);
              }
          }
          res.results = filtered;
      }
      YUD.get('user_count').innerHTML = res.results.length;
      return res;
  }

  // main table sorting
  var myColumnDefs = [
      {key:"gravatar",label:"",sortable:false,},
      {key:"username",label:"${_('username')}",sortable:true,
          sortOptions: { sortFunction: linkSort }
      },
      {key:"firstname",label:"${_('firstname')}",sortable:true,},
      {key:"lastname",label:"${_('lastname')}",sortable:true,},
      {key:"last_login",label:"${_('last login')}",sortable:true,
          sortOptions: { sortFunction: lastLoginSort }},
      {key:"active",label:"${_('active')}",sortable:true,},
      {key:"admin",label:"${_('admin')}",sortable:true,},
      {key:"ldap",label:"${_('ldap')}",sortable:true,},
      {key:"action",label:"${_('action')}",sortable:false},
  ];

  var myDataTable = new YAHOO.widget.DataTable("users_list_wrap", myColumnDefs, myDataSource,{
    sortedBy:{key:"username",dir:"asc"},
    paginator: new YAHOO.widget.Paginator({
        rowsPerPage: 15,
        alwaysVisible: false,
        template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}",
        pageLinks: 5,
        containerClass: 'pagination-wh',
        currentPageClass: 'pager_curpage',
        pageLinkClass: 'pager_link',
        nextPageLinkLabel: '&gt;',
        previousPageLinkLabel: '&lt;',
        firstPageLinkLabel: '&lt;&lt;',
        lastPageLinkLabel: '&gt;&gt;',
        containers:['user-paginator']
    }),

    MSG_SORTASC:"${_('Click to sort ascending')}",
    MSG_SORTDESC:"${_('Click to sort descending')}",
    MSG_EMPTY:"${_('No records found.')}",
    MSG_ERROR:"${_('Data error.')}",
    MSG_LOADING:"${_('Loading...')}",
  }
  );
  myDataTable.subscribe('postRenderEvent',function(oArgs) {

  });

  var filterTimeout = null;

  updateFilter  = function () {
      // Reset timeout
      filterTimeout = null;

      // Reset sort
      var state = myDataTable.getState();
          state.sortedBy = {key:'username', dir:YAHOO.widget.DataTable.CLASS_ASC};

      // Get filtered data
      myDataSource.sendRequest(YUD.get('q_filter').value,{
          success : myDataTable.onDataReturnInitializeTable,
          failure : myDataTable.onDataReturnInitializeTable,
          scope   : myDataTable,
          argument: state
      });

  };
  YUE.on('q_filter','click',function(){
      YUD.get('q_filter').value = '';
   });

  YUE.on('q_filter','keyup',function (e) {
      clearTimeout(filterTimeout);
      filterTimeout = setTimeout(updateFilter,600);
  });
</script>

</%def>