Mercurial > kallithea
comparison rhodecode/lib/helpers.py @ 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 | 528c7f210b12 |
children | 9282b4f38277 |
comparison
equal
deleted
inserted
replaced
2951:301773d07012 | 2952:029a40c58df7 |
---|---|
498 | 498 |
499 :param user_log: user log instance | 499 :param user_log: user log instance |
500 :param feed: use output for feeds (no html and fancy icons) | 500 :param feed: use output for feeds (no html and fancy icons) |
501 :param parse_cs: parse Changesets into VCS instances | 501 :param parse_cs: parse Changesets into VCS instances |
502 """ | 502 """ |
503 if request.GET.get('lightweight'): | 503 from pylons import tmpl_context as c |
504 if c.visual.lightweight_journal: | |
504 parse_cs = False | 505 parse_cs = False |
505 action = user_log.action | 506 action = user_log.action |
506 action_params = ' ' | 507 action_params = ' ' |
507 | 508 |
508 x = action.split(':') | 509 x = action.split(':') |
529 lbl = '%s' % (rev.short_id) | 530 lbl = '%s' % (rev.short_id) |
530 _url = url('changeset_home', repo_name=repo_name, | 531 _url = url('changeset_home', repo_name=repo_name, |
531 revision=rev.raw_id) | 532 revision=rev.raw_id) |
532 title = tooltip(rev.message) if parse_cs else '' | 533 title = tooltip(rev.message) if parse_cs else '' |
533 else: | 534 else: |
534 lbl = '%s' % rev | 535 lbl = ('%s' % rev)[:12] |
535 _url = '#' | 536 _url = '#' |
536 title = _('Changeset not found') | 537 title = _('Changeset not found') |
537 | 538 |
538 return link_to(lbl, _url, title=title, | 539 return link_to(lbl, _url, title=title, |
539 class_='tooltip' if parse_cs else '',) | 540 class_='tooltip' if parse_cs else '',) |