# HG changeset patch # User Marcin Kuzminski # Date 2012-10-23 09:09:27 # Node ID 029a40c58df72765feac98819e11073bc5bea7e4 # Parent 301773d07012bc254592e73f3b37f98eb99a8e7f Added lightweight journal option for visual 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 @@ -202,6 +202,11 @@ class SettingsController(BaseController) 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 --git a/rhodecode/lib/base.py b/rhodecode/lib/base.py --- a/rhodecode/lib/base.py +++ b/rhodecode/lib/base.py @@ -246,6 +246,7 @@ class BaseController(WSGIController): 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 --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -500,7 +500,8 @@ def action_parser(user_log, feed=False, :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 @@ def action_parser(user_log, feed=False, 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 --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -255,6 +255,7 @@ def ApplicationVisualisationForm(): 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 --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 @@ -131,6 +131,10 @@ ${h.checkbox('rhodecode_lightweight_dashboard','True')} +
+ ${h.checkbox('rhodecode_lightweight_journal','True')} + +