# HG changeset patch # User Steve Losh <steve@stevelosh.com> # Date 1278989977 14400 # Node ID c0afa545124bec3beab72a7d7ef5c8f48aa9827e # Parent 9f8ab6e7b2ec8162735bca0a4321f7dc2caee2c5 web: add the project_url option diff -r 9f8ab6e7b2ec -r c0afa545124b contrib/deploy/wsgi.py --- a/contrib/deploy/wsgi.py Mon Jul 12 21:49:16 2010 -0400 +++ b/contrib/deploy/wsgi.py Mon Jul 12 22:59:37 2010 -0400 @@ -12,6 +12,7 @@ ANON_USER = 'Anonymous <anonymous@example.com>' SITE_ROOT = 'http://yoursite.com/optional/path' TITLE = 'Your Project' +PROJECT_URL = 'http://bitbucket.org/your/project/' # or None from mercurial import hg, ui from review.web import app @@ -26,6 +27,7 @@ app.title = TITLE app.debug = False app.ui = _ui +app.project_url = PROJECT_URL app.repo = repo application = app diff -r 9f8ab6e7b2ec -r c0afa545124b review/templates/base.html --- a/review/templates/base.html Mon Jul 12 21:49:16 2010 -0400 +++ b/review/templates/base.html Mon Jul 12 22:59:37 2010 -0400 @@ -61,7 +61,12 @@ <div class="footer"> <div class="wrap"> <p> - reviewing {{ title }} + reviewing + {% if project_url %} + <a href="{{ project_url }}">{{ title }}</a> + {% else %} + {{ title }} + {% endif %} with <a href="http://bitbucket.org/sjl/hg-review/">hg-review</a> </p> </div> diff -r 9f8ab6e7b2ec -r c0afa545124b review/web.py --- a/review/web.py Mon Jul 12 21:49:16 2010 -0400 +++ b/review/web.py Mon Jul 12 22:59:37 2010 -0400 @@ -75,7 +75,7 @@ def _render(template, **kwargs): return render_template(template, read_only=app.read_only, allow_anon=app.allow_anon, utils=utils, datastore=g.datastore, - title=app.title, **kwargs) + title=app.title, project_url=app.project_url, **kwargs) def _get_revision_or_404(revhash): revhash = revhash.lower() @@ -236,6 +236,7 @@ app.ui = ui app.repo = repo app.title = os.path.basename(repo.root) + app.project_url = None if app.debug: from flaskext.lesscss import lesscss