##// END OF EJS Templates
ux: show multiple tags/branches in changelog/summary instead of truncating
dan -
r786:6387ba98 default
parent child Browse files
Show More
@@ -1,521 +1,523 b''
1
1
2 // tables.less
2 // tables.less
3 // For use in RhodeCode application tables;
3 // For use in RhodeCode application tables;
4 // see style guide documentation for guidelines.
4 // see style guide documentation for guidelines.
5
5
6 // TABLES
6 // TABLES
7
7
8 .rctable,
8 .rctable,
9 table.rctable,
9 table.rctable,
10 table.dataTable {
10 table.dataTable {
11 clear:both;
11 clear:both;
12 width: 100%;
12 width: 100%;
13 margin: 0 auto @padding;
13 margin: 0 auto @padding;
14 padding: 0;
14 padding: 0;
15 vertical-align: baseline;
15 vertical-align: baseline;
16 line-height:1.5em;
16 line-height:1.5em;
17 border: none;
17 border: none;
18 outline: none;
18 outline: none;
19 border-collapse: collapse;
19 border-collapse: collapse;
20 border-spacing: 0;
20 border-spacing: 0;
21 color: @grey2;
21 color: @grey2;
22
22
23 b {
23 b {
24 font-weight: normal;
24 font-weight: normal;
25 }
25 }
26
26
27 em {
27 em {
28 font-weight: bold;
28 font-weight: bold;
29 font-style: normal;
29 font-style: normal;
30 }
30 }
31
31
32 th,
32 th,
33 td {
33 td {
34 height: auto;
34 height: auto;
35 max-width: 20%;
35 max-width: 20%;
36 padding: .65em 1em .65em 0;
36 padding: .65em 1em .65em 0;
37 vertical-align: middle;
37 vertical-align: middle;
38 border-bottom: @border-thickness solid @grey5;
38 border-bottom: @border-thickness solid @grey5;
39 white-space: normal;
39 white-space: normal;
40
40
41 &.td-radio,
41 &.td-radio,
42 &.td-checkbox {
42 &.td-checkbox {
43 padding-right: 0;
43 padding-right: 0;
44 text-align: center;
44 text-align: center;
45
45
46 input {
46 input {
47 margin: 0 1em;
47 margin: 0 1em;
48 }
48 }
49 }
49 }
50
50
51 &.truncate-wrap {
51 &.truncate-wrap {
52 white-space: nowrap !important;
52 white-space: nowrap !important;
53 }
53 }
54
54
55 pre {
55 pre {
56 margin: 0;
56 margin: 0;
57 }
57 }
58
58
59 .show_more {
59 .show_more {
60 height: inherit;
60 height: inherit;
61 }
61 }
62 }
62 }
63
63
64 .expired td {
64 .expired td {
65 background-color: @grey7;
65 background-color: @grey7;
66 }
66 }
67
67
68 .td-radio + .td-owner {
68 .td-radio + .td-owner {
69 padding-left: 1em;
69 padding-left: 1em;
70 }
70 }
71
71
72
72
73 th {
73 th {
74 text-align: left;
74 text-align: left;
75 font-family: @text-semibold;
75 font-family: @text-semibold;
76 }
76 }
77
77
78 .hl {
78 .hl {
79 td {
79 td {
80 background-color: lighten(@alert4,25%);
80 background-color: lighten(@alert4,25%);
81 }
81 }
82 }
82 }
83
83
84 // Special Data Cell Types
84 // Special Data Cell Types
85 // See style guide for desciptions and examples.
85 // See style guide for desciptions and examples.
86
86
87 td {
87 td {
88
88
89 &.user {
89 &.user {
90 padding-left: 1em;
90 padding-left: 1em;
91 }
91 }
92
92
93 &.td-rss {
93 &.td-rss {
94 width: 20px;
94 width: 20px;
95 min-width: 0;
95 min-width: 0;
96 margin: 0;
96 margin: 0;
97 }
97 }
98
98
99 &.quick_repo_menu {
99 &.quick_repo_menu {
100 width: 15px;
100 width: 15px;
101 text-align: center;
101 text-align: center;
102
102
103 &:hover {
103 &:hover {
104 background-color: @grey5;
104 background-color: @grey5;
105 }
105 }
106 }
106 }
107
107
108 &.td-hash {
108 &.td-hash {
109 min-width: 80px;
109 min-width: 80px;
110 width: 200px;
110 width: 200px;
111 }
111 }
112
112
113 &.td-time {
113 &.td-time {
114 width: 160px;
114 width: 160px;
115 white-space: nowrap;
115 white-space: nowrap;
116 }
116 }
117
117
118 &.annotate{
118 &.annotate{
119 padding-right: 0;
119 padding-right: 0;
120
120
121 div.annotatediv{
121 div.annotatediv{
122 margin: 0 0.7em;
122 margin: 0 0.7em;
123 }
123 }
124 }
124 }
125
125
126 &.tags-col {
126 &.tags-col {
127 padding-right: 0;
127 padding-right: 0;
128 }
128 }
129
129
130 &.td-description {
130 &.td-description {
131 min-width: 350px;
131 min-width: 350px;
132 }
132 }
133
133
134 &.td-componentname {
134 &.td-componentname {
135 white-space: nowrap;
135 white-space: nowrap;
136 }
136 }
137
137
138 &.td-journalaction {
138 &.td-journalaction {
139 min-width: 300px;
139 min-width: 300px;
140
140
141 .journal_action_params {
141 .journal_action_params {
142 // waiting for feedback
142 // waiting for feedback
143 }
143 }
144 }
144 }
145
145
146 &.td-active {
146 &.td-active {
147 padding-left: .65em;
147 padding-left: .65em;
148 }
148 }
149
149
150 &.td-url {
150 &.td-url {
151 white-space: nowrap;
151 white-space: nowrap;
152 }
152 }
153
153
154 &.td-comments {
154 &.td-comments {
155 min-width: 3em;
155 min-width: 3em;
156 }
156 }
157
157
158 &.td-buttons {
158 &.td-buttons {
159 padding: .3em 0;
159 padding: .3em 0;
160 }
160 }
161
161
162 &.td-action {
162 &.td-action {
163 // this is for the remove/delete/edit buttons
163 // this is for the remove/delete/edit buttons
164 padding-right: 0;
164 padding-right: 0;
165 min-width: 95px;
165 min-width: 95px;
166 text-transform: capitalize;
166 text-transform: capitalize;
167
167
168 i {
168 i {
169 display: none;
169 display: none;
170 }
170 }
171 }
171 }
172
172
173 // TODO: lisa: this needs to be cleaned up with the buttons
173 // TODO: lisa: this needs to be cleaned up with the buttons
174 .grid_edit,
174 .grid_edit,
175 .grid_delete {
175 .grid_delete {
176 display: inline-block;
176 display: inline-block;
177 margin: 0 @padding/3 0 0;
177 margin: 0 @padding/3 0 0;
178 font-family: @text-light;
178 font-family: @text-light;
179
179
180 i {
180 i {
181 display: none;
181 display: none;
182 }
182 }
183 }
183 }
184
184
185 .grid_edit + .grid_delete {
185 .grid_edit + .grid_delete {
186 border-left: @border-thickness solid @grey5;
186 border-left: @border-thickness solid @grey5;
187 padding-left: @padding/2;
187 padding-left: @padding/2;
188 }
188 }
189
189
190 &.td-compare {
190 &.td-compare {
191
191
192 input {
192 input {
193 margin-right: 1em;
193 margin-right: 1em;
194 }
194 }
195
195
196 .compare-radio-button {
196 .compare-radio-button {
197 margin: 0 1em 0 0;
197 margin: 0 1em 0 0;
198 }
198 }
199
199
200
200
201 }
201 }
202
202
203 &.td-tags {
203 &.td-tags {
204 padding: .5em 1em .5em 0;
204 padding: .5em 1em .5em 0;
205 width: 140px;
205
206
206 .tag {
207 .tag {
207 margin: 1px;
208 margin: 1px;
209 float: left;
208 }
210 }
209 }
211 }
210
212
211 .icon-svn, .icon-hg, .icon-git {
213 .icon-svn, .icon-hg, .icon-git {
212 font-size: 1.4em;
214 font-size: 1.4em;
213 }
215 }
214
216
215 &.collapse_commit,
217 &.collapse_commit,
216 &.expand_commit {
218 &.expand_commit {
217 padding-right: 0;
219 padding-right: 0;
218 padding-left: 1em;
220 padding-left: 1em;
219 }
221 }
220 }
222 }
221
223
222 .perm_admin_row {
224 .perm_admin_row {
223 color: @grey4;
225 color: @grey4;
224 background-color: @grey6;
226 background-color: @grey6;
225 }
227 }
226
228
227 .noborder {
229 .noborder {
228 border: none;
230 border: none;
229
231
230 td {
232 td {
231 border: none;
233 border: none;
232 }
234 }
233 }
235 }
234 }
236 }
235
237
236 // TRUNCATING
238 // TRUNCATING
237 // TODO: lisaq: should this possibly be moved out of tables.less?
239 // TODO: lisaq: should this possibly be moved out of tables.less?
238 // for truncated text
240 // for truncated text
239 // used inside of table cells and in code block headers
241 // used inside of table cells and in code block headers
240 .truncate-wrap {
242 .truncate-wrap {
241 white-space: nowrap !important;
243 white-space: nowrap !important;
242
244
243 //truncated text
245 //truncated text
244 .truncate {
246 .truncate {
245 max-width: 450px;
247 max-width: 450px;
246 width: 300px;
248 width: 300px;
247 overflow: hidden;
249 overflow: hidden;
248 text-overflow: ellipsis;
250 text-overflow: ellipsis;
249 -o-text-overflow: ellipsis;
251 -o-text-overflow: ellipsis;
250 -ms-text-overflow: ellipsis;
252 -ms-text-overflow: ellipsis;
251
253
252 &.autoexpand {
254 &.autoexpand {
253 width: 120px;
255 width: 120px;
254 margin-right: 200px;
256 margin-right: 200px;
255 }
257 }
256 }
258 }
257 &:hover .truncate.autoexpand {
259 &:hover .truncate.autoexpand {
258 overflow: visible;
260 overflow: visible;
259 }
261 }
260
262
261 .tags-truncate {
263 .tags-truncate {
262 width: 150px;
264 width: 150px;
263 height: 22px;
265 height: 22px;
264 overflow: hidden;
266 overflow: hidden;
265
267
266 .tag {
268 .tag {
267 display: inline-block;
269 display: inline-block;
268 }
270 }
269
271
270 &.truncate {
272 &.truncate {
271 height: 22px;
273 height: 22px;
272 max-height:2em;
274 max-height:2em;
273 width: 140px;
275 width: 140px;
274 }
276 }
275 }
277 }
276 }
278 }
277
279
278 .apikeys_wrap {
280 .apikeys_wrap {
279 margin-bottom: @padding;
281 margin-bottom: @padding;
280
282
281 table.rctable td:first-child {
283 table.rctable td:first-child {
282 width: 340px;
284 width: 340px;
283 }
285 }
284 }
286 }
285
287
286
288
287
289
288 // SPECIAL CASES
290 // SPECIAL CASES
289
291
290 // Repository Followers
292 // Repository Followers
291 table.rctable.followers_data {
293 table.rctable.followers_data {
292 width: 75%;
294 width: 75%;
293 margin: 0;
295 margin: 0;
294 }
296 }
295
297
296 // Repository List
298 // Repository List
297 // Group Members List
299 // Group Members List
298 table.rctable.group_members,
300 table.rctable.group_members,
299 table#repo_list_table {
301 table#repo_list_table {
300 min-width: 600px;
302 min-width: 600px;
301 }
303 }
302
304
303 // Keyboard mappings
305 // Keyboard mappings
304 table.keyboard-mappings {
306 table.keyboard-mappings {
305 th {
307 th {
306 text-align: left;
308 text-align: left;
307 font-family: @text-semibold;
309 font-family: @text-semibold;
308 }
310 }
309 }
311 }
310
312
311 // Branches, Tags, and Bookmarks
313 // Branches, Tags, and Bookmarks
312 #obj_list_table.dataTable {
314 #obj_list_table.dataTable {
313 td.td-time {
315 td.td-time {
314 padding-right: 1em;
316 padding-right: 1em;
315 }
317 }
316 }
318 }
317
319
318 // User Admin
320 // User Admin
319 .rctable.useremails,
321 .rctable.useremails,
320 .rctable.account_emails {
322 .rctable.account_emails {
321 .tag,
323 .tag,
322 .btn {
324 .btn {
323 float: right;
325 float: right;
324 }
326 }
325 .btn { //to line up with tags
327 .btn { //to line up with tags
326 margin-right: 1.65em;
328 margin-right: 1.65em;
327 }
329 }
328 }
330 }
329
331
330 // User List
332 // User List
331 #user_list_table {
333 #user_list_table {
332
334
333 td.td-user {
335 td.td-user {
334 min-width: 100px;
336 min-width: 100px;
335 }
337 }
336 }
338 }
337
339
338 // Pull Request List Table
340 // Pull Request List Table
339 #pull_request_list_table.dataTable {
341 #pull_request_list_table.dataTable {
340
342
341 //TODO: lisa: This needs to be removed once the description is adjusted
343 //TODO: lisa: This needs to be removed once the description is adjusted
342 // for using an expand_commit button (see issue 765)
344 // for using an expand_commit button (see issue 765)
343 td {
345 td {
344 vertical-align: middle;
346 vertical-align: middle;
345 }
347 }
346 }
348 }
347
349
348 // Settings (no border)
350 // Settings (no border)
349 table.rctable.dl-settings {
351 table.rctable.dl-settings {
350 td {
352 td {
351 border: none;
353 border: none;
352 }
354 }
353 }
355 }
354
356
355
357
356 // Statistics
358 // Statistics
357 table.trending_language_tbl {
359 table.trending_language_tbl {
358 width: 100%;
360 width: 100%;
359 line-height: 1em;
361 line-height: 1em;
360
362
361 td div {
363 td div {
362 overflow: visible;
364 overflow: visible;
363 }
365 }
364 }
366 }
365
367
366 .trending_language_tbl, .trending_language_tbl td {
368 .trending_language_tbl, .trending_language_tbl td {
367 border: 0;
369 border: 0;
368 margin: 0;
370 margin: 0;
369 padding: 0;
371 padding: 0;
370 background: transparent;
372 background: transparent;
371 }
373 }
372
374
373 .trending_language_tbl, .trending_language_tbl tr {
375 .trending_language_tbl, .trending_language_tbl tr {
374 border-spacing: 0 3px;
376 border-spacing: 0 3px;
375 }
377 }
376
378
377 .trending_language {
379 .trending_language {
378 position: relative;
380 position: relative;
379 width: 100%;
381 width: 100%;
380 height: 19px;
382 height: 19px;
381 overflow: hidden;
383 overflow: hidden;
382 background-color: @grey6;
384 background-color: @grey6;
383
385
384 span, b{
386 span, b{
385 position: absolute;
387 position: absolute;
386 display: block;
388 display: block;
387 height: 12px;
389 height: 12px;
388 margin-bottom: 0px;
390 margin-bottom: 0px;
389 white-space: pre;
391 white-space: pre;
390 padding: floor(@basefontsize/4);
392 padding: floor(@basefontsize/4);
391 top: 0;
393 top: 0;
392 left: 0;
394 left: 0;
393 }
395 }
394
396
395 span{
397 span{
396 color: @text-color;
398 color: @text-color;
397 z-index: 0;
399 z-index: 0;
398 min-width: 20px;
400 min-width: 20px;
399 }
401 }
400
402
401 b {
403 b {
402 z-index: 1;
404 z-index: 1;
403 overflow: hidden;
405 overflow: hidden;
404 background-color: @rcblue;
406 background-color: @rcblue;
405 color: #FFF;
407 color: #FFF;
406 text-decoration: none;
408 text-decoration: none;
407 }
409 }
408
410
409 }
411 }
410
412
411 // Changesets
413 // Changesets
412 #changesets.rctable {
414 #changesets.rctable {
413
415
414 // td must be fixed height for graph
416 // td must be fixed height for graph
415 td {
417 td {
416 height: 32px;
418 height: 32px;
417 padding: 0 1em 0 0;
419 padding: 0 1em 0 0;
418 vertical-align: middle;
420 vertical-align: middle;
419 white-space: nowrap;
421 white-space: nowrap;
420
422
421 &.td-description {
423 &.td-description {
422 white-space: normal;
424 white-space: normal;
423 }
425 }
424
426
425 &.expand_commit {
427 &.expand_commit {
426 padding-right: 0;
428 padding-right: 0;
427 }
429 }
428 }
430 }
429 }
431 }
430
432
431 // Compare
433 // Compare
432 table.compare_view_commits {
434 table.compare_view_commits {
433 margin-top: @space;
435 margin-top: @space;
434
436
435 td.td-time {
437 td.td-time {
436 padding-left: .5em;
438 padding-left: .5em;
437 }
439 }
438
440
439 tr:hover {
441 tr:hover {
440 cursor: pointer;
442 cursor: pointer;
441
443
442 td {
444 td {
443 background-color: lighten(@alert4,25%);
445 background-color: lighten(@alert4,25%);
444 }
446 }
445 }
447 }
446 }
448 }
447
449
448 .file_history {
450 .file_history {
449 td.td-actions {
451 td.td-actions {
450 text-align: right;
452 text-align: right;
451 }
453 }
452 }
454 }
453
455
454 .compare_view_files {
456 .compare_view_files {
455
457
456 td.td-actions {
458 td.td-actions {
457 text-align: right;
459 text-align: right;
458 }
460 }
459
461
460 .flag_status {
462 .flag_status {
461 margin: 0 0 0 5px;
463 margin: 0 0 0 5px;
462 }
464 }
463
465
464 td.injected_diff {
466 td.injected_diff {
465
467
466 .code-difftable {
468 .code-difftable {
467 border:none;
469 border:none;
468 }
470 }
469
471
470 .diff-container {
472 .diff-container {
471 border: @border-thickness solid @border-default-color;
473 border: @border-thickness solid @border-default-color;
472 .border-radius(@border-radius);
474 .border-radius(@border-radius);
473 }
475 }
474
476
475 div.diffblock {
477 div.diffblock {
476 border:none;
478 border:none;
477 }
479 }
478
480
479 div.code-body {
481 div.code-body {
480 max-width: 1152px;
482 max-width: 1152px;
481 }
483 }
482 }
484 }
483
485
484 .rctable {
486 .rctable {
485
487
486 td {
488 td {
487 padding-top: @space;
489 padding-top: @space;
488 }
490 }
489
491
490 &:first-child td {
492 &:first-child td {
491 padding-top: 0;
493 padding-top: 0;
492 }
494 }
493 }
495 }
494
496
495 .comment-bubble,
497 .comment-bubble,
496 .show_comments {
498 .show_comments {
497 float: right;
499 float: right;
498 visibility: hidden;
500 visibility: hidden;
499 padding: 0 1em 0 0;
501 padding: 0 1em 0 0;
500 }
502 }
501
503
502 .injected_diff {
504 .injected_diff {
503 padding-bottom: @padding;
505 padding-bottom: @padding;
504 }
506 }
505 }
507 }
506
508
507 // Gist List
509 // Gist List
508 #gist_list_table {
510 #gist_list_table {
509 td {
511 td {
510 vertical-align: middle;
512 vertical-align: middle;
511
513
512 div{
514 div{
513 display: inline-block;
515 display: inline-block;
514 vertical-align: middle;
516 vertical-align: middle;
515 }
517 }
516
518
517 img{
519 img{
518 vertical-align: middle;
520 vertical-align: middle;
519 }
521 }
520 }
522 }
521 }
523 }
@@ -1,418 +1,418 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2
2
3 <%inherit file="/base/base.html"/>
3 <%inherit file="/base/base.html"/>
4
4
5 <%def name="title()">
5 <%def name="title()">
6 ${_('%s Changelog') % c.repo_name}
6 ${_('%s Changelog') % c.repo_name}
7 %if c.changelog_for_path:
7 %if c.changelog_for_path:
8 /${c.changelog_for_path}
8 /${c.changelog_for_path}
9 %endif
9 %endif
10 %if c.rhodecode_name:
10 %if c.rhodecode_name:
11 &middot; ${h.branding(c.rhodecode_name)}
11 &middot; ${h.branding(c.rhodecode_name)}
12 %endif
12 %endif
13 </%def>
13 </%def>
14
14
15 <%def name="breadcrumbs_links()">
15 <%def name="breadcrumbs_links()">
16 %if c.changelog_for_path:
16 %if c.changelog_for_path:
17 /${c.changelog_for_path}
17 /${c.changelog_for_path}
18 %endif
18 %endif
19 ${ungettext('showing %d out of %d commit', 'showing %d out of %d commits', c.showing_commits) % (c.showing_commits, c.total_cs)}
19 ${ungettext('showing %d out of %d commit', 'showing %d out of %d commits', c.showing_commits) % (c.showing_commits, c.total_cs)}
20 </%def>
20 </%def>
21
21
22 <%def name="menu_bar_nav()">
22 <%def name="menu_bar_nav()">
23 ${self.menu_items(active='repositories')}
23 ${self.menu_items(active='repositories')}
24 </%def>
24 </%def>
25
25
26 <%def name="menu_bar_subnav()">
26 <%def name="menu_bar_subnav()">
27 ${self.repo_menu(active='changelog')}
27 ${self.repo_menu(active='changelog')}
28 </%def>
28 </%def>
29
29
30 <%def name="main()">
30 <%def name="main()">
31
31
32 <div class="box">
32 <div class="box">
33 <div class="title">
33 <div class="title">
34 ${self.repo_page_title(c.rhodecode_db_repo)}
34 ${self.repo_page_title(c.rhodecode_db_repo)}
35 <ul class="links">
35 <ul class="links">
36 <li>
36 <li>
37 <a href="#" class="btn btn-small" id="rev_range_container" style="display:none;"></a>
37 <a href="#" class="btn btn-small" id="rev_range_container" style="display:none;"></a>
38 %if c.rhodecode_db_repo.fork:
38 %if c.rhodecode_db_repo.fork:
39 <span>
39 <span>
40 <a id="compare_fork_button"
40 <a id="compare_fork_button"
41 title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}"
41 title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}"
42 class="btn btn-small"
42 class="btn btn-small"
43 href="${h.url('compare_url',
43 href="${h.url('compare_url',
44 repo_name=c.rhodecode_db_repo.fork.repo_name,
44 repo_name=c.rhodecode_db_repo.fork.repo_name,
45 source_ref_type=c.rhodecode_db_repo.landing_rev[0],
45 source_ref_type=c.rhodecode_db_repo.landing_rev[0],
46 source_ref=c.rhodecode_db_repo.landing_rev[1],
46 source_ref=c.rhodecode_db_repo.landing_rev[1],
47 target_repo=c.repo_name,
47 target_repo=c.repo_name,
48 target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],
48 target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],
49 target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1],
49 target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1],
50 merge=1)
50 merge=1)
51 }">
51 }">
52 <i class="icon-loop"></i>
52 <i class="icon-loop"></i>
53 ${_('Compare fork with Parent (%s)' % c.rhodecode_db_repo.fork.repo_name)}
53 ${_('Compare fork with Parent (%s)' % c.rhodecode_db_repo.fork.repo_name)}
54 </a>
54 </a>
55 </span>
55 </span>
56 %endif
56 %endif
57
57
58 ## pr open link
58 ## pr open link
59 %if h.is_hg(c.rhodecode_repo) or h.is_git(c.rhodecode_repo):
59 %if h.is_hg(c.rhodecode_repo) or h.is_git(c.rhodecode_repo):
60 <span>
60 <span>
61 <a id="open_new_pull_request" class="btn btn-small btn-success" href="${h.url('pullrequest_home',repo_name=c.repo_name)}">
61 <a id="open_new_pull_request" class="btn btn-small btn-success" href="${h.url('pullrequest_home',repo_name=c.repo_name)}">
62 ${_('Open new pull request')}
62 ${_('Open new pull request')}
63 </a>
63 </a>
64 </span>
64 </span>
65 %endif
65 %endif
66
66
67 ## clear selection
67 ## clear selection
68 <div title="${_('Clear selection')}" class="btn" id="rev_range_clear" style="display:none">
68 <div title="${_('Clear selection')}" class="btn" id="rev_range_clear" style="display:none">
69 ${_('Clear selection')}
69 ${_('Clear selection')}
70 </div>
70 </div>
71
71
72 </li>
72 </li>
73 </ul>
73 </ul>
74 </div>
74 </div>
75
75
76 % if c.pagination:
76 % if c.pagination:
77
77
78 <div class="graph-header">
78 <div class="graph-header">
79 <div id="filter_changelog">
79 <div id="filter_changelog">
80 ${h.hidden('branch_filter')}
80 ${h.hidden('branch_filter')}
81 %if c.selected_name:
81 %if c.selected_name:
82 <div class="btn btn-default" id="clear_filter" >
82 <div class="btn btn-default" id="clear_filter" >
83 ${_('Clear filter')}
83 ${_('Clear filter')}
84 </div>
84 </div>
85 %endif
85 %endif
86 </div>
86 </div>
87 ${self.breadcrumbs('breadcrumbs_light')}
87 ${self.breadcrumbs('breadcrumbs_light')}
88 </div>
88 </div>
89
89
90 <div id="graph">
90 <div id="graph">
91 <div class="graph-col-wrapper">
91 <div class="graph-col-wrapper">
92 <div id="graph_nodes">
92 <div id="graph_nodes">
93 <div id="graph_canvas" data-graph='${c.jsdata|n}'></div>
93 <div id="graph_canvas" data-graph='${c.jsdata|n}'></div>
94 </div>
94 </div>
95 <div id="graph_content" class="main-content graph_full_width">
95 <div id="graph_content" class="main-content graph_full_width">
96
96
97 <div class="table">
97 <div class="table">
98 <table id="changesets" class="rctable">
98 <table id="changesets" class="rctable">
99 <tr>
99 <tr>
100 ## checkbox
100 ## checkbox
101 <th></th>
101 <th></th>
102 <th colspan="2"></th>
102 <th colspan="2"></th>
103
103
104 <th>${_('Commit')}</th>
104 <th>${_('Commit')}</th>
105 ## commit message expand arrow
105 ## commit message expand arrow
106 <th></th>
106 <th></th>
107 <th>${_('Commit Message')}</th>
107 <th>${_('Commit Message')}</th>
108
108
109 <th>${_('Age')}</th>
109 <th>${_('Age')}</th>
110 <th>${_('Author')}</th>
110 <th>${_('Author')}</th>
111
111
112 <th>${_('Refs')}</th>
112 <th>${_('Refs')}</th>
113 </tr>
113 </tr>
114 <tbody>
114 <tbody>
115 %for cnt,commit in enumerate(c.pagination):
115 %for cnt,commit in enumerate(c.pagination):
116 <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
116 <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
117
117
118 <td class="td-checkbox">
118 <td class="td-checkbox">
119 ${h.checkbox(commit.raw_id,class_="commit-range")}
119 ${h.checkbox(commit.raw_id,class_="commit-range")}
120 </td>
120 </td>
121 <td class="td-status">
121 <td class="td-status">
122
122
123 %if c.statuses.get(commit.raw_id):
123 %if c.statuses.get(commit.raw_id):
124 <div class="changeset-status-ico">
124 <div class="changeset-status-ico">
125 %if c.statuses.get(commit.raw_id)[2]:
125 %if c.statuses.get(commit.raw_id)[2]:
126 <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.url('pullrequest_show',repo_name=c.statuses.get(commit.raw_id)[3],pull_request_id=c.statuses.get(commit.raw_id)[2])}">
126 <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.url('pullrequest_show',repo_name=c.statuses.get(commit.raw_id)[3],pull_request_id=c.statuses.get(commit.raw_id)[2])}">
127 <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div>
127 <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div>
128 </a>
128 </a>
129 %else:
129 %else:
130 <a class="tooltip" title="${_('Commit status: %s') % h.commit_status_lbl(c.statuses.get(commit.raw_id)[0])}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}">
130 <a class="tooltip" title="${_('Commit status: %s') % h.commit_status_lbl(c.statuses.get(commit.raw_id)[0])}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}">
131 <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div>
131 <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div>
132 </a>
132 </a>
133 %endif
133 %endif
134 </div>
134 </div>
135 %else:
135 %else:
136 <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div>
136 <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div>
137 %endif
137 %endif
138 </td>
138 </td>
139 <td class="td-comments comments-col">
139 <td class="td-comments comments-col">
140 %if c.comments.get(commit.raw_id):
140 %if c.comments.get(commit.raw_id):
141 <a title="${_('Commit has comments')}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}">
141 <a title="${_('Commit has comments')}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}">
142 <i class="icon-comment icon-comment-colored"></i> ${len(c.comments[commit.raw_id])}
142 <i class="icon-comment icon-comment-colored"></i> ${len(c.comments[commit.raw_id])}
143 </a>
143 </a>
144 %endif
144 %endif
145 </td>
145 </td>
146 <td class="td-hash">
146 <td class="td-hash">
147 <code>
147 <code>
148 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}">
148 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}">
149 <span class="commit_hash">${h.show_id(commit)}</span>
149 <span class="commit_hash">${h.show_id(commit)}</span>
150 </a>
150 </a>
151 </code>
151 </code>
152 </td>
152 </td>
153 <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}">
153 <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}">
154 <div class="show_more_col">
154 <div class="show_more_col">
155 <i class="show_more"></i>&nbsp;
155 <i class="show_more"></i>&nbsp;
156 </div>
156 </div>
157 </td>
157 </td>
158 <td class="td-description mid">
158 <td class="td-description mid">
159 <div class="log-container truncate-wrap">
159 <div class="log-container truncate-wrap">
160 <div class="message truncate" id="c-${commit.raw_id}">${h.urlify_commit_message(commit.message, c.repo_name)}</div>
160 <div class="message truncate" id="c-${commit.raw_id}">${h.urlify_commit_message(commit.message, c.repo_name)}</div>
161 </div>
161 </div>
162 </td>
162 </td>
163
163
164 <td class="td-time">
164 <td class="td-time">
165 ${h.age_component(commit.date)}
165 ${h.age_component(commit.date)}
166 </td>
166 </td>
167 <td class="td-user">
167 <td class="td-user">
168 ${self.gravatar_with_user(commit.author)}
168 ${self.gravatar_with_user(commit.author)}
169 </td>
169 </td>
170
170
171 <td class="td-tags tags-col truncate-wrap">
171 <td class="td-tags tags-col">
172 <div class="truncate tags-truncate" id="t-${commit.raw_id}">
172 <div id="t-${commit.raw_id}">
173 ## branch
173 ## branch
174 %if commit.branch:
174 %if commit.branch:
175 <span class="branchtag tag" title="${_('Branch %s') % commit.branch}">
175 <span class="branchtag tag" title="${_('Branch %s') % commit.branch}">
176 <a href="${h.url('changelog_home',repo_name=c.repo_name,branch=commit.branch)}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a>
176 <a href="${h.url('changelog_home',repo_name=c.repo_name,branch=commit.branch)}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a>
177 </span>
177 </span>
178 %endif
178 %endif
179
179
180 ## bookmarks
180 ## bookmarks
181 %if h.is_hg(c.rhodecode_repo):
181 %if h.is_hg(c.rhodecode_repo):
182 %for book in commit.bookmarks:
182 %for book in commit.bookmarks:
183 <span class="tag booktag" title="${_('Bookmark %s') % book}">
183 <span class="tag booktag" title="${_('Bookmark %s') % book}">
184 <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a>
184 <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a>
185 </span>
185 </span>
186 %endfor
186 %endfor
187 %endif
187 %endif
188
188
189 ## tags
189 ## tags
190 %for tag in commit.tags:
190 %for tag in commit.tags:
191 <span class="tagtag tag" title="${_('Tag %s') % tag}">
191 <span class="tagtag tag" title="${_('Tag %s') % tag}">
192 <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-tag"></i>${h.shorter(tag)}</a>
192 <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-tag"></i>${h.shorter(tag)}</a>
193 </span>
193 </span>
194 %endfor
194 %endfor
195
195
196 </div>
196 </div>
197 </td>
197 </td>
198 </tr>
198 </tr>
199 %endfor
199 %endfor
200 </tbody>
200 </tbody>
201 </table>
201 </table>
202 </div>
202 </div>
203 </div>
203 </div>
204 </div>
204 </div>
205 <div class="pagination-wh pagination-left">
205 <div class="pagination-wh pagination-left">
206 ${c.pagination.pager('$link_previous ~2~ $link_next')}
206 ${c.pagination.pager('$link_previous ~2~ $link_next')}
207 </div>
207 </div>
208
208
209 <script type="text/javascript" src="${h.asset('js/jquery.commits-graph.js')}"></script>
209 <script type="text/javascript" src="${h.asset('js/jquery.commits-graph.js')}"></script>
210 <script type="text/javascript">
210 <script type="text/javascript">
211 var cache = {};
211 var cache = {};
212 $(function(){
212 $(function(){
213
213
214 // Create links to commit ranges when range checkboxes are selected
214 // Create links to commit ranges when range checkboxes are selected
215 var $commitCheckboxes = $('.commit-range');
215 var $commitCheckboxes = $('.commit-range');
216 // cache elements
216 // cache elements
217 var $commitRangeContainer = $('#rev_range_container');
217 var $commitRangeContainer = $('#rev_range_container');
218 var $commitRangeClear = $('#rev_range_clear');
218 var $commitRangeClear = $('#rev_range_clear');
219
219
220 var checkboxRangeSelector = function(e){
220 var checkboxRangeSelector = function(e){
221 var selectedCheckboxes = [];
221 var selectedCheckboxes = [];
222 for (pos in $commitCheckboxes){
222 for (pos in $commitCheckboxes){
223 if($commitCheckboxes[pos].checked){
223 if($commitCheckboxes[pos].checked){
224 selectedCheckboxes.push($commitCheckboxes[pos]);
224 selectedCheckboxes.push($commitCheckboxes[pos]);
225 }
225 }
226 }
226 }
227 var open_new_pull_request = $('#open_new_pull_request');
227 var open_new_pull_request = $('#open_new_pull_request');
228 if(open_new_pull_request){
228 if(open_new_pull_request){
229 var selected_changes = selectedCheckboxes.length;
229 var selected_changes = selectedCheckboxes.length;
230 if (selected_changes > 1 || selected_changes == 1 && templateContext.repo_type != 'hg') {
230 if (selected_changes > 1 || selected_changes == 1 && templateContext.repo_type != 'hg') {
231 open_new_pull_request.hide();
231 open_new_pull_request.hide();
232 } else {
232 } else {
233 if (selected_changes == 1) {
233 if (selected_changes == 1) {
234 open_new_pull_request.html(_gettext('Open new pull request for selected commit'));
234 open_new_pull_request.html(_gettext('Open new pull request for selected commit'));
235 } else if (selected_changes == 0) {
235 } else if (selected_changes == 0) {
236 open_new_pull_request.html(_gettext('Open new pull request'));
236 open_new_pull_request.html(_gettext('Open new pull request'));
237 }
237 }
238 open_new_pull_request.show();
238 open_new_pull_request.show();
239 }
239 }
240 }
240 }
241
241
242 if (selectedCheckboxes.length>0){
242 if (selectedCheckboxes.length>0){
243 var revEnd = selectedCheckboxes[0].name;
243 var revEnd = selectedCheckboxes[0].name;
244 var revStart = selectedCheckboxes[selectedCheckboxes.length-1].name;
244 var revStart = selectedCheckboxes[selectedCheckboxes.length-1].name;
245 var url = pyroutes.url('changeset_home',
245 var url = pyroutes.url('changeset_home',
246 {'repo_name': '${c.repo_name}',
246 {'repo_name': '${c.repo_name}',
247 'revision': revStart+'...'+revEnd});
247 'revision': revStart+'...'+revEnd});
248
248
249 var link = (revStart == revEnd)
249 var link = (revStart == revEnd)
250 ? _gettext('Show selected commit __S')
250 ? _gettext('Show selected commit __S')
251 : _gettext('Show selected commits __S ... __E');
251 : _gettext('Show selected commits __S ... __E');
252
252
253 link = link.replace('__S', revStart.substr(0,6));
253 link = link.replace('__S', revStart.substr(0,6));
254 link = link.replace('__E', revEnd.substr(0,6));
254 link = link.replace('__E', revEnd.substr(0,6));
255
255
256 $commitRangeContainer
256 $commitRangeContainer
257 .attr('href',url)
257 .attr('href',url)
258 .html(link)
258 .html(link)
259 .show();
259 .show();
260
260
261 $commitRangeClear.show();
261 $commitRangeClear.show();
262 var _url = pyroutes.url('pullrequest_home',
262 var _url = pyroutes.url('pullrequest_home',
263 {'repo_name': '${c.repo_name}',
263 {'repo_name': '${c.repo_name}',
264 'commit': revEnd});
264 'commit': revEnd});
265 open_new_pull_request.attr('href', _url);
265 open_new_pull_request.attr('href', _url);
266 $('#compare_fork_button').hide();
266 $('#compare_fork_button').hide();
267 } else {
267 } else {
268 $commitRangeContainer.hide();
268 $commitRangeContainer.hide();
269 $commitRangeClear.hide();
269 $commitRangeClear.hide();
270
270
271 %if c.branch_name:
271 %if c.branch_name:
272 var _url = pyroutes.url('pullrequest_home',
272 var _url = pyroutes.url('pullrequest_home',
273 {'repo_name': '${c.repo_name}',
273 {'repo_name': '${c.repo_name}',
274 'branch':'${c.branch_name}'});
274 'branch':'${c.branch_name}'});
275 open_new_pull_request.attr('href', _url);
275 open_new_pull_request.attr('href', _url);
276 %else:
276 %else:
277 var _url = pyroutes.url('pullrequest_home',
277 var _url = pyroutes.url('pullrequest_home',
278 {'repo_name': '${c.repo_name}'});
278 {'repo_name': '${c.repo_name}'});
279 open_new_pull_request.attr('href', _url);
279 open_new_pull_request.attr('href', _url);
280 %endif
280 %endif
281 $('#compare_fork_button').show();
281 $('#compare_fork_button').show();
282 }
282 }
283 };
283 };
284
284
285 $commitCheckboxes.on('click', checkboxRangeSelector);
285 $commitCheckboxes.on('click', checkboxRangeSelector);
286
286
287 $commitRangeClear.on('click',function(e) {
287 $commitRangeClear.on('click',function(e) {
288 $commitCheckboxes.attr('checked', false)
288 $commitCheckboxes.attr('checked', false)
289 checkboxRangeSelector();
289 checkboxRangeSelector();
290 e.preventDefault();
290 e.preventDefault();
291 });
291 });
292
292
293 // make sure the buttons are consistent when navigate back and forth
293 // make sure the buttons are consistent when navigate back and forth
294 checkboxRangeSelector();
294 checkboxRangeSelector();
295
295
296
296
297 var msgs = $('.message');
297 var msgs = $('.message');
298 // get first element height
298 // get first element height
299 var el = $('#graph_content .container')[0];
299 var el = $('#graph_content .container')[0];
300 var row_h = el.clientHeight;
300 var row_h = el.clientHeight;
301 for (var i=0; i < msgs.length; i++) {
301 for (var i=0; i < msgs.length; i++) {
302 var m = msgs[i];
302 var m = msgs[i];
303
303
304 var h = m.clientHeight;
304 var h = m.clientHeight;
305 var pad = $(m).css('padding');
305 var pad = $(m).css('padding');
306 if (h > row_h) {
306 if (h > row_h) {
307 var offset = row_h - (h+12);
307 var offset = row_h - (h+12);
308 $(m.nextElementSibling).css('display','block');
308 $(m.nextElementSibling).css('display','block');
309 $(m.nextElementSibling).css('margin-top',offset+'px');
309 $(m.nextElementSibling).css('margin-top',offset+'px');
310 }
310 }
311 }
311 }
312
312
313 $('.expand_commit').on('click',function(e){
313 $('.expand_commit').on('click',function(e){
314 var target_expand = $(this);
314 var target_expand = $(this);
315 var cid = target_expand.data('commitId');
315 var cid = target_expand.data('commitId');
316
316
317 if (target_expand.hasClass('open')){
317 if (target_expand.hasClass('open')){
318 $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'});
318 $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'});
319 $('#t-'+cid).css({'height': 'auto', 'line-height': '.9em', 'text-overflow': 'ellipsis', 'overflow':'hidden', 'white-space':'nowrap'});
319 $('#t-'+cid).css({'height': 'auto', 'line-height': '.9em', 'text-overflow': 'ellipsis', 'overflow':'hidden', 'white-space':'nowrap'});
320 target_expand.removeClass('open');
320 target_expand.removeClass('open');
321 }
321 }
322 else {
322 else {
323 $('#c-'+cid).css({'height': 'auto', 'white-space': 'pre-line', 'text-overflow': 'initial', 'overflow':'visible'});
323 $('#c-'+cid).css({'height': 'auto', 'white-space': 'pre-line', 'text-overflow': 'initial', 'overflow':'visible'});
324 $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible', 'white-space':'normal'});
324 $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible', 'white-space':'normal'});
325 target_expand.addClass('open');
325 target_expand.addClass('open');
326 }
326 }
327 // redraw the graph
327 // redraw the graph
328 graph_options.height = $("#changesets").height();
328 graph_options.height = $("#changesets").height();
329 $("canvas").remove();
329 $("canvas").remove();
330 $("[data-graph]").commits(graph_options);
330 $("[data-graph]").commits(graph_options);
331 });
331 });
332
332
333 $("#clear_filter").on("click", function() {
333 $("#clear_filter").on("click", function() {
334 var filter = {'repo_name': '${c.repo_name}'};
334 var filter = {'repo_name': '${c.repo_name}'};
335 window.location = pyroutes.url('changelog_home', filter);
335 window.location = pyroutes.url('changelog_home', filter);
336 });
336 });
337
337
338 $("#branch_filter").select2({
338 $("#branch_filter").select2({
339 'dropdownAutoWidth': true,
339 'dropdownAutoWidth': true,
340 'width': 'resolve',
340 'width': 'resolve',
341 'placeholder': "${c.selected_name or _('Filter changelog')}",
341 'placeholder': "${c.selected_name or _('Filter changelog')}",
342 containerCssClass: "drop-menu",
342 containerCssClass: "drop-menu",
343 dropdownCssClass: "drop-menu-dropdown",
343 dropdownCssClass: "drop-menu-dropdown",
344 query: function(query){
344 query: function(query){
345 var key = 'cache';
345 var key = 'cache';
346 var cached = cache[key] ;
346 var cached = cache[key] ;
347 if(cached) {
347 if(cached) {
348 var data = {results: []};
348 var data = {results: []};
349 //filter results
349 //filter results
350 $.each(cached.results, function(){
350 $.each(cached.results, function(){
351 var section = this.text;
351 var section = this.text;
352 var children = [];
352 var children = [];
353 $.each(this.children, function(){
353 $.each(this.children, function(){
354 if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){
354 if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){
355 children.push({'id': this.id, 'text': this.text, 'type': this.type})
355 children.push({'id': this.id, 'text': this.text, 'type': this.type})
356 }
356 }
357 });
357 });
358 data.results.push({'text': section, 'children': children});
358 data.results.push({'text': section, 'children': children});
359 query.callback({results: data.results});
359 query.callback({results: data.results});
360 });
360 });
361 }else{
361 }else{
362 $.ajax({
362 $.ajax({
363 url: pyroutes.url('repo_refs_changelog_data', {'repo_name': '${c.repo_name}'}),
363 url: pyroutes.url('repo_refs_changelog_data', {'repo_name': '${c.repo_name}'}),
364 data: {},
364 data: {},
365 dataType: 'json',
365 dataType: 'json',
366 type: 'GET',
366 type: 'GET',
367 success: function(data) {
367 success: function(data) {
368 cache[key] = data;
368 cache[key] = data;
369 query.callback({results: data.results});
369 query.callback({results: data.results});
370 }
370 }
371 })
371 })
372 }
372 }
373 }
373 }
374 });
374 });
375
375
376 $('#branch_filter').on('change', function(e){
376 $('#branch_filter').on('change', function(e){
377 var data = $('#branch_filter').select2('data');
377 var data = $('#branch_filter').select2('data');
378 var selected = data.text;
378 var selected = data.text;
379 var filter = {'repo_name': '${c.repo_name}'};
379 var filter = {'repo_name': '${c.repo_name}'};
380 if(data.type == 'branch' || data.type == 'branch_closed'){
380 if(data.type == 'branch' || data.type == 'branch_closed'){
381 filter["branch"] = selected;
381 filter["branch"] = selected;
382 }
382 }
383 else if (data.type == 'book'){
383 else if (data.type == 'book'){
384 filter["bookmark"] = selected;
384 filter["bookmark"] = selected;
385 }
385 }
386 window.location = pyroutes.url('changelog_home', filter);
386 window.location = pyroutes.url('changelog_home', filter);
387 });
387 });
388
388
389 // Determine max number of edges per row in graph
389 // Determine max number of edges per row in graph
390 var jsdata = $.parseJSON($("[data-graph]").attr('data-graph'));
390 var jsdata = $.parseJSON($("[data-graph]").attr('data-graph'));
391 var edgeCount = 1;
391 var edgeCount = 1;
392 $.each(jsdata, function(i, item){
392 $.each(jsdata, function(i, item){
393 $.each(item[2], function(key, value) {
393 $.each(item[2], function(key, value) {
394 if (value[1] > edgeCount){
394 if (value[1] > edgeCount){
395 edgeCount = value[1];
395 edgeCount = value[1];
396 }
396 }
397 });
397 });
398 });
398 });
399 var x_step = Math.min(18, Math.floor(86 / edgeCount));
399 var x_step = Math.min(18, Math.floor(86 / edgeCount));
400 var graph_options = {
400 var graph_options = {
401 width: 100,
401 width: 100,
402 height: $("#changesets").height(),
402 height: $("#changesets").height(),
403 x_step: x_step,
403 x_step: x_step,
404 y_step: 42,
404 y_step: 42,
405 dotRadius: 3.5,
405 dotRadius: 3.5,
406 lineWidth: 2.5
406 lineWidth: 2.5
407 };
407 };
408 $("[data-graph]").commits(graph_options);
408 $("[data-graph]").commits(graph_options);
409
409
410 });
410 });
411
411
412 </script>
412 </script>
413 %else:
413 %else:
414 ${_('There are no changes yet')}
414 ${_('There are no changes yet')}
415 %endif
415 %endif
416 </div>
416 </div>
417 </div>
417 </div>
418 </%def>
418 </%def>
@@ -1,136 +1,136 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%namespace name="base" file="/base/base.html"/>
2 <%namespace name="base" file="/base/base.html"/>
3 %if c.repo_commits:
3 %if c.repo_commits:
4 <table class="rctable repo_summary table_disp">
4 <table class="rctable repo_summary table_disp">
5 <tr>
5 <tr>
6
6
7 <th class="status" colspan="2"></th>
7 <th class="status" colspan="2"></th>
8 <th>${_('Commit')}</th>
8 <th>${_('Commit')}</th>
9 <th>${_('Commit message')}</th>
9 <th>${_('Commit message')}</th>
10 <th>${_('Age')}</th>
10 <th>${_('Age')}</th>
11 <th>${_('Author')}</th>
11 <th>${_('Author')}</th>
12 <th>${_('Refs')}</th>
12 <th>${_('Refs')}</th>
13 </tr>
13 </tr>
14 %for cnt,cs in enumerate(c.repo_commits):
14 %for cnt,cs in enumerate(c.repo_commits):
15 <tr class="parity${cnt%2}">
15 <tr class="parity${cnt%2}">
16
16
17 <td class="td-status">
17 <td class="td-status">
18 %if c.statuses.get(cs.raw_id):
18 %if c.statuses.get(cs.raw_id):
19 <div class="changeset-status-ico shortlog">
19 <div class="changeset-status-ico shortlog">
20 %if c.statuses.get(cs.raw_id)[2]:
20 %if c.statuses.get(cs.raw_id)[2]:
21 <a class="tooltip" title="${_('Commit status: %s\nClick to open associated pull request #%s') % (c.statuses.get(cs.raw_id)[0], c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}">
21 <a class="tooltip" title="${_('Commit status: %s\nClick to open associated pull request #%s') % (c.statuses.get(cs.raw_id)[0], c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}">
22 <div class="${'flag_status %s' % c.statuses.get(cs.raw_id)[0]}"></div>
22 <div class="${'flag_status %s' % c.statuses.get(cs.raw_id)[0]}"></div>
23 </a>
23 </a>
24 %else:
24 %else:
25 <a class="tooltip" title="${_('Commit status: %s') % h.commit_status_lbl(c.statuses.get(cs.raw_id)[0])}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}">
25 <a class="tooltip" title="${_('Commit status: %s') % h.commit_status_lbl(c.statuses.get(cs.raw_id)[0])}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}">
26 <div class="${'flag_status %s' % c.statuses.get(cs.raw_id)[0]}"></div>
26 <div class="${'flag_status %s' % c.statuses.get(cs.raw_id)[0]}"></div>
27 </a>
27 </a>
28 %endif
28 %endif
29 </div>
29 </div>
30 %else:
30 %else:
31 <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div>
31 <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div>
32 %endif
32 %endif
33 </td>
33 </td>
34 <td class="td-comments">
34 <td class="td-comments">
35 %if c.comments.get(cs.raw_id,[]):
35 %if c.comments.get(cs.raw_id,[]):
36 <a title="${_('Commit has comments')}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}">
36 <a title="${_('Commit has comments')}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}">
37 <i class="icon-comment icon-comment-colored"></i> ${len(c.comments[cs.raw_id])}
37 <i class="icon-comment icon-comment-colored"></i> ${len(c.comments[cs.raw_id])}
38 </a>
38 </a>
39 %endif
39 %endif
40 </td>
40 </td>
41 <td class="td-commit">
41 <td class="td-commit">
42 <pre><a href="${h.url('changeset_home', repo_name=c.repo_name, revision=cs.raw_id)}">${h.show_id(cs)}</a></pre>
42 <pre><a href="${h.url('changeset_home', repo_name=c.repo_name, revision=cs.raw_id)}">${h.show_id(cs)}</a></pre>
43 </td>
43 </td>
44
44
45 <td class="td-description mid">
45 <td class="td-description mid">
46 <div class="log-container truncate-wrap">
46 <div class="log-container truncate-wrap">
47 <div class="message truncate" id="c-${cs.raw_id}">${h.urlify_commit_message(cs.message, c.repo_name)}</div>
47 <div class="message truncate" id="c-${cs.raw_id}">${h.urlify_commit_message(cs.message, c.repo_name)}</div>
48 </div>
48 </div>
49 </td>
49 </td>
50
50
51 <td class="td-time">
51 <td class="td-time">
52 ${h.age_component(cs.date)}
52 ${h.age_component(cs.date)}
53 </td>
53 </td>
54 <td class="td-user author">
54 <td class="td-user author">
55 ${base.gravatar_with_user(cs.author)}
55 ${base.gravatar_with_user(cs.author)}
56 </td>
56 </td>
57
57
58 <td class="td-tags truncate-wrap">
58 <td class="td-tags">
59 <div class="truncate tags-truncate"><div class="autoexpand">
59 <div class="autoexpand">
60 %if h.is_hg(c.rhodecode_repo):
60 %if h.is_hg(c.rhodecode_repo):
61 %for book in cs.bookmarks:
61 %for book in cs.bookmarks:
62 <span class="booktag tag" title="${_('Bookmark %s') % book}">
62 <span class="booktag tag" title="${_('Bookmark %s') % book}">
63 <a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a>
63 <a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a>
64 </span>
64 </span>
65 %endfor
65 %endfor
66 %endif
66 %endif
67 ## tags
67 ## tags
68 %for tag in cs.tags:
68 %for tag in cs.tags:
69 <span class="tagtag tag" title="${_('Tag %s') % tag}">
69 <span class="tagtag tag" title="${_('Tag %s') % tag}">
70 <a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}"><i class="icon-tag"></i>${h.shorter(tag)}</a>
70 <a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}"><i class="icon-tag"></i>${h.shorter(tag)}</a>
71 </span>
71 </span>
72 %endfor
72 %endfor
73
73
74 ## branch
74 ## branch
75 %if cs.branch:
75 %if cs.branch:
76 <span class="branchtag tag" title="${_('Branch %s') % cs.branch}">
76 <span class="branchtag tag" title="${_('Branch %s') % cs.branch}">
77 <a href="${h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch)}"><i class="icon-code-fork"></i>${h.shorter(cs.branch)}</a>
77 <a href="${h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch)}"><i class="icon-code-fork"></i>${h.shorter(cs.branch)}</a>
78 </span>
78 </span>
79 %endif
79 %endif
80 </div>
80 </div>
81 </td>
81 </td>
82 </tr>
82 </tr>
83 %endfor
83 %endfor
84
84
85 </table>
85 </table>
86
86
87 <script type="text/javascript">
87 <script type="text/javascript">
88 $(document).pjax('#shortlog_data .pager_link','#shortlog_data', {timeout: 2000, scrollTo: false });
88 $(document).pjax('#shortlog_data .pager_link','#shortlog_data', {timeout: 2000, scrollTo: false });
89 $(document).on('pjax:success', function(){ timeagoActivate(); });
89 $(document).on('pjax:success', function(){ timeagoActivate(); });
90 </script>
90 </script>
91
91
92 <div class="pagination-wh pagination-left">
92 <div class="pagination-wh pagination-left">
93 ${c.repo_commits.pager('$link_previous ~2~ $link_next')}
93 ${c.repo_commits.pager('$link_previous ~2~ $link_next')}
94 </div>
94 </div>
95 %else:
95 %else:
96
96
97 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
97 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
98 <div class="quick_start">
98 <div class="quick_start">
99 <div class="fieldset">
99 <div class="fieldset">
100 <div class="left-label">${_('Add or upload files directly via RhodeCode:')}</div>
100 <div class="left-label">${_('Add or upload files directly via RhodeCode:')}</div>
101 <div class="right-content">
101 <div class="right-content">
102 <div id="add_node_id" class="add_node">
102 <div id="add_node_id" class="add_node">
103 <a href="${h.url('files_add_home',repo_name=c.repo_name,revision=0,f_path='', anchor='edit')}" class="btn btn-default">${_('Add New File')}</a>
103 <a href="${h.url('files_add_home',repo_name=c.repo_name,revision=0,f_path='', anchor='edit')}" class="btn btn-default">${_('Add New File')}</a>
104 </div>
104 </div>
105 </div>
105 </div>
106 %endif
106 %endif
107 </div>
107 </div>
108
108
109 %if not h.is_svn(c.rhodecode_repo):
109 %if not h.is_svn(c.rhodecode_repo):
110 <div class="fieldset">
110 <div class="fieldset">
111 <div class="left-label">${_('Push new repo:')}</div>
111 <div class="left-label">${_('Push new repo:')}</div>
112 <div class="right-content">
112 <div class="right-content">
113 <pre>
113 <pre>
114 ${c.rhodecode_repo.alias} clone ${c.clone_repo_url}
114 ${c.rhodecode_repo.alias} clone ${c.clone_repo_url}
115 ${c.rhodecode_repo.alias} add README # add first file
115 ${c.rhodecode_repo.alias} add README # add first file
116 ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message
116 ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message
117 ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back
117 ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back
118 </pre>
118 </pre>
119 </div>
119 </div>
120 </div>
120 </div>
121 <div class="fieldset">
121 <div class="fieldset">
122 <div class="left-label">${_('Existing repository?')}</div>
122 <div class="left-label">${_('Existing repository?')}</div>
123 <div class="right-content">
123 <div class="right-content">
124 <pre>
124 <pre>
125 %if h.is_git(c.rhodecode_repo):
125 %if h.is_git(c.rhodecode_repo):
126 git remote add origin ${c.clone_repo_url}
126 git remote add origin ${c.clone_repo_url}
127 git push -u origin master
127 git push -u origin master
128 %else:
128 %else:
129 hg push ${c.clone_repo_url}
129 hg push ${c.clone_repo_url}
130 %endif
130 %endif
131 </pre>
131 </pre>
132 </div>
132 </div>
133 </div>
133 </div>
134 %endif
134 %endif
135 </div>
135 </div>
136 %endif
136 %endif
General Comments 0
You need to be logged in to leave comments. Login now