Show More
@@ -1,170 +1,173 b'' | |||||
1 | @font-face { |
|
1 | @font-face { | |
2 | font-family: 'rcicons'; |
|
2 | font-family: 'rcicons'; | |
3 | src: url('../fonts/RCIcons/rcicons.eot?74666722'); |
|
3 | src: url('../fonts/RCIcons/rcicons.eot?74666722'); | |
4 | src: url('../fonts/RCIcons/rcicons.eot?74666722#iefix') format('embedded-opentype'), |
|
4 | src: url('../fonts/RCIcons/rcicons.eot?74666722#iefix') format('embedded-opentype'), | |
5 | url('../fonts/RCIcons/rcicons.woff2?74666722') format('woff2'), |
|
5 | url('../fonts/RCIcons/rcicons.woff2?74666722') format('woff2'), | |
6 | url('../fonts/RCIcons/rcicons.woff?74666722') format('woff'), |
|
6 | url('../fonts/RCIcons/rcicons.woff?74666722') format('woff'), | |
7 | url('../fonts/RCIcons/rcicons.ttf?74666722') format('truetype'), |
|
7 | url('../fonts/RCIcons/rcicons.ttf?74666722') format('truetype'), | |
8 | url('../fonts/RCIcons/rcicons.svg?74666722#rcicons') format('svg'); |
|
8 | url('../fonts/RCIcons/rcicons.svg?74666722#rcicons') format('svg'); | |
9 | font-weight: normal; |
|
9 | font-weight: normal; | |
10 | font-style: normal; |
|
10 | font-style: normal; | |
11 | } |
|
11 | } | |
12 | /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ |
|
12 | /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ | |
13 | /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ |
|
13 | /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ | |
14 | /* |
|
14 | /* | |
15 | @media screen and (-webkit-min-device-pixel-ratio:0) { |
|
15 | @media screen and (-webkit-min-device-pixel-ratio:0) { | |
16 | @font-face { |
|
16 | @font-face { | |
17 | font-family: 'rcicons'; |
|
17 | font-family: 'rcicons'; | |
18 | src: url('../fonts/RCIcons/rcicons.svg?74666722#rcicons') format('svg'); |
|
18 | src: url('../fonts/RCIcons/rcicons.svg?74666722#rcicons') format('svg'); | |
19 | } |
|
19 | } | |
20 | } |
|
20 | } | |
21 | */ |
|
21 | */ | |
22 |
|
22 | |||
23 | [class^="icon-"]:before, [class*=" icon-"]:before { |
|
23 | [class^="icon-"]:before, [class*=" icon-"]:before { | |
24 | font-family: "rcicons"; |
|
24 | font-family: "rcicons"; | |
25 | font-style: normal; |
|
25 | font-style: normal; | |
26 | font-weight: normal; |
|
26 | font-weight: normal; | |
27 | speak: none; |
|
27 | speak: none; | |
28 |
|
28 | |||
29 | display: inline-block; |
|
29 | display: inline-block; | |
30 | text-decoration: inherit; |
|
30 | text-decoration: inherit; | |
31 | width: 1em; |
|
31 | width: 1em; | |
32 | margin-right: .2em; |
|
32 | margin-right: .2em; | |
33 | text-align: center; |
|
33 | text-align: center; | |
34 | /* opacity: .8; */ |
|
34 | /* opacity: .8; */ | |
35 |
|
35 | |||
36 | /* For safety - reset parent styles, that can break glyph codes*/ |
|
36 | /* For safety - reset parent styles, that can break glyph codes*/ | |
37 | font-variant: normal; |
|
37 | font-variant: normal; | |
38 | text-transform: none; |
|
38 | text-transform: none; | |
39 |
|
39 | |||
40 | /* fix buttons height, for twitter bootstrap */ |
|
40 | /* fix buttons height, for twitter bootstrap */ | |
41 | line-height: 1em; |
|
41 | line-height: 1em; | |
42 |
|
42 | |||
43 | /* Animation center compensation - margins should be symmetric */ |
|
43 | /* Animation center compensation - margins should be symmetric */ | |
44 | /* remove if not needed */ |
|
44 | /* remove if not needed */ | |
45 | margin-left: .2em; |
|
45 | margin-left: .2em; | |
46 |
|
46 | |||
47 | /* you can be more comfortable with increased icons size */ |
|
47 | /* you can be more comfortable with increased icons size */ | |
48 | /* font-size: 120%; */ |
|
48 | /* font-size: 120%; */ | |
49 |
|
49 | |||
50 | /* Font smoothing. That was taken from TWBS */ |
|
50 | /* Font smoothing. That was taken from TWBS */ | |
51 | -webkit-font-smoothing: antialiased; |
|
51 | -webkit-font-smoothing: antialiased; | |
52 | -moz-osx-font-smoothing: grayscale; |
|
52 | -moz-osx-font-smoothing: grayscale; | |
53 |
|
53 | |||
54 | /* Uncomment for 3D effect */ |
|
54 | /* Uncomment for 3D effect */ | |
55 | /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ |
|
55 | /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ | |
56 | } |
|
56 | } | |
57 |
|
57 | |||
58 | .icon-no-margin::before { |
|
58 | .icon-no-margin::before { | |
59 | margin: 0; |
|
59 | margin: 0; | |
60 |
|
60 | |||
61 | } |
|
61 | } | |
62 | // -- ICON CLASSES -- // |
|
62 | // -- ICON CLASSES -- // | |
63 |
|
63 | |||
64 | .icon-bookmark:before { content: '\e803'; } /* 'ξ ' */ |
|
64 | .icon-bookmark:before { content: '\e803'; } /* 'ξ ' */ | |
65 | .icon-branch:before { content: '\e804'; } /* 'ξ ' */ |
|
65 | .icon-branch:before { content: '\e804'; } /* 'ξ ' */ | |
66 | .icon-lock:before { content: '\e806'; } /* 'ξ ' */ |
|
66 | .icon-lock:before { content: '\e806'; } /* 'ξ ' */ | |
67 | .icon-unlock:before { content: '\e807'; } /* 'ξ ' */ |
|
67 | .icon-unlock:before { content: '\e807'; } /* 'ξ ' */ | |
68 | .icon-delete:before { content: '\e808'; } /* 'ξ ' */ |
|
68 | .icon-delete:before { content: '\e808'; } /* 'ξ ' */ | |
69 | .icon-false:before { content: '\e808'; } /* 'ξ ' */ |
|
69 | .icon-false:before { content: '\e808'; } /* 'ξ ' */ | |
70 |
|
70 | |||
71 | .icon-ok:before { content: '\e809'; } /* 'ξ ' */ |
|
71 | .icon-ok:before { content: '\e809'; } /* 'ξ ' */ | |
72 | .icon-true:before { content: '\e809'; } /* 'ξ ' */ |
|
72 | .icon-true:before { content: '\e809'; } /* 'ξ ' */ | |
73 |
|
73 | |||
74 | .icon-comment:before { content: '\e80a'; } /* 'ξ ' */ |
|
74 | .icon-comment:before { content: '\e80a'; } /* 'ξ ' */ | |
75 | .icon-comment-add:before { content: '\e816'; } /* 'ξ ' */ |
|
75 | .icon-comment-add:before { content: '\e816'; } /* 'ξ ' */ | |
76 | .icon-comment_toggle:before { content: '\e818'; } /* 'ξ ' */ |
|
76 | .icon-comment_toggle:before { content: '\e818'; } /* 'ξ ' */ | |
77 |
|
77 | |||
78 | .icon-feed:before { content: '\e80b'; } /* 'ξ ' */ |
|
78 | .icon-feed:before { content: '\e80b'; } /* 'ξ ' */ | |
79 |
|
79 | |||
80 | .icon-right:before { content: '\e80c'; } /* 'ξ ' */ |
|
80 | .icon-right:before { content: '\e80c'; } /* 'ξ ' */ | |
81 | .icon-left:before { content: '\e80d'; } /* 'ξ ' */ |
|
81 | .icon-left:before { content: '\e80d'; } /* 'ξ ' */ | |
82 |
|
82 | |||
83 | .icon-arrow_down:before { content: '\e80e'; } /* 'ξ ' */ |
|
83 | .icon-arrow_down:before { content: '\e80e'; } /* 'ξ ' */ | |
84 | .icon-arrow_up:before { content: '\e80e'; } /* 'ξ ' */ |
|
84 | .icon-arrow_up:before { content: '\e80e'; } /* 'ξ ' */ | |
85 |
|
85 | |||
86 | .icon-group:before { content: '\e812'; } /* 'ξ ' */ |
|
86 | .icon-group:before { content: '\e812'; } /* 'ξ ' */ | |
87 |
|
87 | |||
88 | .icon-fork:before { content: '\e814'; } /* 'ξ ' */ |
|
88 | .icon-fork:before { content: '\e814'; } /* 'ξ ' */ | |
89 | .icon-merge:before { content: '\e814'; } /* 'ξ ' */ |
|
89 | .icon-merge:before { content: '\e814'; } /* 'ξ ' */ | |
90 |
|
90 | |||
91 | .icon-more:before { content: '\e815'; } /* 'ξ ' */ |
|
91 | .icon-more:before { content: '\e815'; } /* 'ξ ' */ | |
92 |
|
92 | |||
93 | .icon-more-linked { cursor: pointer; color: @grey3 } |
|
93 | .icon-more-linked { cursor: pointer; color: @grey3 } | |
94 | .icon-more-linked:before { content: '\e815'; } /* 'ξ ' */ |
|
94 | .icon-more-linked:before { content: '\e815'; } /* 'ξ ' */ | |
95 |
|
95 | |||
|
96 | .icon-expand-linked { cursor: pointer; color: @grey3; font-size: 8px } | |||
|
97 | .icon-expand-linked:before { content: '\e80e'; } /* 'ξ ' */ | |||
|
98 | ||||
96 | .icon-git-inv:before { content: '\e80f'; } /* 'ξ ' */ |
|
99 | .icon-git-inv:before { content: '\e80f'; } /* 'ξ ' */ | |
97 | .icon-hg-inv:before { content: '\e810'; } /* 'ξ ' */ |
|
100 | .icon-hg-inv:before { content: '\e810'; } /* 'ξ ' */ | |
98 | .icon-svn-inv:before { content: '\e811'; } /* 'ξ ' */ |
|
101 | .icon-svn-inv:before { content: '\e811'; } /* 'ξ ' */ | |
99 |
|
102 | |||
100 | .icon-git:before { content: '\e81a'; } /* 'ξ ' */ |
|
103 | .icon-git:before { content: '\e81a'; } /* 'ξ ' */ | |
101 | .icon-hg:before { content: '\e81b'; } /* 'ξ ' */ |
|
104 | .icon-hg:before { content: '\e81b'; } /* 'ξ ' */ | |
102 | .icon-svn:before { content: '\e820'; } /* 'ξ ' */ |
|
105 | .icon-svn:before { content: '\e820'; } /* 'ξ ' */ | |
103 |
|
106 | |||
104 | .icon-minus:before { content: '\e81c'; } /* 'ξ ' */ |
|
107 | .icon-minus:before { content: '\e81c'; } /* 'ξ ' */ | |
105 | .icon-plus:before { content: '\e81d'; } /* 'ξ ' */ |
|
108 | .icon-plus:before { content: '\e81d'; } /* 'ξ ' */ | |
106 | .icon-remove:before { content: '\e81e'; } /* 'ξ ' */ |
|
109 | .icon-remove:before { content: '\e81e'; } /* 'ξ ' */ | |
107 | .icon-remove-sign:before { content: '\e81e'; } /* 'ξ ' */ |
|
110 | .icon-remove-sign:before { content: '\e81e'; } /* 'ξ ' */ | |
108 |
|
111 | |||
109 | .icon-rhodecode:before { content: '\e81f'; } /* 'ξ ' */ |
|
112 | .icon-rhodecode:before { content: '\e81f'; } /* 'ξ ' */ | |
110 |
|
113 | |||
111 | .icon-tag:before { content: '\e821'; } /* 'ξ ‘' */ |
|
114 | .icon-tag:before { content: '\e821'; } /* 'ξ ‘' */ | |
112 | .icon-copy:before { content: '\f0c5'; } /* 'ο ' */ |
|
115 | .icon-copy:before { content: '\f0c5'; } /* 'ο ' */ | |
113 | .icon-clipboard:before { content: '\f0c5'; } /* 'ο ' */ |
|
116 | .icon-clipboard:before { content: '\f0c5'; } /* 'ο ' */ | |
114 |
|
117 | |||
115 |
|
118 | |||
116 | .icon-folder:before { content: '\e813'; } /* 'ξ ' */ |
|
119 | .icon-folder:before { content: '\e813'; } /* 'ξ ' */ | |
117 | .icon-folder-close:before { content: '\e813'; } /* 'ξ ' */ |
|
120 | .icon-folder-close:before { content: '\e813'; } /* 'ξ ' */ | |
118 |
|
121 | |||
119 | .icon-directory:before { content: '\e800'; } /* 'ξ ' */ |
|
122 | .icon-directory:before { content: '\e800'; } /* 'ξ ' */ | |
120 | .icon-directory-empty:before { content: '\f114'; } /* 'ο' */ |
|
123 | .icon-directory-empty:before { content: '\f114'; } /* 'ο' */ | |
121 | .icon-file-text:before { content: '\f0f6'; } /* 'οΆ' */ |
|
124 | .icon-file-text:before { content: '\f0f6'; } /* 'οΆ' */ | |
122 | .icon-file-text-inv:before { content: '\f15c'; } /* 'ο ' */ |
|
125 | .icon-file-text-inv:before { content: '\f15c'; } /* 'ο ' */ | |
123 | .icon-file-code:before { content: '\f1c9'; } /* 'ο' */ |
|
126 | .icon-file-code:before { content: '\f1c9'; } /* 'ο' */ | |
124 |
|
127 | |||
125 | // MERGED ICONS |
|
128 | // MERGED ICONS | |
126 |
|
129 | |||
127 | .icon-repo-private:before { &:extend(.icon-lock:before); } |
|
130 | .icon-repo-private:before { &:extend(.icon-lock:before); } | |
128 | .icon-repo-lock:before { &:extend(.icon-lock:before); } |
|
131 | .icon-repo-lock:before { &:extend(.icon-lock:before); } | |
129 | .icon-unlock-alt:before { &:extend(.icon-unlock:before); } |
|
132 | .icon-unlock-alt:before { &:extend(.icon-unlock:before); } | |
130 | .icon-repo-unlock:before { &:extend(.icon-unlock:before); } |
|
133 | .icon-repo-unlock:before { &:extend(.icon-unlock:before); } | |
131 | .icon-repo-public:before { &:extend(.icon-unlock:before); } |
|
134 | .icon-repo-public:before { &:extend(.icon-unlock:before); } | |
132 | .icon-rss-sign:before { &:extend(.icon-feed:before); } |
|
135 | .icon-rss-sign:before { &:extend(.icon-feed:before); } | |
133 | .icon-code-fork:before { &:extend(.icon-fork:before); } |
|
136 | .icon-code-fork:before { &:extend(.icon-fork:before); } | |
134 |
|
137 | |||
135 | // TRANSFORM |
|
138 | // TRANSFORM | |
136 | .icon-arrow_up:before {transform: rotate(180deg);} |
|
139 | .icon-arrow_up:before {transform: rotate(180deg);} | |
137 | .icon-merge:before {transform: rotate(180deg);} |
|
140 | .icon-merge:before {transform: rotate(180deg);} | |
138 |
|
141 | |||
139 | // -- END ICON CLASSES -- // |
|
142 | // -- END ICON CLASSES -- // | |
140 |
|
143 | |||
141 |
|
144 | |||
142 | //--- ICONS STYLING ------------------// |
|
145 | //--- ICONS STYLING ------------------// | |
143 |
|
146 | |||
144 | .icon-git { color: @color4 !important; } |
|
147 | .icon-git { color: @color4 !important; } | |
145 | .icon-hg { color: @color8 !important; } |
|
148 | .icon-hg { color: @color8 !important; } | |
146 | .icon-svn { color: @color1 !important; } |
|
149 | .icon-svn { color: @color1 !important; } | |
147 | .icon-git-inv { color: @color4 !important; } |
|
150 | .icon-git-inv { color: @color4 !important; } | |
148 | .icon-hg-inv { color: @color8 !important; } |
|
151 | .icon-hg-inv { color: @color8 !important; } | |
149 | .icon-svn-inv { color: @color1 !important; } |
|
152 | .icon-svn-inv { color: @color1 !important; } | |
150 | .icon-repo-lock { color: #FF0000; } |
|
153 | .icon-repo-lock { color: #FF0000; } | |
151 | .icon-repo-unlock { color: #FF0000; } |
|
154 | .icon-repo-unlock { color: #FF0000; } | |
152 |
|
155 | |||
153 | .repo-switcher-dropdown .select2-result-label { |
|
156 | .repo-switcher-dropdown .select2-result-label { | |
154 | .icon-git:before { |
|
157 | .icon-git:before { | |
155 | &:extend(.icon-git-transparent:before); |
|
158 | &:extend(.icon-git-transparent:before); | |
156 | } |
|
159 | } | |
157 | .icon-hg:before { |
|
160 | .icon-hg:before { | |
158 | &:extend(.icon-hg-transparent:before); |
|
161 | &:extend(.icon-hg-transparent:before); | |
159 | color: @alert4; |
|
162 | color: @alert4; | |
160 | } |
|
163 | } | |
161 | .icon-svn:before { |
|
164 | .icon-svn:before { | |
162 | &:extend(.icon-svn-transparent:before); |
|
165 | &:extend(.icon-svn-transparent:before); | |
163 | } |
|
166 | } | |
164 | } |
|
167 | } | |
165 |
|
168 | |||
166 | .icon-user-group:before { |
|
169 | .icon-user-group:before { | |
167 | &:extend(.icon-group:before); |
|
170 | &:extend(.icon-group:before); | |
168 | margin: 0; |
|
171 | margin: 0; | |
169 | font-size: 16px; |
|
172 | font-size: 16px; | |
170 | } |
|
173 | } |
@@ -1,152 +1,152 b'' | |||||
1 | ## small box that displays changed/added/removed details fetched by AJAX |
|
1 | ## small box that displays changed/added/removed details fetched by AJAX | |
2 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | <%namespace name="base" file="/base/base.mako"/> | |
3 |
|
3 | |||
4 |
|
4 | |||
5 | % if c.prev_page: |
|
5 | % if c.prev_page: | |
6 | <tr> |
|
6 | <tr> | |
7 | <td colspan="9" class="load-more-commits"> |
|
7 | <td colspan="9" class="load-more-commits"> | |
8 | <a class="prev-commits" href="#loadPrevCommits" onclick="commitsController.loadPrev(this, ${c.prev_page}, '${c.branch_name}', '${c.commit_id}', '${c.f_path}');return false"> |
|
8 | <a class="prev-commits" href="#loadPrevCommits" onclick="commitsController.loadPrev(this, ${c.prev_page}, '${c.branch_name}', '${c.commit_id}', '${c.f_path}');return false"> | |
9 | ${_('load previous')} |
|
9 | ${_('load previous')} | |
10 | </a> |
|
10 | </a> | |
11 | </td> |
|
11 | </td> | |
12 | </tr> |
|
12 | </tr> | |
13 | % endif |
|
13 | % endif | |
14 |
|
14 | |||
15 | ## to speed up lookups cache some functions before the loop |
|
15 | ## to speed up lookups cache some functions before the loop | |
16 | <% |
|
16 | <% | |
17 | active_patterns = h.get_active_pattern_entries(c.repo_name) |
|
17 | active_patterns = h.get_active_pattern_entries(c.repo_name) | |
18 | urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns) |
|
18 | urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns) | |
19 | %> |
|
19 | %> | |
20 |
|
20 | |||
21 | % for cnt,commit in enumerate(c.pagination): |
|
21 | % for cnt,commit in enumerate(c.pagination): | |
22 | <tr id="sha_${commit.raw_id}" class="changelogRow container ${'tablerow%s' % (cnt%2)}"> |
|
22 | <tr id="sha_${commit.raw_id}" class="changelogRow container ${'tablerow%s' % (cnt%2)}"> | |
23 |
|
23 | |||
24 | <td class="td-checkbox"> |
|
24 | <td class="td-checkbox"> | |
25 | ${h.checkbox(commit.raw_id,class_="commit-range")} |
|
25 | ${h.checkbox(commit.raw_id,class_="commit-range")} | |
26 | </td> |
|
26 | </td> | |
27 | <td class="td-status"> |
|
27 | <td class="td-status"> | |
28 |
|
28 | |||
29 | %if c.statuses.get(commit.raw_id): |
|
29 | %if c.statuses.get(commit.raw_id): | |
30 | <div class="changeset-status-ico"> |
|
30 | <div class="changeset-status-ico"> | |
31 | %if c.statuses.get(commit.raw_id)[2]: |
|
31 | %if c.statuses.get(commit.raw_id)[2]: | |
32 | <a class="tooltip" title="${_('Commit status: %s\nClick to open associated pull request #%s') % (h.commit_status_lbl(c.statuses.get(commit.raw_id)[0]), c.statuses.get(commit.raw_id)[2])}" href="${h.route_path('pullrequest_show',repo_name=c.statuses.get(commit.raw_id)[3],pull_request_id=c.statuses.get(commit.raw_id)[2])}"> |
|
32 | <a class="tooltip" title="${_('Commit status: %s\nClick to open associated pull request #%s') % (h.commit_status_lbl(c.statuses.get(commit.raw_id)[0]), c.statuses.get(commit.raw_id)[2])}" href="${h.route_path('pullrequest_show',repo_name=c.statuses.get(commit.raw_id)[3],pull_request_id=c.statuses.get(commit.raw_id)[2])}"> | |
33 | <div class="${'flag_status {}'.format(c.statuses.get(commit.raw_id)[0])}"></div> |
|
33 | <div class="${'flag_status {}'.format(c.statuses.get(commit.raw_id)[0])}"></div> | |
34 | </a> |
|
34 | </a> | |
35 | %else: |
|
35 | %else: | |
36 | <a class="tooltip" title="${_('Commit status: {}').format(h.commit_status_lbl(c.statuses.get(commit.raw_id)[0]))}" href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=commit.raw_id,_anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> |
|
36 | <a class="tooltip" title="${_('Commit status: {}').format(h.commit_status_lbl(c.statuses.get(commit.raw_id)[0]))}" href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=commit.raw_id,_anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> | |
37 | <div class="${'flag_status {}'.format(c.statuses.get(commit.raw_id)[0])}"></div> |
|
37 | <div class="${'flag_status {}'.format(c.statuses.get(commit.raw_id)[0])}"></div> | |
38 | </a> |
|
38 | </a> | |
39 | %endif |
|
39 | %endif | |
40 | </div> |
|
40 | </div> | |
41 | %else: |
|
41 | %else: | |
42 | <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div> |
|
42 | <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div> | |
43 | %endif |
|
43 | %endif | |
44 | </td> |
|
44 | </td> | |
45 | <td class="td-comments comments-col"> |
|
45 | <td class="td-comments comments-col"> | |
46 | %if c.comments.get(commit.raw_id): |
|
46 | %if c.comments.get(commit.raw_id): | |
47 | <a title="${_('Commit has comments')}" href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=commit.raw_id,_anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> |
|
47 | <a title="${_('Commit has comments')}" href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=commit.raw_id,_anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> | |
48 | <i class="icon-comment"></i> ${len(c.comments[commit.raw_id])} |
|
48 | <i class="icon-comment"></i> ${len(c.comments[commit.raw_id])} | |
49 | </a> |
|
49 | </a> | |
50 | %endif |
|
50 | %endif | |
51 | </td> |
|
51 | </td> | |
52 | <td class="td-hash"> |
|
52 | <td class="td-hash"> | |
53 | <code> |
|
53 | <code> | |
54 |
|
54 | |||
55 | <a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=commit.raw_id)}"> |
|
55 | <a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=commit.raw_id)}"> | |
56 | <span class="${'commit_hash obsolete' if getattr(commit, 'obsolete', None) else 'commit_hash'}">${h.show_id(commit)}</span> |
|
56 | <span class="${'commit_hash obsolete' if getattr(commit, 'obsolete', None) else 'commit_hash'}">${h.show_id(commit)}</span> | |
57 | </a> |
|
57 | </a> | |
58 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${commit.raw_id}" title="${_('Copy the full commit id')}"></i> |
|
58 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${commit.raw_id}" title="${_('Copy the full commit id')}"></i> | |
59 | </code> |
|
59 | </code> | |
60 | </td> |
|
60 | </td> | |
61 | <td class="td-tags tags-col"> |
|
61 | <td class="td-tags tags-col"> | |
62 | ## phase |
|
62 | ## phase | |
63 | % if hasattr(commit, 'phase'): |
|
63 | % if hasattr(commit, 'phase'): | |
64 | % if commit.phase != 'public': |
|
64 | % if commit.phase != 'public': | |
65 | <span class="tag phase-${commit.phase} tooltip" title="${_('Commit phase')}">${commit.phase}</span> |
|
65 | <span class="tag phase-${commit.phase} tooltip" title="${_('Commit phase')}">${commit.phase}</span> | |
66 | % endif |
|
66 | % endif | |
67 | % endif |
|
67 | % endif | |
68 |
|
68 | |||
69 | ## obsolete commits |
|
69 | ## obsolete commits | |
70 | % if hasattr(commit, 'obsolete'): |
|
70 | % if hasattr(commit, 'obsolete'): | |
71 | % if commit.obsolete: |
|
71 | % if commit.obsolete: | |
72 | <span class="tag obsolete-${commit.obsolete} tooltip" title="${_('Evolve State')}">${_('obsolete')}</span> |
|
72 | <span class="tag obsolete-${commit.obsolete} tooltip" title="${_('Evolve State')}">${_('obsolete')}</span> | |
73 | % endif |
|
73 | % endif | |
74 | % endif |
|
74 | % endif | |
75 |
|
75 | |||
76 | ## hidden commits |
|
76 | ## hidden commits | |
77 | % if hasattr(commit, 'hidden'): |
|
77 | % if hasattr(commit, 'hidden'): | |
78 | % if commit.hidden: |
|
78 | % if commit.hidden: | |
79 | <span class="tag obsolete-${commit.hidden} tooltip" title="${_('Evolve State')}">${_('hidden')}</span> |
|
79 | <span class="tag obsolete-${commit.hidden} tooltip" title="${_('Evolve State')}">${_('hidden')}</span> | |
80 | % endif |
|
80 | % endif | |
81 | % endif |
|
81 | % endif | |
82 | </td> |
|
82 | </td> | |
83 | <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}" onclick="commitsController.expandCommit(this); return false"> |
|
83 | <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}" onclick="commitsController.expandCommit(this); return false"> | |
84 | <div class="show_more_col"> |
|
84 | <div class="show_more_col"> | |
85 |
<i class="icon- |
|
85 | <i class="icon-expand-linked"></i> | |
86 | </div> |
|
86 | </div> | |
87 | </td> |
|
87 | </td> | |
88 | <td class="td-description mid"> |
|
88 | <td class="td-description mid"> | |
89 | <div class="log-container truncate-wrap"> |
|
89 | <div class="log-container truncate-wrap"> | |
90 | <div class="message truncate" id="c-${commit.raw_id}">${urlify_commit_message(commit.message, c.repo_name)}</div> |
|
90 | <div class="message truncate" id="c-${commit.raw_id}">${urlify_commit_message(commit.message, c.repo_name)}</div> | |
91 | </div> |
|
91 | </div> | |
92 | </td> |
|
92 | </td> | |
93 |
|
93 | |||
94 | <td class="td-time"> |
|
94 | <td class="td-time"> | |
95 | ${h.age_component(commit.date)} |
|
95 | ${h.age_component(commit.date)} | |
96 | </td> |
|
96 | </td> | |
97 | <td class="td-user"> |
|
97 | <td class="td-user"> | |
98 | ${base.gravatar_with_user(commit.author)} |
|
98 | ${base.gravatar_with_user(commit.author)} | |
99 | </td> |
|
99 | </td> | |
100 |
|
100 | |||
101 | <td class="td-tags tags-col"> |
|
101 | <td class="td-tags tags-col"> | |
102 | <div id="t-${commit.raw_id}"> |
|
102 | <div id="t-${commit.raw_id}"> | |
103 |
|
103 | |||
104 | ## merge |
|
104 | ## merge | |
105 | %if commit.merge: |
|
105 | %if commit.merge: | |
106 | <span class="tag mergetag"> |
|
106 | <span class="tag mergetag"> | |
107 | <i class="icon-merge"></i>${_('merge')} |
|
107 | <i class="icon-merge"></i>${_('merge')} | |
108 | </span> |
|
108 | </span> | |
109 | %endif |
|
109 | %endif | |
110 |
|
110 | |||
111 | ## branch |
|
111 | ## branch | |
112 | %if commit.branch: |
|
112 | %if commit.branch: | |
113 | <span class="tag branchtag" title="${h.tooltip(_('Branch %s') % commit.branch)}"> |
|
113 | <span class="tag branchtag" title="${h.tooltip(_('Branch %s') % commit.branch)}"> | |
114 | <a href="${h.route_path('repo_changelog',repo_name=c.repo_name,_query=dict(branch=commit.branch))}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a> |
|
114 | <a href="${h.route_path('repo_changelog',repo_name=c.repo_name,_query=dict(branch=commit.branch))}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a> | |
115 | </span> |
|
115 | </span> | |
116 | %endif |
|
116 | %endif | |
117 |
|
117 | |||
118 | ## bookmarks |
|
118 | ## bookmarks | |
119 | %if h.is_hg(c.rhodecode_repo): |
|
119 | %if h.is_hg(c.rhodecode_repo): | |
120 | %for book in commit.bookmarks: |
|
120 | %for book in commit.bookmarks: | |
121 | <span class="tag booktag" title="${h.tooltip(_('Bookmark %s') % book)}"> |
|
121 | <span class="tag booktag" title="${h.tooltip(_('Bookmark %s') % book)}"> | |
122 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=commit.raw_id, _query=dict(at=book))}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> |
|
122 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=commit.raw_id, _query=dict(at=book))}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> | |
123 | </span> |
|
123 | </span> | |
124 | %endfor |
|
124 | %endfor | |
125 | %endif |
|
125 | %endif | |
126 |
|
126 | |||
127 | ## tags |
|
127 | ## tags | |
128 | %for tag in commit.tags: |
|
128 | %for tag in commit.tags: | |
129 | <span class="tag tagtag" title="${h.tooltip(_('Tag %s') % tag)}"> |
|
129 | <span class="tag tagtag" title="${h.tooltip(_('Tag %s') % tag)}"> | |
130 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=commit.raw_id, _query=dict(at=tag))}"><i class="icon-tag"></i>${h.shorter(tag)}</a> |
|
130 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=commit.raw_id, _query=dict(at=tag))}"><i class="icon-tag"></i>${h.shorter(tag)}</a> | |
131 | </span> |
|
131 | </span> | |
132 | %endfor |
|
132 | %endfor | |
133 |
|
133 | |||
134 | </div> |
|
134 | </div> | |
135 | </td> |
|
135 | </td> | |
136 | </tr> |
|
136 | </tr> | |
137 | % endfor |
|
137 | % endfor | |
138 |
|
138 | |||
139 | % if c.next_page: |
|
139 | % if c.next_page: | |
140 | <tr> |
|
140 | <tr> | |
141 | <td colspan="10" class="load-more-commits"> |
|
141 | <td colspan="10" class="load-more-commits"> | |
142 | <a class="next-commits" href="#loadNextCommits" onclick="commitsController.loadNext(this, ${c.next_page}, '${c.branch_name}', '${c.commit_id}', '${c.f_path}');return false"> |
|
142 | <a class="next-commits" href="#loadNextCommits" onclick="commitsController.loadNext(this, ${c.next_page}, '${c.branch_name}', '${c.commit_id}', '${c.f_path}');return false"> | |
143 | ${_('load next')} |
|
143 | ${_('load next')} | |
144 | </a> |
|
144 | </a> | |
145 | </td> |
|
145 | </td> | |
146 | </tr> |
|
146 | </tr> | |
147 | % endif |
|
147 | % endif | |
148 | <tr class="chunk-graph-data" style="display:none" |
|
148 | <tr class="chunk-graph-data" style="display:none" | |
149 | data-graph='${c.graph_data|n}' |
|
149 | data-graph='${c.graph_data|n}' | |
150 | data-node='${c.prev_page}:${c.next_page}' |
|
150 | data-node='${c.prev_page}:${c.next_page}' | |
151 | data-commits='${c.graph_commits|n}'> |
|
151 | data-commits='${c.graph_commits|n}'> | |
152 | </tr> No newline at end of file |
|
152 | </tr> |
@@ -1,117 +1,117 b'' | |||||
1 | ## Changesets table ! |
|
1 | ## Changesets table ! | |
2 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | <%namespace name="base" file="/base/base.mako"/> | |
3 |
|
3 | |||
4 | %if c.ancestor: |
|
4 | %if c.ancestor: | |
5 | <div class="ancestor">${_('Common Ancestor Commit')}: |
|
5 | <div class="ancestor">${_('Common Ancestor Commit')}: | |
6 | <a href="${h.route_path('repo_commit', repo_name=c.repo_name, commit_id=c.ancestor)}"> |
|
6 | <a href="${h.route_path('repo_commit', repo_name=c.repo_name, commit_id=c.ancestor)}"> | |
7 | ${h.short_id(c.ancestor)} |
|
7 | ${h.short_id(c.ancestor)} | |
8 | </a>. ${_('Compare was calculated based on this shared commit.')} |
|
8 | </a>. ${_('Compare was calculated based on this shared commit.')} | |
9 | <input id="common_ancestor" type="hidden" name="common_ancestor" value="${c.ancestor}"> |
|
9 | <input id="common_ancestor" type="hidden" name="common_ancestor" value="${c.ancestor}"> | |
10 | </div> |
|
10 | </div> | |
11 | %endif |
|
11 | %endif | |
12 |
|
12 | |||
13 | <div class="container"> |
|
13 | <div class="container"> | |
14 | <input type="hidden" name="__start__" value="revisions:sequence"> |
|
14 | <input type="hidden" name="__start__" value="revisions:sequence"> | |
15 | <table class="rctable compare_view_commits"> |
|
15 | <table class="rctable compare_view_commits"> | |
16 | <tr> |
|
16 | <tr> | |
17 | <th>${_('Time')}</th> |
|
17 | <th>${_('Time')}</th> | |
18 | <th>${_('Author')}</th> |
|
18 | <th>${_('Author')}</th> | |
19 | <th>${_('Commit')}</th> |
|
19 | <th>${_('Commit')}</th> | |
20 | <th></th> |
|
20 | <th></th> | |
21 | <th>${_('Description')}</th> |
|
21 | <th>${_('Description')}</th> | |
22 | </tr> |
|
22 | </tr> | |
23 | ## to speed up lookups cache some functions before the loop |
|
23 | ## to speed up lookups cache some functions before the loop | |
24 | <% |
|
24 | <% | |
25 | active_patterns = h.get_active_pattern_entries(c.repo_name) |
|
25 | active_patterns = h.get_active_pattern_entries(c.repo_name) | |
26 | urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns) |
|
26 | urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns) | |
27 | %> |
|
27 | %> | |
28 | %for commit in c.commit_ranges: |
|
28 | %for commit in c.commit_ranges: | |
29 | <tr id="row-${commit.raw_id}" |
|
29 | <tr id="row-${commit.raw_id}" | |
30 | commit_id="${commit.raw_id}" |
|
30 | commit_id="${commit.raw_id}" | |
31 | class="compare_select" |
|
31 | class="compare_select" | |
32 | style="${'display: none' if c.collapse_all_commits else ''}" |
|
32 | style="${'display: none' if c.collapse_all_commits else ''}" | |
33 | > |
|
33 | > | |
34 | <td class="td-time"> |
|
34 | <td class="td-time"> | |
35 | ${h.age_component(commit.date)} |
|
35 | ${h.age_component(commit.date)} | |
36 | </td> |
|
36 | </td> | |
37 | <td class="td-user"> |
|
37 | <td class="td-user"> | |
38 | ${base.gravatar_with_user(commit.author, 16)} |
|
38 | ${base.gravatar_with_user(commit.author, 16)} | |
39 | </td> |
|
39 | </td> | |
40 | <td class="td-hash"> |
|
40 | <td class="td-hash"> | |
41 | <code> |
|
41 | <code> | |
42 | <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=commit.raw_id)}"> |
|
42 | <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=commit.raw_id)}"> | |
43 | r${commit.idx}:${h.short_id(commit.raw_id)} |
|
43 | r${commit.idx}:${h.short_id(commit.raw_id)} | |
44 | </a> |
|
44 | </a> | |
45 | ${h.hidden('revisions',commit.raw_id)} |
|
45 | ${h.hidden('revisions',commit.raw_id)} | |
46 | </code> |
|
46 | </code> | |
47 | </td> |
|
47 | </td> | |
48 | <td class="expand_commit" |
|
48 | <td class="expand_commit" | |
49 | data-commit-id="${commit.raw_id}" |
|
49 | data-commit-id="${commit.raw_id}" | |
50 | title="${_( 'Expand commit message')}" |
|
50 | title="${_( 'Expand commit message')}" | |
51 | > |
|
51 | > | |
52 | <div class="show_more_col"> |
|
52 | <div class="show_more_col"> | |
53 |
<i class="icon- |
|
53 | <i class="icon-expand-linked"></i> | |
54 | </div> |
|
54 | </div> | |
55 | </td> |
|
55 | </td> | |
56 | <td class="mid td-description"> |
|
56 | <td class="mid td-description"> | |
57 | <div class="log-container truncate-wrap"> |
|
57 | <div class="log-container truncate-wrap"> | |
58 | <div |
|
58 | <div | |
59 | id="c-${commit.raw_id}" |
|
59 | id="c-${commit.raw_id}" | |
60 | class="message truncate" |
|
60 | class="message truncate" | |
61 | data-message-raw="${commit.message}" |
|
61 | data-message-raw="${commit.message}" | |
62 | > |
|
62 | > | |
63 | ${urlify_commit_message(commit.message, c.repo_name)} |
|
63 | ${urlify_commit_message(commit.message, c.repo_name)} | |
64 | </div> |
|
64 | </div> | |
65 | </div> |
|
65 | </div> | |
66 | </td> |
|
66 | </td> | |
67 | </tr> |
|
67 | </tr> | |
68 | %endfor |
|
68 | %endfor | |
69 | <tr class="compare_select_hidden" style="${'' if c.collapse_all_commits else 'display: none'}"> |
|
69 | <tr class="compare_select_hidden" style="${'' if c.collapse_all_commits else 'display: none'}"> | |
70 | <td colspan="5"> |
|
70 | <td colspan="5"> | |
71 | ${_ungettext('%s commit hidden','%s commits hidden', len(c.commit_ranges)) % len(c.commit_ranges)}, |
|
71 | ${_ungettext('%s commit hidden','%s commits hidden', len(c.commit_ranges)) % len(c.commit_ranges)}, | |
72 | <a href="#" onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false">${_ungettext('show it','show them', len(c.commit_ranges))}</a> |
|
72 | <a href="#" onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false">${_ungettext('show it','show them', len(c.commit_ranges))}</a> | |
73 | </td> |
|
73 | </td> | |
74 | </tr> |
|
74 | </tr> | |
75 | % if not c.commit_ranges: |
|
75 | % if not c.commit_ranges: | |
76 | <tr class="compare_select"> |
|
76 | <tr class="compare_select"> | |
77 | <td colspan="5"> |
|
77 | <td colspan="5"> | |
78 | ${_('No commits in this compare')} |
|
78 | ${_('No commits in this compare')} | |
79 | </td> |
|
79 | </td> | |
80 | </tr> |
|
80 | </tr> | |
81 | % endif |
|
81 | % endif | |
82 | </table> |
|
82 | </table> | |
83 | <input type="hidden" name="__end__" value="revisions:sequence"> |
|
83 | <input type="hidden" name="__end__" value="revisions:sequence"> | |
84 |
|
84 | |||
85 | </div> |
|
85 | </div> | |
86 |
|
86 | |||
87 | <script> |
|
87 | <script> | |
88 | $('.expand_commit').on('click',function(e){ |
|
88 | $('.expand_commit').on('click',function(e){ | |
89 | var target_expand = $(this); |
|
89 | var target_expand = $(this); | |
90 | var cid = target_expand.data('commitId'); |
|
90 | var cid = target_expand.data('commitId'); | |
91 |
|
91 | |||
92 | // ## TODO: dan: extract styles into css, and just toggleClass('open') here |
|
92 | // ## TODO: dan: extract styles into css, and just toggleClass('open') here | |
93 | if (target_expand.hasClass('open')){ |
|
93 | if (target_expand.hasClass('open')){ | |
94 | $('#c-'+cid).css({ |
|
94 | $('#c-'+cid).css({ | |
95 | 'height': '1.5em', |
|
95 | 'height': '1.5em', | |
96 | 'white-space': 'nowrap', |
|
96 | 'white-space': 'nowrap', | |
97 | 'text-overflow': 'ellipsis', |
|
97 | 'text-overflow': 'ellipsis', | |
98 | 'overflow':'hidden' |
|
98 | 'overflow':'hidden' | |
99 | }); |
|
99 | }); | |
100 | target_expand.removeClass('open'); |
|
100 | target_expand.removeClass('open'); | |
101 | } |
|
101 | } | |
102 | else { |
|
102 | else { | |
103 | $('#c-'+cid).css({ |
|
103 | $('#c-'+cid).css({ | |
104 | 'height': 'auto', |
|
104 | 'height': 'auto', | |
105 | 'white-space': 'pre-line', |
|
105 | 'white-space': 'pre-line', | |
106 | 'text-overflow': 'initial', |
|
106 | 'text-overflow': 'initial', | |
107 | 'overflow':'visible' |
|
107 | 'overflow':'visible' | |
108 | }); |
|
108 | }); | |
109 | target_expand.addClass('open'); |
|
109 | target_expand.addClass('open'); | |
110 | } |
|
110 | } | |
111 | }); |
|
111 | }); | |
112 |
|
112 | |||
113 | $('.compare_select').on('click',function(e){ |
|
113 | $('.compare_select').on('click',function(e){ | |
114 | var cid = $(this).attr('commit_id'); |
|
114 | var cid = $(this).attr('commit_id'); | |
115 | $('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl')); |
|
115 | $('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl')); | |
116 | }); |
|
116 | }); | |
117 | </script> |
|
117 | </script> |
@@ -1,874 +1,874 b'' | |||||
1 | <%inherit file="/base/base.mako"/> |
|
1 | <%inherit file="/base/base.mako"/> | |
2 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | <%namespace name="base" file="/base/base.mako"/> | |
3 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
3 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> | |
4 |
|
4 | |||
5 | <%def name="title()"> |
|
5 | <%def name="title()"> | |
6 | ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} |
|
6 | ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} | |
7 | %if c.rhodecode_name: |
|
7 | %if c.rhodecode_name: | |
8 | · ${h.branding(c.rhodecode_name)} |
|
8 | · ${h.branding(c.rhodecode_name)} | |
9 | %endif |
|
9 | %endif | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="breadcrumbs_links()"> |
|
12 | <%def name="breadcrumbs_links()"> | |
13 | <span id="pr-title"> |
|
13 | <span id="pr-title"> | |
14 | ${c.pull_request.title} |
|
14 | ${c.pull_request.title} | |
15 | %if c.pull_request.is_closed(): |
|
15 | %if c.pull_request.is_closed(): | |
16 | (${_('Closed')}) |
|
16 | (${_('Closed')}) | |
17 | %endif |
|
17 | %endif | |
18 | </span> |
|
18 | </span> | |
19 | <div id="pr-title-edit" class="input" style="display: none;"> |
|
19 | <div id="pr-title-edit" class="input" style="display: none;"> | |
20 | ${h.text('pullrequest_title', id_="pr-title-input", class_="large", value=c.pull_request.title)} |
|
20 | ${h.text('pullrequest_title', id_="pr-title-input", class_="large", value=c.pull_request.title)} | |
21 | </div> |
|
21 | </div> | |
22 | </%def> |
|
22 | </%def> | |
23 |
|
23 | |||
24 | <%def name="menu_bar_nav()"> |
|
24 | <%def name="menu_bar_nav()"> | |
25 | ${self.menu_items(active='repositories')} |
|
25 | ${self.menu_items(active='repositories')} | |
26 | </%def> |
|
26 | </%def> | |
27 |
|
27 | |||
28 | <%def name="menu_bar_subnav()"> |
|
28 | <%def name="menu_bar_subnav()"> | |
29 | ${self.repo_menu(active='showpullrequest')} |
|
29 | ${self.repo_menu(active='showpullrequest')} | |
30 | </%def> |
|
30 | </%def> | |
31 |
|
31 | |||
32 | <%def name="main()"> |
|
32 | <%def name="main()"> | |
33 |
|
33 | |||
34 | <script type="text/javascript"> |
|
34 | <script type="text/javascript"> | |
35 | // TODO: marcink switch this to pyroutes |
|
35 | // TODO: marcink switch this to pyroutes | |
36 | AJAX_COMMENT_DELETE_URL = "${h.route_path('pullrequest_comment_delete',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id,comment_id='__COMMENT_ID__')}"; |
|
36 | AJAX_COMMENT_DELETE_URL = "${h.route_path('pullrequest_comment_delete',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id,comment_id='__COMMENT_ID__')}"; | |
37 | templateContext.pull_request_data.pull_request_id = ${c.pull_request.pull_request_id}; |
|
37 | templateContext.pull_request_data.pull_request_id = ${c.pull_request.pull_request_id}; | |
38 | </script> |
|
38 | </script> | |
39 | <div class="box"> |
|
39 | <div class="box"> | |
40 |
|
40 | |||
41 | <div class="title"> |
|
41 | <div class="title"> | |
42 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
42 | ${self.repo_page_title(c.rhodecode_db_repo)} | |
43 | </div> |
|
43 | </div> | |
44 |
|
44 | |||
45 | ${self.breadcrumbs()} |
|
45 | ${self.breadcrumbs()} | |
46 |
|
46 | |||
47 | <div class="box pr-summary"> |
|
47 | <div class="box pr-summary"> | |
48 |
|
48 | |||
49 | <div class="summary-details block-left"> |
|
49 | <div class="summary-details block-left"> | |
50 | <% summary = lambda n:{False:'summary-short'}.get(n) %> |
|
50 | <% summary = lambda n:{False:'summary-short'}.get(n) %> | |
51 | <div class="pr-details-title"> |
|
51 | <div class="pr-details-title"> | |
52 | <a href="${h.route_path('pull_requests_global', pull_request_id=c.pull_request.pull_request_id)}">${_('Pull request #%s') % c.pull_request.pull_request_id}</a> ${_('From')} ${h.format_date(c.pull_request.created_on)} |
|
52 | <a href="${h.route_path('pull_requests_global', pull_request_id=c.pull_request.pull_request_id)}">${_('Pull request #%s') % c.pull_request.pull_request_id}</a> ${_('From')} ${h.format_date(c.pull_request.created_on)} | |
53 | %if c.allowed_to_update: |
|
53 | %if c.allowed_to_update: | |
54 | <div id="delete_pullrequest" class="pull-right action_button ${'' if c.allowed_to_delete else 'disabled' }" style="clear:inherit;padding: 0"> |
|
54 | <div id="delete_pullrequest" class="pull-right action_button ${'' if c.allowed_to_delete else 'disabled' }" style="clear:inherit;padding: 0"> | |
55 | % if c.allowed_to_delete: |
|
55 | % if c.allowed_to_delete: | |
56 | ${h.secure_form(h.route_path('pullrequest_delete', repo_name=c.pull_request.target_repo.repo_name, pull_request_id=c.pull_request.pull_request_id), request=request)} |
|
56 | ${h.secure_form(h.route_path('pullrequest_delete', repo_name=c.pull_request.target_repo.repo_name, pull_request_id=c.pull_request.pull_request_id), request=request)} | |
57 | ${h.submit('remove_%s' % c.pull_request.pull_request_id, _('Delete'), |
|
57 | ${h.submit('remove_%s' % c.pull_request.pull_request_id, _('Delete'), | |
58 | class_="btn btn-link btn-danger no-margin",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} |
|
58 | class_="btn btn-link btn-danger no-margin",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} | |
59 | ${h.end_form()} |
|
59 | ${h.end_form()} | |
60 | % else: |
|
60 | % else: | |
61 | ${_('Delete')} |
|
61 | ${_('Delete')} | |
62 | % endif |
|
62 | % endif | |
63 | </div> |
|
63 | </div> | |
64 | <div id="open_edit_pullrequest" class="pull-right action_button">${_('Edit')}</div> |
|
64 | <div id="open_edit_pullrequest" class="pull-right action_button">${_('Edit')}</div> | |
65 | <div id="close_edit_pullrequest" class="pull-right action_button" style="display: none;padding: 0">${_('Cancel')}</div> |
|
65 | <div id="close_edit_pullrequest" class="pull-right action_button" style="display: none;padding: 0">${_('Cancel')}</div> | |
66 | %endif |
|
66 | %endif | |
67 | </div> |
|
67 | </div> | |
68 |
|
68 | |||
69 | <div id="summary" class="fields pr-details-content"> |
|
69 | <div id="summary" class="fields pr-details-content"> | |
70 | <div class="field"> |
|
70 | <div class="field"> | |
71 | <div class="label-summary"> |
|
71 | <div class="label-summary"> | |
72 | <label>${_('Source')}:</label> |
|
72 | <label>${_('Source')}:</label> | |
73 | </div> |
|
73 | </div> | |
74 | <div class="input"> |
|
74 | <div class="input"> | |
75 | <div class="pr-origininfo"> |
|
75 | <div class="pr-origininfo"> | |
76 | ## branch link is only valid if it is a branch |
|
76 | ## branch link is only valid if it is a branch | |
77 | <span class="tag"> |
|
77 | <span class="tag"> | |
78 | %if c.pull_request.source_ref_parts.type == 'branch': |
|
78 | %if c.pull_request.source_ref_parts.type == 'branch': | |
79 | <a href="${h.route_path('repo_changelog', repo_name=c.pull_request.source_repo.repo_name, _query=dict(branch=c.pull_request.source_ref_parts.name))}">${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name}</a> |
|
79 | <a href="${h.route_path('repo_changelog', repo_name=c.pull_request.source_repo.repo_name, _query=dict(branch=c.pull_request.source_ref_parts.name))}">${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name}</a> | |
80 | %else: |
|
80 | %else: | |
81 | ${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name} |
|
81 | ${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name} | |
82 | %endif |
|
82 | %endif | |
83 | </span> |
|
83 | </span> | |
84 | <span class="clone-url"> |
|
84 | <span class="clone-url"> | |
85 | <a href="${h.route_path('repo_summary', repo_name=c.pull_request.source_repo.repo_name)}">${c.pull_request.source_repo.clone_url()}</a> |
|
85 | <a href="${h.route_path('repo_summary', repo_name=c.pull_request.source_repo.repo_name)}">${c.pull_request.source_repo.clone_url()}</a> | |
86 | </span> |
|
86 | </span> | |
87 | <br/> |
|
87 | <br/> | |
88 | % if c.ancestor_commit: |
|
88 | % if c.ancestor_commit: | |
89 | ${_('Common ancestor')}: |
|
89 | ${_('Common ancestor')}: | |
90 | <code><a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=c.ancestor_commit.raw_id)}">${h.show_id(c.ancestor_commit)}</a></code> |
|
90 | <code><a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=c.ancestor_commit.raw_id)}">${h.show_id(c.ancestor_commit)}</a></code> | |
91 | % endif |
|
91 | % endif | |
92 | </div> |
|
92 | </div> | |
93 | %if h.is_hg(c.pull_request.source_repo): |
|
93 | %if h.is_hg(c.pull_request.source_repo): | |
94 | <% clone_url = 'hg pull -r {} {}'.format(h.short_id(c.source_ref), c.pull_request.source_repo.clone_url()) %> |
|
94 | <% clone_url = 'hg pull -r {} {}'.format(h.short_id(c.source_ref), c.pull_request.source_repo.clone_url()) %> | |
95 | %elif h.is_git(c.pull_request.source_repo): |
|
95 | %elif h.is_git(c.pull_request.source_repo): | |
96 | <% clone_url = 'git pull {} {}'.format(c.pull_request.source_repo.clone_url(), c.pull_request.source_ref_parts.name) %> |
|
96 | <% clone_url = 'git pull {} {}'.format(c.pull_request.source_repo.clone_url(), c.pull_request.source_ref_parts.name) %> | |
97 | %endif |
|
97 | %endif | |
98 |
|
98 | |||
99 | <div class=""> |
|
99 | <div class=""> | |
100 | <input type="text" class="input-monospace pr-pullinfo" value="${clone_url}" readonly="readonly"> |
|
100 | <input type="text" class="input-monospace pr-pullinfo" value="${clone_url}" readonly="readonly"> | |
101 | <i class="tooltip icon-clipboard clipboard-action pull-right pr-pullinfo-copy" data-clipboard-text="${clone_url}" title="${_('Copy the pull url')}"></i> |
|
101 | <i class="tooltip icon-clipboard clipboard-action pull-right pr-pullinfo-copy" data-clipboard-text="${clone_url}" title="${_('Copy the pull url')}"></i> | |
102 | </div> |
|
102 | </div> | |
103 |
|
103 | |||
104 | </div> |
|
104 | </div> | |
105 | </div> |
|
105 | </div> | |
106 | <div class="field"> |
|
106 | <div class="field"> | |
107 | <div class="label-summary"> |
|
107 | <div class="label-summary"> | |
108 | <label>${_('Target')}:</label> |
|
108 | <label>${_('Target')}:</label> | |
109 | </div> |
|
109 | </div> | |
110 | <div class="input"> |
|
110 | <div class="input"> | |
111 | <div class="pr-targetinfo"> |
|
111 | <div class="pr-targetinfo"> | |
112 | ## branch link is only valid if it is a branch |
|
112 | ## branch link is only valid if it is a branch | |
113 | <span class="tag"> |
|
113 | <span class="tag"> | |
114 | %if c.pull_request.target_ref_parts.type == 'branch': |
|
114 | %if c.pull_request.target_ref_parts.type == 'branch': | |
115 | <a href="${h.route_path('repo_changelog', repo_name=c.pull_request.target_repo.repo_name, _query=dict(branch=c.pull_request.target_ref_parts.name))}">${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name}</a> |
|
115 | <a href="${h.route_path('repo_changelog', repo_name=c.pull_request.target_repo.repo_name, _query=dict(branch=c.pull_request.target_ref_parts.name))}">${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name}</a> | |
116 | %else: |
|
116 | %else: | |
117 | ${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name} |
|
117 | ${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name} | |
118 | %endif |
|
118 | %endif | |
119 | </span> |
|
119 | </span> | |
120 | <span class="clone-url"> |
|
120 | <span class="clone-url"> | |
121 | <a href="${h.route_path('repo_summary', repo_name=c.pull_request.target_repo.repo_name)}">${c.pull_request.target_repo.clone_url()}</a> |
|
121 | <a href="${h.route_path('repo_summary', repo_name=c.pull_request.target_repo.repo_name)}">${c.pull_request.target_repo.clone_url()}</a> | |
122 | </span> |
|
122 | </span> | |
123 | </div> |
|
123 | </div> | |
124 | </div> |
|
124 | </div> | |
125 | </div> |
|
125 | </div> | |
126 |
|
126 | |||
127 | ## Link to the shadow repository. |
|
127 | ## Link to the shadow repository. | |
128 | <div class="field"> |
|
128 | <div class="field"> | |
129 | <div class="label-summary"> |
|
129 | <div class="label-summary"> | |
130 | <label>${_('Merge')}:</label> |
|
130 | <label>${_('Merge')}:</label> | |
131 | </div> |
|
131 | </div> | |
132 | <div class="input"> |
|
132 | <div class="input"> | |
133 | % if not c.pull_request.is_closed() and c.pull_request.shadow_merge_ref: |
|
133 | % if not c.pull_request.is_closed() and c.pull_request.shadow_merge_ref: | |
134 | %if h.is_hg(c.pull_request.target_repo): |
|
134 | %if h.is_hg(c.pull_request.target_repo): | |
135 | <% clone_url = 'hg clone --update {} {} pull-request-{}'.format(c.pull_request.shadow_merge_ref.name, c.shadow_clone_url, c.pull_request.pull_request_id) %> |
|
135 | <% clone_url = 'hg clone --update {} {} pull-request-{}'.format(c.pull_request.shadow_merge_ref.name, c.shadow_clone_url, c.pull_request.pull_request_id) %> | |
136 | %elif h.is_git(c.pull_request.target_repo): |
|
136 | %elif h.is_git(c.pull_request.target_repo): | |
137 | <% clone_url = 'git clone --branch {} {} pull-request-{}'.format(c.pull_request.shadow_merge_ref.name, c.shadow_clone_url, c.pull_request.pull_request_id) %> |
|
137 | <% clone_url = 'git clone --branch {} {} pull-request-{}'.format(c.pull_request.shadow_merge_ref.name, c.shadow_clone_url, c.pull_request.pull_request_id) %> | |
138 | %endif |
|
138 | %endif | |
139 | <div class=""> |
|
139 | <div class=""> | |
140 | <input type="text" class="input-monospace pr-mergeinfo" value="${clone_url}" readonly="readonly"> |
|
140 | <input type="text" class="input-monospace pr-mergeinfo" value="${clone_url}" readonly="readonly"> | |
141 | <i class="tooltip icon-clipboard clipboard-action pull-right pr-mergeinfo-copy" data-clipboard-text="${clone_url}" title="${_('Copy the clone url')}"></i> |
|
141 | <i class="tooltip icon-clipboard clipboard-action pull-right pr-mergeinfo-copy" data-clipboard-text="${clone_url}" title="${_('Copy the clone url')}"></i> | |
142 | </div> |
|
142 | </div> | |
143 | % else: |
|
143 | % else: | |
144 | <div class=""> |
|
144 | <div class=""> | |
145 | ${_('Shadow repository data not available')}. |
|
145 | ${_('Shadow repository data not available')}. | |
146 | </div> |
|
146 | </div> | |
147 | % endif |
|
147 | % endif | |
148 | </div> |
|
148 | </div> | |
149 | </div> |
|
149 | </div> | |
150 |
|
150 | |||
151 | <div class="field"> |
|
151 | <div class="field"> | |
152 | <div class="label-summary"> |
|
152 | <div class="label-summary"> | |
153 | <label>${_('Review')}:</label> |
|
153 | <label>${_('Review')}:</label> | |
154 | </div> |
|
154 | </div> | |
155 | <div class="input"> |
|
155 | <div class="input"> | |
156 | %if c.pull_request_review_status: |
|
156 | %if c.pull_request_review_status: | |
157 | <div class="${'flag_status %s' % c.pull_request_review_status} tooltip pull-left"></div> |
|
157 | <div class="${'flag_status %s' % c.pull_request_review_status} tooltip pull-left"></div> | |
158 | <span class="changeset-status-lbl tooltip"> |
|
158 | <span class="changeset-status-lbl tooltip"> | |
159 | %if c.pull_request.is_closed(): |
|
159 | %if c.pull_request.is_closed(): | |
160 | ${_('Closed')}, |
|
160 | ${_('Closed')}, | |
161 | %endif |
|
161 | %endif | |
162 | ${h.commit_status_lbl(c.pull_request_review_status)} |
|
162 | ${h.commit_status_lbl(c.pull_request_review_status)} | |
163 | </span> |
|
163 | </span> | |
164 | - ${_ungettext('calculated based on %s reviewer vote', 'calculated based on %s reviewers votes', len(c.pull_request_reviewers)) % len(c.pull_request_reviewers)} |
|
164 | - ${_ungettext('calculated based on %s reviewer vote', 'calculated based on %s reviewers votes', len(c.pull_request_reviewers)) % len(c.pull_request_reviewers)} | |
165 | %endif |
|
165 | %endif | |
166 | </div> |
|
166 | </div> | |
167 | </div> |
|
167 | </div> | |
168 | <div class="field"> |
|
168 | <div class="field"> | |
169 | <div class="pr-description-label label-summary" title="${_('Rendered using {} renderer').format(c.renderer)}"> |
|
169 | <div class="pr-description-label label-summary" title="${_('Rendered using {} renderer').format(c.renderer)}"> | |
170 | <label>${_('Description')}:</label> |
|
170 | <label>${_('Description')}:</label> | |
171 | </div> |
|
171 | </div> | |
172 | <div id="pr-desc" class="input"> |
|
172 | <div id="pr-desc" class="input"> | |
173 | <div class="pr-description">${h.render(c.pull_request.description, renderer=c.renderer)}</div> |
|
173 | <div class="pr-description">${h.render(c.pull_request.description, renderer=c.renderer)}</div> | |
174 | </div> |
|
174 | </div> | |
175 | <div id="pr-desc-edit" class="input textarea editor" style="display: none;"> |
|
175 | <div id="pr-desc-edit" class="input textarea editor" style="display: none;"> | |
176 | <input id="pr-renderer-input" type="hidden" name="description_renderer" value="${c.visual.default_renderer}"> |
|
176 | <input id="pr-renderer-input" type="hidden" name="description_renderer" value="${c.visual.default_renderer}"> | |
177 | ${dt.markup_form('pr-description-input', form_text=c.pull_request.description)} |
|
177 | ${dt.markup_form('pr-description-input', form_text=c.pull_request.description)} | |
178 | </div> |
|
178 | </div> | |
179 | </div> |
|
179 | </div> | |
180 |
|
180 | |||
181 | <div class="field"> |
|
181 | <div class="field"> | |
182 | <div class="label-summary"> |
|
182 | <div class="label-summary"> | |
183 | <label>${_('Versions')}:</label> |
|
183 | <label>${_('Versions')}:</label> | |
184 | </div> |
|
184 | </div> | |
185 |
|
185 | |||
186 | <% outdated_comm_count_ver = len(c.inline_versions[None]['outdated']) %> |
|
186 | <% outdated_comm_count_ver = len(c.inline_versions[None]['outdated']) %> | |
187 | <% general_outdated_comm_count_ver = len(c.comment_versions[None]['outdated']) %> |
|
187 | <% general_outdated_comm_count_ver = len(c.comment_versions[None]['outdated']) %> | |
188 |
|
188 | |||
189 | <div class="pr-versions"> |
|
189 | <div class="pr-versions"> | |
190 | % if c.show_version_changes: |
|
190 | % if c.show_version_changes: | |
191 | <% outdated_comm_count_ver = len(c.inline_versions[c.at_version_num]['outdated']) %> |
|
191 | <% outdated_comm_count_ver = len(c.inline_versions[c.at_version_num]['outdated']) %> | |
192 | <% general_outdated_comm_count_ver = len(c.comment_versions[c.at_version_num]['outdated']) %> |
|
192 | <% general_outdated_comm_count_ver = len(c.comment_versions[c.at_version_num]['outdated']) %> | |
193 | <a id="show-pr-versions" class="input" onclick="return versionController.toggleVersionView(this)" href="#show-pr-versions" |
|
193 | <a id="show-pr-versions" class="input" onclick="return versionController.toggleVersionView(this)" href="#show-pr-versions" | |
194 | data-toggle-on="${_ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))}" |
|
194 | data-toggle-on="${_ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))}" | |
195 | data-toggle-off="${_('Hide all versions of this pull request')}"> |
|
195 | data-toggle-off="${_('Hide all versions of this pull request')}"> | |
196 | ${_ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))} |
|
196 | ${_ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))} | |
197 | </a> |
|
197 | </a> | |
198 | <table> |
|
198 | <table> | |
199 | ## SHOW ALL VERSIONS OF PR |
|
199 | ## SHOW ALL VERSIONS OF PR | |
200 | <% ver_pr = None %> |
|
200 | <% ver_pr = None %> | |
201 |
|
201 | |||
202 | % for data in reversed(list(enumerate(c.versions, 1))): |
|
202 | % for data in reversed(list(enumerate(c.versions, 1))): | |
203 | <% ver_pos = data[0] %> |
|
203 | <% ver_pos = data[0] %> | |
204 | <% ver = data[1] %> |
|
204 | <% ver = data[1] %> | |
205 | <% ver_pr = ver.pull_request_version_id %> |
|
205 | <% ver_pr = ver.pull_request_version_id %> | |
206 | <% display_row = '' if c.at_version and (c.at_version_num == ver_pr or c.from_version_num == ver_pr) else 'none' %> |
|
206 | <% display_row = '' if c.at_version and (c.at_version_num == ver_pr or c.from_version_num == ver_pr) else 'none' %> | |
207 |
|
207 | |||
208 | <tr class="version-pr" style="display: ${display_row}"> |
|
208 | <tr class="version-pr" style="display: ${display_row}"> | |
209 | <td> |
|
209 | <td> | |
210 | <code> |
|
210 | <code> | |
211 | <a href="${request.current_route_path(_query=dict(version=ver_pr or 'latest'))}">v${ver_pos}</a> |
|
211 | <a href="${request.current_route_path(_query=dict(version=ver_pr or 'latest'))}">v${ver_pos}</a> | |
212 | </code> |
|
212 | </code> | |
213 | </td> |
|
213 | </td> | |
214 | <td> |
|
214 | <td> | |
215 | <input ${'checked="checked"' if c.from_version_num == ver_pr else ''} class="compare-radio-button" type="radio" name="ver_source" value="${ver_pr or 'latest'}" data-ver-pos="${ver_pos}"/> |
|
215 | <input ${'checked="checked"' if c.from_version_num == ver_pr else ''} class="compare-radio-button" type="radio" name="ver_source" value="${ver_pr or 'latest'}" data-ver-pos="${ver_pos}"/> | |
216 | <input ${'checked="checked"' if c.at_version_num == ver_pr else ''} class="compare-radio-button" type="radio" name="ver_target" value="${ver_pr or 'latest'}" data-ver-pos="${ver_pos}"/> |
|
216 | <input ${'checked="checked"' if c.at_version_num == ver_pr else ''} class="compare-radio-button" type="radio" name="ver_target" value="${ver_pr or 'latest'}" data-ver-pos="${ver_pos}"/> | |
217 | </td> |
|
217 | </td> | |
218 | <td> |
|
218 | <td> | |
219 | <% review_status = c.review_versions[ver_pr].status if ver_pr in c.review_versions else 'not_reviewed' %> |
|
219 | <% review_status = c.review_versions[ver_pr].status if ver_pr in c.review_versions else 'not_reviewed' %> | |
220 | <div class="${'flag_status %s' % review_status} tooltip pull-left" title="${_('Your review status at this version')}"> |
|
220 | <div class="${'flag_status %s' % review_status} tooltip pull-left" title="${_('Your review status at this version')}"> | |
221 | </div> |
|
221 | </div> | |
222 | </td> |
|
222 | </td> | |
223 | <td> |
|
223 | <td> | |
224 | % if c.at_version_num != ver_pr: |
|
224 | % if c.at_version_num != ver_pr: | |
225 | <i class="icon-comment"></i> |
|
225 | <i class="icon-comment"></i> | |
226 | <code class="tooltip" title="${_('Comment from pull request version v{0}, general:{1} inline:{2}').format(ver_pos, len(c.comment_versions[ver_pr]['at']), len(c.inline_versions[ver_pr]['at']))}"> |
|
226 | <code class="tooltip" title="${_('Comment from pull request version v{0}, general:{1} inline:{2}').format(ver_pos, len(c.comment_versions[ver_pr]['at']), len(c.inline_versions[ver_pr]['at']))}"> | |
227 | G:${len(c.comment_versions[ver_pr]['at'])} / I:${len(c.inline_versions[ver_pr]['at'])} |
|
227 | G:${len(c.comment_versions[ver_pr]['at'])} / I:${len(c.inline_versions[ver_pr]['at'])} | |
228 | </code> |
|
228 | </code> | |
229 | % endif |
|
229 | % endif | |
230 | </td> |
|
230 | </td> | |
231 | <td> |
|
231 | <td> | |
232 | ##<code>${ver.source_ref_parts.commit_id[:6]}</code> |
|
232 | ##<code>${ver.source_ref_parts.commit_id[:6]}</code> | |
233 | </td> |
|
233 | </td> | |
234 | <td> |
|
234 | <td> | |
235 | ${h.age_component(ver.updated_on, time_is_local=True)} |
|
235 | ${h.age_component(ver.updated_on, time_is_local=True)} | |
236 | </td> |
|
236 | </td> | |
237 | </tr> |
|
237 | </tr> | |
238 | % endfor |
|
238 | % endfor | |
239 |
|
239 | |||
240 | <tr> |
|
240 | <tr> | |
241 | <td colspan="6"> |
|
241 | <td colspan="6"> | |
242 | <button id="show-version-diff" onclick="return versionController.showVersionDiff()" class="btn btn-sm" style="display: none" |
|
242 | <button id="show-version-diff" onclick="return versionController.showVersionDiff()" class="btn btn-sm" style="display: none" | |
243 | data-label-text-locked="${_('select versions to show changes')}" |
|
243 | data-label-text-locked="${_('select versions to show changes')}" | |
244 | data-label-text-diff="${_('show changes between versions')}" |
|
244 | data-label-text-diff="${_('show changes between versions')}" | |
245 | data-label-text-show="${_('show pull request for this version')}" |
|
245 | data-label-text-show="${_('show pull request for this version')}" | |
246 | > |
|
246 | > | |
247 | ${_('select versions to show changes')} |
|
247 | ${_('select versions to show changes')} | |
248 | </button> |
|
248 | </button> | |
249 | </td> |
|
249 | </td> | |
250 | </tr> |
|
250 | </tr> | |
251 |
|
251 | |||
252 | ## show comment/inline comments summary |
|
252 | ## show comment/inline comments summary | |
253 | <%def name="comments_summary()"> |
|
253 | <%def name="comments_summary()"> | |
254 | <tr> |
|
254 | <tr> | |
255 | <td colspan="6" class="comments-summary-td"> |
|
255 | <td colspan="6" class="comments-summary-td"> | |
256 |
|
256 | |||
257 | % if c.at_version: |
|
257 | % if c.at_version: | |
258 | <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num]['display']) %> |
|
258 | <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num]['display']) %> | |
259 | <% general_comm_count_ver = len(c.comment_versions[c.at_version_num]['display']) %> |
|
259 | <% general_comm_count_ver = len(c.comment_versions[c.at_version_num]['display']) %> | |
260 | ${_('Comments at this version')}: |
|
260 | ${_('Comments at this version')}: | |
261 | % else: |
|
261 | % else: | |
262 | <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num]['until']) %> |
|
262 | <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num]['until']) %> | |
263 | <% general_comm_count_ver = len(c.comment_versions[c.at_version_num]['until']) %> |
|
263 | <% general_comm_count_ver = len(c.comment_versions[c.at_version_num]['until']) %> | |
264 | ${_('Comments for this pull request')}: |
|
264 | ${_('Comments for this pull request')}: | |
265 | % endif |
|
265 | % endif | |
266 |
|
266 | |||
267 |
|
267 | |||
268 | %if general_comm_count_ver: |
|
268 | %if general_comm_count_ver: | |
269 | <a href="#comments">${_("%d General ") % general_comm_count_ver}</a> |
|
269 | <a href="#comments">${_("%d General ") % general_comm_count_ver}</a> | |
270 | %else: |
|
270 | %else: | |
271 | ${_("%d General ") % general_comm_count_ver} |
|
271 | ${_("%d General ") % general_comm_count_ver} | |
272 | %endif |
|
272 | %endif | |
273 |
|
273 | |||
274 | %if inline_comm_count_ver: |
|
274 | %if inline_comm_count_ver: | |
275 | , <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${_("%d Inline") % inline_comm_count_ver}</a> |
|
275 | , <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${_("%d Inline") % inline_comm_count_ver}</a> | |
276 | %else: |
|
276 | %else: | |
277 | , ${_("%d Inline") % inline_comm_count_ver} |
|
277 | , ${_("%d Inline") % inline_comm_count_ver} | |
278 | %endif |
|
278 | %endif | |
279 |
|
279 | |||
280 | %if outdated_comm_count_ver: |
|
280 | %if outdated_comm_count_ver: | |
281 | , <a href="#" onclick="showOutdated(); Rhodecode.comments.nextOutdatedComment(); return false;">${_("%d Outdated") % outdated_comm_count_ver}</a> |
|
281 | , <a href="#" onclick="showOutdated(); Rhodecode.comments.nextOutdatedComment(); return false;">${_("%d Outdated") % outdated_comm_count_ver}</a> | |
282 | <a href="#" class="showOutdatedComments" onclick="showOutdated(this); return false;"> | ${_('show outdated comments')}</a> |
|
282 | <a href="#" class="showOutdatedComments" onclick="showOutdated(this); return false;"> | ${_('show outdated comments')}</a> | |
283 | <a href="#" class="hideOutdatedComments" style="display: none" onclick="hideOutdated(this); return false;"> | ${_('hide outdated comments')}</a> |
|
283 | <a href="#" class="hideOutdatedComments" style="display: none" onclick="hideOutdated(this); return false;"> | ${_('hide outdated comments')}</a> | |
284 | %else: |
|
284 | %else: | |
285 | , ${_("%d Outdated") % outdated_comm_count_ver} |
|
285 | , ${_("%d Outdated") % outdated_comm_count_ver} | |
286 | %endif |
|
286 | %endif | |
287 | </td> |
|
287 | </td> | |
288 | </tr> |
|
288 | </tr> | |
289 | </%def> |
|
289 | </%def> | |
290 | ${comments_summary()} |
|
290 | ${comments_summary()} | |
291 | </table> |
|
291 | </table> | |
292 | % else: |
|
292 | % else: | |
293 | <div class="input"> |
|
293 | <div class="input"> | |
294 | ${_('Pull request versions not available')}. |
|
294 | ${_('Pull request versions not available')}. | |
295 | </div> |
|
295 | </div> | |
296 | <div> |
|
296 | <div> | |
297 | <table> |
|
297 | <table> | |
298 | ${comments_summary()} |
|
298 | ${comments_summary()} | |
299 | </table> |
|
299 | </table> | |
300 | </div> |
|
300 | </div> | |
301 | % endif |
|
301 | % endif | |
302 | </div> |
|
302 | </div> | |
303 | </div> |
|
303 | </div> | |
304 |
|
304 | |||
305 | <div id="pr-save" class="field" style="display: none;"> |
|
305 | <div id="pr-save" class="field" style="display: none;"> | |
306 | <div class="label-summary"></div> |
|
306 | <div class="label-summary"></div> | |
307 | <div class="input"> |
|
307 | <div class="input"> | |
308 | <span id="edit_pull_request" class="btn btn-small no-margin">${_('Save Changes')}</span> |
|
308 | <span id="edit_pull_request" class="btn btn-small no-margin">${_('Save Changes')}</span> | |
309 | </div> |
|
309 | </div> | |
310 | </div> |
|
310 | </div> | |
311 | </div> |
|
311 | </div> | |
312 | </div> |
|
312 | </div> | |
313 | <div> |
|
313 | <div> | |
314 | ## AUTHOR |
|
314 | ## AUTHOR | |
315 | <div class="reviewers-title block-right"> |
|
315 | <div class="reviewers-title block-right"> | |
316 | <div class="pr-details-title"> |
|
316 | <div class="pr-details-title"> | |
317 | ${_('Author of this pull request')} |
|
317 | ${_('Author of this pull request')} | |
318 | </div> |
|
318 | </div> | |
319 | </div> |
|
319 | </div> | |
320 | <div class="block-right pr-details-content reviewers"> |
|
320 | <div class="block-right pr-details-content reviewers"> | |
321 | <ul class="group_members"> |
|
321 | <ul class="group_members"> | |
322 | <li> |
|
322 | <li> | |
323 | ${self.gravatar_with_user(c.pull_request.author.email, 16)} |
|
323 | ${self.gravatar_with_user(c.pull_request.author.email, 16)} | |
324 | </li> |
|
324 | </li> | |
325 | </ul> |
|
325 | </ul> | |
326 | </div> |
|
326 | </div> | |
327 |
|
327 | |||
328 | ## REVIEW RULES |
|
328 | ## REVIEW RULES | |
329 | <div id="review_rules" style="display: none" class="reviewers-title block-right"> |
|
329 | <div id="review_rules" style="display: none" class="reviewers-title block-right"> | |
330 | <div class="pr-details-title"> |
|
330 | <div class="pr-details-title"> | |
331 | ${_('Reviewer rules')} |
|
331 | ${_('Reviewer rules')} | |
332 | %if c.allowed_to_update: |
|
332 | %if c.allowed_to_update: | |
333 | <span id="close_edit_reviewers" class="block-right action_button last-item" style="display: none;">${_('Close')}</span> |
|
333 | <span id="close_edit_reviewers" class="block-right action_button last-item" style="display: none;">${_('Close')}</span> | |
334 | %endif |
|
334 | %endif | |
335 | </div> |
|
335 | </div> | |
336 | <div class="pr-reviewer-rules"> |
|
336 | <div class="pr-reviewer-rules"> | |
337 | ## review rules will be appended here, by default reviewers logic |
|
337 | ## review rules will be appended here, by default reviewers logic | |
338 | </div> |
|
338 | </div> | |
339 | <input id="review_data" type="hidden" name="review_data" value=""> |
|
339 | <input id="review_data" type="hidden" name="review_data" value=""> | |
340 | </div> |
|
340 | </div> | |
341 |
|
341 | |||
342 | ## REVIEWERS |
|
342 | ## REVIEWERS | |
343 | <div class="reviewers-title block-right"> |
|
343 | <div class="reviewers-title block-right"> | |
344 | <div class="pr-details-title"> |
|
344 | <div class="pr-details-title"> | |
345 | ${_('Pull request reviewers')} |
|
345 | ${_('Pull request reviewers')} | |
346 | %if c.allowed_to_update: |
|
346 | %if c.allowed_to_update: | |
347 | <span id="open_edit_reviewers" class="block-right action_button last-item">${_('Edit')}</span> |
|
347 | <span id="open_edit_reviewers" class="block-right action_button last-item">${_('Edit')}</span> | |
348 | %endif |
|
348 | %endif | |
349 | </div> |
|
349 | </div> | |
350 | </div> |
|
350 | </div> | |
351 | <div id="reviewers" class="block-right pr-details-content reviewers"> |
|
351 | <div id="reviewers" class="block-right pr-details-content reviewers"> | |
352 |
|
352 | |||
353 | ## members redering block |
|
353 | ## members redering block | |
354 | <input type="hidden" name="__start__" value="review_members:sequence"> |
|
354 | <input type="hidden" name="__start__" value="review_members:sequence"> | |
355 | <ul id="review_members" class="group_members"> |
|
355 | <ul id="review_members" class="group_members"> | |
356 |
|
356 | |||
357 | % for review_obj, member, reasons, mandatory, status in c.pull_request_reviewers: |
|
357 | % for review_obj, member, reasons, mandatory, status in c.pull_request_reviewers: | |
358 | <script> |
|
358 | <script> | |
359 | var member = ${h.json.dumps(h.reviewer_as_json(member, reasons=reasons, mandatory=mandatory, user_group=review_obj.rule_user_group_data()))|n}; |
|
359 | var member = ${h.json.dumps(h.reviewer_as_json(member, reasons=reasons, mandatory=mandatory, user_group=review_obj.rule_user_group_data()))|n}; | |
360 | var status = "${(status[0][1].status if status else 'not_reviewed')}"; |
|
360 | var status = "${(status[0][1].status if status else 'not_reviewed')}"; | |
361 | var status_lbl = "${h.commit_status_lbl(status[0][1].status if status else 'not_reviewed')}"; |
|
361 | var status_lbl = "${h.commit_status_lbl(status[0][1].status if status else 'not_reviewed')}"; | |
362 | var allowed_to_update = ${h.json.dumps(c.allowed_to_update)}; |
|
362 | var allowed_to_update = ${h.json.dumps(c.allowed_to_update)}; | |
363 |
|
363 | |||
364 | var entry = renderTemplate('reviewMemberEntry', { |
|
364 | var entry = renderTemplate('reviewMemberEntry', { | |
365 | 'member': member, |
|
365 | 'member': member, | |
366 | 'mandatory': member.mandatory, |
|
366 | 'mandatory': member.mandatory, | |
367 | 'reasons': member.reasons, |
|
367 | 'reasons': member.reasons, | |
368 | 'allowed_to_update': allowed_to_update, |
|
368 | 'allowed_to_update': allowed_to_update, | |
369 | 'review_status': status, |
|
369 | 'review_status': status, | |
370 | 'review_status_label': status_lbl, |
|
370 | 'review_status_label': status_lbl, | |
371 | 'user_group': member.user_group, |
|
371 | 'user_group': member.user_group, | |
372 | 'create': false |
|
372 | 'create': false | |
373 | }); |
|
373 | }); | |
374 | $('#review_members').append(entry) |
|
374 | $('#review_members').append(entry) | |
375 | </script> |
|
375 | </script> | |
376 |
|
376 | |||
377 | % endfor |
|
377 | % endfor | |
378 |
|
378 | |||
379 | </ul> |
|
379 | </ul> | |
380 | <input type="hidden" name="__end__" value="review_members:sequence"> |
|
380 | <input type="hidden" name="__end__" value="review_members:sequence"> | |
381 | ## end members redering block |
|
381 | ## end members redering block | |
382 |
|
382 | |||
383 | %if not c.pull_request.is_closed(): |
|
383 | %if not c.pull_request.is_closed(): | |
384 | <div id="add_reviewer" class="ac" style="display: none;"> |
|
384 | <div id="add_reviewer" class="ac" style="display: none;"> | |
385 | %if c.allowed_to_update: |
|
385 | %if c.allowed_to_update: | |
386 | % if not c.forbid_adding_reviewers: |
|
386 | % if not c.forbid_adding_reviewers: | |
387 | <div id="add_reviewer_input" class="reviewer_ac"> |
|
387 | <div id="add_reviewer_input" class="reviewer_ac"> | |
388 | ${h.text('user', class_='ac-input', placeholder=_('Add reviewer or reviewer group'))} |
|
388 | ${h.text('user', class_='ac-input', placeholder=_('Add reviewer or reviewer group'))} | |
389 | <div id="reviewers_container"></div> |
|
389 | <div id="reviewers_container"></div> | |
390 | </div> |
|
390 | </div> | |
391 | % endif |
|
391 | % endif | |
392 | <div class="pull-right"> |
|
392 | <div class="pull-right"> | |
393 | <button id="update_pull_request" class="btn btn-small no-margin">${_('Save Changes')}</button> |
|
393 | <button id="update_pull_request" class="btn btn-small no-margin">${_('Save Changes')}</button> | |
394 | </div> |
|
394 | </div> | |
395 | %endif |
|
395 | %endif | |
396 | </div> |
|
396 | </div> | |
397 | %endif |
|
397 | %endif | |
398 | </div> |
|
398 | </div> | |
399 | </div> |
|
399 | </div> | |
400 | </div> |
|
400 | </div> | |
401 | <div class="box"> |
|
401 | <div class="box"> | |
402 | ##DIFF |
|
402 | ##DIFF | |
403 | <div class="table" > |
|
403 | <div class="table" > | |
404 | <div id="changeset_compare_view_content"> |
|
404 | <div id="changeset_compare_view_content"> | |
405 | ##CS |
|
405 | ##CS | |
406 | % if c.missing_requirements: |
|
406 | % if c.missing_requirements: | |
407 | <div class="box"> |
|
407 | <div class="box"> | |
408 | <div class="alert alert-warning"> |
|
408 | <div class="alert alert-warning"> | |
409 | <div> |
|
409 | <div> | |
410 | <strong>${_('Missing requirements:')}</strong> |
|
410 | <strong>${_('Missing requirements:')}</strong> | |
411 | ${_('These commits cannot be displayed, because this repository uses the Mercurial largefiles extension, which was not enabled.')} |
|
411 | ${_('These commits cannot be displayed, because this repository uses the Mercurial largefiles extension, which was not enabled.')} | |
412 | </div> |
|
412 | </div> | |
413 | </div> |
|
413 | </div> | |
414 | </div> |
|
414 | </div> | |
415 | % elif c.missing_commits: |
|
415 | % elif c.missing_commits: | |
416 | <div class="box"> |
|
416 | <div class="box"> | |
417 | <div class="alert alert-warning"> |
|
417 | <div class="alert alert-warning"> | |
418 | <div> |
|
418 | <div> | |
419 | <strong>${_('Missing commits')}:</strong> |
|
419 | <strong>${_('Missing commits')}:</strong> | |
420 | ${_('This pull request cannot be displayed, because one or more commits no longer exist in the source repository.')} |
|
420 | ${_('This pull request cannot be displayed, because one or more commits no longer exist in the source repository.')} | |
421 | ${_('Please update this pull request, push the commits back into the source repository, or consider closing this pull request.')} |
|
421 | ${_('Please update this pull request, push the commits back into the source repository, or consider closing this pull request.')} | |
422 | ${_('Consider doing a {force_refresh_url} in case you think this is an error.').format(force_refresh_url=h.link_to('force refresh', h.current_route_path(request, force_refresh='1')))|n} |
|
422 | ${_('Consider doing a {force_refresh_url} in case you think this is an error.').format(force_refresh_url=h.link_to('force refresh', h.current_route_path(request, force_refresh='1')))|n} | |
423 | </div> |
|
423 | </div> | |
424 | </div> |
|
424 | </div> | |
425 | </div> |
|
425 | </div> | |
426 | % endif |
|
426 | % endif | |
427 |
|
427 | |||
428 | <div class="compare_view_commits_title"> |
|
428 | <div class="compare_view_commits_title"> | |
429 | % if not c.compare_mode: |
|
429 | % if not c.compare_mode: | |
430 |
|
430 | |||
431 | % if c.at_version_pos: |
|
431 | % if c.at_version_pos: | |
432 | <h4> |
|
432 | <h4> | |
433 | ${_('Showing changes at v%d, commenting is disabled.') % c.at_version_pos} |
|
433 | ${_('Showing changes at v%d, commenting is disabled.') % c.at_version_pos} | |
434 | </h4> |
|
434 | </h4> | |
435 | % endif |
|
435 | % endif | |
436 |
|
436 | |||
437 | <div class="pull-left"> |
|
437 | <div class="pull-left"> | |
438 | <div class="btn-group"> |
|
438 | <div class="btn-group"> | |
439 | <a |
|
439 | <a | |
440 | class="btn" |
|
440 | class="btn" | |
441 | href="#" |
|
441 | href="#" | |
442 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> |
|
442 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> | |
443 | ${_ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
443 | ${_ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
444 | </a> |
|
444 | </a> | |
445 | <a |
|
445 | <a | |
446 | class="btn" |
|
446 | class="btn" | |
447 | href="#" |
|
447 | href="#" | |
448 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> |
|
448 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> | |
449 | ${_ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
449 | ${_ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
450 | </a> |
|
450 | </a> | |
451 | </div> |
|
451 | </div> | |
452 | </div> |
|
452 | </div> | |
453 |
|
453 | |||
454 | <div class="pull-right"> |
|
454 | <div class="pull-right"> | |
455 | % if c.allowed_to_update and not c.pull_request.is_closed(): |
|
455 | % if c.allowed_to_update and not c.pull_request.is_closed(): | |
456 | <a id="update_commits" class="btn btn-primary no-margin pull-right">${_('Update commits')}</a> |
|
456 | <a id="update_commits" class="btn btn-primary no-margin pull-right">${_('Update commits')}</a> | |
457 | % else: |
|
457 | % else: | |
458 | <a class="tooltip btn disabled pull-right" disabled="disabled" title="${_('Update is disabled for current view')}">${_('Update commits')}</a> |
|
458 | <a class="tooltip btn disabled pull-right" disabled="disabled" title="${_('Update is disabled for current view')}">${_('Update commits')}</a> | |
459 | % endif |
|
459 | % endif | |
460 |
|
460 | |||
461 | </div> |
|
461 | </div> | |
462 | % endif |
|
462 | % endif | |
463 | </div> |
|
463 | </div> | |
464 |
|
464 | |||
465 | % if not c.missing_commits: |
|
465 | % if not c.missing_commits: | |
466 | % if c.compare_mode: |
|
466 | % if c.compare_mode: | |
467 | % if c.at_version: |
|
467 | % if c.at_version: | |
468 | <h4> |
|
468 | <h4> | |
469 | ${_('Commits and changes between v{ver_from} and {ver_to} of this pull request, commenting is disabled').format(ver_from=c.from_version_pos, ver_to=c.at_version_pos if c.at_version_pos else 'latest')}: |
|
469 | ${_('Commits and changes between v{ver_from} and {ver_to} of this pull request, commenting is disabled').format(ver_from=c.from_version_pos, ver_to=c.at_version_pos if c.at_version_pos else 'latest')}: | |
470 | </h4> |
|
470 | </h4> | |
471 |
|
471 | |||
472 | <div class="subtitle-compare"> |
|
472 | <div class="subtitle-compare"> | |
473 | ${_('commits added: {}, removed: {}').format(len(c.commit_changes_summary.added), len(c.commit_changes_summary.removed))} |
|
473 | ${_('commits added: {}, removed: {}').format(len(c.commit_changes_summary.added), len(c.commit_changes_summary.removed))} | |
474 | </div> |
|
474 | </div> | |
475 |
|
475 | |||
476 | <div class="container"> |
|
476 | <div class="container"> | |
477 | <table class="rctable compare_view_commits"> |
|
477 | <table class="rctable compare_view_commits"> | |
478 | <tr> |
|
478 | <tr> | |
479 | <th></th> |
|
479 | <th></th> | |
480 | <th>${_('Time')}</th> |
|
480 | <th>${_('Time')}</th> | |
481 | <th>${_('Author')}</th> |
|
481 | <th>${_('Author')}</th> | |
482 | <th>${_('Commit')}</th> |
|
482 | <th>${_('Commit')}</th> | |
483 | <th></th> |
|
483 | <th></th> | |
484 | <th>${_('Description')}</th> |
|
484 | <th>${_('Description')}</th> | |
485 | </tr> |
|
485 | </tr> | |
486 |
|
486 | |||
487 | % for c_type, commit in c.commit_changes: |
|
487 | % for c_type, commit in c.commit_changes: | |
488 | % if c_type in ['a', 'r']: |
|
488 | % if c_type in ['a', 'r']: | |
489 | <% |
|
489 | <% | |
490 | if c_type == 'a': |
|
490 | if c_type == 'a': | |
491 | cc_title = _('Commit added in displayed changes') |
|
491 | cc_title = _('Commit added in displayed changes') | |
492 | elif c_type == 'r': |
|
492 | elif c_type == 'r': | |
493 | cc_title = _('Commit removed in displayed changes') |
|
493 | cc_title = _('Commit removed in displayed changes') | |
494 | else: |
|
494 | else: | |
495 | cc_title = '' |
|
495 | cc_title = '' | |
496 | %> |
|
496 | %> | |
497 | <tr id="row-${commit.raw_id}" commit_id="${commit.raw_id}" class="compare_select"> |
|
497 | <tr id="row-${commit.raw_id}" commit_id="${commit.raw_id}" class="compare_select"> | |
498 | <td> |
|
498 | <td> | |
499 | <div class="commit-change-indicator color-${c_type}-border"> |
|
499 | <div class="commit-change-indicator color-${c_type}-border"> | |
500 | <div class="commit-change-content color-${c_type} tooltip" title="${h.tooltip(cc_title)}"> |
|
500 | <div class="commit-change-content color-${c_type} tooltip" title="${h.tooltip(cc_title)}"> | |
501 | ${c_type.upper()} |
|
501 | ${c_type.upper()} | |
502 | </div> |
|
502 | </div> | |
503 | </div> |
|
503 | </div> | |
504 | </td> |
|
504 | </td> | |
505 | <td class="td-time"> |
|
505 | <td class="td-time"> | |
506 | ${h.age_component(commit.date)} |
|
506 | ${h.age_component(commit.date)} | |
507 | </td> |
|
507 | </td> | |
508 | <td class="td-user"> |
|
508 | <td class="td-user"> | |
509 | ${base.gravatar_with_user(commit.author, 16)} |
|
509 | ${base.gravatar_with_user(commit.author, 16)} | |
510 | </td> |
|
510 | </td> | |
511 | <td class="td-hash"> |
|
511 | <td class="td-hash"> | |
512 | <code> |
|
512 | <code> | |
513 | <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=commit.raw_id)}"> |
|
513 | <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=commit.raw_id)}"> | |
514 | r${commit.idx}:${h.short_id(commit.raw_id)} |
|
514 | r${commit.idx}:${h.short_id(commit.raw_id)} | |
515 | </a> |
|
515 | </a> | |
516 | ${h.hidden('revisions', commit.raw_id)} |
|
516 | ${h.hidden('revisions', commit.raw_id)} | |
517 | </code> |
|
517 | </code> | |
518 | </td> |
|
518 | </td> | |
519 | <td class="expand_commit" data-commit-id="${commit.raw_id}" title="${_( 'Expand commit message')}"> |
|
519 | <td class="expand_commit" data-commit-id="${commit.raw_id}" title="${_( 'Expand commit message')}"> | |
520 | <div class="show_more_col"> |
|
520 | <div class="show_more_col"> | |
521 |
<i class="icon- |
|
521 | <i class="icon-expand-linked"></i> | |
522 | </div> |
|
522 | </div> | |
523 | </td> |
|
523 | </td> | |
524 | <td class="mid td-description"> |
|
524 | <td class="mid td-description"> | |
525 | <div class="log-container truncate-wrap"> |
|
525 | <div class="log-container truncate-wrap"> | |
526 | <div class="message truncate" id="c-${commit.raw_id}" data-message-raw="${commit.message}"> |
|
526 | <div class="message truncate" id="c-${commit.raw_id}" data-message-raw="${commit.message}"> | |
527 | ${h.urlify_commit_message(commit.message, c.repo_name)} |
|
527 | ${h.urlify_commit_message(commit.message, c.repo_name)} | |
528 | </div> |
|
528 | </div> | |
529 | </div> |
|
529 | </div> | |
530 | </td> |
|
530 | </td> | |
531 | </tr> |
|
531 | </tr> | |
532 | % endif |
|
532 | % endif | |
533 | % endfor |
|
533 | % endfor | |
534 | </table> |
|
534 | </table> | |
535 | </div> |
|
535 | </div> | |
536 |
|
536 | |||
537 | <script> |
|
537 | <script> | |
538 | $('.expand_commit').on('click',function(e){ |
|
538 | $('.expand_commit').on('click',function(e){ | |
539 | var target_expand = $(this); |
|
539 | var target_expand = $(this); | |
540 | var cid = target_expand.data('commitId'); |
|
540 | var cid = target_expand.data('commitId'); | |
541 |
|
541 | |||
542 | if (target_expand.hasClass('open')){ |
|
542 | if (target_expand.hasClass('open')){ | |
543 | $('#c-'+cid).css({ |
|
543 | $('#c-'+cid).css({ | |
544 | 'height': '1.5em', |
|
544 | 'height': '1.5em', | |
545 | 'white-space': 'nowrap', |
|
545 | 'white-space': 'nowrap', | |
546 | 'text-overflow': 'ellipsis', |
|
546 | 'text-overflow': 'ellipsis', | |
547 | 'overflow':'hidden' |
|
547 | 'overflow':'hidden' | |
548 | }); |
|
548 | }); | |
549 | target_expand.removeClass('open'); |
|
549 | target_expand.removeClass('open'); | |
550 | } |
|
550 | } | |
551 | else { |
|
551 | else { | |
552 | $('#c-'+cid).css({ |
|
552 | $('#c-'+cid).css({ | |
553 | 'height': 'auto', |
|
553 | 'height': 'auto', | |
554 | 'white-space': 'pre-line', |
|
554 | 'white-space': 'pre-line', | |
555 | 'text-overflow': 'initial', |
|
555 | 'text-overflow': 'initial', | |
556 | 'overflow':'visible' |
|
556 | 'overflow':'visible' | |
557 | }); |
|
557 | }); | |
558 | target_expand.addClass('open'); |
|
558 | target_expand.addClass('open'); | |
559 | } |
|
559 | } | |
560 | }); |
|
560 | }); | |
561 | </script> |
|
561 | </script> | |
562 |
|
562 | |||
563 | % endif |
|
563 | % endif | |
564 |
|
564 | |||
565 | % else: |
|
565 | % else: | |
566 | <%include file="/compare/compare_commits.mako" /> |
|
566 | <%include file="/compare/compare_commits.mako" /> | |
567 | % endif |
|
567 | % endif | |
568 |
|
568 | |||
569 | <div class="cs_files"> |
|
569 | <div class="cs_files"> | |
570 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> |
|
570 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> | |
571 |
|
571 | |||
572 | ${cbdiffs.render_diffset_menu(c.diffset, range_diff_on=c.range_diff_on)} |
|
572 | ${cbdiffs.render_diffset_menu(c.diffset, range_diff_on=c.range_diff_on)} | |
573 |
|
573 | |||
574 | % if c.range_diff_on: |
|
574 | % if c.range_diff_on: | |
575 | % for commit in c.commit_ranges: |
|
575 | % for commit in c.commit_ranges: | |
576 | ${cbdiffs.render_diffset( |
|
576 | ${cbdiffs.render_diffset( | |
577 | c.changes[commit.raw_id], |
|
577 | c.changes[commit.raw_id], | |
578 | commit=commit, use_comments=True, |
|
578 | commit=commit, use_comments=True, | |
579 | collapse_when_files_over=5, |
|
579 | collapse_when_files_over=5, | |
580 | disable_new_comments=True, |
|
580 | disable_new_comments=True, | |
581 | deleted_files_comments=c.deleted_files_comments, |
|
581 | deleted_files_comments=c.deleted_files_comments, | |
582 | inline_comments=c.inline_comments)} |
|
582 | inline_comments=c.inline_comments)} | |
583 | % endfor |
|
583 | % endfor | |
584 | % else: |
|
584 | % else: | |
585 | ${cbdiffs.render_diffset( |
|
585 | ${cbdiffs.render_diffset( | |
586 | c.diffset, use_comments=True, |
|
586 | c.diffset, use_comments=True, | |
587 | collapse_when_files_over=30, |
|
587 | collapse_when_files_over=30, | |
588 | disable_new_comments=not c.allowed_to_comment, |
|
588 | disable_new_comments=not c.allowed_to_comment, | |
589 | deleted_files_comments=c.deleted_files_comments, |
|
589 | deleted_files_comments=c.deleted_files_comments, | |
590 | inline_comments=c.inline_comments)} |
|
590 | inline_comments=c.inline_comments)} | |
591 | % endif |
|
591 | % endif | |
592 |
|
592 | |||
593 | </div> |
|
593 | </div> | |
594 | % else: |
|
594 | % else: | |
595 | ## skipping commits we need to clear the view for missing commits |
|
595 | ## skipping commits we need to clear the view for missing commits | |
596 | <div style="clear:both;"></div> |
|
596 | <div style="clear:both;"></div> | |
597 | % endif |
|
597 | % endif | |
598 |
|
598 | |||
599 | </div> |
|
599 | </div> | |
600 | </div> |
|
600 | </div> | |
601 |
|
601 | |||
602 | ## template for inline comment form |
|
602 | ## template for inline comment form | |
603 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> |
|
603 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> | |
604 |
|
604 | |||
605 | ## render general comments |
|
605 | ## render general comments | |
606 |
|
606 | |||
607 | <div id="comment-tr-show"> |
|
607 | <div id="comment-tr-show"> | |
608 | <div class="comment"> |
|
608 | <div class="comment"> | |
609 | % if general_outdated_comm_count_ver: |
|
609 | % if general_outdated_comm_count_ver: | |
610 | <div class="meta"> |
|
610 | <div class="meta"> | |
611 | % if general_outdated_comm_count_ver == 1: |
|
611 | % if general_outdated_comm_count_ver == 1: | |
612 | ${_('there is {num} general comment from older versions').format(num=general_outdated_comm_count_ver)}, |
|
612 | ${_('there is {num} general comment from older versions').format(num=general_outdated_comm_count_ver)}, | |
613 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show it')}</a> |
|
613 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show it')}</a> | |
614 | % else: |
|
614 | % else: | |
615 | ${_('there are {num} general comments from older versions').format(num=general_outdated_comm_count_ver)}, |
|
615 | ${_('there are {num} general comments from older versions').format(num=general_outdated_comm_count_ver)}, | |
616 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show them')}</a> |
|
616 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show them')}</a> | |
617 | % endif |
|
617 | % endif | |
618 | </div> |
|
618 | </div> | |
619 | % endif |
|
619 | % endif | |
620 | </div> |
|
620 | </div> | |
621 | </div> |
|
621 | </div> | |
622 |
|
622 | |||
623 | ${comment.generate_comments(c.comments, include_pull_request=True, is_pull_request=True)} |
|
623 | ${comment.generate_comments(c.comments, include_pull_request=True, is_pull_request=True)} | |
624 |
|
624 | |||
625 | % if not c.pull_request.is_closed(): |
|
625 | % if not c.pull_request.is_closed(): | |
626 | ## merge status, and merge action |
|
626 | ## merge status, and merge action | |
627 | <div class="pull-request-merge"> |
|
627 | <div class="pull-request-merge"> | |
628 | <%include file="/pullrequests/pullrequest_merge_checks.mako"/> |
|
628 | <%include file="/pullrequests/pullrequest_merge_checks.mako"/> | |
629 | </div> |
|
629 | </div> | |
630 |
|
630 | |||
631 | ## main comment form and it status |
|
631 | ## main comment form and it status | |
632 | ${comment.comments(h.route_path('pullrequest_comment_create', repo_name=c.repo_name, |
|
632 | ${comment.comments(h.route_path('pullrequest_comment_create', repo_name=c.repo_name, | |
633 | pull_request_id=c.pull_request.pull_request_id), |
|
633 | pull_request_id=c.pull_request.pull_request_id), | |
634 | c.pull_request_review_status, |
|
634 | c.pull_request_review_status, | |
635 | is_pull_request=True, change_status=c.allowed_to_change_status)} |
|
635 | is_pull_request=True, change_status=c.allowed_to_change_status)} | |
636 | %endif |
|
636 | %endif | |
637 |
|
637 | |||
638 | <script type="text/javascript"> |
|
638 | <script type="text/javascript"> | |
639 | if (location.hash) { |
|
639 | if (location.hash) { | |
640 | var result = splitDelimitedHash(location.hash); |
|
640 | var result = splitDelimitedHash(location.hash); | |
641 | var line = $('html').find(result.loc); |
|
641 | var line = $('html').find(result.loc); | |
642 | // show hidden comments if we use location.hash |
|
642 | // show hidden comments if we use location.hash | |
643 | if (line.hasClass('comment-general')) { |
|
643 | if (line.hasClass('comment-general')) { | |
644 | $(line).show(); |
|
644 | $(line).show(); | |
645 | } else if (line.hasClass('comment-inline')) { |
|
645 | } else if (line.hasClass('comment-inline')) { | |
646 | $(line).show(); |
|
646 | $(line).show(); | |
647 | var $cb = $(line).closest('.cb'); |
|
647 | var $cb = $(line).closest('.cb'); | |
648 | $cb.removeClass('cb-collapsed') |
|
648 | $cb.removeClass('cb-collapsed') | |
649 | } |
|
649 | } | |
650 | if (line.length > 0){ |
|
650 | if (line.length > 0){ | |
651 | offsetScroll(line, 70); |
|
651 | offsetScroll(line, 70); | |
652 | } |
|
652 | } | |
653 | } |
|
653 | } | |
654 |
|
654 | |||
655 | versionController = new VersionController(); |
|
655 | versionController = new VersionController(); | |
656 | versionController.init(); |
|
656 | versionController.init(); | |
657 |
|
657 | |||
658 | reviewersController = new ReviewersController(); |
|
658 | reviewersController = new ReviewersController(); | |
659 |
|
659 | |||
660 | $(function(){ |
|
660 | $(function(){ | |
661 |
|
661 | |||
662 | // custom code mirror |
|
662 | // custom code mirror | |
663 | var codeMirrorInstance = $('#pr-description-input').get(0).MarkupForm.cm; |
|
663 | var codeMirrorInstance = $('#pr-description-input').get(0).MarkupForm.cm; | |
664 |
|
664 | |||
665 | var PRDetails = { |
|
665 | var PRDetails = { | |
666 | editButton: $('#open_edit_pullrequest'), |
|
666 | editButton: $('#open_edit_pullrequest'), | |
667 | closeButton: $('#close_edit_pullrequest'), |
|
667 | closeButton: $('#close_edit_pullrequest'), | |
668 | deleteButton: $('#delete_pullrequest'), |
|
668 | deleteButton: $('#delete_pullrequest'), | |
669 | viewFields: $('#pr-desc, #pr-title'), |
|
669 | viewFields: $('#pr-desc, #pr-title'), | |
670 | editFields: $('#pr-desc-edit, #pr-title-edit, #pr-save'), |
|
670 | editFields: $('#pr-desc-edit, #pr-title-edit, #pr-save'), | |
671 |
|
671 | |||
672 | init: function() { |
|
672 | init: function() { | |
673 | var that = this; |
|
673 | var that = this; | |
674 | this.editButton.on('click', function(e) { that.edit(); }); |
|
674 | this.editButton.on('click', function(e) { that.edit(); }); | |
675 | this.closeButton.on('click', function(e) { that.view(); }); |
|
675 | this.closeButton.on('click', function(e) { that.view(); }); | |
676 | }, |
|
676 | }, | |
677 |
|
677 | |||
678 | edit: function(event) { |
|
678 | edit: function(event) { | |
679 | this.viewFields.hide(); |
|
679 | this.viewFields.hide(); | |
680 | this.editButton.hide(); |
|
680 | this.editButton.hide(); | |
681 | this.deleteButton.hide(); |
|
681 | this.deleteButton.hide(); | |
682 | this.closeButton.show(); |
|
682 | this.closeButton.show(); | |
683 | this.editFields.show(); |
|
683 | this.editFields.show(); | |
684 | codeMirrorInstance.refresh(); |
|
684 | codeMirrorInstance.refresh(); | |
685 | }, |
|
685 | }, | |
686 |
|
686 | |||
687 | view: function(event) { |
|
687 | view: function(event) { | |
688 | this.editButton.show(); |
|
688 | this.editButton.show(); | |
689 | this.deleteButton.show(); |
|
689 | this.deleteButton.show(); | |
690 | this.editFields.hide(); |
|
690 | this.editFields.hide(); | |
691 | this.closeButton.hide(); |
|
691 | this.closeButton.hide(); | |
692 | this.viewFields.show(); |
|
692 | this.viewFields.show(); | |
693 | } |
|
693 | } | |
694 | }; |
|
694 | }; | |
695 |
|
695 | |||
696 | var ReviewersPanel = { |
|
696 | var ReviewersPanel = { | |
697 | editButton: $('#open_edit_reviewers'), |
|
697 | editButton: $('#open_edit_reviewers'), | |
698 | closeButton: $('#close_edit_reviewers'), |
|
698 | closeButton: $('#close_edit_reviewers'), | |
699 | addButton: $('#add_reviewer'), |
|
699 | addButton: $('#add_reviewer'), | |
700 | removeButtons: $('.reviewer_member_remove,.reviewer_member_mandatory_remove'), |
|
700 | removeButtons: $('.reviewer_member_remove,.reviewer_member_mandatory_remove'), | |
701 |
|
701 | |||
702 | init: function() { |
|
702 | init: function() { | |
703 | var self = this; |
|
703 | var self = this; | |
704 | this.editButton.on('click', function(e) { self.edit(); }); |
|
704 | this.editButton.on('click', function(e) { self.edit(); }); | |
705 | this.closeButton.on('click', function(e) { self.close(); }); |
|
705 | this.closeButton.on('click', function(e) { self.close(); }); | |
706 | }, |
|
706 | }, | |
707 |
|
707 | |||
708 | edit: function(event) { |
|
708 | edit: function(event) { | |
709 | this.editButton.hide(); |
|
709 | this.editButton.hide(); | |
710 | this.closeButton.show(); |
|
710 | this.closeButton.show(); | |
711 | this.addButton.show(); |
|
711 | this.addButton.show(); | |
712 | this.removeButtons.css('visibility', 'visible'); |
|
712 | this.removeButtons.css('visibility', 'visible'); | |
713 | // review rules |
|
713 | // review rules | |
714 | reviewersController.loadReviewRules( |
|
714 | reviewersController.loadReviewRules( | |
715 | ${c.pull_request.reviewer_data_json | n}); |
|
715 | ${c.pull_request.reviewer_data_json | n}); | |
716 | }, |
|
716 | }, | |
717 |
|
717 | |||
718 | close: function(event) { |
|
718 | close: function(event) { | |
719 | this.editButton.show(); |
|
719 | this.editButton.show(); | |
720 | this.closeButton.hide(); |
|
720 | this.closeButton.hide(); | |
721 | this.addButton.hide(); |
|
721 | this.addButton.hide(); | |
722 | this.removeButtons.css('visibility', 'hidden'); |
|
722 | this.removeButtons.css('visibility', 'hidden'); | |
723 | // hide review rules |
|
723 | // hide review rules | |
724 | reviewersController.hideReviewRules() |
|
724 | reviewersController.hideReviewRules() | |
725 | } |
|
725 | } | |
726 | }; |
|
726 | }; | |
727 |
|
727 | |||
728 | PRDetails.init(); |
|
728 | PRDetails.init(); | |
729 | ReviewersPanel.init(); |
|
729 | ReviewersPanel.init(); | |
730 |
|
730 | |||
731 | showOutdated = function(self){ |
|
731 | showOutdated = function(self){ | |
732 | $('.comment-inline.comment-outdated').show(); |
|
732 | $('.comment-inline.comment-outdated').show(); | |
733 | $('.filediff-outdated').show(); |
|
733 | $('.filediff-outdated').show(); | |
734 | $('.showOutdatedComments').hide(); |
|
734 | $('.showOutdatedComments').hide(); | |
735 | $('.hideOutdatedComments').show(); |
|
735 | $('.hideOutdatedComments').show(); | |
736 | }; |
|
736 | }; | |
737 |
|
737 | |||
738 | hideOutdated = function(self){ |
|
738 | hideOutdated = function(self){ | |
739 | $('.comment-inline.comment-outdated').hide(); |
|
739 | $('.comment-inline.comment-outdated').hide(); | |
740 | $('.filediff-outdated').hide(); |
|
740 | $('.filediff-outdated').hide(); | |
741 | $('.hideOutdatedComments').hide(); |
|
741 | $('.hideOutdatedComments').hide(); | |
742 | $('.showOutdatedComments').show(); |
|
742 | $('.showOutdatedComments').show(); | |
743 | }; |
|
743 | }; | |
744 |
|
744 | |||
745 | refreshMergeChecks = function(){ |
|
745 | refreshMergeChecks = function(){ | |
746 | var loadUrl = "${request.current_route_path(_query=dict(merge_checks=1))}"; |
|
746 | var loadUrl = "${request.current_route_path(_query=dict(merge_checks=1))}"; | |
747 | $('.pull-request-merge').css('opacity', 0.3); |
|
747 | $('.pull-request-merge').css('opacity', 0.3); | |
748 | $('.action-buttons-extra').css('opacity', 0.3); |
|
748 | $('.action-buttons-extra').css('opacity', 0.3); | |
749 |
|
749 | |||
750 | $('.pull-request-merge').load( |
|
750 | $('.pull-request-merge').load( | |
751 | loadUrl, function() { |
|
751 | loadUrl, function() { | |
752 | $('.pull-request-merge').css('opacity', 1); |
|
752 | $('.pull-request-merge').css('opacity', 1); | |
753 |
|
753 | |||
754 | $('.action-buttons-extra').css('opacity', 1); |
|
754 | $('.action-buttons-extra').css('opacity', 1); | |
755 | injectCloseAction(); |
|
755 | injectCloseAction(); | |
756 | } |
|
756 | } | |
757 | ); |
|
757 | ); | |
758 | }; |
|
758 | }; | |
759 |
|
759 | |||
760 | injectCloseAction = function() { |
|
760 | injectCloseAction = function() { | |
761 | var closeAction = $('#close-pull-request-action').html(); |
|
761 | var closeAction = $('#close-pull-request-action').html(); | |
762 | var $actionButtons = $('.action-buttons-extra'); |
|
762 | var $actionButtons = $('.action-buttons-extra'); | |
763 | // clear the action before |
|
763 | // clear the action before | |
764 | $actionButtons.html(""); |
|
764 | $actionButtons.html(""); | |
765 | $actionButtons.html(closeAction); |
|
765 | $actionButtons.html(closeAction); | |
766 | }; |
|
766 | }; | |
767 |
|
767 | |||
768 | closePullRequest = function (status) { |
|
768 | closePullRequest = function (status) { | |
769 | // inject closing flag |
|
769 | // inject closing flag | |
770 | $('.action-buttons-extra').append('<input type="hidden" class="close-pr-input" id="close_pull_request" value="1">'); |
|
770 | $('.action-buttons-extra').append('<input type="hidden" class="close-pr-input" id="close_pull_request" value="1">'); | |
771 | $(generalCommentForm.statusChange).select2("val", status).trigger('change'); |
|
771 | $(generalCommentForm.statusChange).select2("val", status).trigger('change'); | |
772 | $(generalCommentForm.submitForm).submit(); |
|
772 | $(generalCommentForm.submitForm).submit(); | |
773 | }; |
|
773 | }; | |
774 |
|
774 | |||
775 | $('#show-outdated-comments').on('click', function(e){ |
|
775 | $('#show-outdated-comments').on('click', function(e){ | |
776 | var button = $(this); |
|
776 | var button = $(this); | |
777 | var outdated = $('.comment-outdated'); |
|
777 | var outdated = $('.comment-outdated'); | |
778 |
|
778 | |||
779 | if (button.html() === "(Show)") { |
|
779 | if (button.html() === "(Show)") { | |
780 | button.html("(Hide)"); |
|
780 | button.html("(Hide)"); | |
781 | outdated.show(); |
|
781 | outdated.show(); | |
782 | } else { |
|
782 | } else { | |
783 | button.html("(Show)"); |
|
783 | button.html("(Show)"); | |
784 | outdated.hide(); |
|
784 | outdated.hide(); | |
785 | } |
|
785 | } | |
786 | }); |
|
786 | }); | |
787 |
|
787 | |||
788 | $('.show-inline-comments').on('change', function(e){ |
|
788 | $('.show-inline-comments').on('change', function(e){ | |
789 | var show = 'none'; |
|
789 | var show = 'none'; | |
790 | var target = e.currentTarget; |
|
790 | var target = e.currentTarget; | |
791 | if(target.checked){ |
|
791 | if(target.checked){ | |
792 | show = '' |
|
792 | show = '' | |
793 | } |
|
793 | } | |
794 | var boxid = $(target).attr('id_for'); |
|
794 | var boxid = $(target).attr('id_for'); | |
795 | var comments = $('#{0} .inline-comments'.format(boxid)); |
|
795 | var comments = $('#{0} .inline-comments'.format(boxid)); | |
796 | var fn_display = function(idx){ |
|
796 | var fn_display = function(idx){ | |
797 | $(this).css('display', show); |
|
797 | $(this).css('display', show); | |
798 | }; |
|
798 | }; | |
799 | $(comments).each(fn_display); |
|
799 | $(comments).each(fn_display); | |
800 | var btns = $('#{0} .inline-comments-button'.format(boxid)); |
|
800 | var btns = $('#{0} .inline-comments-button'.format(boxid)); | |
801 | $(btns).each(fn_display); |
|
801 | $(btns).each(fn_display); | |
802 | }); |
|
802 | }); | |
803 |
|
803 | |||
804 | $('#merge_pull_request_form').submit(function() { |
|
804 | $('#merge_pull_request_form').submit(function() { | |
805 | if (!$('#merge_pull_request').attr('disabled')) { |
|
805 | if (!$('#merge_pull_request').attr('disabled')) { | |
806 | $('#merge_pull_request').attr('disabled', 'disabled'); |
|
806 | $('#merge_pull_request').attr('disabled', 'disabled'); | |
807 | } |
|
807 | } | |
808 | return true; |
|
808 | return true; | |
809 | }); |
|
809 | }); | |
810 |
|
810 | |||
811 | $('#edit_pull_request').on('click', function(e){ |
|
811 | $('#edit_pull_request').on('click', function(e){ | |
812 | var title = $('#pr-title-input').val(); |
|
812 | var title = $('#pr-title-input').val(); | |
813 | var description = codeMirrorInstance.getValue(); |
|
813 | var description = codeMirrorInstance.getValue(); | |
814 | var renderer = $('#pr-renderer-input').val(); |
|
814 | var renderer = $('#pr-renderer-input').val(); | |
815 | editPullRequest( |
|
815 | editPullRequest( | |
816 | "${c.repo_name}", "${c.pull_request.pull_request_id}", |
|
816 | "${c.repo_name}", "${c.pull_request.pull_request_id}", | |
817 | title, description, renderer); |
|
817 | title, description, renderer); | |
818 | }); |
|
818 | }); | |
819 |
|
819 | |||
820 | $('#update_pull_request').on('click', function(e){ |
|
820 | $('#update_pull_request').on('click', function(e){ | |
821 | $(this).attr('disabled', 'disabled'); |
|
821 | $(this).attr('disabled', 'disabled'); | |
822 | $(this).addClass('disabled'); |
|
822 | $(this).addClass('disabled'); | |
823 | $(this).html(_gettext('Saving...')); |
|
823 | $(this).html(_gettext('Saving...')); | |
824 | reviewersController.updateReviewers( |
|
824 | reviewersController.updateReviewers( | |
825 | "${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
825 | "${c.repo_name}", "${c.pull_request.pull_request_id}"); | |
826 | }); |
|
826 | }); | |
827 |
|
827 | |||
828 | $('#update_commits').on('click', function(e){ |
|
828 | $('#update_commits').on('click', function(e){ | |
829 | var isDisabled = !$(e.currentTarget).attr('disabled'); |
|
829 | var isDisabled = !$(e.currentTarget).attr('disabled'); | |
830 | $(e.currentTarget).attr('disabled', 'disabled'); |
|
830 | $(e.currentTarget).attr('disabled', 'disabled'); | |
831 | $(e.currentTarget).addClass('disabled'); |
|
831 | $(e.currentTarget).addClass('disabled'); | |
832 | $(e.currentTarget).removeClass('btn-primary'); |
|
832 | $(e.currentTarget).removeClass('btn-primary'); | |
833 | $(e.currentTarget).text(_gettext('Updating...')); |
|
833 | $(e.currentTarget).text(_gettext('Updating...')); | |
834 | if(isDisabled){ |
|
834 | if(isDisabled){ | |
835 | updateCommits( |
|
835 | updateCommits( | |
836 | "${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
836 | "${c.repo_name}", "${c.pull_request.pull_request_id}"); | |
837 | } |
|
837 | } | |
838 | }); |
|
838 | }); | |
839 | // fixing issue with caches on firefox |
|
839 | // fixing issue with caches on firefox | |
840 | $('#update_commits').removeAttr("disabled"); |
|
840 | $('#update_commits').removeAttr("disabled"); | |
841 |
|
841 | |||
842 | $('.show-inline-comments').on('click', function(e){ |
|
842 | $('.show-inline-comments').on('click', function(e){ | |
843 | var boxid = $(this).attr('data-comment-id'); |
|
843 | var boxid = $(this).attr('data-comment-id'); | |
844 | var button = $(this); |
|
844 | var button = $(this); | |
845 |
|
845 | |||
846 | if(button.hasClass("comments-visible")) { |
|
846 | if(button.hasClass("comments-visible")) { | |
847 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
847 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ | |
848 | $(this).hide(); |
|
848 | $(this).hide(); | |
849 | }); |
|
849 | }); | |
850 | button.removeClass("comments-visible"); |
|
850 | button.removeClass("comments-visible"); | |
851 | } else { |
|
851 | } else { | |
852 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
852 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ | |
853 | $(this).show(); |
|
853 | $(this).show(); | |
854 | }); |
|
854 | }); | |
855 | button.addClass("comments-visible"); |
|
855 | button.addClass("comments-visible"); | |
856 | } |
|
856 | } | |
857 | }); |
|
857 | }); | |
858 |
|
858 | |||
859 | // register submit callback on commentForm form to track TODOs |
|
859 | // register submit callback on commentForm form to track TODOs | |
860 | window.commentFormGlobalSubmitSuccessCallback = function(){ |
|
860 | window.commentFormGlobalSubmitSuccessCallback = function(){ | |
861 | refreshMergeChecks(); |
|
861 | refreshMergeChecks(); | |
862 | }; |
|
862 | }; | |
863 | // initial injection |
|
863 | // initial injection | |
864 | injectCloseAction(); |
|
864 | injectCloseAction(); | |
865 |
|
865 | |||
866 | ReviewerAutoComplete('#user'); |
|
866 | ReviewerAutoComplete('#user'); | |
867 |
|
867 | |||
868 | }) |
|
868 | }) | |
869 | </script> |
|
869 | </script> | |
870 |
|
870 | |||
871 | </div> |
|
871 | </div> | |
872 | </div> |
|
872 | </div> | |
873 |
|
873 | |||
874 | </%def> |
|
874 | </%def> |
@@ -1,82 +1,82 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <table class="rctable search-results"> |
|
3 | <table class="rctable search-results"> | |
4 | <tr> |
|
4 | <tr> | |
5 | <th>${_('Repository')}</th> |
|
5 | <th>${_('Repository')}</th> | |
6 | <th>${_('Commit')}</th> |
|
6 | <th>${_('Commit')}</th> | |
7 | <th></th> |
|
7 | <th></th> | |
8 | <th>${_('Commit message')}</th> |
|
8 | <th>${_('Commit message')}</th> | |
9 | <th> |
|
9 | <th> | |
10 | %if c.sort == 'newfirst': |
|
10 | %if c.sort == 'newfirst': | |
11 | <a href="${c.url_generator(sort='oldfirst')}">${_('Age (new first)')}</a> |
|
11 | <a href="${c.url_generator(sort='oldfirst')}">${_('Age (new first)')}</a> | |
12 | %else: |
|
12 | %else: | |
13 | <a href="${c.url_generator(sort='newfirst')}">${_('Age (old first)')}</a> |
|
13 | <a href="${c.url_generator(sort='newfirst')}">${_('Age (old first)')}</a> | |
14 | %endif |
|
14 | %endif | |
15 | </th> |
|
15 | </th> | |
16 | <th>${_('Author')}</th> |
|
16 | <th>${_('Author')}</th> | |
17 | </tr> |
|
17 | </tr> | |
18 | %for entry in c.formatted_results: |
|
18 | %for entry in c.formatted_results: | |
19 | ## search results are additionally filtered, and this check is just a safe gate |
|
19 | ## search results are additionally filtered, and this check is just a safe gate | |
20 | % if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results commit check'): |
|
20 | % if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results commit check'): | |
21 | <tr class="body"> |
|
21 | <tr class="body"> | |
22 | <td class="td-componentname"> |
|
22 | <td class="td-componentname"> | |
23 | %if h.get_repo_type_by_name(entry.get('repository')) == 'hg': |
|
23 | %if h.get_repo_type_by_name(entry.get('repository')) == 'hg': | |
24 | <i class="icon-hg"></i> |
|
24 | <i class="icon-hg"></i> | |
25 | %elif h.get_repo_type_by_name(entry.get('repository')) == 'git': |
|
25 | %elif h.get_repo_type_by_name(entry.get('repository')) == 'git': | |
26 | <i class="icon-git"></i> |
|
26 | <i class="icon-git"></i> | |
27 | %elif h.get_repo_type_by_name(entry.get('repository')) == 'svn': |
|
27 | %elif h.get_repo_type_by_name(entry.get('repository')) == 'svn': | |
28 | <i class="icon-svn"></i> |
|
28 | <i class="icon-svn"></i> | |
29 | %endif |
|
29 | %endif | |
30 | ${h.link_to(entry['repository'], h.route_path('repo_summary',repo_name=entry['repository']))} |
|
30 | ${h.link_to(entry['repository'], h.route_path('repo_summary',repo_name=entry['repository']))} | |
31 | </td> |
|
31 | </td> | |
32 | <td class="td-commit"> |
|
32 | <td class="td-commit"> | |
33 | ${h.link_to(h._shorten_commit_id(entry['commit_id']), |
|
33 | ${h.link_to(h._shorten_commit_id(entry['commit_id']), | |
34 | h.route_path('repo_commit',repo_name=entry['repository'],commit_id=entry['commit_id']))} |
|
34 | h.route_path('repo_commit',repo_name=entry['repository'],commit_id=entry['commit_id']))} | |
35 | </td> |
|
35 | </td> | |
36 | <td class="td-message expand_commit search open" data-commit-id="${h.md5_safe(entry['repository'])+entry['commit_id']}" id="t-${h.md5_safe(entry['repository'])+entry['commit_id']}" title="${_('Expand commit message')}"> |
|
36 | <td class="td-message expand_commit search open" data-commit-id="${h.md5_safe(entry['repository'])+entry['commit_id']}" id="t-${h.md5_safe(entry['repository'])+entry['commit_id']}" title="${_('Expand commit message')}"> | |
37 | <div class="show_more_col"> |
|
37 | <div class="show_more_col"> | |
38 |
<i class="icon- |
|
38 | <i class="icon-expand-linked"></i> | |
39 | </div> |
|
39 | </div> | |
40 | </td> |
|
40 | </td> | |
41 | <td data-commit-id="${h.md5_safe(entry['repository'])+entry['commit_id']}" id="c-${h.md5_safe(entry['repository'])+entry['commit_id']}" class="message td-description open"> |
|
41 | <td data-commit-id="${h.md5_safe(entry['repository'])+entry['commit_id']}" id="c-${h.md5_safe(entry['repository'])+entry['commit_id']}" class="message td-description open"> | |
42 | %if entry.get('message_hl'): |
|
42 | %if entry.get('message_hl'): | |
43 | ${h.literal(entry['message_hl'])} |
|
43 | ${h.literal(entry['message_hl'])} | |
44 | %else: |
|
44 | %else: | |
45 | ${h.urlify_commit_message(entry['message'], entry['repository'])} |
|
45 | ${h.urlify_commit_message(entry['message'], entry['repository'])} | |
46 | %endif |
|
46 | %endif | |
47 | </td> |
|
47 | </td> | |
48 | <td class="td-time"> |
|
48 | <td class="td-time"> | |
49 | ${h.age_component(h.time_to_utcdatetime(entry['date']))} |
|
49 | ${h.age_component(h.time_to_utcdatetime(entry['date']))} | |
50 | </td> |
|
50 | </td> | |
51 |
|
51 | |||
52 | <td class="td-user author"> |
|
52 | <td class="td-user author"> | |
53 | ${base.gravatar_with_user(entry['author'])} |
|
53 | ${base.gravatar_with_user(entry['author'])} | |
54 | </td> |
|
54 | </td> | |
55 | </tr> |
|
55 | </tr> | |
56 | % endif |
|
56 | % endif | |
57 | %endfor |
|
57 | %endfor | |
58 | </table> |
|
58 | </table> | |
59 |
|
59 | |||
60 | %if c.cur_query and c.formatted_results: |
|
60 | %if c.cur_query and c.formatted_results: | |
61 | <div class="pagination-wh pagination-left"> |
|
61 | <div class="pagination-wh pagination-left"> | |
62 | ${c.formatted_results.pager('$link_previous ~2~ $link_next')} |
|
62 | ${c.formatted_results.pager('$link_previous ~2~ $link_next')} | |
63 | </div> |
|
63 | </div> | |
64 | %endif |
|
64 | %endif | |
65 |
|
65 | |||
66 | <script> |
|
66 | <script> | |
67 | $('.expand_commit').on('click',function(e){ |
|
67 | $('.expand_commit').on('click',function(e){ | |
68 | var target_expand = $(this); |
|
68 | var target_expand = $(this); | |
69 | var cid = target_expand.data('commit-id'); |
|
69 | var cid = target_expand.data('commit-id'); | |
70 |
|
70 | |||
71 | if (target_expand.hasClass('open')){ |
|
71 | if (target_expand.hasClass('open')){ | |
72 | $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'}) |
|
72 | $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'}) | |
73 | $('#t-'+cid).css({'height': 'auto', 'line-height': '.9em', 'text-overflow': 'ellipsis', 'overflow':'hidden'}) |
|
73 | $('#t-'+cid).css({'height': 'auto', 'line-height': '.9em', 'text-overflow': 'ellipsis', 'overflow':'hidden'}) | |
74 | target_expand.removeClass('open'); |
|
74 | target_expand.removeClass('open'); | |
75 | } |
|
75 | } | |
76 | else { |
|
76 | else { | |
77 | $('#c-'+cid).css({'height': 'auto', 'white-space': 'normal', 'text-overflow': 'initial', 'overflow':'visible'}) |
|
77 | $('#c-'+cid).css({'height': 'auto', 'white-space': 'normal', 'text-overflow': 'initial', 'overflow':'visible'}) | |
78 | $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible'}) |
|
78 | $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible'}) | |
79 | target_expand.addClass('open'); |
|
79 | target_expand.addClass('open'); | |
80 | } |
|
80 | } | |
81 | }); |
|
81 | }); | |
82 | </script> |
|
82 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now