Mercurial > kallithea
changeset 2952:029a40c58df7 beta
Added lightweight journal option for visual
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 23 Oct 2012 11:09:27 +0200 |
parents | 301773d07012 |
children | ac83f7a809a6 |
files | rhodecode/controllers/admin/settings.py rhodecode/lib/base.py rhodecode/lib/helpers.py rhodecode/model/forms.py rhodecode/templates/admin/settings/settings.html |
diffstat | 5 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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'),
--- 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()
--- 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')
--- 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
--- 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')} <label for="rhodecode_lightweight_dashboard">${_('Use lightweight dashboard')}</label> </div> + <div class="checkbox"> + ${h.checkbox('rhodecode_lightweight_journal','True')} + <label for="rhodecode_lightweight_journal">${_('Use lightweight journal')}</label> + </div> </div> </div>