diff --git a/rhodecode/config/routing.py b/rhodecode/config/routing.py --- a/rhodecode/config/routing.py +++ b/rhodecode/config/routing.py @@ -337,6 +337,10 @@ def make_map(config): rmap.connect('changelog_home', '/{repo_name:.*}/changelog', controller='changelog', conditions=dict(function=check_repo)) + rmap.connect('changelog_details', '/{repo_name:.*}/changelog_details/{cs}', + controller='changelog', action='changelog_details', + conditions=dict(function=check_repo)) + rmap.connect('files_home', '/{repo_name:.*}/files/{revision}/{f_path:.*}', controller='files', revision='tip', f_path='', conditions=dict(function=check_repo)) diff --git a/rhodecode/controllers/changelog.py b/rhodecode/controllers/changelog.py --- a/rhodecode/controllers/changelog.py +++ b/rhodecode/controllers/changelog.py @@ -76,6 +76,11 @@ class ChangelogController(BaseRepoContro return render('changelog/changelog.html') + def changelog_details(self, cs): + if request.environ.get('HTTP_X_PARTIAL_XHR'): + c.cs = c.rhodecode_repo.get_changeset(cs) + return render('changelog/changelog_details.html') + def _graph(self, repo, repo_size, size, p): """ Generates a DAG graph for mercurial diff --git a/rhodecode/public/css/style.css b/rhodecode/public/css/style.css --- a/rhodecode/public/css/style.css +++ b/rhodecode/public/css/style.css @@ -1787,6 +1787,16 @@ white-space:pre-wrap; clear:both; } +.right .changes .changed_total{ +border:1px solid #DDD; +display:block; +float:right; +text-align:center; +min-width:45px; +cursor: pointer; +background:#FD8; +font-weight: bold; +} .right .changes .added,.changed,.removed { border:1px solid #DDD; display:block; diff --git a/rhodecode/templates/changelog/changelog.html b/rhodecode/templates/changelog/changelog.html --- a/rhodecode/templates/changelog/changelog.html +++ b/rhodecode/templates/changelog/changelog.html @@ -59,20 +59,15 @@
${h.link_to(h.wrap_paragraphs(cs.message),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
-
- % if len(cs.affected_files) <= c.affected_files_cut_off: - ${len(cs.removed)} - ${len(cs.changed)} - ${len(cs.added)} - % else: - ! - ! - ! - % endif +
+ + ${len(cs.affected_files)} +
%if len(cs.parents)>1:
- ${_('merge')}merge + ${_('merge')}merge
%endif %if cs.parents: @@ -110,7 +105,7 @@ YAHOO.util.Event.onDOMReady(function(){ //Monitor range checkboxes and build a link to changesets - //ranges + //ranges var checkboxes = YUD.getElementsByClassName('changeset_range'); var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; YUE.on(checkboxes,'click',function(e){ @@ -139,6 +134,15 @@ } }); + //Fetch changeset details + YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ + var id = e.currentTarget.id + var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}" + var url = url.replace('__CS__',id); + ypjax(url,id+'_changes_info',function(){tooltip_activate()}); + }); + + function set_canvas(heads) { var c = document.getElementById('graph_nodes'); var t = document.getElementById('graph_content'); diff --git a/rhodecode/templates/changelog/changelog_details.html b/rhodecode/templates/changelog/changelog_details.html new file mode 100644 --- /dev/null +++ b/rhodecode/templates/changelog/changelog_details.html @@ -0,0 +1,9 @@ +% if len(c.cs.affected_files) <= c.affected_files_cut_off: +${len(c.cs.removed)} +${len(c.cs.changed)} +${len(c.cs.added)} +% else: + ! + ! + ! +% endif \ No newline at end of file