##// END OF EJS Templates
pullrequests: added peppercorn sequence start/end markers to...
dan -
r955:e88e739c default
parent child Browse files
Show More
@@ -1,102 +1,104 b''
1 ## Changesets table !
1 ## Changesets table !
2 <%namespace name="base" file="/base/base.html"/>
2 <%namespace name="base" file="/base/base.html"/>
3 <div class="container">
3 <div class="container">
4 %if not c.commit_ranges:
4 %if not c.commit_ranges:
5 <p class="empty_data">${_('No Commits')}</p>
5 <p class="empty_data">${_('No Commits')}</p>
6 %else:
6 %else:
7
7
8 %if c.ancestor:
8 %if c.ancestor:
9 <p class="ancestor">${_('Common Ancestor Commit')}:
9 <p class="ancestor">${_('Common Ancestor Commit')}:
10 <a href="${h.url('changeset_home',
10 <a href="${h.url('changeset_home',
11 repo_name=c.repo_name,
11 repo_name=c.repo_name,
12 revision=c.ancestor)}">
12 revision=c.ancestor)}">
13 ${h.short_id(c.ancestor)}
13 ${h.short_id(c.ancestor)}
14 </a>
14 </a>
15 </p>
15 </p>
16 %endif
16 %endif
17
17
18 <input type="hidden" name="__start__" value="revisions:sequence">
18 <table class="rctable compare_view_commits">
19 <table class="rctable compare_view_commits">
19 <tr>
20 <tr>
20 <th>${_('Time')}</th>
21 <th>${_('Time')}</th>
21 <th>${_('Author')}</th>
22 <th>${_('Author')}</th>
22 <th>${_('Commit')}</th>
23 <th>${_('Commit')}</th>
23 <th></th>
24 <th></th>
24 <th>${_('Description')}</th>
25 <th>${_('Description')}</th>
25 </tr>
26 </tr>
26 %for commit in c.commit_ranges:
27 %for commit in c.commit_ranges:
27 <tr id="row-${commit.raw_id}"
28 <tr id="row-${commit.raw_id}"
28 commit_id="${commit.raw_id}"
29 commit_id="${commit.raw_id}"
29 class="compare_select"
30 class="compare_select"
30 >
31 >
31 <td class="td-time">
32 <td class="td-time">
32 ${h.age_component(commit.date)}
33 ${h.age_component(commit.date)}
33 </td>
34 </td>
34 <td class="td-user">
35 <td class="td-user">
35 ${base.gravatar_with_user(commit.author, 16)}
36 ${base.gravatar_with_user(commit.author, 16)}
36 </td>
37 </td>
37 <td class="td-hash">
38 <td class="td-hash">
38 <code>
39 <code>
39 <a href="${h.url('changeset_home',
40 <a href="${h.url('changeset_home',
40 repo_name=c.target_repo.repo_name,
41 repo_name=c.target_repo.repo_name,
41 revision=commit.raw_id)}">
42 revision=commit.raw_id)}">
42 r${commit.revision}:${h.short_id(commit.raw_id)}
43 r${commit.revision}:${h.short_id(commit.raw_id)}
43 </a>
44 </a>
44 ${h.hidden('revisions',commit.raw_id)}
45 ${h.hidden('revisions',commit.raw_id)}
45 </code>
46 </code>
46 </td>
47 </td>
47 <td class="expand_commit"
48 <td class="expand_commit"
48 data-commit-id="${commit.raw_id}"
49 data-commit-id="${commit.raw_id}"
49 title="${_( 'Expand commit message')}"
50 title="${_( 'Expand commit message')}"
50 >
51 >
51 <div class="show_more_col">
52 <div class="show_more_col">
52 <i class="show_more"></i>
53 <i class="show_more"></i>
53 </div>
54 </div>
54 </td>
55 </td>
55 <td class="mid td-description">
56 <td class="mid td-description">
56 <div class="log-container truncate-wrap">
57 <div class="log-container truncate-wrap">
57 <div
58 <div
58 id="c-${commit.raw_id}"
59 id="c-${commit.raw_id}"
59 class="message truncate"
60 class="message truncate"
60 data-message-raw="${commit.message}"
61 data-message-raw="${commit.message}"
61 >
62 >
62 ${h.urlify_commit_message(commit.message, c.repo_name)}
63 ${h.urlify_commit_message(commit.message, c.repo_name)}
63 </div>
64 </div>
64 </div>
65 </div>
65 </td>
66 </td>
66 </tr>
67 </tr>
67 %endfor
68 %endfor
68 </table>
69 </table>
70 <input type="hidden" name="__end__" value="revisions:sequence">
69 %endif
71 %endif
70 </div>
72 </div>
71
73
72 <script>
74 <script>
73 $('.expand_commit').on('click',function(e){
75 $('.expand_commit').on('click',function(e){
74 var target_expand = $(this);
76 var target_expand = $(this);
75 var cid = target_expand.data('commitId');
77 var cid = target_expand.data('commitId');
76
78
77 ## TODO: dan: extract styles into css, and just toggleClass('open') here
79 ## TODO: dan: extract styles into css, and just toggleClass('open') here
78 if (target_expand.hasClass('open')){
80 if (target_expand.hasClass('open')){
79 $('#c-'+cid).css({
81 $('#c-'+cid).css({
80 'height': '1.5em',
82 'height': '1.5em',
81 'white-space': 'nowrap',
83 'white-space': 'nowrap',
82 'text-overflow': 'ellipsis',
84 'text-overflow': 'ellipsis',
83 'overflow':'hidden'
85 'overflow':'hidden'
84 });
86 });
85 target_expand.removeClass('open');
87 target_expand.removeClass('open');
86 }
88 }
87 else {
89 else {
88 $('#c-'+cid).css({
90 $('#c-'+cid).css({
89 'height': 'auto',
91 'height': 'auto',
90 'white-space': 'pre-line',
92 'white-space': 'pre-line',
91 'text-overflow': 'initial',
93 'text-overflow': 'initial',
92 'overflow':'visible'
94 'overflow':'visible'
93 });
95 });
94 target_expand.addClass('open');
96 target_expand.addClass('open');
95 }
97 }
96 });
98 });
97
99
98 $('.compare_select').on('click',function(e){
100 $('.compare_select').on('click',function(e){
99 var cid = $(this).attr('commit_id');
101 var cid = $(this).attr('commit_id');
100 $('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl'));
102 $('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl'));
101 });
103 });
102 </script>
104 </script>
General Comments 0
You need to be logged in to leave comments. Login now