Show More
@@ -202,11 +202,6 b' class SettingsController(BaseController)' | |||
|
202 | 202 | form_result['rhodecode_lightweight_dashboard'] |
|
203 | 203 | Session().add(sett4) |
|
204 | 204 | |
|
205 | sett5 = RhodeCodeSetting.get_by_name_or_create('lightweight_journal') | |
|
206 | sett5.app_settings_value = \ | |
|
207 | form_result['rhodecode_lightweight_journal'] | |
|
208 | Session().add(sett5) | |
|
209 | ||
|
210 | 205 | Session().commit() |
|
211 | 206 | set_rhodecode_config(config) |
|
212 | 207 | h.flash(_('Updated visualisation settings'), |
@@ -248,7 +248,6 b' class BaseController(WSGIController):' | |||
|
248 | 248 | c.visual.show_private_icon = str2bool(rc_config.get('rhodecode_show_private_icon')) |
|
249 | 249 | c.visual.stylify_metatags = str2bool(rc_config.get('rhodecode_stylify_metatags')) |
|
250 | 250 | c.visual.lightweight_dashboard = str2bool(rc_config.get('rhodecode_lightweight_dashboard')) |
|
251 | c.visual.lightweight_journal = str2bool(rc_config.get('rhodecode_lightweight_dashboard')) | |
|
252 | 251 | |
|
253 | 252 | c.repo_name = get_repo_slug(request) |
|
254 | 253 | c.backends = BACKENDS.keys() |
@@ -491,7 +491,7 b' def bool2icon(value):' | |||
|
491 | 491 | return value |
|
492 | 492 | |
|
493 | 493 | |
|
494 |
def action_parser(user_log, feed=False, parse_cs= |
|
|
494 | def action_parser(user_log, feed=False, parse_cs=False): | |
|
495 | 495 | """ |
|
496 | 496 | This helper will action_map the specified string action into translated |
|
497 | 497 | fancy names with icons and links |
@@ -500,9 +500,7 b' def action_parser(user_log, feed=False, ' | |||
|
500 | 500 | :param feed: use output for feeds (no html and fancy icons) |
|
501 | 501 | :param parse_cs: parse Changesets into VCS instances |
|
502 | 502 | """ |
|
503 | from pylons import tmpl_context as c | |
|
504 | if c.visual.lightweight_journal: | |
|
505 | parse_cs = False | |
|
503 | ||
|
506 | 504 | action = user_log.action |
|
507 | 505 | action_params = ' ' |
|
508 | 506 | |
@@ -522,42 +520,42 b' def action_parser(user_log, feed=False, ' | |||
|
522 | 520 | repo_name = user_log.repository.repo_name |
|
523 | 521 | |
|
524 | 522 | def lnk(rev, repo_name): |
|
525 | ||
|
526 | 523 | if isinstance(rev, BaseChangeset) or isinstance(rev, AttributeDict): |
|
527 |
|
|
|
528 | lbl = 'r%s:%s' % (rev.revision, rev.short_id) | |
|
529 | else: | |
|
530 | lbl = '%s' % (rev.short_id) | |
|
524 | lbl = '%s' % (rev.short_id[:8]) | |
|
531 | 525 | _url = url('changeset_home', repo_name=repo_name, |
|
532 | 526 | revision=rev.raw_id) |
|
533 |
title = tooltip(rev.message) |
|
|
527 | title = tooltip(rev.message) | |
|
534 | 528 | else: |
|
529 | ## changeset cannot be found/striped/removed etc. | |
|
535 | 530 | lbl = ('%s' % rev)[:12] |
|
536 | 531 | _url = '#' |
|
537 | 532 | title = _('Changeset not found') |
|
538 | ||
|
539 | return link_to(lbl, _url, title=title, | |
|
540 | class_='tooltip' if parse_cs else '',) | |
|
533 | if parse_cs: | |
|
534 | return link_to(lbl, _url, title=title, class_='tooltip') | |
|
535 | return link_to(lbl, _url, raw_id=rev.raw_id, class_='journal-cs') | |
|
541 | 536 | |
|
542 | 537 | revs = [] |
|
543 | 538 | if len(filter(lambda v: v != '', revs_ids)) > 0: |
|
544 | if parse_cs: | |
|
545 | repo = user_log.repository.scm_instance | |
|
539 | repo = None | |
|
546 | 540 | for rev in revs_ids[:revs_top_limit]: |
|
541 | # we want parsed changesets, or new log store format is bad | |
|
547 | 542 | if parse_cs: |
|
548 | 543 | try: |
|
549 |
|
|
|
550 | revs.append(rev) | |
|
544 | if repo is None: | |
|
545 | repo = user_log.repository.scm_instance | |
|
546 | _rev = repo.get_changeset(rev) | |
|
547 | revs.append(_rev) | |
|
551 | 548 | except ChangesetDoesNotExistError: |
|
552 | 549 | log.error('cannot find revision %s in this repo' % rev) |
|
553 | 550 | revs.append(rev) |
|
554 | 551 | continue |
|
555 | 552 | else: |
|
556 | rev = AttributeDict({ | |
|
553 | _rev = AttributeDict({ | |
|
557 | 554 | 'short_id': rev[:12], |
|
558 | 555 | 'raw_id': rev, |
|
556 | 'message': '', | |
|
559 | 557 | }) |
|
560 | revs.append(rev) | |
|
558 | revs.append(_rev) | |
|
561 | 559 | cs_links = [] |
|
562 | 560 | cs_links.append(" " + ', '.join( |
|
563 | 561 | [lnk(rev, repo_name) for rev in revs[:revs_limit]] |
@@ -36,7 +36,7 b' from rhodecode.lib.utils import action_l' | |||
|
36 | 36 | from rhodecode.lib.vcs.backends.base import EmptyChangeset |
|
37 | 37 | from rhodecode.lib.compat import json |
|
38 | 38 | from rhodecode.lib.exceptions import HTTPLockedRC |
|
39 | from rhodecode.lib.utils2 import safe_str | |
|
39 | from rhodecode.lib.utils2 import safe_str, datetime_to_time | |
|
40 | 40 | from rhodecode.model.db import Repository, User |
|
41 | 41 | |
|
42 | 42 |
@@ -131,10 +131,6 b'' | |||
|
131 | 131 | ${h.checkbox('rhodecode_lightweight_dashboard','True')} |
|
132 | 132 | <label for="rhodecode_lightweight_dashboard">${_('Use lightweight dashboard')}</label> |
|
133 | 133 | </div> |
|
134 | <div class="checkbox"> | |
|
135 | ${h.checkbox('rhodecode_lightweight_journal','True')} | |
|
136 | <label for="rhodecode_lightweight_journal">${_('Use lightweight journal')}</label> | |
|
137 | </div> | |
|
138 | 134 | </div> |
|
139 | 135 | </div> |
|
140 | 136 |
@@ -70,6 +70,8 b'' | |||
|
70 | 70 | <%include file="/compare/compare_cs.html" /> |
|
71 | 71 | |
|
72 | 72 | ## FILES |
|
73 | <div id="affected_files"> | |
|
74 | % if c.files: | |
|
73 | 75 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> |
|
74 | 76 | <div class="cs_files"> |
|
75 | 77 | %for fid, change, f, stat in c.files: |
@@ -79,6 +81,10 b'' | |||
|
79 | 81 | </div> |
|
80 | 82 | %endfor |
|
81 | 83 | </div> |
|
84 | %else: | |
|
85 | <div class="ui-btn" style="text-align: center;margin-top:5px">${_('Click to load diff details')}</div> | |
|
86 | %endif | |
|
87 | </div> | |
|
82 | 88 | </div> |
|
83 | 89 | </div> |
|
84 | 90 | ## REVIEWERS |
@@ -131,10 +137,12 b'' | |||
|
131 | 137 | </script> |
|
132 | 138 | |
|
133 | 139 | ## diff block |
|
140 | <div id="diff_block_container" style="clear:both;"> | |
|
134 | 141 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
135 | 142 | %for fid, change, f, stat in c.files: |
|
136 | 143 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
137 | 144 | %endfor |
|
145 | </div> | |
|
138 | 146 | |
|
139 | 147 | ## template for inline comment form |
|
140 | 148 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
General Comments 0
You need to be logged in to leave comments.
Login now