##// END OF EJS Templates
small ui improvements to pull-request form
small ui improvements to pull-request form

File last commit:

r3776:13241a40 beta
r3815:8b1f6472 beta
Show More
repos.html
128 lines | 3.8 KiB | text/html | HtmlLexer
renamed project to rhodecode
r547 ## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>
<%def name="title()">
improved title consistency...
r3582 ${_('Repositories administration')} &middot; ${c.rhodecode_name}
renamed project to rhodecode
r547 </%def>
<%def name="breadcrumbs_links()">
use placeholders in qfilter, not the ugly JS logic
r3665 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/> ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="repo_count">0</span> ${_('repositories')}
renamed project to rhodecode
r547 </%def>
<%def name="page_nav()">
Mads Kiilerich
html: don't use tabs
r3197 ${self.menu('admin')}
renamed project to rhodecode
r547 </%def>
<%def name="main()">
<div class="box">
Added sorting into journal and admin pages...
r1779
renamed project to rhodecode
r547 <div class="title">
${self.breadcrumbs()}
<ul class="links">
<li>
Mads Kiilerich
html: don't hardcode uppercase texts...
r3201 <span>${h.link_to(_(u'Add repository'),h.url('new_repo'))}</span>
White-space cleanup
r1888 </li>
</ul>
renamed project to rhodecode
r547 </div>
rewrote admin repos page....
r2664 <div class="table yui-skin-sam" id="repos_list_wrap"></div>
<div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
white space cleanup
r2673
White-space cleanup
r1888
</div>
Added sorting into journal and admin pages...
r1779 <script>
rewrote admin repos page....
r2664 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:"menu"},
{key:"raw_name"},
{key:"name"},
{key:"desc"},
Use common function for generation of grid data...
r3154 {key:"last_changeset"},
rewrote admin repos page....
r2664 {key:"owner"},
{key:"action"},
]
};
myDataSource.doBeforeCallback = function(req,raw,res,cb) {
// This is the filter function
var data = res.results || [],
filtered = [],
i,l;
white space cleanup
r2673
rewrote admin repos page....
r2664 if (req) {
req = req.toLowerCase();
for (i = 0; i<data.length; i++) {
var pos = data[i].raw_name.toLowerCase().indexOf(req)
if (pos != -1) {
filtered.push(data[i]);
}
}
res.results = filtered;
}
YUD.get('repo_count').innerHTML = res.results.length;
return res;
}
White-space cleanup
r1888
Added sorting into journal and admin pages...
r1779 // main table sorting
var myColumnDefs = [
{key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
{key:"name",label:"${_('Name')}",sortable:true,
Mads Kiilerich
html: don't use tabs
r3197 sortOptions: { sortFunction: nameSort }},
Added sorting into journal and admin pages...
r1779 {key:"desc",label:"${_('Description')}",sortable:true},
Use common function for generation of grid data...
r3154 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
whitespace cleanup
r3168 sortOptions: { sortFunction: revisionSort }},
Added sorting into journal and admin pages...
r1779 {key:"owner",label:"${_('Owner')}",sortable:true},
{key:"action",label:"${_('Action')}",sortable:false},
];
rewrote admin repos page....
r2664 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{
sortedBy:{key:"name",dir:"asc"},
Unified the paginators for pylons and YUI....
r3776 paginator: YUI_paginator(25, ['user-paginator']),
White-space cleanup
r1888
rewrote admin repos page....
r2664 MSG_SORTASC:"${_('Click to sort ascending')}",
MSG_SORTDESC:"${_('Click to sort descending')}",
MSG_EMPTY:"${_('No records found.')}",
MSG_ERROR:"${_('Data error.')}",
MSG_LOADING:"${_('Loading...')}",
}
Added sorting into journal and admin pages...
r1779 );
myDataTable.subscribe('postRenderEvent',function(oArgs) {
tooltip_activate();
quick_repo_menu();
White-space cleanup
r1888 });
white space cleanup
r2673
rewrote admin repos page....
r2664 var filterTimeout = null;
updateFilter = function () {
// Reset timeout
filterTimeout = null;
// Reset sort
var state = myDataTable.getState();
Use common function for generation of grid data...
r3154 state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC};
rewrote admin repos page....
r2664
// Get filtered data
myDataSource.sendRequest(YUD.get('q_filter').value,{
success : myDataTable.onDataReturnInitializeTable,
failure : myDataTable.onDataReturnInitializeTable,
scope : myDataTable,
argument: state
});
white space cleanup
r2673 };
rewrote admin repos page....
r2664 YUE.on('q_filter','click',function(){
Mads Kiilerich
html: don't use tabs
r3197 if(!YUD.hasClass('q_filter', 'loaded')){
//TODO: load here full list later to do search within groups
YUD.addClass('q_filter', 'loaded');
}
rewrote admin repos page....
r2664 });
YUE.on('q_filter','keyup',function (e) {
clearTimeout(filterTimeout);
filterTimeout = setTimeout(updateFilter,600);
white space cleanup
r2673 });
White-space cleanup
r1888 </script>
rewrote admin repos page....
r2664
White-space cleanup
r1888 </%def>