##// END OF EJS Templates
range-diff: enable hovercards for commits in range-diff.
milka -
r4542:a4080f12 default
parent child Browse files
Show More
@@ -1,121 +1,125 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.mako"/>
2 <%inherit file="/base/base.mako"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('%s Commits') % c.repo_name} -
5 ${_('%s Commits') % c.repo_name} -
6 r${c.commit_ranges[0].idx}:${h.short_id(c.commit_ranges[0].raw_id)}
6 r${c.commit_ranges[0].idx}:${h.short_id(c.commit_ranges[0].raw_id)}
7 ...
7 ...
8 r${c.commit_ranges[-1].idx}:${h.short_id(c.commit_ranges[-1].raw_id)}
8 r${c.commit_ranges[-1].idx}:${h.short_id(c.commit_ranges[-1].raw_id)}
9 ${_ungettext('(%s commit)','(%s commits)', len(c.commit_ranges)) % len(c.commit_ranges)}
9 ${_ungettext('(%s commit)','(%s commits)', len(c.commit_ranges)) % len(c.commit_ranges)}
10 %if c.rhodecode_name:
10 %if c.rhodecode_name:
11 &middot; ${h.branding(c.rhodecode_name)}
11 &middot; ${h.branding(c.rhodecode_name)}
12 %endif
12 %endif
13 </%def>
13 </%def>
14
14
15 <%def name="breadcrumbs_links()"></%def>
15 <%def name="breadcrumbs_links()"></%def>
16
16
17 <%def name="menu_bar_nav()">
17 <%def name="menu_bar_nav()">
18 ${self.menu_items(active='repositories')}
18 ${self.menu_items(active='repositories')}
19 </%def>
19 </%def>
20
20
21 <%def name="menu_bar_subnav()">
21 <%def name="menu_bar_subnav()">
22 ${self.repo_menu(active='commits')}
22 ${self.repo_menu(active='commits')}
23 </%def>
23 </%def>
24
24
25 <%def name="main()">
25 <%def name="main()">
26
26
27 <div class="box">
27 <div class="box">
28 <div class="summary changeset">
28 <div class="summary changeset">
29 <div class="summary-detail">
29 <div class="summary-detail">
30 <div class="summary-detail-header">
30 <div class="summary-detail-header">
31 <span class="breadcrumbs files_location">
31 <span class="breadcrumbs files_location">
32 <h4>
32 <h4>
33 ${_('Commit Range')}
33 ${_('Commit Range')}
34 </h4>
34 </h4>
35 </span>
35 </span>
36
36
37 <div class="clear-fix"></div>
37 <div class="clear-fix"></div>
38 </div>
38 </div>
39
39
40 <div class="fieldset">
40 <div class="fieldset">
41 <div class="left-label-summary">
41 <div class="left-label-summary">
42 <p class="spacing">${_('Range')}:</p>
42 <p class="spacing">${_('Range')}:</p>
43 <div class="right-label-summary">
43 <div class="right-label-summary">
44 <div class="code-header" >
44 <div class="code-header" >
45 <div class="compare_header">
45 <div class="compare_header">
46 <code class="fieldset-text-line">
46 <code class="fieldset-text-line">
47 r${c.commit_ranges[0].idx}:${h.short_id(c.commit_ranges[0].raw_id)}
47 r${c.commit_ranges[0].idx}:${h.short_id(c.commit_ranges[0].raw_id)}
48 ...
48 ...
49 r${c.commit_ranges[-1].idx}:${h.short_id(c.commit_ranges[-1].raw_id)}
49 r${c.commit_ranges[-1].idx}:${h.short_id(c.commit_ranges[-1].raw_id)}
50 ${_ungettext('(%s commit)','(%s commits)', len(c.commit_ranges)) % len(c.commit_ranges)}
50 ${_ungettext('(%s commit)','(%s commits)', len(c.commit_ranges)) % len(c.commit_ranges)}
51 </code>
51 </code>
52 </div>
52 </div>
53 </div>
53 </div>
54 </div>
54 </div>
55 </div>
55 </div>
56 </div>
56 </div>
57
57
58 <div class="fieldset">
58 <div class="fieldset">
59 <div class="left-label-summary">
59 <div class="left-label-summary">
60 <p class="spacing">${_('Diff Option')}:</p>
60 <p class="spacing">${_('Diff Option')}:</p>
61 <div class="right-label-summary">
61 <div class="right-label-summary">
62 <div class="code-header" >
62 <div class="code-header" >
63 <div class="compare_header">
63 <div class="compare_header">
64 <a class="btn btn-primary" href="${h.route_path('repo_compare',
64 <a class="btn btn-primary" href="${h.route_path('repo_compare',
65 repo_name=c.repo_name,
65 repo_name=c.repo_name,
66 source_ref_type='rev',
66 source_ref_type='rev',
67 source_ref=getattr(c.commit_ranges[0].parents[0] if c.commit_ranges[0].parents else h.EmptyCommit(), 'raw_id'),
67 source_ref=getattr(c.commit_ranges[0].parents[0] if c.commit_ranges[0].parents else h.EmptyCommit(), 'raw_id'),
68 target_ref_type='rev',
68 target_ref_type='rev',
69 target_ref=c.commit_ranges[-1].raw_id)}"
69 target_ref=c.commit_ranges[-1].raw_id)}"
70 >
70 >
71 ${_('Show combined diff')}
71 ${_('Show combined diff')}
72 </a>
72 </a>
73 </div>
73 </div>
74 </div>
74 </div>
75 </div>
75 </div>
76 </div>
76 </div>
77 </div>
77 </div>
78
78
79 <div class="clear-fix"></div>
79 <div class="clear-fix"></div>
80 </div> <!-- end summary-detail -->
80 </div> <!-- end summary-detail -->
81 </div> <!-- end summary -->
81 </div> <!-- end summary -->
82
82
83 <div id="changeset_compare_view_content">
83 <div id="changeset_compare_view_content">
84 <div class="pull-left">
84 <div class="pull-left">
85 <div class="btn-group">
85 <div class="btn-group">
86 <a class="${('collapsed' if c.collapse_all_commits else '')}" href="#expand-commits" onclick="toggleCommitExpand(this); return false" data-toggle-commits-cnt=${len(c.commit_ranges)} >
86 <a class="${('collapsed' if c.collapse_all_commits else '')}" href="#expand-commits" onclick="toggleCommitExpand(this); return false" data-toggle-commits-cnt=${len(c.commit_ranges)} >
87 % if c.collapse_all_commits:
87 % if c.collapse_all_commits:
88 <i class="icon-plus-squared-alt icon-no-margin"></i>
88 <i class="icon-plus-squared-alt icon-no-margin"></i>
89 ${_ungettext('Expand {} commit', 'Expand {} commits', len(c.commit_ranges)).format(len(c.commit_ranges))}
89 ${_ungettext('Expand {} commit', 'Expand {} commits', len(c.commit_ranges)).format(len(c.commit_ranges))}
90 % else:
90 % else:
91 <i class="icon-minus-squared-alt icon-no-margin"></i>
91 <i class="icon-minus-squared-alt icon-no-margin"></i>
92 ${_ungettext('Collapse {} commit', 'Collapse {} commits', len(c.commit_ranges)).format(len(c.commit_ranges))}
92 ${_ungettext('Collapse {} commit', 'Collapse {} commits', len(c.commit_ranges)).format(len(c.commit_ranges))}
93 % endif
93 % endif
94 </a>
94 </a>
95 </div>
95 </div>
96 </div>
96 </div>
97 ## Commit range generated below
97 ## Commit range generated below
98 <%include file="../compare/compare_commits.mako"/>
98 <%include file="../compare/compare_commits.mako"/>
99 <div class="cs_files">
99 <div class="cs_files">
100 <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/>
100 <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/>
101 <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/>
101 <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/>
102 <%namespace name="diff_block" file="/changeset/diff_block.mako"/>
102 <%namespace name="diff_block" file="/changeset/diff_block.mako"/>
103
103
104 %for commit in c.commit_ranges:
104 %for commit in c.commit_ranges:
105 ## commit range header for each individual diff
105 ## commit range header for each individual diff
106 <h3>
106 <h3>
107 <a class="tooltip revision" title="${h.tooltip(commit.message)}" href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=commit.raw_id)}">${('r%s:%s' % (commit.idx,h.short_id(commit.raw_id)))}</a>
107
108
109 <a class="tooltip-hovercard revision" data-hovercard-alt="Commit: ${commit.short_id}" data-hovercard-url="${h.route_path('hovercard_repo_commit', repo_name=c.repo_name, commit_id=commit.raw_id)}" href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=commit.raw_id)}">
110 ${('r%s:%s' % (commit.idx,h.short_id(commit.raw_id)))}
111 </a>
108 </h3>
112 </h3>
109
113
110 ${cbdiffs.render_diffset_menu(c.changes[commit.raw_id])}
114 ${cbdiffs.render_diffset_menu(c.changes[commit.raw_id])}
111 ${cbdiffs.render_diffset(
115 ${cbdiffs.render_diffset(
112 diffset=c.changes[commit.raw_id],
116 diffset=c.changes[commit.raw_id],
113 collapse_when_files_over=5,
117 collapse_when_files_over=5,
114 commit=commit,
118 commit=commit,
115 )}
119 )}
116 %endfor
120 %endfor
117 </div>
121 </div>
118 </div>
122 </div>
119 </div>
123 </div>
120
124
121 </%def>
125 </%def>
General Comments 0
You need to be logged in to leave comments. Login now