RhodeCode / rhodecode / templates / admin / repos / repos.html

## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>

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

<%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="repo_count">0</span> ${_('repositories')}
<%def name="page_nav()">
<%def name="main()">
<div class="box">

    <div class="title">
        <ul class="links">
            <span>${h.link_to(_(u'ADD REPOSITORY'),h.url('new_repo'))}</span>
    <div class="table yui-skin-sam" id="repos_list_wrap"></div>
    <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>

  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: [
  myDataSource.doBeforeCallback = function(req,raw,res,cb) {
      // This is the filter function
      var data     = res.results || [],
          filtered = [],

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

  // main table sorting
  var myColumnDefs = [
      {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
    	  sortOptions: { sortFunction: nameSort }},

  var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{
    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;',

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

  var filterTimeout = null;

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

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

      // Get filtered data
          success : myDataTable.onDataReturnInitializeTable,
          failure : myDataTable.onDataReturnInitializeTable,
          scope   : myDataTable,
          argument: state

      YUD.get('q_filter').value = '';

  YUE.on('q_filter','keyup',function (e) {
      filterTimeout = setTimeout(updateFilter,600);

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.