Changeset - 3dbf0ff5fc2b
[Not reviewed]
Merge beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-02-05 20:33:29
marcin@python-works.com
Merged in aras_p/rhodecode (pull request #28)
1 file changed with 20 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/helpers.py
Show inline comments
 
@@ -448,7 +448,18 @@ def action_parser(user_log, feed=False):
 
                                    _('compare view'))
 
                        )
 

	
 
        if len(revs) > revs_limit:
 
        # if we have exactly one more than normally displayed:
 
        # just display it, takes less space than displaying "and 1 more revisions"
 
        if len(revs) == revs_limit + 1:
 
            rev = revs[revs_limit]
 
            cs_links.append(", " + link_to(rev,
 
                url('changeset_home',
 
                repo_name=repo_name,
 
                revision=rev), title=tooltip(message(rev)),
 
                class_='tooltip') )
 

	
 
        # hidden-by-default ones
 
        if len(revs) > revs_limit + 1:
 
            uniq_id = revs[0]
 
            html_tmpl = ('<span> %s '
 
            '<a class="show_more" id="_%s" href="#more">%s</a> '
 
@@ -459,15 +470,20 @@ def action_parser(user_log, feed=False):
 
                                        _('revisions')))
 

	
 
            if not feed:
 
                html_tmpl = '<span id="%s" style="display:none"> %s </span>'
 
                html_tmpl = '<span id="%s" style="display:none">, %s </span>'
 
            else:
 
                html_tmpl = '<span id="%s"> %s </span>'
 

	
 
            cs_links.append(html_tmpl % (uniq_id, ', '.join([link_to(rev,
 
            morelinks = ', '.join([link_to(rev,
 
                url('changeset_home',
 
                repo_name=repo_name, revision=rev),
 
                title=message(rev), class_='tooltip')
 
                for rev in revs[revs_limit:revs_top_limit]])))
 
                for rev in revs[revs_limit:revs_top_limit]])
 

	
 
            if len(revs) > revs_top_limit:
 
                morelinks += ', ...'
 

	
 
            cs_links.append(html_tmpl % (uniq_id, morelinks))
 
        if len(revs) > 1:
 
            cs_links.append(compare_view)
 
        return ''.join(cs_links)
0 comments (0 inline, 0 general)