diff --git a/rhodecode/templates/changeset/changeset.mako b/rhodecode/templates/changeset/changeset.mako
--- a/rhodecode/templates/changeset/changeset.mako
+++ b/rhodecode/templates/changeset/changeset.mako
@@ -158,7 +158,7 @@
<%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/>
- ${cbdiffs.render_diffset_menu(c.changes[c.commit.raw_id])}
+ ${cbdiffs.render_diffset_menu(c.changes[c.commit.raw_id], commit=c.commit)}
${cbdiffs.render_diffset(
c.changes[c.commit.raw_id], commit=c.commit, use_comments=True,inline_comments=c.inline_comments )}
diff --git a/rhodecode/templates/codeblocks/diffs.mako b/rhodecode/templates/codeblocks/diffs.mako
--- a/rhodecode/templates/codeblocks/diffs.mako
+++ b/rhodecode/templates/codeblocks/diffs.mako
@@ -855,7 +855,7 @@ def get_comments_for(diff_type, comments
%def>
-<%def name="render_diffset_menu(diffset, range_diff_on=None)">
+<%def name="render_diffset_menu(diffset, range_diff_on=None, commit=None, pull_request_menu=None)">
<% diffset_container_id = h.md5(diffset.target_ref) %>
- Loading diff...:
-
-
-
-
-
-
+
+ %if commit:
+
+ ${h.show_id(commit)}
+
+ %elif pull_request_menu and pull_request_menu.get('pull_request'):
+
+ !${pull_request_menu['pull_request'].pull_request_id}
+
+ %endif
+ % if commit or pull_request_menu:
+ Loading diff...:
+
+
+
+
+
+
+ % endif
@@ -1053,6 +1065,8 @@ def get_comments_for(diff_type, comments
e.preventDefault();
});
+ diffNavText = 'diff navigation:'
+
getCurrentChunk = function () {
var chunksAll = $('.nav-chunk').filter(function () {
@@ -1098,15 +1112,15 @@ def get_comments_for(diff_type, comments
if (curElem === undefined) {
// end or back
- $('#diff_nav').html('No next diff element.')
+ $('#diff_nav').html('no next diff element:')
animateDiffNavText()
return
} else if (newPos < 0) {
- $('#diff_nav').html('No previous diff element.')
+ $('#diff_nav').html('no previous diff element:')
animateDiffNavText()
return
} else {
- $('#diff_nav').html('Diff navigation:')
+ $('#diff_nav').html(diffNavText)
}
curElem = $(curElem)
@@ -1347,7 +1361,7 @@ def get_comments_for(diff_type, comments
lastScrollY = currentScrollY;
});
- $('#diff_nav').html('Diff navigation:')
+ $('#diff_nav').html(diffNavText);
});
diff --git a/rhodecode/templates/pullrequests/pullrequest_show.mako b/rhodecode/templates/pullrequests/pullrequest_show.mako
--- a/rhodecode/templates/pullrequests/pullrequest_show.mako
+++ b/rhodecode/templates/pullrequests/pullrequest_show.mako
@@ -624,11 +624,12 @@
<%
pr_menu_data = {
- 'outdated_comm_count_ver': outdated_comm_count_ver
+ 'outdated_comm_count_ver': outdated_comm_count_ver,
+ 'pull_request': c.pull_request
}
%>
- ${cbdiffs.render_diffset_menu(c.diffset, range_diff_on=c.range_diff_on)}
+ ${cbdiffs.render_diffset_menu(c.diffset, range_diff_on=c.range_diff_on, pull_request_menu=pr_menu_data)}
% if c.range_diff_on:
% for commit in c.commit_ranges: