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