Changeset - cd2ee462fc2c
[Not reviewed]
default
0 6 0
Marcin Kuzminski - 15 years ago 2010-06-13 23:14:04
marcin@python-works.com
implemented yui tooltip, and added it into annotation and main page.
6 files changed with 149 insertions and 35 deletions:
0 comments (0 inline, 0 general)
pylons_app/lib/helpers.py
Show inline comments
 
"""Helper functions
 

	
 
Consists of functions to typically be used within templates, but also
 
available to Controllers. This module is available to both as 'h'.
 
"""
 
from pygments.formatters import HtmlFormatter
 
from pygments import highlight as code_highlight
 
from pylons import url, app_globals as g
 
from pylons.i18n.translation import _, ungettext
 
from vcs.utils.annotate import annotate_highlight
 
from webhelpers.html import literal, HTML, escape
 
from webhelpers.html.tools import *
 
from webhelpers.html.builder import make_tag
 
from webhelpers.html.tags import auto_discovery_link, checkbox, css_classes, \
 
    end_form, file, form, hidden, image, javascript_link, link_to, link_to_if, \
 
    link_to_unless, ol, required_legend, select, stylesheet_link, submit, text, \
 
    password, textarea, title, ul, xml_declaration
 
    password, textarea, title, ul, xml_declaration, radio
 
from webhelpers.html.tools import auto_link, button_to, highlight, js_obfuscate, \
 
    mail_to, strip_links, strip_tags, tag_re
 
from webhelpers.number import format_byte_size, format_bit_size
 
from webhelpers.pylonslib import Flash as _Flash
 
from webhelpers.pylonslib.secure_form import secure_form
 
from webhelpers.text import chop_at, collapse, convert_accented_entities, \
 
    convert_misc_entities, lchop, plural, rchop, remove_formatting, \
 
    replace_whitespace, urlify, truncate
 
    replace_whitespace, urlify, truncate, wrap_paragraphs
 

	
 

	
 
#Custom helper here :)
 
#Custom helpers here :)
 
class _Link(object):
 
    '''
 
    Make a url based on label and url with help of url_for
 
    @param label:name of link    if not defined url is used
 
    @param url: the url for link
 
    '''
 

	
 
    def __call__(self, label='', *url_, **urlargs):
 
        if label is None or '':
 
            label = url
 
        link_fn = link_to(label, url(*url_, **urlargs))
 
        return link_fn
 

	
 
link = _Link()
 

	
 
class _GetError(object):
 

	
 
    def __call__(self, field_name, form_errors):
 
        tmpl = """<span class="error_msg">%s</span>"""
 
        if form_errors and form_errors.has_key(field_name):
 
            return literal(tmpl % form_errors.get(field_name))
 

	
 
get_error = _GetError()
 

	
 
def recursive_replace(str, replace=' '):
 
    """
 
    Recursive replace of given sign to just one instance
 
    @param str: given string
 
    @param replace:char to find and replace multiple instances
 
        
 
    Examples::
 
    >>> recursive_replace("Mighty---Mighty-Bo--sstones",'-')
 
    'Mighty-Mighty-Bo-sstones'
 
    """
 

	
 
    if str.find(replace * 2) == -1:
 
        return str
 
    else:
 
        str = str.replace(replace * 2, replace)
 
        return recursive_replace(str, replace)  
 

	
 
class _ToolTip(object):
 
    
 
    def __call__(self, tooltip_title, trim_at=50):
 
        """
 
        Special function just to wrap our text into nice formatted autowrapped
 
        text
 
        @param tooltip_title:
 
        """
 
        
 
        return literal(wrap_paragraphs(tooltip_title, trim_at)\
 
                       .replace('\n', '<br/>')) 
 
    
 
    def activate(self):
 
        """
 
        Adds tooltip mechanism to the given Html all tooltips have to have 
 
        set class tooltip and set attribute tooltip_title.
 
        Then a tooltip will be generated based on that
 
        All with yui js tooltip
 
        """
 
        
 
        js = '''
 
        YAHOO.util.Event.onDOMReady(function(){
 
            function toolTipsId(){
 
                var ids = [];
 
                var tts = YAHOO.util.Dom.getElementsByClassName('tooltip');
 
                
 
                for (var i = 0; i < tts.length; i++) {
 
                    //if element doesn not have and id autgenerate one for tooltip
 
                    
 
                    if (!tts[i].id){
 
                        tts[i].id='tt'+i*100;
 
                    }
 
                    ids.push(tts[i].id);
 
                }
 
                return ids        
 
            };
 
            var myToolTips = new YAHOO.widget.Tooltip("tooltip", { 
 
                context: toolTipsId(),
 
                monitorresize:false,
 
                xyoffset :[0,0],
 
                autodismissdelay:300000,
 
                hidedelay:5,
 
                showdelay:20,
 
            });
 
            
 
            //Mouse subscribe optional arguments
 
            myToolTips.contextMouseOverEvent.subscribe(
 
                function(type, args) {
 
                    var context = args[0];
 
                    return true;
 
                });
 
            
 
            // Set the text for the tooltip just before we display it. Lazy method
 
            myToolTips.contextTriggerEvent.subscribe( 
 
                 function(type, args) { 
 
                        var context = args[0]; 
 
                        var txt = context.getAttribute('tooltip_title');
 
                        this.cfg.setProperty("text", txt);                     
 
                  });
 
        });
 
        '''         
 
        return literal(js)
 

	
 
tooltip = _ToolTip()
 

	
 
class _FilesBreadCrumbs(object):
 
    
 
    def __call__(self, repo_name, rev, paths):
 
        url_l = [link_to(repo_name, url('files_home', repo_name=repo_name, revision=rev, f_path=''))]
 
        paths_l = paths.split('/')
 
        paths_l = paths.split(' / ')
 
        
 
        for cnt, p in enumerate(paths_l, 1):
 
            if p != '':
 
                url_l.append(link_to(p, url('files_home', repo_name=repo_name, revision=rev, f_path='/'.join(paths_l[:cnt]))))
 
                url_l.append(link_to(p, url('files_home', repo_name=repo_name, revision=rev, f_path=' / '.join(paths_l[:cnt]))))
 

	
 
        return literal(' / '.join(url_l))
 

	
 
files_breadcrumbs = _FilesBreadCrumbs()
 

	
 
def pygmentize(filenode, **kwargs):
 
    """
 
    pygmentize function using pygments
 
    @param filenode:
 
    """
 
    return literal(code_highlight(filenode.content, filenode.lexer, HtmlFormatter(**kwargs)))
 

	
 
def pygmentize_annotation(filenode, **kwargs):
 
    """
 
    pygmentize function for annotation
 
    @param filenode:
 
    """
 
    
 
    color_dict = g.changeset_annotation_colors
 
    def gen_color():
 
        import random
 
        return [str(random.randrange(10, 235)) for _ in xrange(3)]
 
    def get_color_string(cs):
 
        if color_dict.has_key(cs):
 
            col = color_dict[cs]
 
        else:
 
            color_dict[cs] = gen_color()
 
            col = color_dict[cs]
 
        return "color: rgb(%s) ! important;" % (','.join(col))
 
        return "color: rgb(%s) ! important;" % (', '.join(col))
 
        
 
    def url_func(changeset):
 
        return '%s\n' % (link_to('r%s:%s' % (changeset.revision, changeset.raw_id),
 
        url('changeset_home', repo_name='test', revision=changeset.raw_id),
 
        title=_('author') + ':%s - %s' % (changeset.author, changeset.message,),
 
        style=get_color_string(changeset.raw_id)))
 
           
 
        tooltip_html = "<div style='font-size:0.8em'><b>Author:</b> %s<br/><b>Date:</b> %s</b><br/><b>Message:</b> %s<br/></div>" 
 
        
 
        tooltip_html = tooltip_html % (changeset.author,
 
                                               changeset.date,
 
                                               tooltip(changeset.message))
 
        lnk_format = 'r%s:%s' % (changeset.revision,
 
                                 changeset.raw_id)
 
        uri = link_to(
 
                lnk_format,
 
                url('changeset_home', repo_name='test',
 
                    revision=changeset.raw_id),
 
                style=get_color_string(changeset.raw_id),
 
                class_='tooltip',
 
                tooltip_title=tooltip_html
 
              )
 
        
 
        uri += '\n'
 
        return uri   
 
    return literal(annotate_highlight(filenode, url_func, **kwargs))
 

	
 
def recursive_replace(str, replace=' '):
 
    """
 
    Recursive replace of given sign to just one instance
 
    @param str: given string
 
    @param replace:char to find and replace multiple instances
 
        
 
    Examples::
 
    >>> recursive_replace("Mighty---Mighty-Bo--sstones",'-')
 
    'Mighty-Mighty-Bo-sstones'
 
    """
 

	
 
    if str.find(replace * 2) == -1:
 
        return str
 
    else:
 
        str = str.replace(replace * 2, replace)
 
        return recursive_replace(str, replace)  
 
      
 
def repo_name_slug(value):
 
    """
 
    Return slug of name of repository
 
    """
 
    slug = urlify(value)
 
    for c in """=[]\;'"<>,/~!@#$%^&*()+{}|:""":
 
        slug = slug.replace(c, '-')
 
    slug = recursive_replace(slug, '-')
 
    return slug
 
    
 
files_breadcrumbs = _FilesBreadCrumbs()
 
link = _Link()
 

	
 
flash = _Flash()
 
get_error = _GetError()
pylons_app/lib/utils.py
Show inline comments
 
#!/usr/bin/env python
 
# encoding: utf-8
 
# Utilities for hg app
 
# Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
 
 
 
# This program is free software; you can redistribute it and/or
 
# modify it under the terms of the GNU General Public License
 
# as published by the Free Software Foundation; version 2
 
# of the License or (at your opinion) any later version of the license.
 
# 
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
# 
 
# You should have received a copy of the GNU General Public License
 
# along with this program; if not, write to the Free Software
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
# MA  02110-1301, USA.
 

	
 
"""
 
Created on April 18, 2010
 
Utilities for hg app
 
@author: marcink
 
"""
 

	
 
import os
 
import logging
 
from mercurial import ui, config, hg
 
from mercurial.error import RepoError
 
from pylons_app.model.db import Repository, User
 
log = logging.getLogger(__name__)
 

	
 

	
 
def get_repo_slug(request):
 
    return request.environ['pylons.routes_dict'].get('repo_name')
 

	
 
def is_mercurial(environ):
 
    """
 
    Returns True if request's target is mercurial server - header
 
    ``HTTP_ACCEPT`` of such request would start with ``application/mercurial``.
 
    """
 
    http_accept = environ.get('HTTP_ACCEPT')
 
    if http_accept and http_accept.startswith('application/mercurial'):
 
        return True
 
    return False
 

	
 
def check_repo_dir(paths):
 
    repos_path = paths[0][1].split('/')
 
    if repos_path[-1] in ['*', '**']:
 
        repos_path = repos_path[:-1]
 
    if repos_path[0] != '/':
 
        repos_path[0] = '/'
 
    if not os.path.isdir(os.path.join(*repos_path)):
 
        raise Exception('Not a valid repository in %s' % paths[0][1])
 

	
 
def check_repo(repo_name, base_path):
 

	
 
    repo_path = os.path.join(base_path, repo_name)
 

	
 
    try:
 
        r = hg.repository(ui.ui(), repo_path)
 
        hg.verify(r)
 
        #here we hnow that repo exists it was verified
 
        log.info('%s repo is already created', repo_name)
 
        return False
 
        #raise Exception('Repo exists')
 
    except RepoError:
 
        log.info('%s repo is free for creation', repo_name)
 
        #it means that there is no valid repo there...
 
        return True
 
                
 
def make_ui(path=None, checkpaths=True):        
 
    """
 
    A funcion that will read python rc files and make an ui from read options
 
    
 
    @param path: path to mercurial config file
 
    """
 
    if not path:
 
        log.error('repos config path is empty !')
 
    
 
    if not os.path.isfile(path):
 
        log.warning('Unable to read config file %s' % path)
 
        return False
 
    #propagated from mercurial documentation
 
    sections = [
 
                'alias',
 
                'auth',
 
                'decode/encode',
 
                'defaults',
 
                'diff',
 
                'email',
 
                'extensions',
 
                'format',
 
                'merge-patterns',
 
                'merge-tools',
 
                'hooks',
 
                'http_proxy',
 
                'smtp',
 
                'patch',
 
                'paths',
 
                'profiling',
 
                'server',
 
                'trusted',
 
                'ui',
 
                'web',
 
                ]
 

	
 
    baseui = ui.ui()
 
    cfg = config.config()
 
    cfg.read(path)
 
    if checkpaths:check_repo_dir(cfg.items('paths'))
 

	
 
    for section in sections:
 
        for k, v in cfg.items(section):
 
            baseui.setconfig(section, k, v)
 
    
 
    return baseui
 

	
 
def invalidate_cache(name, *args):
 
    """Invalidates given name cache"""
 
    
 
    from beaker.cache import region_invalidate
 
    log.info('INVALIDATING CACHE FOR %s', name)
 
    
 
    """propagate our arguments to make sure invalidation works. First
 
    argument has to be the name of cached func name give to cache decorator
 
    without that the invalidation would not work"""
 
    tmp = [name]
 
    tmp.extend(args)
 
    args = tuple(tmp)
 
    
 
    if name == 'cached_repo_list':
 
        from pylons_app.model.hg_model import _get_repos_cached
 
        region_invalidate(_get_repos_cached, None, *args)
 
        
 
    if name == 'full_changelog':
 
        from pylons_app.model.hg_model import _full_changelog_cached
 
        region_invalidate(_full_changelog_cached, None, *args)
 
        
 
from vcs.backends.base import BaseChangeset
 
from vcs.utils.lazy import LazyProperty
 
class EmptyChangeset(BaseChangeset):
 
    
 
    revision = -1
 

	
 
    message = ''
 
    
 
    @LazyProperty
 
    def raw_id(self):
 
        """
 
        Returns raw string identifing this changeset, useful for web
 
        representation.
 
        """
 
        return '0' * 12
 

	
 

	
 
def repo2db_mapper(initial_repo_list):
 
    """
 
    maps all found repositories into db
 
    """
 
    from pylons_app.model.meta import Session
 
    sa = Session()
 
    user = sa.query(User).filter(User.admin == True).first()
 
    for name, repo in initial_repo_list.items():
 
        if not sa.query(Repository).get(name):
 
            log.info('%s not found creating default', name)
 
            try:
 
                
 
                new_repo = Repository()
 
                new_repo.repo_name = name
 
                desc = repo.description if repo.description != 'unknown' else \
 
                                            'auto description for %s' % name
 
                new_repo.description = desc
 
                new_repo.user_id = user.user_id
 
                new_repo.private = False
 
                sa.add(new_repo)
 
                sa.commit()
 
            except:
 
                sa.rollback()
 
                raise
 
            
pylons_app/model/hg_model.py
Show inline comments
 
#!/usr/bin/env python
 
# encoding: utf-8
 
# Model for hg app
 
# Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
 
 
 
# This program is free software; you can redistribute it and/or
 
# modify it under the terms of the GNU General Public License
 
# as published by the Free Software Foundation; version 2
 
# of the License or (at your opinion) any later version of the license.
 
# 
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
# 
 
# You should have received a copy of the GNU General Public License
 
# along with this program; if not, write to the Free Software
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
# MA  02110-1301, USA.
 

	
 
"""
 
Created on April 9, 2010
 
Model for hg app
 
@author: marcink
 
"""
 

	
 
from beaker.cache import cache_region
 
from mercurial import ui
 
from mercurial.hgweb.hgwebdir_mod import findrepos
 
from vcs.exceptions import RepositoryError, VCSError
 
from pylons_app.model.meta import Session
 
from pylons_app.model.db import Repository
 
import logging
 
import os
 
import sys
 
log = logging.getLogger(__name__)
 

	
 
try:
 
    from vcs.backends.hg import MercurialRepository
 
except ImportError:
 
    sys.stderr.write('You have to import vcs module')
 
    raise Exception('Unable to import vcs')
 

	
 
def _get_repos_cached_initial(app_globals):
 
    """
 
    return cached dict with repos
 
    """
 
    g = app_globals
 
    return HgModel.repo_scan(g.paths[0][0], g.paths[0][1], g.baseui)
 

	
 
@cache_region('long_term', 'cached_repo_list')
 
def _get_repos_cached():
 
    """
 
    return cached dict with repos
 
    """
 
    log.info('getting all repositories list')
 
    from pylons import app_globals as g
 
    return HgModel.repo_scan(g.paths[0][0], g.paths[0][1], g.baseui)
 

	
 
@cache_region('long_term', 'full_changelog')
 
def _full_changelog_cached(repo_name):
 
    log.info('getting full changelog for %s', repo_name)
 
    return list(reversed(list(HgModel().get_repo(repo_name))))
 

	
 
class HgModel(object):
 
    """
 
    Mercurial Model
 
    """
 

	
 
    def __init__(self):
 
        """
 
        Constructor
 
        """
 
    
 
    @staticmethod
 
    def repo_scan(repos_prefix, repos_path, baseui):
 
        """
 
        Listing of repositories in given path. This path should not be a 
 
        repository itself. Return a dictionary of repository objects
 
        :param repos_path: path to directory it could take syntax with 
 
        * or ** for deep recursive displaying repositories
 
        """
 
        sa = Session()
 
        def check_repo_dir(path):
 
            """
 
            Checks the repository
 
            :param path:
 
            """
 
            repos_path = path.split('/')
 
            if repos_path[-1] in ['*', '**']:
 
                repos_path = repos_path[:-1]
 
            if repos_path[0] != '/':
 
                repos_path[0] = '/'
 
            if not os.path.isdir(os.path.join(*repos_path)):
 
                raise RepositoryError('Not a valid repository in %s' % path[0][1])        
 
        if not repos_path.endswith('*'):
 
            raise VCSError('You need to specify * or ** at the end of path '
 
                            'for recursive scanning')
 
            
 
        check_repo_dir(repos_path)
 
        log.info('scanning for repositories in %s', repos_path)
 
        repos = findrepos([(repos_prefix, repos_path)])
 
        if not isinstance(baseui, ui.ui):
 
            baseui = ui.ui()
 
    
 
        repos_list = {}
 
        for name, path in repos:
 
            try:
 
                #name = name.split('/')[-1]
 
                if repos_list.has_key(name):
 
                    raise RepositoryError('Duplicate repository name %s found in'
 
                                    ' %s' % (name, path))
 
                else:
 
                    
 
                    repos_list[name] = MercurialRepository(path, baseui=baseui)
 
                    repos_list[name].name = name
 
                    dbrepo = sa.query(Repository).get(name)
 
                    if dbrepo:
 
                        repos_list[name].description = dbrepo.description
 
                        repos_list[name].contact = dbrepo.user.full_contact
 
            except OSError:
 
                continue
 
        return repos_list
 
        
 
    def get_repos(self):
 
        for name, repo in _get_repos_cached().items():
 
            if repo._get_hidden():
 
                #skip hidden web repository
 
                continue
 
            
 
            last_change = repo.last_change
 
            try:
 
                tip = repo.get_changeset('tip')
 
            except RepositoryError:
 
                from pylons_app.lib.utils import EmptyChangeset
 
                tip = EmptyChangeset()
 
                
 
            tmp_d = {}
 
            tmp_d['name'] = repo.name
 
            tmp_d['name_sort'] = tmp_d['name'].lower()
 
            tmp_d['description'] = repo.description
 
            tmp_d['description_sort'] = tmp_d['description']
 
            tmp_d['last_change'] = last_change
 
            tmp_d['last_change_sort'] = last_change[1] - last_change[0]
 
            tmp_d['tip'] = tip.raw_id
 
            tmp_d['tip_sort'] = tip.revision 
 
            tmp_d['rev'] = tip.revision
 
            tmp_d['contact'] = repo.contact
 
            tmp_d['contact_sort'] = tmp_d['contact']
 
            tmp_d['repo_archives'] = list(repo._get_archives())
 
            tmp_d['last_msg'] = tip.message
 
            
 
            yield tmp_d
 

	
 
    def get_repo(self, repo_name):
 
        return _get_repos_cached()[repo_name]
pylons_app/public/css/monoblue_custom.css
Show inline comments
 
/*** Initial Settings ***/
 
#mainhtml{
 
	margin: 15px 50px;
 
	background: #DBD4C6;
 
	font-family: sans-serif;
 
}
 

	
 
a {
 
	color: #556CB5;
 
	text-decoration: none;
 
}
 
a:HOVER{
 
	text-decoration: underline;
 
}
 

	
 
/*** end of Initial Settings ***/ 
 

	
 
/*** ***/
 
.table_disp {
 
    border-left: 0px solid #666666;
 
    border-bottom: 1px solid #666666;
 
    border-right: 1px solid #666666;
 
    padding: 0px;
 
    margin: 0px;
 
    border-spacing: 0px;    
 
}
 

	
 
.table_disp .header {
 
    border-top: 1px solid #666666;
 
    background-color: #556CB5;
 
    font-weight: bold;
 
    color: white;
 
    vertical-align: middle;
 
    padding: 3px 5px;
 
    text-align: left;
 
    font-size: 0.9em;
 
}
 

	
 
.table_disp .header td {
 
    padding: 4px;
 
    vertical-align: middle;
 
    border-top: 1px solid #AAAAAA;
 
    border-bottom: 2px solid #666666;
 
}
 
.table_disp td {
 
    border-left: 1px solid #AAAAAA;
 
    padding-left: 4px;
 
    padding-right: 4px;
 
}
 

	
 
table tr.parity0:hover,table tr.parity1:hover {
 
    background: #D5E1E6;
 
}
 

	
 
table tr.parity0 {
 
    background: #EAEAE9;
 
}
 

	
 
table tr.parity1 {
 
    background: #FFFFFF;
 
}
 

	
 

	
 
/*** ***/
 

	
 
/** common settings **/
 
.add_icon{
 
    background: url("/images/icons/add.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 

	
 
}
 
.edit_icon{
 
    background: url("/images/icons/folder_edit.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 
}
 

	
 
.delete_icon{
 
    background: url("/images/icons/delete.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 

	
 
}
 

	
 
.action_button{
 
    border:0px;
 
    display: block;
 
}
 
.action_button:hover{
 
    border:0px;
 
    font-style:italic;
 
    cursor: pointer;
 
}
 

	
 
.flash_msg ul{
 
	margin:0;
 
	padding:25px 0px 0px 0px;
 
	
 
}
 
.error_msg {
 
	background-color:#FFCFCF;
 
	background-image: url("/images/icons/error_msg.png");
 
	border:1px solid #FF9595;
 
	color:#CC3300;
 
}
 
.warning_msg {
 
	background-color:#FFFBCC;
 
	background-image: url("/images/icons/warning_msg.png");
 
	border:1px solid #FFF35E;
 
	color:#C69E00;
 
}
 
.success_msg {
 
	background-color:#D5FFCF;
 
	background-image: url("/images/icons/success_msg.png");
 
	border:1px solid #97FF88;
 
	color:#009900;
 
}
 
.notice_msg {
 
	background-color:#DCE3FF;
 
	background-image: url("/images/icons/notice_msg.png");
 
	border:1px solid #93A8FF;
 
	color:#556CB5;
 
}
 

	
 
.success_msg, .error_msg, .notice_msg, .warning_msg{
 
	background-position:10px center;
 
	background-repeat:no-repeat;
 
	font-size:12px;
 
	font-weight:bold;
 
	min-height:14px;
 
	line-height:14px;
 
	margin-bottom:0px;
 
	margin-top:0px;
 
	padding:3px 10px 3px 40px;
 
	display:block;
 
	overflow: auto;
 
}        
 

	
 
#msg_close {
 
	background:transparent url("icons/cross_grey_small.png")	no-repeat scroll 0 0;
 
	cursor:pointer;
 
	height:16px;
 
	position:absolute;
 
	right:5px;
 
	top:5px;
 
	width:16px;
 
}
 

	
 
.error-message{
 
	color:#CC3300;
 
}
 
/**** Tooltip ****/
 
.yui-overlay,
 
.yui-panel-container {
 
    visibility:hidden;
 
    position:absolute;
 
    z-index: 2;
 
}
 

	
 
.yui-tt {
 
    visibility:hidden;
 
    position:absolute;
 
    color:#666666;
 
    background-color:#FFFFFF;
 
    font-family:arial,helvetica,verdana,sans-serif;
 
    padding:8px;
 
    border:2px solid #556CB5;
 
    font:100% sans-serif;
 
    width:auto;
 
}
 

	
 
.yui-tt-shadow {
 
    display: none;
 
}
 
/** end of Tooltip **/ 
 

	
 

	
 
div#main {
 
	padding: 5px;
 
}
 

	
 
div#container {
 
	background: #FFFFFF;
 
	position: relative;
 
	color: #666;
 
}
 

	
 
div.page-header {
 
	padding: 50px 20px 0;
 
	background: #556cb5 top left repeat-x;
 
	position: relative;
 
}
 

	
 
div.page-header h1 {
 
	margin: 10px 0 30px;
 
	font-size: 1.8em;
 
	font-weight: bold;
 
	font-family: sans-serif;
 
	letter-spacing: 1px;
 
	color: #FFFFFF;
 
}
 

	
 
div.page-header h1 a {
 
	font-weight: bold;
 
	color: #FFFFFF;
 
}
 

	
 
div.page-header a {
 
	text-decoration: none;
 
}
 

	
 
div.page-header form {
 
	position: absolute;
 
	margin-bottom: 2px;
 
	bottom: 0;
 
	right: 20px;
 
}
 

	
 
div.page-header form label {
 
	color: #DDD;
 
}
 

	
 
div.page-header form input {
 
	padding: 2px;
 
	border: solid 1px #DDD;
 
}
 

	
 
div.page-header form dl {
 
	overflow: hidden;
 
}
 

	
 
div.page-header form dl dt {
 
	font-size: 1.2em;
 
}
 

	
 
div.page-header form dl dt,div.page-header form dl dd {
 
	margin: 0 0 0 5px;
 
	float: left;
 
	height: 24px;
 
	line-height: 20px;
 
}
 

	
 
ul.page-nav {
 
	margin: 10px 0 0 0;
 
	list-style-type: none;
 
	overflow: hidden;
 
	width: 800px;
 
	padding: 0;
 
}
 

	
 
ul.page-nav li {
 
	margin: 0 4px 0 0;
 
	float: left;
 
	height: 24px;
 
	font-size: 1.1em;
 
	line-height: 24px;
 
	text-align: center;
 
	background: #556CB5;
 
}
 

	
 
ul.page-nav li.current {
 
	background: #FFF;
 
	padding-right: 5px;
 
	padding-left: 5px;
 
}
 
ul.page-nav li.current a {
 
	color: #556CB5;
 
}
 
ul.page-nav li a {
 
	height: 24px;
 
	color: #FFF;
 
	padding-right: 5px;
 
	padding-left: 5px;
 
	display: block;
 
	text-decoration: none;
 
	font-weight: bold;
 
}
 
ul.page-nav li.logout a {
 
	color: #FDAC9D;
 
}
 
ul.page-nav li a:hover {
 
	background: #FFF;
 
	color: #556CB5;
 
}
 

	
 
ul.submenu {
 
	margin: 5px 0px -20px 0px;
 
	list-style-type: none;
 
}
 

	
 
ul.submenu li {
 
	margin: 0 10px 0 0;
 
	font-size: 0.9em;
 
	font-weight:bold;
 
	display: inline;
 
}
 
ul.submenu .repos {
 
    background: url("/images/icons/folder_edit.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 
   
 
}
 
ul.submenu .users {
 
    background: url("/images/icons/user_edit.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 
}
 
ul.submenu .permissions {
 
    background: url("/images/icons/folder_key.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 
}
 

	
 
ul.submenu .current_submenu {
 
    border-bottom: 2px solid #556CB5;
 
}
 

	
 
h2 {
 
	margin: 20px 0 10px;
 
	height: 30px;
 
	line-height: 30px;
 
	text-indent: 20px;
 
	background: #FFF;
 
	font-size: 1.2em;
 
	border-top: dotted 1px #D5E1E6;
 
	font-weight: bold;
 
	color:#556CB5;
 
}
 

	
 
h2.no-link {
 
	color: #006699;
 
}
 

	
 
h2.no-border {
 
	color: #FFF;
 
	background: #556CB5;
 
	border: 0;
 
}
 

	
 
h2 a {
 
	font-weight: bold;
 
	color: #006699;
 
}
 

	
 
div.page-path {
 
	text-align: right;
 
	padding: 20px 30px 10px 0;
 
	border: solid #d9d8d1;
 
	border-width: 0px 0px 1px;
 
	font-size: 1.2em;
 
}
 

	
 
div.page-footer {
 
	margin: 50px 0 0;
 
	position: relative;
 
	text-align: center;
 
	font-weight: bold;
 
	font-size: 90%;
 
}
 

	
 
div.page-footer p {
 
	position: relative;
 
	left: 20px;
 
	bottom: 5px;
 
	font-size: 1.2em;
 
}
 

	
 
ul.rss-logo {
 
	position: absolute;
 
	top: -10px;
 
	right: 20px;
 
	height: 20px;
 
	list-style-type: none;
 
}
 

	
 
ul.rss-logo li {
 
	display: inline;
 
}
 

	
 
ul.rss-logo li a {
 
	padding: 3px 6px;
 
	line-height: 10px;
 
	border: 1px solid;
 
	border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e;
 
	color: #ffffff;
 
	background-color: #ff6600;
 
	font-weight: bold;
 
	font-family: sans-serif;
 
	font-size: 10px;
 
	text-align: center;
 
	text-decoration: none;
 
}
 

	
 
div.rss-logo li a:hover {
 
	background-color: #ee5500;
 
}
 

	
 
p.normal {
 
	margin: 20px 0 20px 30px;
 
	font-size: 1.2em;
 
}
 

	
 
span.logtags span {
 
	background-repeat: no-repeat;
 
	height: 16px;
 
	padding-left: 20px;
 
	padding-top: 0px;
 
	text-align: left;
 
	font-weight: bold;
 
}
 

	
 
span.logtags span.tagtag {
 
	background-image: url("/images/icons/tag_green.png");
 
}
 

	
 
span.logtags span.branchtag {
 
	background-image: url("/images/icons/arrow_branch.png");
 
	color: #628F53;
 
}
 

	
 
span.logtags span.inbranchtag {
 
	background-image: url("/images/icons/arrow_branch.png");
 
}
 

	
 
div.diff pre {
 
	margin: 10px 0 0 0;
 
}
 

	
 
div.diff pre span {
 
	font-family: monospace;
 
	white-space: pre;
 
	font-size: 1.2em;
 
	padding: 3px 0;
 
}
 

	
 
td.source {
 
	white-space: pre;
 
	font-family: monospace;
 
	margin: 10px 30px 0;
 
	font-size: 1.2em;
 
	font-family: monospace;
 
}
 

	
 
div.source div.parity0,div.source div.parity1 {
 
	padding: 1px;
 
	font-size: 1.2em;
 
}
 

	
 
div.source div.parity0 {
 
	background: #F1F6F7;
 
}
 

	
 
div.source div.parity1 {
 
	background: #FFFFFF;
 
}
 

	
 
div.parity0:hover,div.parity1:hover {
 
	background: #D5E1E6;
 
}
 

	
 
.linenr {
 
	color: #999;
 
	text-align: right;
 
}
 

	
 
.lineno {
 
	text-align: right;
 
}
 

	
 
.lineno a {
 
	color: #999;
 
}
 

	
 
td.linenr {
 
	width: 60px;
 
}
 

	
 
div#powered-by {
 
	position: absolute;
 
	width: 75px;
 
	top: 15px;
 
	right: 20px;
 
	font-size: 1.2em;
 
}
 

	
 
div#powered-by a {
 
	color: #EEE;
 
	text-decoration: none;
 
}
 

	
 
div#powered-by a:hover {
 
	text-decoration: underline;
 
}
 

	
 
dl.overview {
 
	margin: 0 0 0 30px;
 
	font-size: 1.1em;
 
	overflow: hidden;
 
}
 

	
 
dl.overview dt,dl.overview dd {
 
	margin: 5px 0;
 
	float: left;
 
}
 

	
 
dl.overview dt {
 
	clear: left;
 
	font-weight: bold;
 
	width: 150px;
 
}
 

	
 
#clone_url{
 
    border: 0px;
 
}
 
/** end of summary **/ 
 

	
 
/** chagelog **/
 
h3.changelog {
 
	margin: 20px 0 5px 30px;
 
	padding: 0 0 2px;
 
	font-size: 1.4em;
 
	border-bottom: dotted 1px #D5E1E6;
 
}
 

	
 
ul.changelog-entry {
 
	margin: 0 0 10px 30px;
 
	list-style-type: none;
 
	position: relative;
 
}
 

	
 
ul.changelog-entry li span.revdate {
 
	font-size: 1.1em;
 
}
 

	
 
ul.changelog-entry li.age {
 
	position: absolute;
 
	top: -25px;
 
	right: 10px;
 
	font-size: 1.4em;
 
	color: #CCC;
 
	font-weight: bold;
 
	font-style: italic;
 
}
 

	
 
ul.changelog-entry li span.name {
 
	font-size: 1.2em;
 
	font-weight: bold;
 
}
 

	
 
ul.changelog-entry li.description {
 
	margin: 10px 0 0;
 
	font-size: 1.1em;
 
}
 

	
 
/** end of changelog **/ 
 

	
 
/** file **/
 
p.files {
 
	margin: 0 0 0 20px;
 
	font-size: 2.0em;
 
	font-weight: bold;
 
}
 

	
 
/** end of file **/ 
 

	
 
/** changeset **/
 
#changeset_content{
 
	width:60%;
 
	float:left;
 
}
 

	
 
#changeset_content .container .wrapper{
 
	width: 600px;
 
}
 
#changeset_content .container{
 
	border:1px solid #CCCCCC;
 
	height:120px;
 
}
 

	
 
#changeset_content .container .left{
 
	float:left;
 
	width: 70%;
 
	padding-left: 5px;
 
}
 

	
 
#changeset_content .container .right{
 
	float:right;
 
	width: 25%;
 
	text-align: right;
 
}
 

	
 
#changeset_content .container .left .date{
 
	font-weight:bold;
 
}
 
#changeset_content .container .left .author{
 
	
 
}
 
#changeset_content .container .left .message{
 
	font-style: italic;
 
	color: #556CB5;
 
}
 

	
 
.cs_files{
 
	width: 60%;
 
}
 

	
 
.cs_files .cs_added{
 
	background: url("/images/icons/page_white_add.png") no-repeat scroll 3px;
 
	/*background-color:#BBFFBB;*/
 
	height: 16px;
 
	padding-left: 20px;
 
	margin-top: 7px;
 
	text-align: left;	
 
}
 
.cs_files .cs_changed{
 
	background: url("/images/icons/page_white_edit.png") no-repeat scroll 3px;
 
	/*background-color: #FFDD88;*/
 
	height: 16px;
 
	padding-left: 20px;
 
	margin-top: 7px;
 
	text-align: left;	
 
}
 
.cs_files .cs_removed{
 
	background: url("/images/icons/page_white_delete.png") no-repeat scroll 3px;
 
	/*background-color: #FF8888;*/
 
	height: 16px;
 
	padding-left: 20px;
 
	margin-top: 7px;
 
	text-align: left;	
 
}
 

	
 
/** end of changeset **/ 
 

	
 
/** canvas **/
 
canvas {
 
	position: absolute;
 
	z-index: 5;
 
	top: -0.7em;
 
}
 
#graph{
 
	overflow: hidden;
 

	
 
}
 
#graph_nodes{
 
	width:160px;
 
	float:left;
 
}
 

	
 
#graph_content{
 
	width:800px;
 
	float:left;
 
}
 
#graph_content .container_header{
 
	border:1px solid #CCCCCC;
 
	height:30px;
 
	background: #EEEEEE;
 
}
 

	
 

	
 
#graph_content .container .wrapper{
 
	width: 600px;
 
}
 
#graph_content .container{
 
	border-bottom: 1px solid #CCCCCC;
 
	border-left: 1px solid #CCCCCC;
 
	border-right: 1px solid #CCCCCC;
 
	height:120px;
 
}
 

	
 
#graph_content .container .left{
 
	float:left;
 
	width: 70%;
 
	padding-left: 5px;
 
}
 

	
 
#graph_content .container .right{
 
	float:right;
 
	width: 25%;
 
	text-align: right;
 
}
 
#graph_content .container .left .date{
 
	font-weight:bold;
 
}
 
#graph_content .container .left .author{
 
	
 
}
 
#graph_content .container .left .message{
 
	font-size: 80%;
 
}
 

	
 
.right div{
 
	clear: both;
 
}
 
.right .changes .added,.changed,.removed{
 
	border:1px solid #DDDDDD;
 
	display:block;
 
	float:right;
 
	font-size:0.75em;
 
	text-align:center;
 
	min-width:15px;
 
}
 
.right .changes .added{
 
	background:#BBFFBB; 
 
}
 
.right .changes .changed{
 
	background: #FFDD88;
 
}
 
.right .changes .removed{
 
	background: #FF8888;
 
}
 

	
 
.right .merge{
 
	vertical-align: top;
 
	font-size: 60%;
 
	font-weight: bold;
 
}
 
.right .merge img{
 
	vertical-align: bottom;	
 
}
 

	
 
.right .parent{
 
	font-size: 90%;
 
	font-family: monospace;
 
}
 
/** end of canvas **/
 

	
 
/* FILE BROWSER */
 
div.browserblock {
 
    overflow: hidden;
 
    padding: 0px;
 
    border: 1px solid #ccc;
 
    background: #f8f8f8;
 
    font-size: 100%;
 
    line-height: 100%;
 
    /* new */
 
    line-height: 125%;
 
}
 
div.browserblock .browser-header{
 
	border-bottom: 1px solid #CCCCCC;
 
	background: #EEEEEE;
 
	color:blue;
 
	padding:10px 0 10px 0;
 
}
 
div.browserblock .browser-header span{
 
	margin-left:25px;
 
	font-weight: bold;
 
}
 
div.browserblock .browser-body{
 
	background: #EEEEEE;
 
}
 

	
 
table.code-browser {
 
	border-collapse:collapse;
 
	width: 100%;
 
}
 
table.code-browser tr{
 
	margin:3px;	
 
}
 

	
 
table.code-browser thead th {
 
	background-color: #EEEEEE;
 
	height: 20px;
 
	font-size: 1.1em;
 
	font-weight: bold;
 
	text-align: center;
 
	text-align: left;
 
	padding-left: 10px;
 
}
 
table.code-browser tbody tr {
 
	
 
}
 

	
 
table.code-browser tbody td {
 
	
 
	padding-left:10px;
 
	height: 20px;
 
}
 

	
 
.info-table {
 
	background: none repeat scroll 0 0 #FAFAFA;
 
	border-bottom: 1px solid #DDDDDD;
 
	width: 100%;
 
}
 

	
 
.rss_logo {
 
	background: url("/images/icons/rss_16.png") no-repeat scroll 3px;
 
	height: 16px;
 
	padding-left: 20px;
 
	padding-top: 0px;
 
	text-align: left;
 
}
 

	
 
.atom_logo {
 
	background: url("/images/icons/atom.png") no-repeat scroll 3px;
 
	height: 16px;
 
	padding-left: 20px;
 
	padding-top: 0px;
 
	text-align: left;
 
}
 
.archive_logo{
 
	background: url("/images/icons/compress.png") no-repeat scroll 3px;
 
	height: 16px;
 
	padding-left: 20px;
 
	text-align: left;
 
}
 

	
 
.browser-file {
 
	background: url("/images/icons/document_16.png") no-repeat scroll 3px;
 
	height: 16px;
 
	padding-left: 20px;
 
	text-align: left;
 
}
 

	
 
.browser-dir {
 
	background: url("/images/icons/folder_16.png") no-repeat scroll 3px;
 
	height: 16px;
 
	padding-left: 20px;
 
	text-align: left;
 
}
 

	
 
#repos_list {
 
	border: 1px solid #556CB5;
 
	background: #FFFFFF;
 
}
 
\ No newline at end of file
pylons_app/templates/base/base.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
 
<head>
 
    <link rel="icon" href="/images/hgicon.png" type="image/png" />
 
    <meta name="robots" content="index, nofollow"/>
 
    <title>${next.title()}</title>
 
    ##For future use yui reset for cross browser compatability.
 
    ##<link rel="stylesheet" href="/js/yui/reset-fonts-grids/reset-fonts-grids.css" type="text/css" />
 
    ${self.css()}
 
    ${self.js()}
 
</head>
 

	
 
<body class="mainbody">
 
<div id="container">
 
    <div class="page-header">
 
        <h1>${next.breadcrumbs()}</h1>
 
        ${self.page_nav()}
 
    <div class="flash_msg">
 
    <% messages = h.flash.pop_messages() %>
 
		% if messages:
 
		<ul id="flash-messages">
 
		    % for message in messages:
 
		    <li class="${message.category}_msg">${message}</li>
 
		    % endfor
 
		</ul>
 
		% endif
 
    </div>        
 
    <div id="main"> 
 
    	${next.main()}
 
    	<script>${h.tooltip.activate()}</script>    	
 
    </div>
 
    <div class="page-footer">
 
        Hg App ${c.hg_app_version} &copy; 2010 by Marcin Kuzminski
 
    </div>   
 

	
 
    <div id="powered-by">
 
        <p>
 
        <a href="http://mercurial.selenic.com/" title="Mercurial">
 
            <img src="/images/hglogo.png" width="75" height="90" alt="mercurial"/></a>
 
        </p>
 
    </div>
 

	
 
    <div id="corner-top-left"></div>
 
    <div id="corner-top-right"></div>
 
    <div id="corner-bottom-left"></div>
 
    <div id="corner-bottom-right"></div>
 

	
 
</div>
 
</body>
 
</html>
 

	
 
### MAKO DEFS ### 
 

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

	
 
<%def name="menu(current)">
 
<% 
 
def is_current(selected):
 
	if selected == current:
 
		return "class='current'"
 
%>
 
		%if current not in ['home','admin']:
 
		##regular menu
 
	       <script type="text/javascript">
 
	       	YAHOO.util.Event.onDOMReady(function(){
 
				YAHOO.util.Event.addListener('repo_switcher','click',function(){
 
					if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){
 
						YAHOO.util.Dom.setStyle('switch_repos','display','none');
 
						YAHOO.util.Dom.setStyle('repo_switcher','background','');
 
						YAHOO.util.Dom.removeClass('repo_switcher','selected');
 
						YAHOO.util.Dom.get('repo_switcher').removeAttribute('style');
 
					}
 
					else{
 
						YAHOO.util.Dom.setStyle('switch_repos','display','');
 
						YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF');
 
						YAHOO.util.Dom.setStyle('repo_switcher','color','#556CB5');
 
						YAHOO.util.Dom.addClass('repo_switcher','selected');
 
					}
 
					});
 
				YAHOO.util.Event.addListener('repos_list','change',function(e){
 
		            var wa = YAHOO.util.Dom.get('repos_list').value;
 
		        	
 
		            var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa);
 
			        window.location = url;
 
				})
 
	           });
 
	       	</script>       	
 
	        <ul class="page-nav">
 
				<li>
 
					<a id="repo_switcher" title="${_('Switch repository')}" href="#">&darr;</a>
 
					<div id="switch_repos" style="display:none;position: absolute;height: 25px">
 
						<select id="repos_list" size="=10" style="min-width: 150px">
 
						%for repo in sorted(x.name.lower() for x in c.cached_repo_list.values()):
 
							<option value="${repo}">${repo}</option>
 
						%endfor
 
						</select>
 
					</div>			
 
				</li>
 
	            <li ${is_current('summary')}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
 
	            <li ${is_current('shortlog')}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li>
 
				<li ${is_current('changelog')}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>            
 
	            <li ${is_current('branches')}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
 
	            <li ${is_current('tags')}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
 
	            <li ${is_current('files')}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li>
 
	        </ul>
 
		%else:
 
		##Root menu
 
			<ul class="page-nav">
 
				<li ${is_current('home')}>${h.link_to(_('Home'),h.url('/'))}</li>
 
				<li ${is_current('admin')}>${h.link_to(_('Admin'),h.url('admin_home'))}</li>
 
				<li class="logout">${h.link_to(u'Logout',h.url('logout_home'))}</li>
 
			</ul>
 
		%endif    
 
		</div>
 
</%def>
 
<%def name="submenu(current=None)">
 
	<% 
 
	def is_current(selected):
 
		if selected == current:
 
			return "class='current_submenu'"
 
	%>
 
	%if current != None:
 
	<div>
 
    <ul class="submenu">
 
        <li ${is_current('repos')}>${h.link_to(u'repos',h.url('repos'),class_='repos')}</li>
 
        <li ${is_current('users')}>${h.link_to(u'users',h.url('users'),class_='users')}</li>
 
        <li ${is_current('permissions')}>${h.link_to(u'permissions',h.url('permissions'),class_='permissions')}</li>
 
    </ul>
 
    </div>
 
    %endif
 
</%def>
 

	
 

	
 
<%def name="css()">
 
<link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
 
</%def>
 

	
 
<%def name="js()">
 
<script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
 
<script type="text/javascript" src="/js/yui/container/container-min.js"></script>
 
</%def>
 

	
 
<!-- DEFINITION OF FORM ERROR FETCHER -->
 
<%def name="get_form_error(element)">
 
	%if hasattr(c,'form_errors') and type(c.form_errors) == dict:
 
        %if c.form_errors.get(element,False):
 
            <span class="error-message">
 
                ${c.form_errors.get(element,'')}
 
            </span>
 
        %endif
 
	%endif           
 
</%def>
 
\ No newline at end of file
pylons_app/templates/index.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%!
 
from pylons_app.lib import filters
 
%>
 
<%inherit file="base/base.html"/>
 
<%def name="title()">
 
    ${c.repos_prefix} Mercurial Repositories
 
</%def>
 
<%def name="breadcrumbs()">
 
	${c.repos_prefix} Mercurial Repositories
 
</%def>
 
<%def name="page_nav()">
 
	${self.menu('home')}
 
</%def>
 
<%def name="main()">
 
	<%def name="get_sort(name)">
 
		<%name_slug = name.lower().replace(' ','_') %>
 
		%if name_slug == c.cs_slug:
 
			<span style="font-weight: bold;text-decoration: underline;">${name}</span>
 
		%else:
 
			<span style="font-weight: bold">${name}</span>
 
		%endif
 
		<a style="color:#FFF" href="?sort=${name_slug}">&darr;</a>
 
		<a style="color:#FFF" href="?sort=-${name_slug}">&uarr;</a>
 
	</%def>
 
	<table class="table_disp">
 
	  <tr class="header">
 
	    <td>${get_sort(_('Name'))}</td>
 
	    <td>${get_sort(_('Description'))}</td>
 
	    <td>${get_sort(_('Last change'))}</td>
 
	    <td>${get_sort(_('Tip'))}</td>
 
	    <td>${get_sort(_('Contact'))}</td>
 
	    <td>${_('RSS')}</td>
 
	    <td>${_('Atom')}</td>
 
	  </tr>	
 
	%for cnt,repo in enumerate(c.repos_list):
 
 		<tr class="parity${cnt%2}">
 
		    <td>${h.link(repo['name'],h.url('summary_home',repo_name=repo['name']))}</td>
 
		    <td>${h.link_to(repo['name'],
 
		    	h.url('summary_home',repo_name=repo['name']))}</td>
 
		    <td title="${repo['description']}">${h.truncate(repo['description'],60)}</td>
 
	        <td>${repo['last_change']|n,filters.age}</td>
 
	        <td>${h.link_to('r%s:%s' % (repo['rev'],repo['tip']),h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']))}</td>
 
	        <td>${h.link_to('r%s:%s' % (repo['rev'],repo['tip']),
 
		        h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
 
	        	class_="tooltip",
 
		    	tooltip_title=h.tooltip(repo['last_msg']))}</td>
 
	        <td title="${repo['contact']}">${repo['contact']|n,filters.person}</td>
 
			<td>
 
				<a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_logo"  href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
 
			</td>        
 
			<td>
 
				<a title="${_('Subscribe to %s atom feed')%repo['name']}"  class="atom_logo" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a>
 
			</td>
 
		</tr>
 
	%endfor
 
	</table>
 
</%def>    
0 comments (0 inline, 0 general)