Changeset - 8b06c420491d
[Not reviewed]
pylons_app/config/middleware.py
Show inline comments
 
"""Pylons middleware initialization"""
 
from beaker.middleware import SessionMiddleware
 
from paste.cascade import Cascade
 
from paste.registry import RegistryManager
 
from paste.urlparser import StaticURLParser
 
from paste.deploy.converters import asbool
 
from pylons.middleware import ErrorHandler, StatusCodeRedirect
 
from pylons.wsgiapp import PylonsApp
 
from routes.middleware import RoutesMiddleware
 
from paste.auth.basic import AuthBasicHandler
 
from pylons_app.lib.simplehg import SimpleHg
 
from pylons_app.config.environment import load_environment
 
from pylons_app.lib.auth import authfunc 
 

	
 
def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
 
    """Create a Pylons WSGI application and return it
 

	
 
    ``global_conf``
 
        The inherited configuration for this application. Normally from
 
        the [DEFAULT] section of the Paste ini file.
 

	
 
    ``full_stack``
 
        Whether or not this application provides a full WSGI stack (by
 
        default, meaning it handles its own exceptions and errors).
 
        Disable full_stack when this application is "managed" by
 
        another WSGI middleware.
 

	
 
    ``app_conf``
 
        The application's local configuration. Normally specified in
 
        the [app:<name>] section of the Paste ini file (where <name>
 
        defaults to main).
 

	
 
    """
 
    # Configure the Pylons environment
 
    config = load_environment(global_conf, app_conf)
 

	
 

	
 
    # The Pylons WSGI app
 
    app = PylonsApp(config=config)
 

	
 
    # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
 

	
 
    # Routing/Session/Cache Middleware
 
    app = RoutesMiddleware(app, config['routes.map'])
 
    app = SessionMiddleware(app, config)
 
    
 
    # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)    
 
    app = SimpleHg(app, config)
 
    app = AuthBasicHandler(app, config['repos_name'] + ' mercurial repository', authfunc)
 
    
 
    if asbool(full_stack):
 
        # Handle Python exceptions
 
        app = ErrorHandler(app, global_conf, **config['pylons.errorware'])
 

	
 
        # Display error documents for 401, 403, 404 status codes (and
 
        # 500 when debug is disabled)
 
        if asbool(config['debug']):
 
            app = StatusCodeRedirect(app)
 
        else:
 
            app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])
 
    
 
    # Establish the Registry for this application
 
    app = RegistryManager(app)
 

	
 
    if asbool(static_files):
 
        # Serve static files
 
        static_app = StaticURLParser(config['pylons.paths']['static_files'])
 
        app = Cascade([static_app, app])
 
    
 
        app.config = config
 

	
 
    return app
 

	
pylons_app/controllers/admin.py
Show inline comments
 
import logging
 

	
 
from pylons import request, response, session, tmpl_context as c, url, app_globals as g
 
from pylons.controllers.util import abort, redirect
 

	
 
from pylons_app.lib.base import BaseController, render
 
import os
 
from mercurial import ui, hg
 
from mercurial.error import RepoError
 
from ConfigParser import ConfigParser
 
from pylons_app.lib import auth
 
from pylons_app.model.forms import LoginForm
 
import formencode
 
import formencode.htmlfill as htmlfill
 
from pylons_app.model import meta
 
from pylons_app.model.db import Users, UserLogs
 
from webhelpers.paginate import Page
 
log = logging.getLogger(__name__)
 

	
 
class AdminController(BaseController):
 

	
 
    def __before__(self):
 
        c.staticurl = g.statics
 
        
 
        c.admin_user = session.get('admin_user', False)
 
        c.admin_username = session.get('admin_username')
 
        
 
    def index(self):
 
        # Return a rendered template
 
        if request.POST:
 
            #import Login Form validator class
 
            login_form = LoginForm()
 

	
 
            try:
 
                c.form_result = login_form.to_python(dict(request.params))
 
                if auth.admin_auth(c.form_result['username'], c.form_result['password']):
 
                    session['admin_user'] = True
 
                    session['admin_username'] = c.form_result['username']
 
                    session.save()
 
                    return redirect(url('admin_home'))
 
                else:
 
                    raise formencode.Invalid('Login Error', None, None,
 
                                             error_dict={'username':'invalid login',
 
                                                         'password':'invalid password'})
 
                                      
 
            except formencode.Invalid, error:
 
                c.form_result = error.value
 
                c.form_errors = error.error_dict or {}
 
                html = render('/admin.html')
 

	
 
                return htmlfill.render(
 
                    html,
 
                    defaults=c.form_result,
 
                    encoding="UTF-8"
 
                )
 
        if c.admin_user:
 
            sa = meta.Session
 
                             
 
            users_log = sa.query(UserLogs)\
 
                .order_by(UserLogs.action_date.desc())
 
            p = int(request.params.get('page', 1))
 
            c.users_log = Page(users_log, page=p, items_per_page=10)
 
            c.log_data = render('admin_log.html')
 
            if request.params.get('partial'):
 
                return c.log_data
 
        return render('/admin.html')
 

	
 
    def hgrc(self, dirname):
 
        filename = os.path.join(dirname, '.hg', 'hgrc')
 
        return filename
 

	
 
    def add_repo(self, new_repo):
pylons_app/controllers/changelog.py
Show inline comments
 
import logging
 

	
 
from pylons import tmpl_context as c, app_globals as g, session, request, config, url
 
from pylons.controllers.util import abort, redirect
 

	
 
from pylons_app.lib.base import BaseController, render
 
from pylons_app.lib.utils import get_repo_slug
 
from pylons_app.model.hg_model import HgModel
 
from webhelpers.paginate import Page
 

	
 
log = logging.getLogger(__name__)
 

	
 
class ChangelogController(BaseController):
 
    def __before__(self):
 
        c.repos_prefix = config['repos_name']
 
        c.staticurl = g.statics
 
        
 
        c.repo_name = get_repo_slug(request)
 
        
 
        
 
    def index(self):
 
        hg_model = HgModel()
 
        p = int(request.params.get('page', 1))
 
        repo = hg_model.get_repo(c.repo_name)
 
        c.repo_changesets = Page(repo, page=p, items_per_page=20)
 
        c.shortlog_data = render('shortlog_data.html')
 
        if request.params.get('partial'):
 
            return c.shortlog_data
 
        r = render('/shortlog.html')
 
        return r
pylons_app/controllers/error.py
Show inline comments
 
import logging
 
from paste.urlparser import PkgResourcesParser
 
import paste.fileapp
 
from pylons import tmpl_context as c, app_globals as g, request, config
 
from pylons.controllers.util import forward
 
from pylons.i18n.translation import _
 
from pylons_app.lib.base import BaseController, render
 
from pylons.middleware  import error_document_template, media_path
 
import cgi
 
import os
 

	
 
log = logging.getLogger(__name__)
 
class ErrorController(BaseController):
 
    """
 
    Generates error documents as and when they are required.
 

	
 
    The ErrorDocuments middleware forwards to ErrorController when error
 
    related status codes are returned from the application.
 

	
 
    This behaviour can be altered by changing the parameters to the
 
    ErrorDocuments middleware in your config/middleware.py file.
 
    """
 
#
 
    def __before__(self):
 
        c.repos_prefix = config['repos_name']
 
        c.staticurl = g.statics
 
        
 
        c.repo_name = request.environ['pylons.original_request']\
 
            .environ.get('PATH_INFO').split('/')[-1]
 
        
 
    def document(self):
 
        resp = request.environ.get('pylons.original_response')
 
        log.debug(resp.status)
 

	
 
        e = request.environ
 
        c.serv_p = r'%(protocol)s://%(host)s/' % {
 
                                                'protocol': e.get('wsgi.url_scheme'),
 
                                                'host':e.get('HTTP_HOST'),
 
                                                }
 
                
 
        if resp.status_int == 404:
 
            return render('/errors/error_404.html')
 
                
 
        c.error_message = cgi.escape(request.GET.get('code', str(resp.status)))
 
        c.error_explanation = self.get_error_explanation(resp.status_int)
 

	
 
        #redirect to when error with given seconds
 
        c.redirect_time = 0
 
        c.redirect_module = _('Home page')# name to what your going to be redirected
 
        c.url_redirect = "/"
 

	
 
        return render('/errors/error_document.html')
 

	
 

	
 
    def img(self, id):
 
        """Serve Pylons' stock images"""
 
        return self._serve_file(os.path.join(media_path, 'img', id))
 

	
 
    def style(self, id):
 
        """Serve Pylons' stock stylesheets"""
 
        return self._serve_file(os.path.join(media_path, 'style', id))
 

	
 
    def _serve_file(self, path):
 
        """Call Paste's FileApp (a WSGI application) to serve the file
 
        at the specified path
 
        """
 
        fapp = paste.fileapp.FileApp(path)
 
        return fapp(request.environ, self.start_response)
 

	
 
    def get_error_explanation(self, code):
 
        ''' get the error explanations of int codes
 
            [400, 401, 403, 404, 500]'''
 
        try:
 
            code = int(code)
 
        except:
pylons_app/controllers/files.py
Show inline comments
 
import logging
 

	
 
from pylons import request, response, session, tmpl_context as c, url, config, app_globals as g
 
from pylons.controllers.util import abort, redirect
 

	
 
from pylons_app.lib.base import BaseController, render
 
from pylons_app.lib.utils import get_repo_slug
 
from pylons_app.model.hg_model import HgModel
 
log = logging.getLogger(__name__)
 

	
 
class FilesController(BaseController):
 
    def __before__(self):
 
        c.repos_prefix = config['repos_name']
 
        c.staticurl = g.statics
 
        
 
        c.repo_name = get_repo_slug(request)
 

	
 
    def index(self, repo_name, revision, f_path):
 
        hg_model = HgModel()
 
        c.repo = repo = hg_model.get_repo(c.repo_name)
 
        c.cur_rev = revision
 
        c.f_path = f_path
 
        c.changeset = repo.get_changeset(repo._get_revision('tip'))
 
        
 
        
 
        c.files_list = c.changeset.get_node(f_path)
 
        
 
        return render('/files.html')
pylons_app/controllers/hg.py
Show inline comments
 
#!/usr/bin/python
 
# -*- coding: utf-8 -*-
 
from mako.template import Template
 
from mercurial.hg import repository
 
from mercurial.hgweb import hgweb
 
from mercurial.hgweb.request import wsgiapplication
 
from mercurial.localrepo import localrepository
 
from operator import itemgetter
 
from pylons import tmpl_context as c, app_globals as g, session, request, config
 
from pylons.controllers.util import abort
 
from pylons_app.lib import helpers as h
 
from pylons_app.lib.base import BaseController, render
 
from pylons_app.lib.utils import get_repo_slug
 
from pylons_app.model.hg_model import HgModel
 
import logging
 
import os
 
from beaker.cache import cache_region
 
log = logging.getLogger(__name__)
 

	
 
class HgController(BaseController):
 

	
 
    def __before__(self):
 
        c.repos_prefix = config['repos_name']
 
        c.staticurl = g.statics
 
        
 
        c.repo_name = get_repo_slug(request)
 
        
 
    def index(self):
 
        
 

	
 
        hg_model = HgModel()
 
        @cache_region('short_term', 'repo_list')
 
        def _list():
 
            return list(hg_model.get_repos())
 
        
 
        c.repos_list = _list()
 
        c.current_sort = request.GET.get('sort', 'name')
 
        
 
        cs = c.current_sort
 
        c.cs_slug = cs.replace('-', '')
 
        sortables = ['name', 'description', 'last_change', 'tip', 'contact']
 
        
 
        if cs and c.cs_slug in sortables:
 
            sort_key = c.cs_slug + '_sort'
 
            if cs.startswith('-'):
 
                c.repos_list.sort(key=itemgetter(sort_key), reverse=True)
 
            else:
 
                c.repos_list.sort(key=itemgetter(sort_key), reverse=False)
 
            
 
        return render('/index.html')
 

	
 
    def view(self, environ, start_response, path_info):
 
        print path_info
 
        
 
        def app_maker():           
 
            
 
            path = os.path.join(g.base_path, c.repo_name)
 
            repo = repository(g.baseui, path)
 
            hgwebapp = hgweb(repo, c.repo_name)
 
            return hgwebapp
 
        
 
        a = wsgiapplication(app_maker)
 
        resp = a(environ, start_response)
 

	
 
        http_accept = request.environ.get('HTTP_ACCEPT', False)
 
        if not http_accept:
 
            return abort(status_code=400, detail='no http accept in header')
 
        
 
        #for mercurial protocols and raw files we can't wrap into mako
 
        if http_accept.find("mercurial") != -1 or \
 
        request.environ['PATH_INFO'].find('raw-file') != -1:
 
                    return resp
 
        try:
pylons_app/controllers/repos.py
Show inline comments
 
import logging
 
import os
 
from pylons import request, response, session, tmpl_context as c, url, app_globals as g
 
from pylons.controllers.util import abort, redirect
 
from pylons_app.lib import auth
 
from pylons_app.lib.base import BaseController, render
 
from pylons_app.model import meta
 
from pylons_app.model.db import Users, UserLogs
 
from pylons_app.lib.auth import authenticate
 
from pylons_app.model.hg_model import HgModel
 
from operator import itemgetter
 
import shutil
 
log = logging.getLogger(__name__)
 

	
 
class ReposController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
 
    # To properly map this controller, ensure your config/routing.py
 
    # file has a resource setup:
 
    #     map.resource('repo', 'repos')
 
    
 
    @authenticate
 
    def __before__(self):
 
        c.staticurl = g.statics
 
        
 
        c.admin_user = session.get('admin_user')
 
        c.admin_username = session.get('admin_username')
 
        self.sa = meta.Session
 
                
 
    def index(self, format='html'):
 
        """GET /repos: All items in the collection"""
 
        # url('repos')
 
        hg_model = HgModel()
 
        c.repos_list = list(hg_model.get_repos())
 
        c.repos_list.sort(key=itemgetter('name'))
 
        return render('/repos.html')
 
    
 
    def create(self):
 
        """POST /repos: Create a new item"""
 
        # url('repos')
 

	
 
    def new(self, format='html'):
 
        """GET /repos/new: Form to create a new item"""
 
        # url('new_repo')
 

	
 
    def update(self, id):
 
        """PUT /repos/id: Update an existing item"""
 
        # Forms posted to this method should contain a hidden field:
 
        #    <input type="hidden" name="_method" value="PUT" />
 
        # Or using helpers:
 
        #    h.form(url('repo', id=ID),
 
        #           method='put')
 
        # url('repo', id=ID)
 

	
 
    def delete(self, id):
 
        """DELETE /repos/id: Delete an existing item"""
 
        # Forms posted to this method should contain a hidden field:
 
        #    <input type="hidden" name="_method" value="DELETE" />
 
        # Or using helpers:
 
        #    h.form(url('repo', id=ID),
 
        #           method='delete')
 
        # url('repo', id=ID)
 
        from datetime import datetime
 
        path = g.paths[0][1].replace('*', '')
 
        rm_path = os.path.join(path, id)
 
        log.info("Removing %s", rm_path)
 
        shutil.move(os.path.join(rm_path, '.hg'), os.path.join(rm_path, 'rm__.hg'))
 
        shutil.move(rm_path, os.path.join(path, 'rm__%s-%s' % (datetime.today(), id)))
 
        return redirect(url('repos'))
 
        
 

	
 
    def show(self, id, format='html'):
 
        """GET /repos/id: Show a specific item"""
pylons_app/controllers/shortlog.py
Show inline comments
 
import logging
 

	
 
from pylons import tmpl_context as c, app_globals as g, session, request, config, url
 
from pylons.controllers.util import abort, redirect
 

	
 
from pylons_app.lib.base import BaseController, render
 
from pylons_app.lib.utils import get_repo_slug
 
from pylons_app.model.hg_model import HgModel
 
from webhelpers.paginate import Page
 

	
 
log = logging.getLogger(__name__)
 

	
 
class ShortlogController(BaseController):
 
    def __before__(self):
 
        c.repos_prefix = config['repos_name']
 
        c.staticurl = g.statics
 
        
 
        c.repo_name = get_repo_slug(request)
 
        
 
        
 
    def index(self):
 
        hg_model = HgModel()
 
        p = int(request.params.get('page', 1))
 
        repo = hg_model.get_repo(c.repo_name)
 
        c.repo_changesets = Page(repo, page=p, items_per_page=20)
 
        c.shortlog_data = render('shortlog_data.html')
 
        if request.params.get('partial'):
 
            return c.shortlog_data
 
        r = render('/shortlog.html')
 
        return r
pylons_app/controllers/summary.py
Show inline comments
 
import logging
 

	
 
from pylons import tmpl_context as c, app_globals as g, session, request, config, url
 
from pylons.controllers.util import abort, redirect
 

	
 
from pylons_app.lib.base import BaseController, render
 
from pylons_app.lib.utils import get_repo_slug
 
from pylons_app.model.hg_model import HgModel
 
log = logging.getLogger(__name__)
 

	
 
class SummaryController(BaseController):
 
    def __before__(self):
 
        c.repos_prefix = config['repos_name']
 
        c.staticurl = g.statics
 
        
 
        c.repo_name = get_repo_slug(request)
 
        
 
    def index(self):
 
        hg_model = HgModel()
 
        c.repo_info = hg_model.get_repo(c.repo_name)
 
        c.repo_changesets = c.repo_info.get_changesets(10)
 
        
 
        e = request.environ
 
        uri = r'%(protocol)s://%(user)s@%(host)s/%(repo_name)s' % {
 
                                                'protocol': e.get('wsgi.url_scheme'),
 
                                                'user':e.get('REMOTE_USER'),
 
                                                'host':e.get('HTTP_HOST'),
 
                                                'repo_name':c.repo_name,
 
                                                }
 
        c.clone_repo_url = url(uri)
 
        #c.repo_tags = c.repo_info.get_tags(limit=10)
 
        #c.repo_branches = c.repo_info.get_branches(limit=10)
 
        return render('/summary.html')
pylons_app/controllers/users.py
Show inline comments
 
import logging
 

	
 
from pylons import request, response, session, tmpl_context as c, url, app_globals as g
 
from pylons.controllers.util import abort, redirect
 

	
 
from pylons_app.lib.base import BaseController, render
 
from formencode import htmlfill
 
from pylons_app.model import meta
 
from pylons_app.model.db import Users, UserLogs
 
from pylons_app.lib.auth import authenticate
 
import crypt
 

	
 
log = logging.getLogger(__name__)
 

	
 
class UsersController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
 
    # To properly map this controller, ensure your config/routing.py
 
    # file has a resource setup:
 
    #     map.resource('user', 'users')
 
    
 
    @authenticate
 
    def __before__(self):
 
        c.staticurl = g.statics
 
        
 
        c.admin_user = session.get('admin_user')
 
        c.admin_username = session.get('admin_username')
 
        self.sa = meta.Session
 
        
 
    def index(self, format='html'):
 
        """GET /users: All items in the collection"""
 
        # url('users')
 
        
 
        c.users_list = self.sa.query(Users).all()     
 
        return render('/users.html')
 
    
 
    def create(self):
 
        """POST /users: Create a new item"""
 
        # url('users')
 
        params = dict(request.params)
 

	
 
        try:
 
            new_user = Users()
 
            new_user.active = params.get('active', False)
 
            new_user.username = params.get('username')
 
            new_user.password = crypt.crypt(params.get('password'), '6a')
 
            new_user.admin = False
 
            self.sa.add(new_user)
 
            self.sa.commit()
 
        except:
 
            self.sa.rollback()
 
            raise      
 
          
 
        return redirect(url('users'))
 
    
 
    def new(self, format='html'):
 
        """GET /users/new: Form to create a new item"""
 
        # url('new_user')
 
        return render('/user_add.html')
 

	
 
    def update(self, id):
 
        """PUT /users/id: Update an existing item"""
 
        # Forms posted to this method should contain a hidden field:
 
        #    <input type="hidden" name="_method" value="PUT" />
 
        # Or using helpers:
 
        #    h.form(url('user', id=ID),
 
        #           method='put')
 
        # url('user', id=ID)
 
        params = dict(request.params)
 

	
 
        try:
 
            new_user = self.sa.query(Users).get(id)
 
            new_user.active = params.get('active', False)
pylons_app/public/images/hgicon.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
pylons_app/public/images/hglogo.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
pylons_app/templates/add.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">
 
<head>
 
    <link rel="icon" href="${c.staticurl}hgicon.png" type="image/png" />
 
    <link rel="icon" href="/images/hgicon.png" type="image/png" />
 
    <meta name="robots" content="index, nofollow"/>
 
    <link rel="stylesheet" href="${c.staticurl}style-monoblue.css" type="text/css" />
 
    <link rel="stylesheet" href="/images/style-monoblue.css" type="text/css" />
 
       <title> Mercurial repositories add</title>
 
</head>
 

	
 
<body>
 
<div id="container">
 
    <div class="page-header">
 
        <h1><a href="/">Home</a> / Admin</h1>
 
        <ul class="page-nav">
 
        </ul>
 
    </div>
 
    <table cellspacing="0">
 
        <tr>
 
            <td><h1>${c.msg}</h1></td>
 
        </tr>
 
        <tr>
 
            <td><h2>${c.new_repo}</h2></td>
 
        </tr>
 
    </table>    
 
    <div class="page-footer">
 
        Mercurial Repository: admin
 
    </div>
 

	
 
    <div id="powered-by">
 
        <p>
 
        <a href="http://mercurial.selenic.com/" title="Mercurial">
 
            <img src="${c.staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
 
            <img src="/images/hglogo.png" width="75" height="90" border=0 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>
 
        
 
\ 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">
 
<head>
 
    <link rel="icon" href="${c.staticurl}hgicon.png" type="image/png" />
 
    <link rel="icon" href="/images/hgicon.png" type="image/png" />
 
    <meta name="robots" content="index, nofollow"/>
 
    <title>${next.title()}</title>
 
    ${self.css()}
 
    ${self.js()}
 
</head>
 

	
 
<body>
 
<div id="container">
 
    <div class="page-header">
 
        <h1>
 
            ${next.breadcrumbs()}
 
        </h1>
 
        <ul class="page-nav">
 
            ${self.page_nav()}
 
        </ul>
 
    </div>
 
    ${next.main()}
 
    <div class="page-footer">
 
        Mercurial App &copy; 2010
 
    </div>   
 

	
 
    <div id="powered-by">
 
        <p>
 
        <a href="http://mercurial.selenic.com/" title="Mercurial">
 
            <img src="${c.staticurl}hglogo.png" width="75" height="90" alt="mercurial"/></a>
 
            <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>
 

	
 
<%def name="page_nav()">
 

	
 
	${self.menu()}
 

	
 
</%def>
 

	
 

	
 
<%def name="menu(current)">
 
        <ul class="page-nav">
 

	
 
            <li 
 
            %if current=='summary':
 
            	class='current' 
 
            %endif
 
            >${h.link_to_unless(current=='summary',_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
 
            <li 
 
            %if current=='changelog':
 
            	class='current' 
 
            %endif
 
            >${h.link_to_unless(current=='changelog',_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>
 
            <li 
 
            %if current=='branches':
 
            	class='current' 
 
            %endif
 
            >${h.link_to_unless(current=='branches',_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
 
            <li 
 
            %if current=='tags':
 
            	class='current' 
 
            %endif
 
            >${h.link_to_unless(current=='tags',_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
 
            <li 
 
            %if current=='graph':
 
            	class='current' 
 
            %endif
 
            >${h.link_to_unless(current=='graph',_('graph'),h.url('graph_home',repo_name=c.repo_name))}</li>
 
            <li 
0 comments (0 inline, 0 general)