##// END OF EJS Templates
Implements #842 RhodeCode version disclosure....
marcink -
r3910:36f7562a beta
parent child Browse files
Show More
@@ -209,6 +209,11 b' class SettingsController(BaseController)'
209 form_result['rhodecode_dashboard_items']
209 form_result['rhodecode_dashboard_items']
210 Session().add(sett5)
210 Session().add(sett5)
211
211
212 sett6 = RhodeCodeSetting.get_by_name_or_create('show_version')
213 sett6.app_settings_value = \
214 form_result['rhodecode_show_version']
215 Session().add(sett6)
216
212 Session().commit()
217 Session().commit()
213 set_rhodecode_config(config)
218 set_rhodecode_config(config)
214 h.flash(_('Updated visualisation settings'),
219 h.flash(_('Updated visualisation settings'),
@@ -273,6 +273,8 b' class BaseController(WSGIController):'
273 c.visual.stylify_metatags = str2bool(rc_config.get('rhodecode_stylify_metatags'))
273 c.visual.stylify_metatags = str2bool(rc_config.get('rhodecode_stylify_metatags'))
274 c.visual.dashboard_items = safe_int(rc_config.get('rhodecode_dashboard_items', 100))
274 c.visual.dashboard_items = safe_int(rc_config.get('rhodecode_dashboard_items', 100))
275 c.visual.repository_fields = str2bool(rc_config.get('rhodecode_repository_fields'))
275 c.visual.repository_fields = str2bool(rc_config.get('rhodecode_repository_fields'))
276 c.visual.show_version = str2bool(rc_config.get('rhodecode_show_version'))
277
276 ## INI stored
278 ## INI stored
277 self.cut_off_limit = int(config.get('cut_off_limit'))
279 self.cut_off_limit = int(config.get('cut_off_limit'))
278
280
@@ -659,6 +659,7 b' class DbManage(object):'
659 ('show_private_icon', True, bool),
659 ('show_private_icon', True, bool),
660 ('stylify_metatags', False, bool),
660 ('stylify_metatags', False, bool),
661 ('dashboard_items', 100, int),
661 ('dashboard_items', 100, int),
662 ('show_version', True, bool)
662 ]
663 ]
663 for key, val, type_ in settings:
664 for key, val, type_ in settings:
664 sett = RhodeCodeSetting(key, val)
665 sett = RhodeCodeSetting(key, val)
@@ -286,6 +286,7 b' def ApplicationVisualisationForm():'
286 rhodecode_repository_fields = v.StringBoolean(if_missing=False)
286 rhodecode_repository_fields = v.StringBoolean(if_missing=False)
287 rhodecode_lightweight_journal = v.StringBoolean(if_missing=False)
287 rhodecode_lightweight_journal = v.StringBoolean(if_missing=False)
288 rhodecode_dashboard_items = v.UnicodeString()
288 rhodecode_dashboard_items = v.UnicodeString()
289 rhodecode_show_version = v.StringBoolean(if_missing=False)
289
290
290 return _ApplicationVisualisationForm
291 return _ApplicationVisualisationForm
291
292
@@ -134,6 +134,11 b''
134 <label for="rhodecode_repository_fields">${_('Use repository extra fields')}</label>
134 <label for="rhodecode_repository_fields">${_('Use repository extra fields')}</label>
135 </div>
135 </div>
136 <span class="help-block">${_('Allows storing additional customized fields per repository.')}</span>
136 <span class="help-block">${_('Allows storing additional customized fields per repository.')}</span>
137 <div class="checkbox">
138 ${h.checkbox('rhodecode_show_version','True')}
139 <label for="rhodecode_show_version">${_('Show RhodeCode version')}</label>
140 </div>
141 <span class="help-block">${_('Shows or hides displayed version of RhodeCode in the footer')}</span>
137 </div>
142 </div>
138 </div>
143 </div>
139 <div class="field">
144 <div class="field">
@@ -42,7 +42,12 b''
42 ${_('Server instance: %s') % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}
42 ${_('Server instance: %s') % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}
43 </p>
43 </p>
44 <p class="footer-link-right">
44 <p class="footer-link-right">
45 <a href="${h.url('rhodecode_official')}">RhodeCode ${c.rhodecode_version}</a>
45 <a href="${h.url('rhodecode_official')}">
46 RhodeCode
47 %if c.visual.show_version:
48 ${c.rhodecode_version}
49 %endif
50 </a>
46 &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski and others
51 &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski and others
47 &ndash; <a href="${h.url('bugtracker')}">${_('Report a bug')}</a>
52 &ndash; <a href="${h.url('bugtracker')}">${_('Report a bug')}</a>
48 </p>
53 </p>
General Comments 0
You need to be logged in to leave comments. Login now