# HG changeset patch # User Jonathan Sternberg # Date 2013-06-17 16:41:28 # Node ID cdf10b3df8995710b1901d326325c4c3fa468409 # Parent 266a3cbc0302857c437137eeaa0365ddb19527fb Allow RhodeCode maintainers to specify a custom bug tracker. This allows people who maintain large RhodeCode installations to setup their own bug tracker and respond to requests against their specific installation. The maintainer is then free to forward problems with RhodeCode to the canonical issue tracker on bitbucket. If the config option "bugtracker" is present, its value will be used with the "Report a bug" button. If left blank, this disables the button. If no value is present, then the default is used. This is so that the new config option doesn't break installations of RhodeCode upgrading to a newer version and to allow easier installation for the common use case. diff --git a/development.ini b/development.ini --- a/development.ini +++ b/development.ini @@ -171,6 +171,9 @@ default_encoding = utf8 #clone_uri = {scheme}://{user}{pass}{netloc}{path} +## issue tracker RhodeCode (leave blank to disable, absent for default) +#bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues + ## issue tracking mapping for commits messages ## comment out issue_pat, issue_server, issue_prefix to enable diff --git a/production.ini b/production.ini --- a/production.ini +++ b/production.ini @@ -171,6 +171,9 @@ default_encoding = utf8 #clone_uri = {scheme}://{user}{pass}{netloc}{path} +## issue tracker for RhodeCode (leave blank to disable, absent for default) +#bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues + ## issue tracking mapping for commits messages ## comment out issue_pat, issue_server, issue_prefix to enable diff --git a/rhodecode/config/deployment.ini_tmpl b/rhodecode/config/deployment.ini_tmpl --- a/rhodecode/config/deployment.ini_tmpl +++ b/rhodecode/config/deployment.ini_tmpl @@ -171,6 +171,9 @@ default_encoding = utf8 #clone_uri = {scheme}://{user}{pass}{netloc}{path} +## issue tracker for RhodeCode (leave blank to disable, absent for default) +#bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues + ## issue tracking mapping for commits messages ## comment out issue_pat, issue_server, issue_prefix to enable diff --git a/rhodecode/config/routing.py b/rhodecode/config/routing.py --- a/rhodecode/config/routing.py +++ b/rhodecode/config/routing.py @@ -95,9 +95,6 @@ def make_map(config): action='repo_switcher') rmap.connect('branch_tag_switcher', '/branches-tags/{repo_name:.*?}', controller='home', action='branch_tag_switcher') - rmap.connect('bugtracker', - "http://bitbucket.org/marcinkuzminski/rhodecode/issues", - _static=True) rmap.connect('rst_help', "http://docutils.sourceforge.net/docs/user/rst/quickref.html", _static=True) diff --git a/rhodecode/lib/base.py b/rhodecode/lib/base.py --- a/rhodecode/lib/base.py +++ b/rhodecode/lib/base.py @@ -262,6 +262,7 @@ class BaseController(WSGIController): c.rhodecode_version = __version__ c.rhodecode_instanceid = config.get('instance_id') c.rhodecode_name = config.get('rhodecode_title') + c.rhodecode_bugtracker = config.get('bugtracker', 'http://bitbucket.org/marcinkuzminski/rhodecode/issues') c.use_gravatar = str2bool(config.get('use_gravatar')) c.ga_code = config.get('rhodecode_ga_code') # Visual options diff --git a/rhodecode/templates/base/base.html b/rhodecode/templates/base/base.html --- a/rhodecode/templates/base/base.html +++ b/rhodecode/templates/base/base.html @@ -49,7 +49,9 @@ %endif © 2010-${h.datetime.today().year} by Marcin Kuzminski and others - – ${_('Report a bug')} + %if c.rhodecode_bugtracker: + – ${_('Report a bug')} + %endif