Changeset - 36f7562a5919
[Not reviewed]
beta
0 6 0
Marcin Kuzminski - 12 years ago 2013-05-28 23:12:31
marcin@python-works.com
Implements #842 RhodeCode version disclosure.

- it's now implemented as visual option in settings
6 files changed with 20 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/admin/settings.py
Show inline comments
 
@@ -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'),
rhodecode/lib/base.py
Show inline comments
 
@@ -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'))
 

	
rhodecode/lib/db_manage.py
Show inline comments
 
@@ -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)
rhodecode/model/forms.py
Show inline comments
 
@@ -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
 

	
rhodecode/templates/admin/settings/settings.html
Show inline comments
 
@@ -134,6 +134,11 @@
 
                        <label for="rhodecode_repository_fields">${_('Use repository extra fields')}</label>
 
                    </div>
 
                    <span class="help-block">${_('Allows storing additional customized fields per repository.')}</span>
 
                    <div class="checkbox">
 
                        ${h.checkbox('rhodecode_show_version','True')}
 
                        <label for="rhodecode_show_version">${_('Show RhodeCode version')}</label>
 
                    </div>
 
                    <span class="help-block">${_('Shows or hides displayed version of RhodeCode in the footer')}</span>
 
                </div>
 
             </div>
 
            <div class="field">
rhodecode/templates/base/base.html
Show inline comments
 
@@ -42,7 +42,12 @@
 
               ${_('Server instance: %s') % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}
 
           </p>
 
           <p class="footer-link-right">
 
               <a href="${h.url('rhodecode_official')}">RhodeCode ${c.rhodecode_version}</a>
 
               <a href="${h.url('rhodecode_official')}">
 
               RhodeCode
 
               %if c.visual.show_version:
 
                   ${c.rhodecode_version}
 
               %endif
 
               </a>
 
               &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski and others
 
               &ndash; <a href="${h.url('bugtracker')}">${_('Report a bug')}</a>
 
           </p>
0 comments (0 inline, 0 general)