##// END OF EJS Templates
summary: re-organize order of summary expanded area...
marcink -
r3657:17d7a4d6 new-ui
parent child Browse files
Show More
@@ -1,514 +1,496 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 .inactive td {
67 .inactive td {
68 background-color: @grey6;
68 background-color: @grey6;
69 }
69 }
70 th {
70 th {
71 text-align: left;
71 text-align: left;
72 font-weight: @text-semibold-weight;
72 font-weight: @text-semibold-weight;
73 font-family: @text-semibold;
73 font-family: @text-semibold;
74 }
74 }
75
75
76 .hl {
76 .hl {
77 td {
77 td {
78 background-color: lighten(@alert4,25%);
78 background-color: lighten(@alert4,25%);
79 }
79 }
80 }
80 }
81
81
82 // Special Data Cell Types
82 // Special Data Cell Types
83 // See style guide for desciptions and examples.
83 // See style guide for desciptions and examples.
84
84
85 td {
85 td {
86
86
87 &.user {
87 &.user {
88 padding-left: 1em;
88 padding-left: 1em;
89 }
89 }
90
90
91 &.td-rss {
91 &.td-rss {
92 width: 20px;
92 width: 20px;
93 min-width: 0;
93 min-width: 0;
94 margin: 0;
94 margin: 0;
95 }
95 }
96
96
97 &.quick_repo_menu {
97 &.quick_repo_menu {
98 width: 15px;
98 width: 15px;
99 text-align: center;
99 text-align: center;
100
100
101 &:hover {
101 &:hover {
102 background-color: @grey5;
102 background-color: @grey5;
103 }
103 }
104 }
104 }
105
105
106 &.td-hash {
106 &.td-hash {
107 min-width: 80px;
107 min-width: 80px;
108 width: 200px;
108 width: 200px;
109
109
110 .obsolete {
110 .obsolete {
111 text-decoration: line-through;
111 text-decoration: line-through;
112 color: lighten(@grey2,25%);
112 color: lighten(@grey2,25%);
113 }
113 }
114 }
114 }
115
115
116 &.td-time {
116 &.td-time {
117 width: 160px;
117 width: 160px;
118 white-space: nowrap;
118 white-space: nowrap;
119 }
119 }
120
120
121 &.annotate{
121 &.annotate{
122 padding-right: 0;
122 padding-right: 0;
123
123
124 div.annotatediv{
124 div.annotatediv{
125 margin: 0 0.7em;
125 margin: 0 0.7em;
126 }
126 }
127 }
127 }
128
128
129 &.tags-col {
129 &.tags-col {
130 padding-right: 0;
130 padding-right: 0;
131 }
131 }
132
132
133 &.td-description {
133 &.td-description {
134 min-width: 350px;
134 min-width: 350px;
135
135
136 &.truncate, .truncate-wrap {
136 &.truncate, .truncate-wrap {
137 white-space: nowrap;
137 white-space: nowrap;
138 overflow: hidden;
138 overflow: hidden;
139 text-overflow: ellipsis;
139 text-overflow: ellipsis;
140 max-width: 350px;
140 max-width: 350px;
141 }
141 }
142 }
142 }
143
143
144 &.td-grid-name {
144 &.td-grid-name {
145 white-space: nowrap;
145 white-space: nowrap;
146 min-width: 300px;
146 min-width: 300px;
147 }
147 }
148
148
149 &.td-componentname {
149 &.td-componentname {
150 white-space: nowrap;
150 white-space: nowrap;
151 }
151 }
152
152
153 &.td-name {
153 &.td-name {
154
154
155 }
155 }
156
156
157 &.td-journalaction {
157 &.td-journalaction {
158 min-width: 300px;
158 min-width: 300px;
159
159
160 .journal_action_params {
160 .journal_action_params {
161 // waiting for feedback
161 // waiting for feedback
162 }
162 }
163 }
163 }
164
164
165 &.td-active {
165 &.td-active {
166 padding-left: .65em;
166 padding-left: .65em;
167 }
167 }
168
168
169 &.td-url {
169 &.td-url {
170 white-space: nowrap;
170 white-space: nowrap;
171 }
171 }
172
172
173 &.td-comments {
173 &.td-comments {
174 min-width: 3em;
174 min-width: 3em;
175 }
175 }
176
176
177 &.td-buttons {
177 &.td-buttons {
178 padding: .3em 0;
178 padding: .3em 0;
179 }
179 }
180 &.td-align-top {
180 &.td-align-top {
181 vertical-align: text-top
181 vertical-align: text-top
182 }
182 }
183 &.td-action {
183 &.td-action {
184 // this is for the remove/delete/edit buttons
184 // this is for the remove/delete/edit buttons
185 padding-right: 0;
185 padding-right: 0;
186 min-width: 95px;
186 min-width: 95px;
187 text-transform: capitalize;
187 text-transform: capitalize;
188
188
189 i {
189 i {
190 display: none;
190 display: none;
191 }
191 }
192 }
192 }
193
193
194 // TODO: lisa: this needs to be cleaned up with the buttons
194 // TODO: lisa: this needs to be cleaned up with the buttons
195 .grid_edit,
195 .grid_edit,
196 .grid_delete {
196 .grid_delete {
197 display: inline-block;
197 display: inline-block;
198 margin: 0 @padding/3 0 0;
198 margin: 0 @padding/3 0 0;
199 font-family: @text-light;
199 font-family: @text-light;
200
200
201 i {
201 i {
202 display: none;
202 display: none;
203 }
203 }
204 }
204 }
205
205
206 .grid_edit + .grid_delete {
206 .grid_edit + .grid_delete {
207 border-left: @border-thickness solid @grey5;
207 border-left: @border-thickness solid @grey5;
208 padding-left: @padding/2;
208 padding-left: @padding/2;
209 }
209 }
210
210
211 &.td-compare {
211 &.td-compare {
212
212
213 input {
213 input {
214 margin-right: 1em;
214 margin-right: 1em;
215 }
215 }
216
216
217 .compare-radio-button {
217 .compare-radio-button {
218 margin: 0 1em 0 0;
218 margin: 0 1em 0 0;
219 }
219 }
220
220
221
221
222 }
222 }
223
223
224 &.td-tags {
224 &.td-tags {
225 padding: .5em 1em .5em 0;
225 padding: .5em 1em .5em 0;
226 width: 140px;
226 width: 140px;
227
227
228 .tag {
228 .tag {
229 margin: 1px;
229 margin: 1px;
230 float: left;
230 float: left;
231 }
231 }
232 }
232 }
233
233
234 .icon-svn, .icon-hg, .icon-git {
234 .icon-svn, .icon-hg, .icon-git {
235 font-size: 1.4em;
235 font-size: 1.4em;
236 }
236 }
237
237
238 &.collapse_commit,
238 &.collapse_commit,
239 &.expand_commit {
239 &.expand_commit {
240 padding-right: 0;
240 padding-right: 0;
241 padding-left: 1em;
241 padding-left: 1em;
242 cursor: pointer;
242 cursor: pointer;
243 width: 20px;
243 width: 20px;
244 }
244 }
245 }
245 }
246
246
247 .perm_admin_row {
247 .perm_admin_row {
248 color: @grey4;
248 color: @grey4;
249 background-color: @grey6;
249 background-color: @grey6;
250 }
250 }
251
251
252 .noborder {
252 .noborder {
253 border: none;
253 border: none;
254
254
255 td {
255 td {
256 border: none;
256 border: none;
257 }
257 }
258 }
258 }
259 }
259 }
260 .rctable.audit-log {
260 .rctable.audit-log {
261 td {
261 td {
262 vertical-align: top;
262 vertical-align: top;
263 }
263 }
264 }
264 }
265
265
266 // TRUNCATING
266 // TRUNCATING
267 // TODO: lisaq: should this possibly be moved out of tables.less?
267 // TODO: lisaq: should this possibly be moved out of tables.less?
268 // for truncated text
268 // for truncated text
269 // used inside of table cells and in code block headers
269 // used inside of table cells and in code block headers
270 .truncate-wrap {
270 .truncate-wrap {
271 white-space: nowrap !important;
271 white-space: nowrap !important;
272
272
273 //truncated text
273 //truncated text
274 .truncate {
274 .truncate {
275 max-width: 450px;
275 max-width: 450px;
276 width: 300px;
276 width: 300px;
277 overflow: hidden;
277 overflow: hidden;
278 text-overflow: ellipsis;
278 text-overflow: ellipsis;
279 -o-text-overflow: ellipsis;
279 -o-text-overflow: ellipsis;
280 -ms-text-overflow: ellipsis;
280 -ms-text-overflow: ellipsis;
281
281
282 &.autoexpand {
282 &.autoexpand {
283 width: 120px;
283 width: 120px;
284 margin-right: 200px;
284 margin-right: 200px;
285 }
285 }
286 }
286 }
287 &:hover .truncate.autoexpand {
287 &:hover .truncate.autoexpand {
288 overflow: visible;
288 overflow: visible;
289 }
289 }
290
290
291 .tags-truncate {
291 .tags-truncate {
292 width: 150px;
292 width: 150px;
293 height: 22px;
293 height: 22px;
294 overflow: hidden;
294 overflow: hidden;
295
295
296 .tag {
296 .tag {
297 display: inline-block;
297 display: inline-block;
298 }
298 }
299
299
300 &.truncate {
300 &.truncate {
301 height: 22px;
301 height: 22px;
302 max-height:2em;
302 max-height:2em;
303 width: 140px;
303 width: 140px;
304 }
304 }
305 }
305 }
306 }
306 }
307
307
308 .apikeys_wrap {
308 .apikeys_wrap {
309 margin-bottom: @padding;
309 margin-bottom: @padding;
310
310
311 table.rctable td:first-child {
311 table.rctable td:first-child {
312 width: 340px;
312 width: 340px;
313 }
313 }
314 }
314 }
315
315
316
316
317
317
318 // SPECIAL CASES
318 // SPECIAL CASES
319
319
320 // Repository Followers
320 // Repository Followers
321 table.rctable.followers_data {
321 table.rctable.followers_data {
322 width: 75%;
322 width: 75%;
323 margin: 0;
323 margin: 0;
324 }
324 }
325
325
326 // Repository List
326 // Repository List
327 // Group Members List
327 // Group Members List
328 table.rctable.group_members,
328 table.rctable.group_members,
329 table#repo_list_table {
329 table#repo_list_table {
330 min-width: 600px;
330 min-width: 600px;
331 }
331 }
332
332
333 // Keyboard mappings
333 // Keyboard mappings
334 table.keyboard-mappings {
334 table.keyboard-mappings {
335 th {
335 th {
336 text-align: left;
336 text-align: left;
337 font-weight: @text-semibold-weight;
337 font-weight: @text-semibold-weight;
338 font-family: @text-semibold;
338 font-family: @text-semibold;
339 }
339 }
340 }
340 }
341
341
342 // Branches, Tags, and Bookmarks
342 // Branches, Tags, and Bookmarks
343 #obj_list_table.dataTable {
343 #obj_list_table.dataTable {
344 td.td-time {
344 td.td-time {
345 padding-right: 1em;
345 padding-right: 1em;
346 }
346 }
347 }
347 }
348
348
349 // User Admin
349 // User Admin
350 .rctable.useremails,
350 .rctable.useremails,
351 .rctable.account_emails {
351 .rctable.account_emails {
352 .tag,
352 .tag,
353 .btn {
353 .btn {
354 float: right;
354 float: right;
355 }
355 }
356 .btn { //to line up with tags
356 .btn { //to line up with tags
357 margin-right: 1.65em;
357 margin-right: 1.65em;
358 }
358 }
359 }
359 }
360
360
361 // User List
361 // User List
362 #user_list_table {
362 #user_list_table {
363
363
364 td.td-user {
364 td.td-user {
365 min-width: 100px;
365 min-width: 100px;
366 }
366 }
367 }
367 }
368
368
369 // Pull Request List Table
369 // Pull Request List Table
370 #pull_request_list_table.dataTable {
370 #pull_request_list_table.dataTable {
371
371
372 //TODO: lisa: This needs to be removed once the description is adjusted
372 //TODO: lisa: This needs to be removed once the description is adjusted
373 // for using an expand_commit button (see issue 765)
373 // for using an expand_commit button (see issue 765)
374 td {
374 td {
375 vertical-align: middle;
375 vertical-align: middle;
376 }
376 }
377 }
377 }
378
378
379 // Settings (no border)
379 // Settings (no border)
380 table.rctable.dl-settings {
380 table.rctable.dl-settings {
381 td {
381 td {
382 border: none;
382 border: none;
383 vertical-align: baseline;
383 vertical-align: baseline;
384 }
384 }
385 }
385 }
386
386
387
387
388 // Statistics
388 // Statistics
389 table.trending_language_tbl {
389 table.trending_language_tbl {
390 width: 100%;
390 width: 100%;
391 line-height: 1em;
391 line-height: 1em;
392
392
393 td div {
393 td div {
394 overflow: visible;
394 overflow: visible;
395 }
395 }
396 }
396 }
397
397
398 .trending_language_tbl, .trending_language_tbl td {
398 .trending_language_tbl, .trending_language_tbl td {
399 border: 0;
399 border: 0;
400 margin: 0;
400 margin: 0;
401 padding: 0;
401 padding: 0;
402 background: transparent;
402 background: transparent;
403 }
403 }
404
404
405 .trending_language_tbl, .trending_language_tbl tr {
405 .trending_language_tbl, .trending_language_tbl tr {
406 border-spacing: 0 3px;
406 border-spacing: 0 3px;
407 }
407 }
408
408
409 .trending_language {
409 .trending_language {
410 position: relative;
410 position: relative;
411 width: 100%;
412 height: 19px;
413 overflow: hidden;
411 overflow: hidden;
414 background-color: @grey6;
412 color: @text-color;
413 width: 400px;
415
414
416 span, b{
415 .lang-bar {
417 position: absolute;
418 display: block;
419 height: 12px;
420 margin-bottom: 0px;
421 white-space: pre;
422 padding: floor(@basefontsize/4);
423 top: 0;
424 left: 0;
425 }
426
427 span{
428 color: @text-color;
429 z-index: 0;
430 min-width: 20px;
431 }
432
433 b {
434 z-index: 1;
416 z-index: 1;
435 overflow: hidden;
417 overflow: hidden;
436 background-color: @rcblue;
418 background-color: @rcblue;
437 color: #FFF;
419 color: #FFF;
438 text-decoration: none;
420 text-decoration: none;
439 }
421 }
440
422
441 }
423 }
442
424
443 // Changesets
425 // Changesets
444 #changesets.rctable {
426 #changesets.rctable {
445
427
446 // td must be fixed height for graph
428 // td must be fixed height for graph
447 td {
429 td {
448 height: 32px;
430 height: 32px;
449 padding: 0 1em 0 0;
431 padding: 0 1em 0 0;
450 vertical-align: middle;
432 vertical-align: middle;
451 white-space: nowrap;
433 white-space: nowrap;
452
434
453 &.td-description {
435 &.td-description {
454 white-space: normal;
436 white-space: normal;
455 }
437 }
456
438
457 &.expand_commit {
439 &.expand_commit {
458 padding-right: 0;
440 padding-right: 0;
459 cursor: pointer;
441 cursor: pointer;
460 width: 20px;
442 width: 20px;
461 }
443 }
462 }
444 }
463 }
445 }
464
446
465 // Compare
447 // Compare
466 table.compare_view_commits {
448 table.compare_view_commits {
467 margin-top: @space;
449 margin-top: @space;
468
450
469 td.td-time {
451 td.td-time {
470 padding-left: .5em;
452 padding-left: .5em;
471 }
453 }
472
454
473 // special case to not show hover actions on hidden indicator
455 // special case to not show hover actions on hidden indicator
474 tr.compare_select_hidden:hover {
456 tr.compare_select_hidden:hover {
475 cursor: inherit;
457 cursor: inherit;
476
458
477 td {
459 td {
478 background-color: inherit;
460 background-color: inherit;
479 }
461 }
480 }
462 }
481
463
482 tr:hover {
464 tr:hover {
483 cursor: pointer;
465 cursor: pointer;
484
466
485 td {
467 td {
486 background-color: lighten(@alert4,25%);
468 background-color: lighten(@alert4,25%);
487 }
469 }
488 }
470 }
489
471
490
472
491 }
473 }
492
474
493 .file_history {
475 .file_history {
494 td.td-actions {
476 td.td-actions {
495 text-align: right;
477 text-align: right;
496 }
478 }
497 }
479 }
498
480
499
481
500 // Gist List
482 // Gist List
501 #gist_list_table {
483 #gist_list_table {
502 td {
484 td {
503 vertical-align: middle;
485 vertical-align: middle;
504
486
505 div{
487 div{
506 display: inline-block;
488 display: inline-block;
507 vertical-align: middle;
489 vertical-align: middle;
508 }
490 }
509
491
510 img{
492 img{
511 vertical-align: middle;
493 vertical-align: middle;
512 }
494 }
513 }
495 }
514 }
496 }
@@ -1,579 +1,572 b''
1 // # Copyright (C) 2010-2019 RhodeCode GmbH
1 // # Copyright (C) 2010-2019 RhodeCode GmbH
2 // #
2 // #
3 // # This program is free software: you can redistribute it and/or modify
3 // # This program is free software: you can redistribute it and/or modify
4 // # it under the terms of the GNU Affero General Public License, version 3
4 // # it under the terms of the GNU Affero General Public License, version 3
5 // # (only), as published by the Free Software Foundation.
5 // # (only), as published by the Free Software Foundation.
6 // #
6 // #
7 // # This program is distributed in the hope that it will be useful,
7 // # This program is distributed in the hope that it will be useful,
8 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 // # GNU General Public License for more details.
10 // # GNU General Public License for more details.
11 // #
11 // #
12 // # You should have received a copy of the GNU Affero General Public License
12 // # You should have received a copy of the GNU Affero General Public License
13 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
13 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 // #
14 // #
15 // # This program is dual-licensed. If you wish to learn more about the
15 // # This program is dual-licensed. If you wish to learn more about the
16 // # RhodeCode Enterprise Edition, including its added features, Support services,
16 // # RhodeCode Enterprise Edition, including its added features, Support services,
17 // # and proprietary license terms, please see https://rhodecode.com/licenses/
17 // # and proprietary license terms, please see https://rhodecode.com/licenses/
18
18
19 /**
19 /**
20 RhodeCode JS Files
20 RhodeCode JS Files
21 **/
21 **/
22
22
23 if (typeof console == "undefined" || typeof console.log == "undefined"){
23 if (typeof console == "undefined" || typeof console.log == "undefined"){
24 console = { log: function() {} }
24 console = { log: function() {} }
25 }
25 }
26
26
27 // TODO: move the following function to submodules
27 // TODO: move the following function to submodules
28
28
29 /**
29 /**
30 * show more
30 * show more
31 */
31 */
32 var show_more_event = function(){
32 var show_more_event = function(){
33 $('table .show_more').click(function(e) {
33 $('table .show_more').click(function(e) {
34 var cid = e.target.id.substring(1);
34 var cid = e.target.id.substring(1);
35 var button = $(this);
35 var button = $(this);
36 if (button.hasClass('open')) {
36 if (button.hasClass('open')) {
37 $('#'+cid).hide();
37 $('#'+cid).hide();
38 button.removeClass('open');
38 button.removeClass('open');
39 } else {
39 } else {
40 $('#'+cid).show();
40 $('#'+cid).show();
41 button.addClass('open one');
41 button.addClass('open one');
42 }
42 }
43 });
43 });
44 };
44 };
45
45
46 var compare_radio_buttons = function(repo_name, compare_ref_type){
46 var compare_radio_buttons = function(repo_name, compare_ref_type){
47 $('#compare_action').on('click', function(e){
47 $('#compare_action').on('click', function(e){
48 e.preventDefault();
48 e.preventDefault();
49
49
50 var source = $('input[name=compare_source]:checked').val();
50 var source = $('input[name=compare_source]:checked').val();
51 var target = $('input[name=compare_target]:checked').val();
51 var target = $('input[name=compare_target]:checked').val();
52 if(source && target){
52 if(source && target){
53 var url_data = {
53 var url_data = {
54 repo_name: repo_name,
54 repo_name: repo_name,
55 source_ref: source,
55 source_ref: source,
56 source_ref_type: compare_ref_type,
56 source_ref_type: compare_ref_type,
57 target_ref: target,
57 target_ref: target,
58 target_ref_type: compare_ref_type,
58 target_ref_type: compare_ref_type,
59 merge: 1
59 merge: 1
60 };
60 };
61 window.location = pyroutes.url('repo_compare', url_data);
61 window.location = pyroutes.url('repo_compare', url_data);
62 }
62 }
63 });
63 });
64 $('.compare-radio-button').on('click', function(e){
64 $('.compare-radio-button').on('click', function(e){
65 var source = $('input[name=compare_source]:checked').val();
65 var source = $('input[name=compare_source]:checked').val();
66 var target = $('input[name=compare_target]:checked').val();
66 var target = $('input[name=compare_target]:checked').val();
67 if(source && target){
67 if(source && target){
68 $('#compare_action').removeAttr("disabled");
68 $('#compare_action').removeAttr("disabled");
69 $('#compare_action').removeClass("disabled");
69 $('#compare_action').removeClass("disabled");
70 }
70 }
71 })
71 })
72 };
72 };
73
73
74 var showRepoSize = function(target, repo_name, commit_id, callback) {
74 var showRepoSize = function(target, repo_name, commit_id, callback) {
75 var container = $('#' + target);
75 var container = $('#' + target);
76 var url = pyroutes.url('repo_stats',
76 var url = pyroutes.url('repo_stats',
77 {"repo_name": repo_name, "commit_id": commit_id});
77 {"repo_name": repo_name, "commit_id": commit_id});
78
78
79 container.show();
79 container.show();
80 if (!container.hasClass('loaded')) {
80 if (!container.hasClass('loaded')) {
81 $.ajax({url: url})
81 $.ajax({url: url})
82 .complete(function (data) {
82 .complete(function (data) {
83 var responseJSON = data.responseJSON;
83 var responseJSON = data.responseJSON;
84 container.addClass('loaded');
84 container.addClass('loaded');
85 container.html(responseJSON.size);
85 container.html(responseJSON.size);
86 callback(responseJSON.code_stats)
86 callback(responseJSON.code_stats)
87 })
87 })
88 .fail(function (data) {
88 .fail(function (data) {
89 console.log('failed to load repo stats');
89 console.log('failed to load repo stats');
90 });
90 });
91 }
91 }
92
92
93 };
93 };
94
94
95 var showRepoStats = function(target, data){
95 var showRepoStats = function(target, data){
96 var container = $('#' + target);
96 var container = $('#' + target);
97
97
98 if (container.hasClass('loaded')) {
98 if (container.hasClass('loaded')) {
99 return
99 return
100 }
100 }
101
101
102 var total = 0;
102 var total = 0;
103 var no_data = true;
103 var no_data = true;
104 var tbl = document.createElement('table');
104 var tbl = document.createElement('table');
105 tbl.setAttribute('class', 'trending_language_tbl');
105 tbl.setAttribute('class', 'trending_language_tbl rctable');
106
106
107 $.each(data, function(key, val){
107 $.each(data, function(key, val){
108 total += val.count;
108 total += val.count;
109 });
109 });
110
110
111 var sortedStats = [];
111 var sortedStats = [];
112 for (var obj in data){
112 for (var obj in data){
113 sortedStats.push([obj, data[obj]])
113 sortedStats.push([obj, data[obj]])
114 }
114 }
115 var sortedData = sortedStats.sort(function (a, b) {
115 var sortedData = sortedStats.sort(function (a, b) {
116 return b[1].count - a[1].count
116 return b[1].count - a[1].count
117 });
117 });
118 var cnt = 0;
118 var cnt = 0;
119 $.each(sortedData, function(idx, val){
119 $.each(sortedData, function(idx, val){
120 cnt += 1;
120 cnt += 1;
121 no_data = false;
121 no_data = false;
122
122
123 var hide = cnt > 2;
124 var tr = document.createElement('tr');
123 var tr = document.createElement('tr');
125 if (hide) {
126 tr.setAttribute('style', 'display:none');
127 tr.setAttribute('class', 'stats_hidden');
128 }
129
124
130 var key = val[0];
125 var key = val[0];
131 var obj = {"desc": val[1].desc, "count": val[1].count};
126 var obj = {"desc": val[1].desc, "count": val[1].count};
132
127
133 var percentage = Math.round((obj.count / total * 100), 2);
128 // meta language names
134
135 var td1 = document.createElement('td');
129 var td1 = document.createElement('td');
136 td1.width = 300;
137 var trending_language_label = document.createElement('div');
130 var trending_language_label = document.createElement('div');
138 trending_language_label.innerHTML = obj.desc + " (.{0})".format(key);
131 trending_language_label.innerHTML = obj.desc;
139 td1.appendChild(trending_language_label);
132 td1.appendChild(trending_language_label);
140
133
134 // extensions
141 var td2 = document.createElement('td');
135 var td2 = document.createElement('td');
142 var trending_language = document.createElement('div');
136 var extension = document.createElement('div');
143 var nr_files = obj.count +" "+ _ngettext('file', 'files', obj.count);
137 extension.innerHTML = ".{0}".format(key)
144
138 td2.appendChild(extension);
145 trending_language.title = key + " " + nr_files;
146
139
147 trending_language.innerHTML = "<span>" + percentage + "% " + nr_files
140 // number of files
148 + "</span><b>" + percentage + "% " + nr_files + "</b>";
141 var td3 = document.createElement('td');
142 var file_count = document.createElement('div');
143 var percentage_num = Math.round((obj.count / total * 100), 2);
144 var label = _ngettext('file', 'files', obj.count);
145 file_count.innerHTML = "{0} {1} ({2}%)".format(obj.count, label, percentage_num) ;
146 td3.appendChild(file_count);
149
147
150 trending_language.setAttribute("class", 'trending_language');
148 // percentage
151 $('b', trending_language)[0].style.width = percentage + "%";
149 var td4 = document.createElement('td');
152 td2.appendChild(trending_language);
150 td4.setAttribute("class", 'trending_language');
151
152 var percentage = document.createElement('div');
153 percentage.setAttribute('class', 'lang-bar');
154 percentage.innerHTML = "&nbsp;";
155 percentage.style.width = percentage_num + '%';
156 td4.appendChild(percentage);
153
157
154 tr.appendChild(td1);
158 tr.appendChild(td1);
155 tr.appendChild(td2);
159 tr.appendChild(td2);
160 tr.appendChild(td3);
161 tr.appendChild(td4);
156 tbl.appendChild(tr);
162 tbl.appendChild(tr);
157 if (cnt == 3) {
158 var show_more = document.createElement('tr');
159 var td = document.createElement('td');
160 lnk = document.createElement('a');
161
163
162 lnk.href = '#';
163 lnk.innerHTML = _gettext('Show more');
164 lnk.id = 'code_stats_show_more';
165 td.appendChild(lnk);
166
167 show_more.appendChild(td);
168 show_more.appendChild(document.createElement('td'));
169 tbl.appendChild(show_more);
170 }
171 });
164 });
172
165
173 $(container).html(tbl);
166 $(container).html(tbl);
174 $(container).addClass('loaded');
167 $(container).addClass('loaded');
175
168
176 $('#code_stats_show_more').on('click', function (e) {
169 $('#code_stats_show_more').on('click', function (e) {
177 e.preventDefault();
170 e.preventDefault();
178 $('.stats_hidden').each(function (idx) {
171 $('.stats_hidden').each(function (idx) {
179 $(this).css("display", "");
172 $(this).css("display", "");
180 });
173 });
181 $('#code_stats_show_more').hide();
174 $('#code_stats_show_more').hide();
182 });
175 });
183
176
184 };
177 };
185
178
186 // returns a node from given html;
179 // returns a node from given html;
187 var fromHTML = function(html){
180 var fromHTML = function(html){
188 var _html = document.createElement('element');
181 var _html = document.createElement('element');
189 _html.innerHTML = html;
182 _html.innerHTML = html;
190 return _html;
183 return _html;
191 };
184 };
192
185
193 // Toggle Collapsable Content
186 // Toggle Collapsable Content
194 function collapsableContent() {
187 function collapsableContent() {
195
188
196 $('.collapsable-content').not('.no-hide').hide();
189 $('.collapsable-content').not('.no-hide').hide();
197
190
198 $('.btn-collapse').unbind(); //in case we've been here before
191 $('.btn-collapse').unbind(); //in case we've been here before
199 $('.btn-collapse').click(function() {
192 $('.btn-collapse').click(function() {
200 var button = $(this);
193 var button = $(this);
201 var togglename = $(this).data("toggle");
194 var togglename = $(this).data("toggle");
202 $('.collapsable-content[data-toggle='+togglename+']').toggle();
195 $('.collapsable-content[data-toggle='+togglename+']').toggle();
203 if ($(this).html()=="Show Less")
196 if ($(this).html()=="Show Less")
204 $(this).html("Show More");
197 $(this).html("Show More");
205 else
198 else
206 $(this).html("Show Less");
199 $(this).html("Show Less");
207 });
200 });
208 };
201 };
209
202
210 var timeagoActivate = function() {
203 var timeagoActivate = function() {
211 $("time.timeago").timeago();
204 $("time.timeago").timeago();
212 };
205 };
213
206
214
207
215 var clipboardActivate = function() {
208 var clipboardActivate = function() {
216 /*
209 /*
217 *
210 *
218 * <i class="tooltip icon-plus clipboard-action" data-clipboard-text="${commit.raw_id}" title="${_('Copy the full commit id')}"></i>
211 * <i class="tooltip icon-plus clipboard-action" data-clipboard-text="${commit.raw_id}" title="${_('Copy the full commit id')}"></i>
219 * */
212 * */
220 var clipboard = new ClipboardJS('.clipboard-action');
213 var clipboard = new ClipboardJS('.clipboard-action');
221
214
222 clipboard.on('success', function(e) {
215 clipboard.on('success', function(e) {
223 var callback = function () {
216 var callback = function () {
224 $(e.trigger).animate({'opacity': 1.00}, 200)
217 $(e.trigger).animate({'opacity': 1.00}, 200)
225 };
218 };
226 $(e.trigger).animate({'opacity': 0.15}, 200, callback);
219 $(e.trigger).animate({'opacity': 0.15}, 200, callback);
227 e.clearSelection();
220 e.clearSelection();
228 });
221 });
229 };
222 };
230
223
231
224
232 // Formatting values in a Select2 dropdown of commit references
225 // Formatting values in a Select2 dropdown of commit references
233 var formatSelect2SelectionRefs = function(commit_ref){
226 var formatSelect2SelectionRefs = function(commit_ref){
234 var tmpl = '';
227 var tmpl = '';
235 if (!commit_ref.text || commit_ref.type === 'sha'){
228 if (!commit_ref.text || commit_ref.type === 'sha'){
236 return commit_ref.text;
229 return commit_ref.text;
237 }
230 }
238 if (commit_ref.type === 'branch'){
231 if (commit_ref.type === 'branch'){
239 tmpl = tmpl.concat('<i class="icon-branch"></i> ');
232 tmpl = tmpl.concat('<i class="icon-branch"></i> ');
240 } else if (commit_ref.type === 'tag'){
233 } else if (commit_ref.type === 'tag'){
241 tmpl = tmpl.concat('<i class="icon-tag"></i> ');
234 tmpl = tmpl.concat('<i class="icon-tag"></i> ');
242 } else if (commit_ref.type === 'book'){
235 } else if (commit_ref.type === 'book'){
243 tmpl = tmpl.concat('<i class="icon-bookmark"></i> ');
236 tmpl = tmpl.concat('<i class="icon-bookmark"></i> ');
244 }
237 }
245 return tmpl.concat(escapeHtml(commit_ref.text));
238 return tmpl.concat(escapeHtml(commit_ref.text));
246 };
239 };
247
240
248 // takes a given html element and scrolls it down offset pixels
241 // takes a given html element and scrolls it down offset pixels
249 function offsetScroll(element, offset) {
242 function offsetScroll(element, offset) {
250 setTimeout(function() {
243 setTimeout(function() {
251 var location = element.offset().top;
244 var location = element.offset().top;
252 // some browsers use body, some use html
245 // some browsers use body, some use html
253 $('html, body').animate({ scrollTop: (location - offset) });
246 $('html, body').animate({ scrollTop: (location - offset) });
254 }, 100);
247 }, 100);
255 }
248 }
256
249
257 // scroll an element `percent`% from the top of page in `time` ms
250 // scroll an element `percent`% from the top of page in `time` ms
258 function scrollToElement(element, percent, time) {
251 function scrollToElement(element, percent, time) {
259 percent = (percent === undefined ? 25 : percent);
252 percent = (percent === undefined ? 25 : percent);
260 time = (time === undefined ? 100 : time);
253 time = (time === undefined ? 100 : time);
261
254
262 var $element = $(element);
255 var $element = $(element);
263 if ($element.length == 0) {
256 if ($element.length == 0) {
264 throw('Cannot scroll to {0}'.format(element))
257 throw('Cannot scroll to {0}'.format(element))
265 }
258 }
266 var elOffset = $element.offset().top;
259 var elOffset = $element.offset().top;
267 var elHeight = $element.height();
260 var elHeight = $element.height();
268 var windowHeight = $(window).height();
261 var windowHeight = $(window).height();
269 var offset = elOffset;
262 var offset = elOffset;
270 if (elHeight < windowHeight) {
263 if (elHeight < windowHeight) {
271 offset = elOffset - ((windowHeight / (100 / percent)) - (elHeight / 2));
264 offset = elOffset - ((windowHeight / (100 / percent)) - (elHeight / 2));
272 }
265 }
273 setTimeout(function() {
266 setTimeout(function() {
274 $('html, body').animate({ scrollTop: offset});
267 $('html, body').animate({ scrollTop: offset});
275 }, time);
268 }, time);
276 }
269 }
277
270
278 /**
271 /**
279 * global hooks after DOM is loaded
272 * global hooks after DOM is loaded
280 */
273 */
281 $(document).ready(function() {
274 $(document).ready(function() {
282 firefoxAnchorFix();
275 firefoxAnchorFix();
283
276
284 $('.navigation a.menulink').on('click', function(e){
277 $('.navigation a.menulink').on('click', function(e){
285 var menuitem = $(this).parent('li');
278 var menuitem = $(this).parent('li');
286 if (menuitem.hasClass('open')) {
279 if (menuitem.hasClass('open')) {
287 menuitem.removeClass('open');
280 menuitem.removeClass('open');
288 } else {
281 } else {
289 menuitem.addClass('open');
282 menuitem.addClass('open');
290 $(document).on('click', function(event) {
283 $(document).on('click', function(event) {
291 if (!$(event.target).closest(menuitem).length) {
284 if (!$(event.target).closest(menuitem).length) {
292 menuitem.removeClass('open');
285 menuitem.removeClass('open');
293 }
286 }
294 });
287 });
295 }
288 }
296 });
289 });
297
290
298 $('body').on('click', '.cb-lineno a', function(event) {
291 $('body').on('click', '.cb-lineno a', function(event) {
299 function sortNumber(a,b) {
292 function sortNumber(a,b) {
300 return a - b;
293 return a - b;
301 }
294 }
302
295
303 var lineNo = $(this).data('lineNo');
296 var lineNo = $(this).data('lineNo');
304 var lineName = $(this).attr('name');
297 var lineName = $(this).attr('name');
305
298
306 if (lineNo) {
299 if (lineNo) {
307 var prevLine = $('.cb-line-selected a').data('lineNo');
300 var prevLine = $('.cb-line-selected a').data('lineNo');
308
301
309 // on shift, we do a range selection, if we got previous line
302 // on shift, we do a range selection, if we got previous line
310 if (event.shiftKey && prevLine !== undefined) {
303 if (event.shiftKey && prevLine !== undefined) {
311 var prevLine = parseInt(prevLine);
304 var prevLine = parseInt(prevLine);
312 var nextLine = parseInt(lineNo);
305 var nextLine = parseInt(lineNo);
313 var pos = [prevLine, nextLine].sort(sortNumber);
306 var pos = [prevLine, nextLine].sort(sortNumber);
314 var anchor = '#L{0}-{1}'.format(pos[0], pos[1]);
307 var anchor = '#L{0}-{1}'.format(pos[0], pos[1]);
315
308
316 // single click
309 // single click
317 } else {
310 } else {
318 var nextLine = parseInt(lineNo);
311 var nextLine = parseInt(lineNo);
319 var pos = [nextLine, nextLine];
312 var pos = [nextLine, nextLine];
320 var anchor = '#L{0}'.format(pos[0]);
313 var anchor = '#L{0}'.format(pos[0]);
321
314
322 }
315 }
323 // highlight
316 // highlight
324 var range = [];
317 var range = [];
325 for (var i = pos[0]; i <= pos[1]; i++) {
318 for (var i = pos[0]; i <= pos[1]; i++) {
326 range.push(i);
319 range.push(i);
327 }
320 }
328 // clear old selected lines
321 // clear old selected lines
329 $('.cb-line-selected').removeClass('cb-line-selected');
322 $('.cb-line-selected').removeClass('cb-line-selected');
330
323
331 $.each(range, function (i, lineNo) {
324 $.each(range, function (i, lineNo) {
332 var line_td = $('td.cb-lineno#L' + lineNo);
325 var line_td = $('td.cb-lineno#L' + lineNo);
333
326
334 if (line_td.length) {
327 if (line_td.length) {
335 line_td.addClass('cb-line-selected'); // line number td
328 line_td.addClass('cb-line-selected'); // line number td
336 line_td.prev().addClass('cb-line-selected'); // line data
329 line_td.prev().addClass('cb-line-selected'); // line data
337 line_td.next().addClass('cb-line-selected'); // line content
330 line_td.next().addClass('cb-line-selected'); // line content
338 }
331 }
339 });
332 });
340
333
341 } else if (lineName !== undefined) { // lineName only occurs in diffs
334 } else if (lineName !== undefined) { // lineName only occurs in diffs
342 // clear old selected lines
335 // clear old selected lines
343 $('td.cb-line-selected').removeClass('cb-line-selected');
336 $('td.cb-line-selected').removeClass('cb-line-selected');
344 var anchor = '#{0}'.format(lineName);
337 var anchor = '#{0}'.format(lineName);
345 var diffmode = templateContext.session_attrs.diffmode || "sideside";
338 var diffmode = templateContext.session_attrs.diffmode || "sideside";
346
339
347 if (diffmode === "unified") {
340 if (diffmode === "unified") {
348 $(this).closest('tr').find('td').addClass('cb-line-selected');
341 $(this).closest('tr').find('td').addClass('cb-line-selected');
349 } else {
342 } else {
350 var activeTd = $(this).closest('td');
343 var activeTd = $(this).closest('td');
351 activeTd.addClass('cb-line-selected');
344 activeTd.addClass('cb-line-selected');
352 activeTd.next('td').addClass('cb-line-selected');
345 activeTd.next('td').addClass('cb-line-selected');
353 }
346 }
354
347
355 }
348 }
356
349
357 // Replace URL without jumping to it if browser supports.
350 // Replace URL without jumping to it if browser supports.
358 // Default otherwise
351 // Default otherwise
359 if (history.pushState && anchor !== undefined) {
352 if (history.pushState && anchor !== undefined) {
360 var new_location = location.href.rstrip('#');
353 var new_location = location.href.rstrip('#');
361 if (location.hash) {
354 if (location.hash) {
362 // location without hash
355 // location without hash
363 new_location = new_location.replace(location.hash, "");
356 new_location = new_location.replace(location.hash, "");
364 }
357 }
365
358
366 // Make new anchor url
359 // Make new anchor url
367 new_location = new_location + anchor;
360 new_location = new_location + anchor;
368 history.pushState(true, document.title, new_location);
361 history.pushState(true, document.title, new_location);
369
362
370 return false;
363 return false;
371 }
364 }
372
365
373 });
366 });
374
367
375 $('.collapse_file').on('click', function(e) {
368 $('.collapse_file').on('click', function(e) {
376 e.stopPropagation();
369 e.stopPropagation();
377 if ($(e.target).is('a')) { return; }
370 if ($(e.target).is('a')) { return; }
378 var node = $(e.delegateTarget).first();
371 var node = $(e.delegateTarget).first();
379 var icon = $($(node.children().first()).children().first());
372 var icon = $($(node.children().first()).children().first());
380 var id = node.attr('fid');
373 var id = node.attr('fid');
381 var target = $('#'+id);
374 var target = $('#'+id);
382 var tr = $('#tr_'+id);
375 var tr = $('#tr_'+id);
383 var diff = $('#diff_'+id);
376 var diff = $('#diff_'+id);
384 if(node.hasClass('expand_file')){
377 if(node.hasClass('expand_file')){
385 node.removeClass('expand_file');
378 node.removeClass('expand_file');
386 icon.removeClass('expand_file_icon');
379 icon.removeClass('expand_file_icon');
387 node.addClass('collapse_file');
380 node.addClass('collapse_file');
388 icon.addClass('collapse_file_icon');
381 icon.addClass('collapse_file_icon');
389 diff.show();
382 diff.show();
390 tr.show();
383 tr.show();
391 target.show();
384 target.show();
392 } else {
385 } else {
393 node.removeClass('collapse_file');
386 node.removeClass('collapse_file');
394 icon.removeClass('collapse_file_icon');
387 icon.removeClass('collapse_file_icon');
395 node.addClass('expand_file');
388 node.addClass('expand_file');
396 icon.addClass('expand_file_icon');
389 icon.addClass('expand_file_icon');
397 diff.hide();
390 diff.hide();
398 tr.hide();
391 tr.hide();
399 target.hide();
392 target.hide();
400 }
393 }
401 });
394 });
402
395
403 $('#expand_all_files').click(function() {
396 $('#expand_all_files').click(function() {
404 $('.expand_file').each(function() {
397 $('.expand_file').each(function() {
405 var node = $(this);
398 var node = $(this);
406 var icon = $($(node.children().first()).children().first());
399 var icon = $($(node.children().first()).children().first());
407 var id = $(this).attr('fid');
400 var id = $(this).attr('fid');
408 var target = $('#'+id);
401 var target = $('#'+id);
409 var tr = $('#tr_'+id);
402 var tr = $('#tr_'+id);
410 var diff = $('#diff_'+id);
403 var diff = $('#diff_'+id);
411 node.removeClass('expand_file');
404 node.removeClass('expand_file');
412 icon.removeClass('expand_file_icon');
405 icon.removeClass('expand_file_icon');
413 node.addClass('collapse_file');
406 node.addClass('collapse_file');
414 icon.addClass('collapse_file_icon');
407 icon.addClass('collapse_file_icon');
415 diff.show();
408 diff.show();
416 tr.show();
409 tr.show();
417 target.show();
410 target.show();
418 });
411 });
419 });
412 });
420
413
421 $('#collapse_all_files').click(function() {
414 $('#collapse_all_files').click(function() {
422 $('.collapse_file').each(function() {
415 $('.collapse_file').each(function() {
423 var node = $(this);
416 var node = $(this);
424 var icon = $($(node.children().first()).children().first());
417 var icon = $($(node.children().first()).children().first());
425 var id = $(this).attr('fid');
418 var id = $(this).attr('fid');
426 var target = $('#'+id);
419 var target = $('#'+id);
427 var tr = $('#tr_'+id);
420 var tr = $('#tr_'+id);
428 var diff = $('#diff_'+id);
421 var diff = $('#diff_'+id);
429 node.removeClass('collapse_file');
422 node.removeClass('collapse_file');
430 icon.removeClass('collapse_file_icon');
423 icon.removeClass('collapse_file_icon');
431 node.addClass('expand_file');
424 node.addClass('expand_file');
432 icon.addClass('expand_file_icon');
425 icon.addClass('expand_file_icon');
433 diff.hide();
426 diff.hide();
434 tr.hide();
427 tr.hide();
435 target.hide();
428 target.hide();
436 });
429 });
437 });
430 });
438
431
439 // Mouse over behavior for comments and line selection
432 // Mouse over behavior for comments and line selection
440
433
441 // Select the line that comes from the url anchor
434 // Select the line that comes from the url anchor
442 // At the time of development, Chrome didn't seem to support jquery's :target
435 // At the time of development, Chrome didn't seem to support jquery's :target
443 // element, so I had to scroll manually
436 // element, so I had to scroll manually
444
437
445 if (location.hash) {
438 if (location.hash) {
446 var result = splitDelimitedHash(location.hash);
439 var result = splitDelimitedHash(location.hash);
447 var loc = result.loc;
440 var loc = result.loc;
448 if (loc.length > 1) {
441 if (loc.length > 1) {
449
442
450 var highlightable_line_tds = [];
443 var highlightable_line_tds = [];
451
444
452 // source code line format
445 // source code line format
453 var page_highlights = loc.substring(
446 var page_highlights = loc.substring(
454 loc.indexOf('#') + 1).split('L');
447 loc.indexOf('#') + 1).split('L');
455
448
456 if (page_highlights.length > 1) {
449 if (page_highlights.length > 1) {
457 var highlight_ranges = page_highlights[1].split(",");
450 var highlight_ranges = page_highlights[1].split(",");
458 var h_lines = [];
451 var h_lines = [];
459 for (var pos in highlight_ranges) {
452 for (var pos in highlight_ranges) {
460 var _range = highlight_ranges[pos].split('-');
453 var _range = highlight_ranges[pos].split('-');
461 if (_range.length === 2) {
454 if (_range.length === 2) {
462 var start = parseInt(_range[0]);
455 var start = parseInt(_range[0]);
463 var end = parseInt(_range[1]);
456 var end = parseInt(_range[1]);
464 if (start < end) {
457 if (start < end) {
465 for (var i = start; i <= end; i++) {
458 for (var i = start; i <= end; i++) {
466 h_lines.push(i);
459 h_lines.push(i);
467 }
460 }
468 }
461 }
469 }
462 }
470 else {
463 else {
471 h_lines.push(parseInt(highlight_ranges[pos]));
464 h_lines.push(parseInt(highlight_ranges[pos]));
472 }
465 }
473 }
466 }
474 for (pos in h_lines) {
467 for (pos in h_lines) {
475 var line_td = $('td.cb-lineno#L' + h_lines[pos]);
468 var line_td = $('td.cb-lineno#L' + h_lines[pos]);
476 if (line_td.length) {
469 if (line_td.length) {
477 highlightable_line_tds.push(line_td);
470 highlightable_line_tds.push(line_td);
478 }
471 }
479 }
472 }
480 }
473 }
481
474
482 // now check a direct id reference (diff page)
475 // now check a direct id reference (diff page)
483 if ($(loc).length && $(loc).hasClass('cb-lineno')) {
476 if ($(loc).length && $(loc).hasClass('cb-lineno')) {
484 highlightable_line_tds.push($(loc));
477 highlightable_line_tds.push($(loc));
485 }
478 }
486 $.each(highlightable_line_tds, function (i, $td) {
479 $.each(highlightable_line_tds, function (i, $td) {
487 $td.addClass('cb-line-selected'); // line number td
480 $td.addClass('cb-line-selected'); // line number td
488 $td.prev().addClass('cb-line-selected'); // line data
481 $td.prev().addClass('cb-line-selected'); // line data
489 $td.next().addClass('cb-line-selected'); // line content
482 $td.next().addClass('cb-line-selected'); // line content
490 });
483 });
491
484
492 if (highlightable_line_tds.length) {
485 if (highlightable_line_tds.length) {
493 var $first_line_td = highlightable_line_tds[0];
486 var $first_line_td = highlightable_line_tds[0];
494 scrollToElement($first_line_td);
487 scrollToElement($first_line_td);
495 $.Topic('/ui/plugins/code/anchor_focus').prepareOrPublish({
488 $.Topic('/ui/plugins/code/anchor_focus').prepareOrPublish({
496 td: $first_line_td,
489 td: $first_line_td,
497 remainder: result.remainder
490 remainder: result.remainder
498 });
491 });
499 }
492 }
500 }
493 }
501 }
494 }
502 collapsableContent();
495 collapsableContent();
503 });
496 });
504
497
505 var feedLifetimeOptions = function(query, initialData){
498 var feedLifetimeOptions = function(query, initialData){
506 var data = {results: []};
499 var data = {results: []};
507 var isQuery = typeof query.term !== 'undefined';
500 var isQuery = typeof query.term !== 'undefined';
508
501
509 var section = _gettext('Lifetime');
502 var section = _gettext('Lifetime');
510 var children = [];
503 var children = [];
511
504
512 //filter results
505 //filter results
513 $.each(initialData.results, function(idx, value) {
506 $.each(initialData.results, function(idx, value) {
514
507
515 if (!isQuery || query.term.length === 0 || value.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0) {
508 if (!isQuery || query.term.length === 0 || value.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0) {
516 children.push({
509 children.push({
517 'id': this.id,
510 'id': this.id,
518 'text': this.text
511 'text': this.text
519 })
512 })
520 }
513 }
521
514
522 });
515 });
523 data.results.push({
516 data.results.push({
524 'text': section,
517 'text': section,
525 'children': children
518 'children': children
526 });
519 });
527
520
528 if (isQuery) {
521 if (isQuery) {
529
522
530 var now = moment.utc();
523 var now = moment.utc();
531
524
532 var parseQuery = function(entry, now){
525 var parseQuery = function(entry, now){
533 var fmt = 'DD/MM/YYYY H:mm';
526 var fmt = 'DD/MM/YYYY H:mm';
534 var parsed = moment.utc(entry, fmt);
527 var parsed = moment.utc(entry, fmt);
535 var diffInMin = parsed.diff(now, 'minutes');
528 var diffInMin = parsed.diff(now, 'minutes');
536
529
537 if (diffInMin > 0){
530 if (diffInMin > 0){
538 return {
531 return {
539 id: diffInMin,
532 id: diffInMin,
540 text: parsed.format(fmt)
533 text: parsed.format(fmt)
541 }
534 }
542 } else {
535 } else {
543 return {
536 return {
544 id: undefined,
537 id: undefined,
545 text: parsed.format('DD/MM/YYYY') + ' ' + _gettext('date not in future')
538 text: parsed.format('DD/MM/YYYY') + ' ' + _gettext('date not in future')
546 }
539 }
547 }
540 }
548
541
549
542
550 };
543 };
551
544
552 data.results.push({
545 data.results.push({
553 'text': _gettext('Specified expiration date'),
546 'text': _gettext('Specified expiration date'),
554 'children': [{
547 'children': [{
555 'id': parseQuery(query.term, now).id,
548 'id': parseQuery(query.term, now).id,
556 'text': parseQuery(query.term, now).text
549 'text': parseQuery(query.term, now).text
557 }]
550 }]
558 });
551 });
559 }
552 }
560
553
561 query.callback(data);
554 query.callback(data);
562 };
555 };
563
556
564
557
565 var storeUserSessionAttr = function (key, val) {
558 var storeUserSessionAttr = function (key, val) {
566
559
567 var postData = {
560 var postData = {
568 'key': key,
561 'key': key,
569 'val': val,
562 'val': val,
570 'csrf_token': CSRF_TOKEN
563 'csrf_token': CSRF_TOKEN
571 };
564 };
572
565
573 var success = function(o) {
566 var success = function(o) {
574 return true
567 return true
575 };
568 };
576
569
577 ajaxPOST(pyroutes.url('store_user_session_value'), postData, success);
570 ajaxPOST(pyroutes.url('store_user_session_value'), postData, success);
578 return false;
571 return false;
579 };
572 };
@@ -1,257 +1,267 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="base" file="/base/base.mako"/>
2
2
3 <%def name="refs_counters(branches, closed_branches, tags, bookmarks)">
3 <%def name="refs_counters(branches, closed_branches, tags, bookmarks)">
4 <span class="branchtag tag">
4 <span class="branchtag tag">
5 <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs">
5 <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs">
6 <i class="icon-branch"></i>
6 <i class="icon-branch"></i>
7 % if len(branches) == 1:
7 % if len(branches) == 1:
8 <span>${len(branches)}</span> ${_('Branch')}
8 <span>${len(branches)}</span> ${_('Branch')}
9 % else:
9 % else:
10 <span>${len(branches)}</span> ${_('Branches')}
10 <span>${len(branches)}</span> ${_('Branches')}
11 % endif
11 % endif
12 </a>
12 </a>
13 </span>
13 </span>
14
14
15 %if closed_branches:
15 %if closed_branches:
16 <span class="branchtag tag">
16 <span class="branchtag tag">
17 <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs">
17 <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs">
18 <i class="icon-branch"></i>
18 <i class="icon-branch"></i>
19 % if len(closed_branches) == 1:
19 % if len(closed_branches) == 1:
20 <span>${len(closed_branches)}</span> ${_('Closed Branch')}
20 <span>${len(closed_branches)}</span> ${_('Closed Branch')}
21 % else:
21 % else:
22 <span>${len(closed_branches)}</span> ${_('Closed Branches')}
22 <span>${len(closed_branches)}</span> ${_('Closed Branches')}
23 % endif
23 % endif
24 </a>
24 </a>
25 </span>
25 </span>
26 %endif
26 %endif
27
27
28 <span class="tagtag tag">
28 <span class="tagtag tag">
29 <a href="${h.route_path('tags_home',repo_name=c.repo_name)}" class="childs">
29 <a href="${h.route_path('tags_home',repo_name=c.repo_name)}" class="childs">
30 <i class="icon-tag"></i>
30 <i class="icon-tag"></i>
31 % if len(tags) == 1:
31 % if len(tags) == 1:
32 <span>${len(tags)}</span> ${_('Tag')}
32 <span>${len(tags)}</span> ${_('Tag')}
33 % else:
33 % else:
34 <span>${len(tags)}</span> ${_('Tags')}
34 <span>${len(tags)}</span> ${_('Tags')}
35 % endif
35 % endif
36 </a>
36 </a>
37 </span>
37 </span>
38
38
39 %if bookmarks:
39 %if bookmarks:
40 <span class="booktag tag">
40 <span class="booktag tag">
41 <a href="${h.route_path('bookmarks_home',repo_name=c.repo_name)}" class="childs">
41 <a href="${h.route_path('bookmarks_home',repo_name=c.repo_name)}" class="childs">
42 <i class="icon-bookmark"></i>
42 <i class="icon-bookmark"></i>
43 % if len(bookmarks) == 1:
43 % if len(bookmarks) == 1:
44 <span>${len(bookmarks)}</span> ${_('Bookmark')}
44 <span>${len(bookmarks)}</span> ${_('Bookmark')}
45 % else:
45 % else:
46 <span>${len(bookmarks)}</span> ${_('Bookmarks')}
46 <span>${len(bookmarks)}</span> ${_('Bookmarks')}
47 % endif
47 % endif
48 </a>
48 </a>
49 </span>
49 </span>
50 %endif
50 %endif
51 </%def>
51 </%def>
52
52
53 <%def name="summary_detail(breadcrumbs_links, show_downloads=True)">
53 <%def name="summary_detail(breadcrumbs_links, show_downloads=True)">
54 <% summary = lambda n:{False:'summary-short'}.get(n) %>
54 <% summary = lambda n:{False:'summary-short'}.get(n) %>
55
55
56 <div id="summary-menu-stats" class="summary-detail">
56 <div id="summary-menu-stats" class="summary-detail">
57 <div class="fieldset">
57 <div class="fieldset">
58 <div class="left-content">
58 <div class="left-content">
59 <div class="left-clone">
59 <div class="left-clone">
60 <select id="clone_option" name="clone_option">
60 <select id="clone_option" name="clone_option">
61 <option value="http" selected="selected">HTTP</option>
61 <option value="http" selected="selected">HTTP</option>
62 <option value="http_id">HTTP UID</option>
62 <option value="http_id">HTTP UID</option>
63 % if c.ssh_enabled:
63 % if c.ssh_enabled:
64 <option value="ssh">SSH</option>
64 <option value="ssh">SSH</option>
65 % endif
65 % endif
66 </select>
66 </select>
67 </div>
67 </div>
68
68
69 <div class="right-clone">
69 <div class="right-clone">
70 <%
70 <%
71 maybe_disabled = ''
71 maybe_disabled = ''
72 if h.is_svn_without_proxy(c.rhodecode_db_repo):
72 if h.is_svn_without_proxy(c.rhodecode_db_repo):
73 maybe_disabled = 'disabled'
73 maybe_disabled = 'disabled'
74 %>
74 %>
75
75
76 <span id="clone_option_http">
76 <span id="clone_option_http">
77 <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url}"/>
77 <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url}"/>
78 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url}" title="${_('Copy the clone url')}"></i>
78 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url}" title="${_('Copy the clone url')}"></i>
79 </span>
79 </span>
80
80
81 <span style="display: none;" id="clone_option_http_id">
81 <span style="display: none;" id="clone_option_http_id">
82 <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_id}"/>
82 <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_id}"/>
83 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_id}" title="${_('Copy the clone by id url')}"></i>
83 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_id}" title="${_('Copy the clone by id url')}"></i>
84 </span>
84 </span>
85
85
86 <span style="display: none;" id="clone_option_ssh">
86 <span style="display: none;" id="clone_option_ssh">
87 <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_ssh}"/>
87 <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_ssh}"/>
88 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_ssh}" title="${_('Copy the clone by ssh url')}"></i>
88 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_ssh}" title="${_('Copy the clone by ssh url')}"></i>
89 </span>
89 </span>
90
90
91 % if maybe_disabled:
91 % if maybe_disabled:
92 <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.route_url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p>
92 <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.route_url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p>
93 % endif
93 % endif
94 </div>
94 </div>
95 </div>
95 </div>
96
96
97 <div class="right-content">
97 <div class="right-content">
98 <div class="commit-info">
98 <div class="commit-info">
99 <div class="tags">
99 <div class="tags">
100 <% commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision') %>
100 <% commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision') %>
101 % if c.rhodecode_repo:
101 % if c.rhodecode_repo:
102 ${refs_counters(
102 ${refs_counters(
103 c.rhodecode_repo.branches,
103 c.rhodecode_repo.branches,
104 c.rhodecode_repo.branches_closed,
104 c.rhodecode_repo.branches_closed,
105 c.rhodecode_repo.tags,
105 c.rhodecode_repo.tags,
106 c.rhodecode_repo.bookmarks)}
106 c.rhodecode_repo.bookmarks)}
107 % else:
107 % else:
108 ## missing requirements can make c.rhodecode_repo None
108 ## missing requirements can make c.rhodecode_repo None
109 ${refs_counters([], [], [], [])}
109 ${refs_counters([], [], [], [])}
110 % endif
110 % endif
111
111
112 ## commits
112 ## commits
113 <span class="tag">
113 <span class="tag">
114 % if commit_rev == -1:
114 % if commit_rev == -1:
115 <i class="icon-tag"></i>
115 <i class="icon-tag"></i>
116 % if commit_rev == -1:
116 % if commit_rev == -1:
117 <span>0</span> ${_('Commit')}
117 <span>0</span> ${_('Commit')}
118 % else:
118 % else:
119 <span>0</span> ${_('Commits')}
119 <span>0</span> ${_('Commits')}
120 % endif
120 % endif
121 % else:
121 % else:
122 <a href="${h.route_path('repo_changelog', repo_name=c.repo_name)}">
122 <a href="${h.route_path('repo_changelog', repo_name=c.repo_name)}">
123 <i class="icon-tag"></i>
123 <i class="icon-tag"></i>
124 % if commit_rev == 1:
124 % if commit_rev == 1:
125 <span>${commit_rev}</span> ${_('Commit')}
125 <span>${commit_rev}</span> ${_('Commit')}
126 % else:
126 % else:
127 <span>${commit_rev}</span> ${_('Commits')}
127 <span>${commit_rev}</span> ${_('Commits')}
128 % endif
128 % endif
129 </a>
129 </a>
130 % endif
130 % endif
131 </span>
131 </span>
132
132
133 ## forks
133 ## forks
134 <span class="tag">
134 <span class="tag">
135 <a title="${_('Number of Repository Forks')}" href="${h.route_path('repo_forks_show_all', repo_name=c.repo_name)}">
135 <a title="${_('Number of Repository Forks')}" href="${h.route_path('repo_forks_show_all', repo_name=c.repo_name)}">
136 <i class="icon-code-fork"></i>
136 <i class="icon-code-fork"></i>
137 <span>${c.repository_forks}</span> ${_ungettext('Fork', 'Forks', c.repository_forks)}</a>
137 <span>${c.repository_forks}</span> ${_ungettext('Fork', 'Forks', c.repository_forks)}</a>
138 </span>
138 </span>
139 </div>
139 </div>
140 </div>
140 </div>
141 </div>
141 </div>
142 </div>
142 </div>
143 ## owner, description, downloads, statistics
143
144
145 ## Owner
144 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
146 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
145 <div class="left-label-summary">
147 <div class="left-label-summary">
146 <p>${_('Repository size')}</p>
148 <p>${_('Owner')}</p>
147
148 <div class="right-label-summary">
149 <div class="right-label-summary">
149 <div class="tags">
150 ${base.gravatar_with_user(c.rhodecode_db_repo.user.email, 16)}
150 ## repo size
151 % if commit_rev == -1:
152 <span class="stats-bullet">0 B</span>
153 % else:
154 <span>
155 <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a>
156 </span>
157 <span class="stats-bullet" id="repo_size_container" style="display:none">
158 ${_('Calculating Repository Size...')}
159 </span>
160 % endif
161 </div>
162 </div>
151 </div>
152
163 </div>
153 </div>
164 </div>
154 </div>
165
155
156 ## Description
166 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
157 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
167 <div class="left-label-summary">
158 <div class="left-label-summary">
168 <p>${_('Description')}</p>
159 <p>${_('Description')}</p>
169
160
170 <div class="right-label-summary input ${summary(c.show_stats)}">
161 <div class="right-label-summary input ${summary(c.show_stats)}">
171 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
162 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
172 ${dt.repo_desc(c.rhodecode_db_repo.description_safe, c.visual.stylify_metatags)}
163 ${dt.repo_desc(c.rhodecode_db_repo.description_safe, c.visual.stylify_metatags)}
173 </div>
164 </div>
174 </div>
165 </div>
175 </div>
166 </div>
176
167
168 ## Downloads
177 % if show_downloads:
169 % if show_downloads:
178 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
170 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
179 <div class="left-label-summary">
171 <div class="left-label-summary">
180 <p>${_('Downloads')}</p>
172 <p>${_('Downloads')}</p>
181
173
182 <div class="right-label-summary input ${summary(c.show_stats)} downloads">
174 <div class="right-label-summary input ${summary(c.show_stats)} downloads">
183 % if c.rhodecode_repo and len(c.rhodecode_repo.commit_ids) == 0:
175 % if c.rhodecode_repo and len(c.rhodecode_repo.commit_ids) == 0:
184 <span class="disabled">
176 <span class="disabled">
185 ${_('There are no downloads yet')}
177 ${_('There are no downloads yet')}
186 </span>
178 </span>
187 % elif not c.enable_downloads:
179 % elif not c.enable_downloads:
188 <span class="disabled">
180 <span class="disabled">
189 ${_('Downloads are disabled for this repository')}.
181 ${_('Downloads are disabled for this repository')}.
190 </span>
182 </span>
191 % if c.is_super_admin:
183 % if c.is_super_admin:
192 ${h.link_to(_('Enable downloads'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_downloads'))}
184 ${h.link_to(_('Enable downloads'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_downloads'))}
193 % endif
185 % endif
194 % else:
186 % else:
195 <span class="enabled">
187 <span class="enabled">
196 <a id="archive_link" class="btn btn-small" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name,fname='tip.zip')}">
188 <a id="archive_link" class="btn btn-small" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name,fname='tip.zip')}">
197 <i class="icon-archive"></i> tip.zip
189 <i class="icon-archive"></i> tip.zip
198 ## replaced by some JS on select
190 ## replaced by some JS on select
199 </a>
191 </a>
200 </span>
192 </span>
201 ${h.hidden('download_options')}
193 ${h.hidden('download_options')}
202 % endif
194 % endif
203 </div>
195 </div>
204 </div>
196 </div>
205 </div>
197 </div>
206 % endif
198 % endif
207
199
200 ## Context Action
201 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
202 <div class="left-label-summary">
203 <p>${_('Feed')}</p>
204
205 <div class="right-label-summary">
206 %if c.rhodecode_user.username != h.DEFAULT_USER:
207 <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name, _query=dict(auth_token=c.rhodecode_user.feed_token))}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a>
208 %else:
209 <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a>
210 %endif
211 </div>
212 </div>
213 </div>
214
215 ## Repo size
216 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
217 <div class="left-label-summary">
218 <p>${_('Repository size')}</p>
219
220 <div class="right-label-summary">
221 <div class="tags">
222 ## repo size
223 % if commit_rev == -1:
224 <span class="stats-bullet">0 B</span>
225 % else:
226 <span>
227 <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a>
228 </span>
229 <span class="stats-bullet" id="repo_size_container" style="display:none">
230 ${_('Calculating Repository Size...')}
231 </span>
232 % endif
233 </div>
234 </div>
235 </div>
236 </div>
237
208 ## Statistics
238 ## Statistics
209 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
239 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
210 <div class="left-label-summary">
240 <div class="left-label-summary">
211 <p>${_('Statistics')}</p>
241 <p>${_('Code Statistics')}</p>
212
242
213 <div class="right-label-summary input ${summary(c.show_stats)} statistics">
243 <div class="right-label-summary input ${summary(c.show_stats)} statistics">
214 % if c.show_stats:
244 % if c.show_stats:
215 <div id="lang_stats" class="enabled">
245 <div id="lang_stats" class="enabled">
216 ${_('Calculating Code Statistics...')}
246 <a href="#showSize" onclick="calculateSize(); $('#show-repo-size').hide(); $(this).hide(); return false" id="show-repo-size">Show code statistics</a>
217 </div>
247 </div>
218 % else:
248 % else:
219 <span class="disabled">
249 <span class="disabled">
220 ${_('Statistics are disabled for this repository')}.
250 ${_('Statistics are disabled for this repository')}.
221 </span>
251 </span>
222 % if c.is_super_admin:
252 % if c.is_super_admin:
223 ${h.link_to(_('Enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))}
253 ${h.link_to(_('Enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))}
224 % endif
254 % endif
225 % endif
255 % endif
226 </div>
256 </div>
227
257
228 </div>
258 </div>
229 </div>
259 </div>
230
260
231 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
232 <div class="left-label-summary">
233 <p>${_('Owner')}</p>
234 <div class="right-label-summary">
235 ${base.gravatar_with_user(c.rhodecode_db_repo.user.email, 16)}
236 </div>
237
238 </div>
239 </div>
240
241 ## Context Action
242 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
243 <div class="left-label-summary">
244 %if c.rhodecode_user.username != h.DEFAULT_USER:
245 <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name, _query=dict(auth_token=c.rhodecode_user.feed_token))}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a>
246 %else:
247 <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a>
248 %endif
249 </div>
250 </div>
251
261
252 </div><!--end summary-detail-->
262 </div><!--end summary-detail-->
253
263
254 <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details">
264 <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details">
255 ${_('Show More')}
265 ${_('Show More')}
256 </div>
266 </div>
257 </%def>
267 </%def>
General Comments 0
You need to be logged in to leave comments. Login now