# HG changeset patch # User Marcin Kuzminski # Date 1350983367 -7200 # Node ID 029a40c58df72765feac98819e11073bc5bea7e4 # Parent 301773d07012bc254592e73f3b37f98eb99a8e7f Added lightweight journal option for visual diff -r 301773d07012 -r 029a40c58df7 rhodecode/controllers/admin/settings.py --- a/rhodecode/controllers/admin/settings.py Tue Oct 23 00:02:59 2012 +0200 +++ b/rhodecode/controllers/admin/settings.py Tue Oct 23 11:09:27 2012 +0200 @@ -202,6 +202,11 @@ form_result['rhodecode_lightweight_dashboard'] Session().add(sett4) + sett5 = RhodeCodeSetting.get_by_name_or_create('lightweight_journal') + sett5.app_settings_value = \ + form_result['rhodecode_lightweight_journal'] + Session().add(sett5) + Session().commit() set_rhodecode_config(config) h.flash(_('Updated visualisation settings'), diff -r 301773d07012 -r 029a40c58df7 rhodecode/lib/base.py --- a/rhodecode/lib/base.py Tue Oct 23 00:02:59 2012 +0200 +++ b/rhodecode/lib/base.py Tue Oct 23 11:09:27 2012 +0200 @@ -246,6 +246,7 @@ c.visual.show_private_icon = str2bool(config.get('rhodecode_show_private_icon')) c.visual.stylify_metatags = str2bool(config.get('rhodecode_stylify_metatags')) c.visual.lightweight_dashboard = str2bool(config.get('rhodecode_lightweight_dashboard')) + c.visual.lightweight_journal = str2bool(config.get('rhodecode_lightweight_dashboard')) c.repo_name = get_repo_slug(request) c.backends = BACKENDS.keys() diff -r 301773d07012 -r 029a40c58df7 rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py Tue Oct 23 00:02:59 2012 +0200 +++ b/rhodecode/lib/helpers.py Tue Oct 23 11:09:27 2012 +0200 @@ -500,7 +500,8 @@ :param feed: use output for feeds (no html and fancy icons) :param parse_cs: parse Changesets into VCS instances """ - if request.GET.get('lightweight'): + from pylons import tmpl_context as c + if c.visual.lightweight_journal: parse_cs = False action = user_log.action action_params = ' ' @@ -531,7 +532,7 @@ revision=rev.raw_id) title = tooltip(rev.message) if parse_cs else '' else: - lbl = '%s' % rev + lbl = ('%s' % rev)[:12] _url = '#' title = _('Changeset not found') diff -r 301773d07012 -r 029a40c58df7 rhodecode/model/forms.py --- a/rhodecode/model/forms.py Tue Oct 23 00:02:59 2012 +0200 +++ b/rhodecode/model/forms.py Tue Oct 23 11:09:27 2012 +0200 @@ -255,6 +255,7 @@ rhodecode_stylify_metatags = v.StringBoolean(if_missing=False) rhodecode_lightweight_dashboard = v.StringBoolean(if_missing=False) + rhodecode_lightweight_journal = v.StringBoolean(if_missing=False) return _ApplicationVisualisationForm diff -r 301773d07012 -r 029a40c58df7 rhodecode/templates/admin/settings/settings.html --- a/rhodecode/templates/admin/settings/settings.html Tue Oct 23 00:02:59 2012 +0200 +++ b/rhodecode/templates/admin/settings/settings.html Tue Oct 23 11:09:27 2012 +0200 @@ -131,6 +131,10 @@ ${h.checkbox('rhodecode_lightweight_dashboard','True')} +
+ ${h.checkbox('rhodecode_lightweight_journal','True')} + +