# HG changeset patch # User Marcin Kuzminski # Date 2013-05-28 23:12:31 # Node ID 36f7562a59199d6301a6d7da1f056a8b66fcd657 # Parent e87298ccdfdbf8485b81751a4e430535ac10ad3d Implements #842 RhodeCode version disclosure. - it's now implemented as visual option in settings diff --git a/rhodecode/controllers/admin/settings.py b/rhodecode/controllers/admin/settings.py --- a/rhodecode/controllers/admin/settings.py +++ b/rhodecode/controllers/admin/settings.py @@ -209,6 +209,11 @@ class SettingsController(BaseController) form_result['rhodecode_dashboard_items'] Session().add(sett5) + sett6 = RhodeCodeSetting.get_by_name_or_create('show_version') + sett6.app_settings_value = \ + form_result['rhodecode_show_version'] + Session().add(sett6) + Session().commit() set_rhodecode_config(config) h.flash(_('Updated visualisation settings'), diff --git a/rhodecode/lib/base.py b/rhodecode/lib/base.py --- a/rhodecode/lib/base.py +++ b/rhodecode/lib/base.py @@ -273,6 +273,8 @@ class BaseController(WSGIController): c.visual.stylify_metatags = str2bool(rc_config.get('rhodecode_stylify_metatags')) c.visual.dashboard_items = safe_int(rc_config.get('rhodecode_dashboard_items', 100)) c.visual.repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) + c.visual.show_version = str2bool(rc_config.get('rhodecode_show_version')) + ## INI stored self.cut_off_limit = int(config.get('cut_off_limit')) diff --git a/rhodecode/lib/db_manage.py b/rhodecode/lib/db_manage.py --- a/rhodecode/lib/db_manage.py +++ b/rhodecode/lib/db_manage.py @@ -659,6 +659,7 @@ class DbManage(object): ('show_private_icon', True, bool), ('stylify_metatags', False, bool), ('dashboard_items', 100, int), + ('show_version', True, bool) ] for key, val, type_ in settings: sett = RhodeCodeSetting(key, val) diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -286,6 +286,7 @@ def ApplicationVisualisationForm(): rhodecode_repository_fields = v.StringBoolean(if_missing=False) rhodecode_lightweight_journal = v.StringBoolean(if_missing=False) rhodecode_dashboard_items = v.UnicodeString() + rhodecode_show_version = v.StringBoolean(if_missing=False) return _ApplicationVisualisationForm diff --git a/rhodecode/templates/admin/settings/settings.html b/rhodecode/templates/admin/settings/settings.html --- a/rhodecode/templates/admin/settings/settings.html +++ b/rhodecode/templates/admin/settings/settings.html @@ -134,6 +134,11 @@ ${_('Allows storing additional customized fields per repository.')} +
+ ${h.checkbox('rhodecode_show_version','True')} + +
+ ${_('Shows or hides displayed version of RhodeCode in the footer')}
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 @@ -42,7 +42,12 @@ ${_('Server instance: %s') % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}