Changeset - 029a40c58df7
[Not reviewed]
beta
0 5 0
Marcin Kuzminski - 13 years ago 2012-10-23 11:09:27
marcin@python-works.com
Added lightweight journal option for visual
5 files changed with 14 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/admin/settings.py
Show inline comments
 
@@ -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'),
rhodecode/lib/base.py
Show inline comments
 
@@ -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()
rhodecode/lib/helpers.py
Show inline comments
 
@@ -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')
 

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

	
rhodecode/templates/admin/settings/settings.html
Show inline comments
 
@@ -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>
 

	
0 comments (0 inline, 0 general)