##// END OF EJS Templates
summary: move the RSS button to the right pane of repo name
marcink -
r3666:73c9ff94 new-ui
parent child Browse files
Show More
@@ -1,571 +1,576 b''
1 //
1 //
2 // Typography
2 // Typography
3 // modified from Bootstrap
3 // modified from Bootstrap
4 // --------------------------------------------------
4 // --------------------------------------------------
5
5
6 // Base
6 // Base
7 body {
7 body {
8 font-size: @basefontsize;
8 font-size: @basefontsize;
9 font-family: @text-light;
9 font-family: @text-light;
10 letter-spacing: .02em;
10 letter-spacing: .02em;
11 color: @grey2;
11 color: @grey2;
12 }
12 }
13
13
14 #content, label{
14 #content, label{
15 font-size: @basefontsize;
15 font-size: @basefontsize;
16 }
16 }
17
17
18 label {
18 label {
19 color: @grey2;
19 color: @grey2;
20 }
20 }
21
21
22 ::selection { background: @rchighlightblue; }
22 ::selection { background: @rchighlightblue; }
23
23
24 // Headings
24 // Headings
25 // -------------------------
25 // -------------------------
26
26
27 h1, h2, h3, h4, h5, h6,
27 h1, h2, h3, h4, h5, h6,
28 .h1, .h2, .h3, .h4, .h5, .h6 {
28 .h1, .h2, .h3, .h4, .h5, .h6 {
29 margin: 0 0 @textmargin 0;
29 margin: 0 0 @textmargin 0;
30 padding: 0;
30 padding: 0;
31 line-height: 1.8em;
31 line-height: 1.8em;
32 color: @text-color;
32 color: @text-color;
33 a {
33 a {
34 color: @rcblue;
34 color: @rcblue;
35 }
35 }
36 }
36 }
37
37
38 h1, .h1 { font-size: 1.54em; font-weight: @text-bold-weight; font-family: @text-bold; }
38 h1, .h1 { font-size: 1.54em; font-weight: @text-bold-weight; font-family: @text-bold; }
39 h2, .h2 { font-size: 1.23em; font-weight: @text-semibold-weight; font-family: @text-semibold; }
39 h2, .h2 { font-size: 1.23em; font-weight: @text-semibold-weight; font-family: @text-semibold; }
40 h3, .h3 { font-size: 1.23em; font-family: @text-regular; }
40 h3, .h3 { font-size: 1.23em; font-family: @text-regular; }
41 h4, .h4 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; }
41 h4, .h4 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; }
42 h5, .h5 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; }
42 h5, .h5 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; }
43 h6, .h6 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; }
43 h6, .h6 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; }
44
44
45 // Breadcrumbs
45 // Breadcrumbs
46 .breadcrumbs {
46 .breadcrumbs {
47 font-size: @repo-title-fontsize;
47 font-size: @repo-title-fontsize;
48 margin: 0;
48 margin: 0;
49
49
50 h4 {
50 h4 {
51 font-size: @basefontsize;
51 font-size: @basefontsize;
52 margin-bottom: 15px;
52 margin-bottom: 15px;
53 }
53 }
54 }
54 }
55
55
56 .breadcrumbs_light {
56 .breadcrumbs_light {
57 float:left;
57 float:left;
58 font-size: 1.3em;
58 font-size: 1.3em;
59 line-height: 38px;
59 line-height: 38px;
60 }
60 }
61
61
62 // Body text
62 // Body text
63 // -------------------------
63 // -------------------------
64
64
65 p {
65 p {
66 margin: 0 0 @textmargin 0;
66 margin: 0 0 @textmargin 0;
67 padding: 0;
67 padding: 0;
68 line-height: 2em;
68 line-height: 2em;
69 }
69 }
70
70
71 .lead {
71 .lead {
72 margin-bottom: @textmargin;
72 margin-bottom: @textmargin;
73 font-weight: 300;
73 font-weight: 300;
74 line-height: 1.4;
74 line-height: 1.4;
75
75
76 @media (min-width: @screen-sm-min) {
76 @media (min-width: @screen-sm-min) {
77 font-size: (@basefontsize * 1.5);
77 font-size: (@basefontsize * 1.5);
78 }
78 }
79 }
79 }
80
80
81 a,
81 a,
82 .link {
82 .link {
83 color: @rcblue;
83 color: @rcblue;
84 text-decoration: none;
84 text-decoration: none;
85 outline: none;
85 outline: none;
86 cursor: pointer;
86 cursor: pointer;
87
87
88 &:focus {
88 &:focus {
89 outline: none;
89 outline: none;
90 }
90 }
91
91
92 &:hover {
92 &:hover {
93 color: @rcdarkblue;
93 color: @rcdarkblue;
94 }
94 }
95 }
95 }
96
96
97 img {
97 img {
98 border: none;
98 border: none;
99 outline: none;
99 outline: none;
100 }
100 }
101
101
102 strong {
102 strong {
103 font-weight: @text-bold-weight;
103 font-weight: @text-bold-weight;
104 font-family: @text-bold;
104 font-family: @text-bold;
105 }
105 }
106
106
107 em {
107 em {
108 font-family: @text-italic;
108 font-family: @text-italic;
109 font-style: italic;
109 font-style: italic;
110 }
110 }
111
111
112 strong em,
112 strong em,
113 em strong {
113 em strong {
114 font-style: italic;
114 font-style: italic;
115 font-weight: @text-bold-italic-weight;
115 font-weight: @text-bold-italic-weight;
116 font-family: @text-bold-italic;
116 font-family: @text-bold-italic;
117 }
117 }
118
118
119 //TODO: lisa: b and i are depreciated, but we are still using them in places.
119 //TODO: lisa: b and i are depreciated, but we are still using them in places.
120 // Should probably make some decision whether to keep or lose these.
120 // Should probably make some decision whether to keep or lose these.
121 b {
121 b {
122
122
123 }
123 }
124
124
125 i {
125 i {
126 font-style: normal;
126 font-style: normal;
127 }
127 }
128
128
129 label {
129 label {
130 color: @text-color;
130 color: @text-color;
131
131
132 input[type="checkbox"] {
132 input[type="checkbox"] {
133 margin-right: 1em;
133 margin-right: 1em;
134 }
134 }
135 input[type="radio"] {
135 input[type="radio"] {
136 margin-right: 1em;
136 margin-right: 1em;
137 }
137 }
138 }
138 }
139
139
140 code,
140 code,
141 .code {
141 .code {
142 font-size: .95em;
142 font-size: .95em;
143 font-family: @text-code;
143 font-family: @text-code;
144 color: @grey3;
144 color: @grey3;
145
145
146 a {
146 a {
147 color: lighten(@rcblue,10%)
147 color: lighten(@rcblue,10%)
148 }
148 }
149 }
149 }
150
150
151 pre {
151 pre {
152 margin: 0;
152 margin: 0;
153 padding: 0;
153 padding: 0;
154 border: 0;
154 border: 0;
155 outline: 0;
155 outline: 0;
156 font-size: @basefontsize*.95;
156 font-size: @basefontsize*.95;
157 line-height: 1.4em;
157 line-height: 1.4em;
158 font-family: @text-code;
158 font-family: @text-code;
159 color: @grey3;
159 color: @grey3;
160 }
160 }
161
161
162 // Emphasis & misc
162 // Emphasis & misc
163 // -------------------------
163 // -------------------------
164 .discreet {
164 .discreet {
165 color: @grey4;
165 color: @grey4;
166 font-size: 85%;
166 font-size: 85%;
167 font-weight: normal;
167 font-weight: normal;
168
168
169 a {
169 a {
170 color: @grey4;
170 color: @grey4;
171
171
172 &:hover {
172 &:hover {
173 color: @rcdarkblue;
173 color: @rcdarkblue;
174 }
174 }
175 }
175 }
176 }
176 }
177
177
178 small,
178 small,
179 .small {
179 .small {
180 font-size: 75%;
180 font-size: 75%;
181 font-weight: normal;
181 font-weight: normal;
182 line-height: 1em;
182 line-height: 1em;
183 }
183 }
184
184
185 mark,
185 mark,
186 .mark {
186 .mark {
187 padding: .2em;
187 padding: .2em;
188 }
188 }
189
189
190 // Alignment
190 // Alignment
191 .text-left { text-align: left; }
191 .text-left { text-align: left; }
192 .text-right { text-align: right; }
192 .text-right { text-align: right; }
193 .text-center { text-align: center; }
193 .text-center { text-align: center; }
194 .text-justify { text-align: justify; }
194 .text-justify { text-align: justify; }
195 .text-nowrap { white-space: nowrap; }
195 .text-nowrap { white-space: nowrap; }
196
196
197 // Transformation
197 // Transformation
198 .text-lowercase { text-transform: lowercase; }
198 .text-lowercase { text-transform: lowercase; }
199 .text-uppercase { text-transform: uppercase; }
199 .text-uppercase { text-transform: uppercase; }
200 .text-capitalize { text-transform: capitalize; }
200 .text-capitalize { text-transform: capitalize; }
201
201
202 // Contextual colors
202 // Contextual colors
203 .text-muted {
203 .text-muted {
204 color: @grey4;
204 color: @grey4;
205 }
205 }
206 .text-primary {
206 .text-primary {
207 color: @rcblue;
207 color: @rcblue;
208 }
208 }
209 .text-success {
209 .text-success {
210 color: @alert1;
210 color: @alert1;
211 }
211 }
212 .text-info {
212 .text-info {
213 color: @alert4;
213 color: @alert4;
214 }
214 }
215 .text-warning {
215 .text-warning {
216 color: @alert3;
216 color: @alert3;
217 }
217 }
218 .text-danger {
218 .text-danger {
219 color: @alert2;
219 color: @alert2;
220 }
220 }
221
221
222 // Contextual backgrounds
222 // Contextual backgrounds
223 .bg-primary {
223 .bg-primary {
224 background-color: white;
224 background-color: white;
225 }
225 }
226 .bg-success {
226 .bg-success {
227 background-color: @alert1;
227 background-color: @alert1;
228 }
228 }
229 .bg-info {
229 .bg-info {
230 background-color: @alert4;
230 background-color: @alert4;
231 }
231 }
232 .bg-warning {
232 .bg-warning {
233 background-color: @alert3;
233 background-color: @alert3;
234 }
234 }
235 .bg-danger {
235 .bg-danger {
236 background-color: @alert2;
236 background-color: @alert2;
237 }
237 }
238
238
239
239
240 // Page header
240 // Page header
241 // -------------------------
241 // -------------------------
242
242
243 .page-header {
243 .page-header {
244 margin: @pagepadding 0 @textmargin;
244 margin: @pagepadding 0 @textmargin;
245 border-bottom: @border-thickness solid @grey5;
245 border-bottom: @border-thickness solid @grey5;
246 }
246 }
247
247
248 .title {
248 .title {
249 clear: both;
249 clear: both;
250 float: left;
250 float: left;
251 width: 100%;
251 width: 100%;
252 margin: @pagepadding/2 0 @pagepadding/4;
252 margin: @pagepadding/2 0 @pagepadding/4;
253 min-height: 25px;
253 min-height: 25px;
254
254
255 .breadcrumbs {
255 .breadcrumbs {
256 float: left;
256 float: left;
257 clear: both;
257 clear: both;
258 width: 700px;
258 width: 700px;
259 margin: 0;
259 margin: 0;
260
260
261 .q_filter_box {
261 .q_filter_box {
262 margin-right: @padding;
262 margin-right: @padding;
263 }
263 }
264 }
264 }
265
265
266 h1 a {
266 h1 a {
267 color: @rcblue;
267 color: @rcblue;
268 }
268 }
269
269
270 input{
270 input{
271 margin-right: @padding;
271 margin-right: @padding;
272 }
272 }
273
273
274 h5, .h5 {
274 h5, .h5 {
275 color: @grey1;
275 color: @grey1;
276 margin-bottom: @space;
276 margin-bottom: @space;
277
277
278 span {
278 span {
279 display: inline-block;
279 display: inline-block;
280 }
280 }
281 }
281 }
282
282
283 p {
283 p {
284 margin-bottom: 0;
284 margin-bottom: 0;
285 }
285 }
286
286
287 .links {
287 .links {
288 float: right;
288 float: right;
289 display: inline;
289 display: inline;
290 margin: 0;
290 margin: 0;
291 padding-left: 0;
291 padding-left: 0;
292 list-style: none;
292 list-style: none;
293 text-align: right;
293 text-align: right;
294
294
295 li {
295 li {
296 float: right;
296 float: right;
297 list-style-type: none;
297 list-style-type: none;
298 }
298 }
299
299
300 a {
300 a {
301 display: inline-block;
301 display: inline-block;
302 margin-left: @textmargin/2;
302 margin-left: @textmargin/2;
303 }
303 }
304 }
304 }
305
305
306 .title-content {
306 .title-content {
307
308 &.repo-title {
309 float: none
310 }
311
307 float: left;
312 float: left;
308 margin: 0;
313 margin: 0;
309 padding: 0;
314 padding: 0;
310
315
311 & + .breadcrumbs {
316 & + .breadcrumbs {
312 margin-top: @padding;
317 margin-top: @padding;
313 }
318 }
314
319
315 & + .links {
320 & + .links {
316 margin-top: -@button-padding;
321 margin-top: -@button-padding;
317
322
318 & + .breadcrumbs {
323 & + .breadcrumbs {
319 margin-top: @padding;
324 margin-top: @padding;
320 }
325 }
321 }
326 }
322
327
323 .repo-group-desc {
328 .repo-group-desc {
324 padding: 8px 0px 0px 0px;
329 padding: 8px 0px 0px 0px;
325 }
330 }
326 }
331 }
327
332
328 .title-main {
333 .title-main {
329 font-size: @repo-title-fontsize;
334 font-size: @repo-title-fontsize;
330 }
335 }
331
336
332 .title-description {
337 .title-description {
333 margin-top: .5em;
338 margin-top: .5em;
334 }
339 }
335
340
336 .q_filter_box {
341 .q_filter_box {
337 width: 200px;
342 width: 200px;
338 }
343 }
339
344
340 }
345 }
341
346
342 #readme .title {
347 #readme .title {
343 text-transform: none;
348 text-transform: none;
344 }
349 }
345
350
346 // Lists
351 // Lists
347 // -------------------------
352 // -------------------------
348
353
349 // Unordered and Ordered lists
354 // Unordered and Ordered lists
350 ul,
355 ul,
351 ol {
356 ol {
352 margin-top: 0;
357 margin-top: 0;
353 margin-bottom: @textmargin;
358 margin-bottom: @textmargin;
354 ul,
359 ul,
355 ol {
360 ol {
356 margin-bottom: 0;
361 margin-bottom: 0;
357 }
362 }
358 }
363 }
359
364
360 li {
365 li {
361 line-height: 2em;
366 line-height: 2em;
362 }
367 }
363
368
364 ul li {
369 ul li {
365 position: relative;
370 position: relative;
366 list-style-type: disc;
371 list-style-type: disc;
367
372
368 p:first-child {
373 p:first-child {
369 display:inline;
374 display:inline;
370 }
375 }
371 }
376 }
372
377
373 // List options
378 // List options
374
379
375 // Unstyled keeps list items block level, just removes default browser padding and list-style
380 // Unstyled keeps list items block level, just removes default browser padding and list-style
376 .list-unstyled {
381 .list-unstyled {
377 padding-left: 0;
382 padding-left: 0;
378 list-style: none;
383 list-style: none;
379 li:before { content: none; }
384 li:before { content: none; }
380 }
385 }
381
386
382 // Inline turns list items into inline-block
387 // Inline turns list items into inline-block
383 .list-inline {
388 .list-inline {
384 .list-unstyled();
389 .list-unstyled();
385 margin-left: -5px;
390 margin-left: -5px;
386
391
387 > li {
392 > li {
388 display: inline-block;
393 display: inline-block;
389 padding-left: 5px;
394 padding-left: 5px;
390 padding-right: 5px;
395 padding-right: 5px;
391 }
396 }
392 }
397 }
393
398
394 // Description Lists
399 // Description Lists
395
400
396 dl {
401 dl {
397 margin-top: 0; // Remove browser default
402 margin-top: 0; // Remove browser default
398 margin-bottom: @textmargin;
403 margin-bottom: @textmargin;
399 }
404 }
400
405
401 dt,
406 dt,
402 dd {
407 dd {
403 line-height: 1.4em;
408 line-height: 1.4em;
404 }
409 }
405
410
406 dt {
411 dt {
407 margin: @textmargin 0 0 0;
412 margin: @textmargin 0 0 0;
408 font-weight: @text-bold-weight;
413 font-weight: @text-bold-weight;
409 font-family: @text-bold;
414 font-family: @text-bold;
410 }
415 }
411
416
412 dd {
417 dd {
413 margin-left: 0; // Undo browser default
418 margin-left: 0; // Undo browser default
414 }
419 }
415
420
416 // Horizontal description lists
421 // Horizontal description lists
417 // Defaults to being stacked without any of the below styles applied, until the
422 // Defaults to being stacked without any of the below styles applied, until the
418 // grid breakpoint is reached (default of ~768px).
423 // grid breakpoint is reached (default of ~768px).
419 // These are used in forms as well; see style guide.
424 // These are used in forms as well; see style guide.
420 // TODO: lisa: These should really not be used in forms.
425 // TODO: lisa: These should really not be used in forms.
421
426
422 .dl-horizontal {
427 .dl-horizontal {
423
428
424 overflow: hidden;
429 overflow: hidden;
425 margin-bottom: @space;
430 margin-bottom: @space;
426
431
427 dt, dd {
432 dt, dd {
428 float: left;
433 float: left;
429 margin: 5px 0 5px 0;
434 margin: 5px 0 5px 0;
430 }
435 }
431
436
432 dt {
437 dt {
433 clear: left;
438 clear: left;
434 width: @label-width - @form-vertical-margin;
439 width: @label-width - @form-vertical-margin;
435 }
440 }
436
441
437 dd {
442 dd {
438 &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present
443 &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present
439 margin-left: @form-vertical-margin;
444 margin-left: @form-vertical-margin;
440 max-width: @form-max-width - (@label-width - @form-vertical-margin) - @form-vertical-margin;
445 max-width: @form-max-width - (@label-width - @form-vertical-margin) - @form-vertical-margin;
441 }
446 }
442
447
443 pre {
448 pre {
444 margin: 0;
449 margin: 0;
445 }
450 }
446
451
447 &.settings {
452 &.settings {
448 dt {
453 dt {
449 text-align: left;
454 text-align: left;
450 }
455 }
451 }
456 }
452
457
453 @media (min-width: 768px) {
458 @media (min-width: 768px) {
454 dt {
459 dt {
455 float: left;
460 float: left;
456 width: 185px;
461 width: 185px;
457 clear: left;
462 clear: left;
458 text-align: right;
463 text-align: right;
459 }
464 }
460 dd {
465 dd {
461 margin-left: 20px;
466 margin-left: 20px;
462 }
467 }
463 }
468 }
464 }
469 }
465
470
466
471
467 // Misc
472 // Misc
468 // -------------------------
473 // -------------------------
469
474
470 // Abbreviations and acronyms
475 // Abbreviations and acronyms
471 abbr[title],
476 abbr[title],
472 abbr[data-original-title] {
477 abbr[data-original-title] {
473 cursor: help;
478 cursor: help;
474 border-bottom: @border-thickness dotted @grey4;
479 border-bottom: @border-thickness dotted @grey4;
475 }
480 }
476 .initialism {
481 .initialism {
477 font-size: 90%;
482 font-size: 90%;
478 text-transform: uppercase;
483 text-transform: uppercase;
479 }
484 }
480
485
481 // Blockquotes
486 // Blockquotes
482 blockquote {
487 blockquote {
483 padding: 1em 2em;
488 padding: 1em 2em;
484 margin: 0 0 2em;
489 margin: 0 0 2em;
485 font-size: @basefontsize;
490 font-size: @basefontsize;
486 border-left: 2px solid @grey6;
491 border-left: 2px solid @grey6;
487
492
488 p,
493 p,
489 ul,
494 ul,
490 ol {
495 ol {
491 &:last-child {
496 &:last-child {
492 margin-bottom: 0;
497 margin-bottom: 0;
493 }
498 }
494 }
499 }
495
500
496 footer,
501 footer,
497 small,
502 small,
498 .small {
503 .small {
499 display: block;
504 display: block;
500 font-size: 80%;
505 font-size: 80%;
501
506
502 &:before {
507 &:before {
503 content: '\2014 \00A0'; // em dash, nbsp
508 content: '\2014 \00A0'; // em dash, nbsp
504 }
509 }
505 }
510 }
506 }
511 }
507
512
508 // Opposite alignment of blockquote
513 // Opposite alignment of blockquote
509 //
514 //
510 .blockquote-reverse,
515 .blockquote-reverse,
511 blockquote.pull-right {
516 blockquote.pull-right {
512 padding-right: 15px;
517 padding-right: 15px;
513 padding-left: 0;
518 padding-left: 0;
514 border-right: 5px solid @grey6;
519 border-right: 5px solid @grey6;
515 border-left: 0;
520 border-left: 0;
516 text-align: right;
521 text-align: right;
517
522
518 // Account for citation
523 // Account for citation
519 footer,
524 footer,
520 small,
525 small,
521 .small {
526 .small {
522 &:before { content: ''; }
527 &:before { content: ''; }
523 &:after {
528 &:after {
524 content: '\00A0 \2014'; // nbsp, em dash
529 content: '\00A0 \2014'; // nbsp, em dash
525 }
530 }
526 }
531 }
527 }
532 }
528
533
529 // Addresses
534 // Addresses
530 address {
535 address {
531 margin-bottom: 2em;
536 margin-bottom: 2em;
532 font-style: normal;
537 font-style: normal;
533 line-height: 1.8em;
538 line-height: 1.8em;
534 }
539 }
535
540
536 .error-message {
541 .error-message {
537 display: block;
542 display: block;
538 margin: @padding/3 0;
543 margin: @padding/3 0;
539 color: @alert2;
544 color: @alert2;
540 }
545 }
541
546
542 .issue-tracker-link {
547 .issue-tracker-link {
543 color: @rcblue;
548 color: @rcblue;
544 }
549 }
545
550
546 .info_text{
551 .info_text{
547 font-size: @basefontsize;
552 font-size: @basefontsize;
548 color: @grey4;
553 color: @grey4;
549 font-family: @text-regular;
554 font-family: @text-regular;
550 }
555 }
551
556
552 .help-block-inline {
557 .help-block-inline {
553 margin: 0;
558 margin: 0;
554 }
559 }
555
560
556 // help block text
561 // help block text
557 .help-block {
562 .help-block {
558 display: block;
563 display: block;
559 margin: 0 0 @padding;
564 margin: 0 0 @padding;
560 color: @grey4;
565 color: @grey4;
561 font-family: @text-light;
566 font-family: @text-light;
562 &.pre-formatting {
567 &.pre-formatting {
563 white-space: pre-wrap;
568 white-space: pre-wrap;
564 }
569 }
565 }
570 }
566
571
567 .error-message {
572 .error-message {
568 display: block;
573 display: block;
569 margin: @padding/3 0;
574 margin: @padding/3 0;
570 color: @alert2;
575 color: @alert2;
571 }
576 }
@@ -1,942 +1,951 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="root.mako"/>
2 <%inherit file="root.mako"/>
3
3
4 <%include file="/ejs_templates/templates.html"/>
4 <%include file="/ejs_templates/templates.html"/>
5
5
6 <div class="outerwrapper">
6 <div class="outerwrapper">
7 <!-- HEADER -->
7 <!-- HEADER -->
8 <div class="header">
8 <div class="header">
9 <div id="header-inner" class="wrapper">
9 <div id="header-inner" class="wrapper">
10 <div id="logo">
10 <div id="logo">
11 <div class="logo-wrapper">
11 <div class="logo-wrapper">
12 <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-60x60.png')}" alt="RhodeCode"/></a>
12 <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-60x60.png')}" alt="RhodeCode"/></a>
13 </div>
13 </div>
14 % if c.rhodecode_name:
14 % if c.rhodecode_name:
15 <div class="branding">
15 <div class="branding">
16 <a href="${h.route_path('home')}">${h.branding(c.rhodecode_name)}</a>
16 <a href="${h.route_path('home')}">${h.branding(c.rhodecode_name)}</a>
17 </div>
17 </div>
18 % endif
18 % endif
19 </div>
19 </div>
20 <!-- MENU BAR NAV -->
20 <!-- MENU BAR NAV -->
21 ${self.menu_bar_nav()}
21 ${self.menu_bar_nav()}
22 <!-- END MENU BAR NAV -->
22 <!-- END MENU BAR NAV -->
23 </div>
23 </div>
24 </div>
24 </div>
25 ${self.menu_bar_subnav()}
25 ${self.menu_bar_subnav()}
26 <!-- END HEADER -->
26 <!-- END HEADER -->
27
27
28 <!-- CONTENT -->
28 <!-- CONTENT -->
29 <div id="content" class="wrapper">
29 <div id="content" class="wrapper">
30
30
31 <rhodecode-toast id="notifications"></rhodecode-toast>
31 <rhodecode-toast id="notifications"></rhodecode-toast>
32
32
33 <div class="main">
33 <div class="main">
34 ${next.main()}
34 ${next.main()}
35 </div>
35 </div>
36 </div>
36 </div>
37 <!-- END CONTENT -->
37 <!-- END CONTENT -->
38
38
39 </div>
39 </div>
40 <!-- FOOTER -->
40 <!-- FOOTER -->
41 <div id="footer">
41 <div id="footer">
42 <div id="footer-inner" class="title wrapper">
42 <div id="footer-inner" class="title wrapper">
43 <div>
43 <div>
44 <p class="footer-link-right">
44 <p class="footer-link-right">
45 % if c.visual.show_version:
45 % if c.visual.show_version:
46 RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition}
46 RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition}
47 % endif
47 % endif
48 &copy; 2010-${h.datetime.today().year}, <a href="${h.route_url('rhodecode_official')}" target="_blank">RhodeCode GmbH</a>. All rights reserved.
48 &copy; 2010-${h.datetime.today().year}, <a href="${h.route_url('rhodecode_official')}" target="_blank">RhodeCode GmbH</a>. All rights reserved.
49 % if c.visual.rhodecode_support_url:
49 % if c.visual.rhodecode_support_url:
50 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
50 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
51 % endif
51 % endif
52 </p>
52 </p>
53 <% sid = 'block' if request.GET.get('showrcid') else 'none' %>
53 <% sid = 'block' if request.GET.get('showrcid') else 'none' %>
54 <p class="server-instance" style="display:${sid}">
54 <p class="server-instance" style="display:${sid}">
55 ## display hidden instance ID if specially defined
55 ## display hidden instance ID if specially defined
56 % if c.rhodecode_instanceid:
56 % if c.rhodecode_instanceid:
57 ${_('RhodeCode instance id: {}').format(c.rhodecode_instanceid)}
57 ${_('RhodeCode instance id: {}').format(c.rhodecode_instanceid)}
58 % endif
58 % endif
59 </p>
59 </p>
60 </div>
60 </div>
61 </div>
61 </div>
62 </div>
62 </div>
63
63
64 <!-- END FOOTER -->
64 <!-- END FOOTER -->
65
65
66 ### MAKO DEFS ###
66 ### MAKO DEFS ###
67
67
68 <%def name="menu_bar_subnav()">
68 <%def name="menu_bar_subnav()">
69 </%def>
69 </%def>
70
70
71 <%def name="breadcrumbs(class_='breadcrumbs')">
71 <%def name="breadcrumbs(class_='breadcrumbs')">
72 <div class="${class_}">
72 <div class="${class_}">
73 ${self.breadcrumbs_links()}
73 ${self.breadcrumbs_links()}
74 </div>
74 </div>
75 </%def>
75 </%def>
76
76
77 <%def name="admin_menu(active=None)">
77 <%def name="admin_menu(active=None)">
78 <%
78 <%
79 def is_active(selected):
79 def is_active(selected):
80 if selected == active:
80 if selected == active:
81 return "active"
81 return "active"
82 %>
82 %>
83
83
84 <div id="context-bar">
84 <div id="context-bar">
85 <div class="wrapper">
85 <div class="wrapper">
86 <div class="title">
86 <div class="title">
87 <div class="title-content">
87 <div class="title-content">
88 <div class="title-main">
88 <div class="title-main">
89 % if c.is_super_admin:
89 % if c.is_super_admin:
90 ${_('Super Admin Panel')}
90 ${_('Super Admin Panel')}
91 % else:
91 % else:
92 ${_('Delegated Admin Panel')}
92 ${_('Delegated Admin Panel')}
93 % endif
93 % endif
94 </div>
94 </div>
95 </div>
95 </div>
96 </div>
96 </div>
97
97
98 <ul id="context-pages" class="navigation horizontal-list">
98 <ul id="context-pages" class="navigation horizontal-list">
99
99
100 ## super admin case
100 ## super admin case
101 % if c.is_super_admin:
101 % if c.is_super_admin:
102 <li class="${is_active('audit_logs')}"><a href="${h.route_path('admin_audit_logs')}">${_('Admin audit logs')}</a></li>
102 <li class="${is_active('audit_logs')}"><a href="${h.route_path('admin_audit_logs')}">${_('Admin audit logs')}</a></li>
103 <li class="${is_active('repositories')}"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li>
103 <li class="${is_active('repositories')}"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li>
104 <li class="${is_active('repository_groups')}"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li>
104 <li class="${is_active('repository_groups')}"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li>
105 <li class="${is_active('users')}"><a href="${h.route_path('users')}">${_('Users')}</a></li>
105 <li class="${is_active('users')}"><a href="${h.route_path('users')}">${_('Users')}</a></li>
106 <li class="${is_active('user_groups')}"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li>
106 <li class="${is_active('user_groups')}"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li>
107 <li class="${is_active('permissions')}"><a href="${h.route_path('admin_permissions_application')}">${_('Permissions')}</a></li>
107 <li class="${is_active('permissions')}"><a href="${h.route_path('admin_permissions_application')}">${_('Permissions')}</a></li>
108 <li class="${is_active('authentication')}"><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li>
108 <li class="${is_active('authentication')}"><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li>
109 <li class="${is_active('integrations')}"><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li>
109 <li class="${is_active('integrations')}"><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li>
110 <li class="${is_active('defaults')}"><a href="${h.route_path('admin_defaults_repositories')}">${_('Defaults')}</a></li>
110 <li class="${is_active('defaults')}"><a href="${h.route_path('admin_defaults_repositories')}">${_('Defaults')}</a></li>
111 <li class="${is_active('settings')}"><a href="${h.route_path('admin_settings')}">${_('Settings')}</a></li>
111 <li class="${is_active('settings')}"><a href="${h.route_path('admin_settings')}">${_('Settings')}</a></li>
112
112
113 ## delegated admin
113 ## delegated admin
114 % elif c.is_delegated_admin:
114 % elif c.is_delegated_admin:
115 <%
115 <%
116 repositories=c.auth_user.repositories_admin or c.can_create_repo
116 repositories=c.auth_user.repositories_admin or c.can_create_repo
117 repository_groups=c.auth_user.repository_groups_admin or c.can_create_repo_group
117 repository_groups=c.auth_user.repository_groups_admin or c.can_create_repo_group
118 user_groups=c.auth_user.user_groups_admin or c.can_create_user_group
118 user_groups=c.auth_user.user_groups_admin or c.can_create_user_group
119 %>
119 %>
120
120
121 %if repositories:
121 %if repositories:
122 <li class="${is_active('repositories')} local-admin-repos"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li>
122 <li class="${is_active('repositories')} local-admin-repos"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li>
123 %endif
123 %endif
124 %if repository_groups:
124 %if repository_groups:
125 <li class="${is_active('repository_groups')} local-admin-repo-groups"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li>
125 <li class="${is_active('repository_groups')} local-admin-repo-groups"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li>
126 %endif
126 %endif
127 %if user_groups:
127 %if user_groups:
128 <li class="${is_active('user_groups')} local-admin-user-groups"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li>
128 <li class="${is_active('user_groups')} local-admin-user-groups"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li>
129 %endif
129 %endif
130 % endif
130 % endif
131 </ul>
131 </ul>
132
132
133 </div>
133 </div>
134 <div class="clear"></div>
134 <div class="clear"></div>
135 </div>
135 </div>
136 </%def>
136 </%def>
137
137
138 <%def name="dt_info_panel(elements)">
138 <%def name="dt_info_panel(elements)">
139 <dl class="dl-horizontal">
139 <dl class="dl-horizontal">
140 %for dt, dd, title, show_items in elements:
140 %for dt, dd, title, show_items in elements:
141 <dt>${dt}:</dt>
141 <dt>${dt}:</dt>
142 <dd title="${h.tooltip(title)}">
142 <dd title="${h.tooltip(title)}">
143 %if callable(dd):
143 %if callable(dd):
144 ## allow lazy evaluation of elements
144 ## allow lazy evaluation of elements
145 ${dd()}
145 ${dd()}
146 %else:
146 %else:
147 ${dd}
147 ${dd}
148 %endif
148 %endif
149 %if show_items:
149 %if show_items:
150 <span class="btn-collapse" data-toggle="item-${h.md5_safe(dt)[:6]}-details">${_('Show More')} </span>
150 <span class="btn-collapse" data-toggle="item-${h.md5_safe(dt)[:6]}-details">${_('Show More')} </span>
151 %endif
151 %endif
152 </dd>
152 </dd>
153
153
154 %if show_items:
154 %if show_items:
155 <div class="collapsable-content" data-toggle="item-${h.md5_safe(dt)[:6]}-details" style="display: none">
155 <div class="collapsable-content" data-toggle="item-${h.md5_safe(dt)[:6]}-details" style="display: none">
156 %for item in show_items:
156 %for item in show_items:
157 <dt></dt>
157 <dt></dt>
158 <dd>${item}</dd>
158 <dd>${item}</dd>
159 %endfor
159 %endfor
160 </div>
160 </div>
161 %endif
161 %endif
162
162
163 %endfor
163 %endfor
164 </dl>
164 </dl>
165 </%def>
165 </%def>
166
166
167 <%def name="gravatar(email, size=16)">
167 <%def name="gravatar(email, size=16)">
168 <%
168 <%
169 if (size > 16):
169 if (size > 16):
170 gravatar_class = 'gravatar gravatar-large'
170 gravatar_class = 'gravatar gravatar-large'
171 else:
171 else:
172 gravatar_class = 'gravatar'
172 gravatar_class = 'gravatar'
173 %>
173 %>
174 <%doc>
174 <%doc>
175 TODO: johbo: For now we serve double size images to make it smooth
175 TODO: johbo: For now we serve double size images to make it smooth
176 for retina. This is how it worked until now. Should be replaced
176 for retina. This is how it worked until now. Should be replaced
177 with a better solution at some point.
177 with a better solution at some point.
178 </%doc>
178 </%doc>
179 <img class="${gravatar_class}" src="${h.gravatar_url(email, size * 2)}" height="${size}" width="${size}">
179 <img class="${gravatar_class}" src="${h.gravatar_url(email, size * 2)}" height="${size}" width="${size}">
180 </%def>
180 </%def>
181
181
182
182
183 <%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
183 <%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
184 <% email = h.email_or_none(contact) %>
184 <% email = h.email_or_none(contact) %>
185 <div class="rc-user tooltip" title="${h.tooltip(h.author_string(email))}">
185 <div class="rc-user tooltip" title="${h.tooltip(h.author_string(email))}">
186 ${self.gravatar(email, size)}
186 ${self.gravatar(email, size)}
187 <span class="${'user user-disabled' if show_disabled else 'user'}"> ${h.link_to_user(contact)}</span>
187 <span class="${'user user-disabled' if show_disabled else 'user'}"> ${h.link_to_user(contact)}</span>
188 </div>
188 </div>
189 </%def>
189 </%def>
190
190
191
191
192 <%def name="repo_page_title(repo_instance)">
192 <%def name="repo_page_title(repo_instance)">
193 <div class="title-content">
193 <div class="title-content repo-title">
194 <div class="title-main">
194 <div class="title-main">
195 ## SVN/HG/GIT icons
195 ## SVN/HG/GIT icons
196 %if h.is_hg(repo_instance):
196 %if h.is_hg(repo_instance):
197 <i class="icon-hg"></i>
197 <i class="icon-hg"></i>
198 %endif
198 %endif
199 %if h.is_git(repo_instance):
199 %if h.is_git(repo_instance):
200 <i class="icon-git"></i>
200 <i class="icon-git"></i>
201 %endif
201 %endif
202 %if h.is_svn(repo_instance):
202 %if h.is_svn(repo_instance):
203 <i class="icon-svn"></i>
203 <i class="icon-svn"></i>
204 %endif
204 %endif
205
205
206 ## public/private
206 ## public/private
207 %if repo_instance.private:
207 %if repo_instance.private:
208 <i class="icon-repo-private"></i>
208 <i class="icon-repo-private"></i>
209 %else:
209 %else:
210 <i class="icon-repo-public"></i>
210 <i class="icon-repo-public"></i>
211 %endif
211 %endif
212
212
213 ## repo name with group name
213 ## repo name with group name
214 ${h.breadcrumb_repo_link(repo_instance)}
214 ${h.breadcrumb_repo_link(repo_instance)}
215
215
216 ## Context Actions
217 <div class="pull-right">
218 %if c.rhodecode_user.username != h.DEFAULT_USER:
219 <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>
220 %else:
221 <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>
222 %endif
223 </div>
224
216 </div>
225 </div>
217
226
218 ## FORKED
227 ## FORKED
219 %if repo_instance.fork:
228 %if repo_instance.fork:
220 <p class="discreet">
229 <p class="discreet">
221 <i class="icon-code-fork"></i> ${_('Fork of')}
230 <i class="icon-code-fork"></i> ${_('Fork of')}
222 ${h.link_to_if(c.has_origin_repo_read_perm,repo_instance.fork.repo_name, h.route_path('repo_summary', repo_name=repo_instance.fork.repo_name))}
231 ${h.link_to_if(c.has_origin_repo_read_perm,repo_instance.fork.repo_name, h.route_path('repo_summary', repo_name=repo_instance.fork.repo_name))}
223 </p>
232 </p>
224 %endif
233 %endif
225
234
226 ## IMPORTED FROM REMOTE
235 ## IMPORTED FROM REMOTE
227 %if repo_instance.clone_uri:
236 %if repo_instance.clone_uri:
228 <p class="discreet">
237 <p class="discreet">
229 <i class="icon-code-fork"></i> ${_('Clone from')}
238 <i class="icon-code-fork"></i> ${_('Clone from')}
230 <a href="${h.safe_str(h.hide_credentials(repo_instance.clone_uri))}">${h.hide_credentials(repo_instance.clone_uri)}</a>
239 <a href="${h.safe_str(h.hide_credentials(repo_instance.clone_uri))}">${h.hide_credentials(repo_instance.clone_uri)}</a>
231 </p>
240 </p>
232 %endif
241 %endif
233
242
234 ## LOCKING STATUS
243 ## LOCKING STATUS
235 %if repo_instance.locked[0]:
244 %if repo_instance.locked[0]:
236 <p class="locking_locked discreet">
245 <p class="locking_locked discreet">
237 <i class="icon-repo-lock"></i>
246 <i class="icon-repo-lock"></i>
238 ${_('Repository locked by %(user)s') % {'user': h.person_by_id(repo_instance.locked[0])}}
247 ${_('Repository locked by %(user)s') % {'user': h.person_by_id(repo_instance.locked[0])}}
239 </p>
248 </p>
240 %elif repo_instance.enable_locking:
249 %elif repo_instance.enable_locking:
241 <p class="locking_unlocked discreet">
250 <p class="locking_unlocked discreet">
242 <i class="icon-repo-unlock"></i>
251 <i class="icon-repo-unlock"></i>
243 ${_('Repository not locked. Pull repository to lock it.')}
252 ${_('Repository not locked. Pull repository to lock it.')}
244 </p>
253 </p>
245 %endif
254 %endif
246
255
247 </div>
256 </div>
248 </%def>
257 </%def>
249
258
250 <%def name="repo_menu(active=None)">
259 <%def name="repo_menu(active=None)">
251 <%
260 <%
252 def is_active(selected):
261 def is_active(selected):
253 if selected == active:
262 if selected == active:
254 return "active"
263 return "active"
255 %>
264 %>
256
265
257 <!--- REPO CONTEXT BAR -->
266 <!--- REPO CONTEXT BAR -->
258 <div id="context-bar">
267 <div id="context-bar">
259 <div class="wrapper">
268 <div class="wrapper">
260
269
261 <div class="title">
270 <div class="title">
262 ${self.repo_page_title(c.rhodecode_db_repo)}
271 ${self.repo_page_title(c.rhodecode_db_repo)}
263 </div>
272 </div>
264
273
265 <ul id="context-pages" class="navigation horizontal-list">
274 <ul id="context-pages" class="navigation horizontal-list">
266 <li class="${is_active('summary')}"><a class="menulink" href="${h.route_path('repo_summary', repo_name=c.repo_name)}"><div class="menulabel">${_('Summary')}</div></a></li>
275 <li class="${is_active('summary')}"><a class="menulink" href="${h.route_path('repo_summary', repo_name=c.repo_name)}"><div class="menulabel">${_('Summary')}</div></a></li>
267 <li class="${is_active('changelog')}"><a class="menulink" href="${h.route_path('repo_changelog', repo_name=c.repo_name)}"><div class="menulabel">${_('Changelog')}</div></a></li>
276 <li class="${is_active('changelog')}"><a class="menulink" href="${h.route_path('repo_changelog', repo_name=c.repo_name)}"><div class="menulabel">${_('Changelog')}</div></a></li>
268 <li class="${is_active('files')}"><a class="menulink" href="${h.route_path('repo_files', repo_name=c.repo_name, commit_id=c.rhodecode_db_repo.landing_rev[1], f_path='')}"><div class="menulabel">${_('Files')}</div></a></li>
277 <li class="${is_active('files')}"><a class="menulink" href="${h.route_path('repo_files', repo_name=c.repo_name, commit_id=c.rhodecode_db_repo.landing_rev[1], f_path='')}"><div class="menulabel">${_('Files')}</div></a></li>
269 <li class="${is_active('compare')}"><a class="menulink" href="${h.route_path('repo_compare_select',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a></li>
278 <li class="${is_active('compare')}"><a class="menulink" href="${h.route_path('repo_compare_select',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a></li>
270
279
271 ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()"
280 ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()"
272 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
281 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
273 <li class="${is_active('showpullrequest')}">
282 <li class="${is_active('showpullrequest')}">
274 <a class="menulink" href="${h.route_path('pullrequest_show_all', repo_name=c.repo_name)}" title="${h.tooltip(_('Show Pull Requests for %s') % c.repo_name)}">
283 <a class="menulink" href="${h.route_path('pullrequest_show_all', repo_name=c.repo_name)}" title="${h.tooltip(_('Show Pull Requests for %s') % c.repo_name)}">
275 <div class="menulabel">
284 <div class="menulabel">
276 %if c.repository_pull_requests == 1:
285 %if c.repository_pull_requests == 1:
277 ${c.repository_pull_requests} ${_('Pull Request')}
286 ${c.repository_pull_requests} ${_('Pull Request')}
278 %else:
287 %else:
279 ${c.repository_pull_requests} ${_('Pull Requests')}
288 ${c.repository_pull_requests} ${_('Pull Requests')}
280 %endif
289 %endif
281 </div>
290 </div>
282 </a>
291 </a>
283 </li>
292 </li>
284 %endif
293 %endif
285
294
286 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
295 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
287 <li class="${is_active('settings')}"><a class="menulink" href="${h.route_path('edit_repo',repo_name=c.repo_name)}"><div class="menulabel">${_('Repository Settings')}</div></a></li>
296 <li class="${is_active('settings')}"><a class="menulink" href="${h.route_path('edit_repo',repo_name=c.repo_name)}"><div class="menulabel">${_('Repository Settings')}</div></a></li>
288 %endif
297 %endif
289
298
290 <li class="${is_active('options')}">
299 <li class="${is_active('options')}">
291 <a class="menulink dropdown">
300 <a class="menulink dropdown">
292 <div class="menulabel">${_('Options')} <div class="show_more"></div></div>
301 <div class="menulabel">${_('Options')} <div class="show_more"></div></div>
293 </a>
302 </a>
294 <ul class="submenu">
303 <ul class="submenu">
295
304
296 %if c.rhodecode_db_repo.fork:
305 %if c.rhodecode_db_repo.fork:
297 <li>
306 <li>
298 <a title="${h.tooltip(_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name))}"
307 <a title="${h.tooltip(_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name))}"
299 href="${h.route_path('repo_compare',
308 href="${h.route_path('repo_compare',
300 repo_name=c.rhodecode_db_repo.fork.repo_name,
309 repo_name=c.rhodecode_db_repo.fork.repo_name,
301 source_ref_type=c.rhodecode_db_repo.landing_rev[0],
310 source_ref_type=c.rhodecode_db_repo.landing_rev[0],
302 source_ref=c.rhodecode_db_repo.landing_rev[1],
311 source_ref=c.rhodecode_db_repo.landing_rev[1],
303 target_repo=c.repo_name,target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],
312 target_repo=c.repo_name,target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],
304 target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1],
313 target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1],
305 _query=dict(merge=1))}"
314 _query=dict(merge=1))}"
306 >
315 >
307 ${_('Compare fork')}
316 ${_('Compare fork')}
308 </a>
317 </a>
309 </li>
318 </li>
310 %endif
319 %endif
311
320
312 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
321 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
313 %if c.rhodecode_db_repo.locked[0]:
322 %if c.rhodecode_db_repo.locked[0]:
314 <li><a class="locking_del" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Unlock')}</a></li>
323 <li><a class="locking_del" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Unlock')}</a></li>
315 %else:
324 %else:
316 <li><a class="locking_add" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Lock')}</a></li>
325 <li><a class="locking_add" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Lock')}</a></li>
317 %endif
326 %endif
318 %endif
327 %endif
319 %if c.rhodecode_user.username != h.DEFAULT_USER:
328 %if c.rhodecode_user.username != h.DEFAULT_USER:
320 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
329 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
321 <li><a href="${h.route_path('repo_fork_new',repo_name=c.repo_name)}">${_('Fork')}</a></li>
330 <li><a href="${h.route_path('repo_fork_new',repo_name=c.repo_name)}">${_('Fork')}</a></li>
322 <li><a href="${h.route_path('pullrequest_new',repo_name=c.repo_name)}">${_('Create Pull Request')}</a></li>
331 <li><a href="${h.route_path('pullrequest_new',repo_name=c.repo_name)}">${_('Create Pull Request')}</a></li>
323 %endif
332 %endif
324 %endif
333 %endif
325 </ul>
334 </ul>
326 </li>
335 </li>
327 </ul>
336 </ul>
328 </div>
337 </div>
329 <div class="clear"></div>
338 <div class="clear"></div>
330 </div>
339 </div>
331 % if c.rhodecode_db_repo.archived:
340 % if c.rhodecode_db_repo.archived:
332 <div class="alert alert-warning text-center">
341 <div class="alert alert-warning text-center">
333 <strong>${_('This repository has been archived. It is now read-only.')}</strong>
342 <strong>${_('This repository has been archived. It is now read-only.')}</strong>
334 </div>
343 </div>
335 % endif
344 % endif
336 <!--- REPO END CONTEXT BAR -->
345 <!--- REPO END CONTEXT BAR -->
337
346
338 </%def>
347 </%def>
339
348
340 <%def name="repo_group_page_title(repo_group_instance)">
349 <%def name="repo_group_page_title(repo_group_instance)">
341 <div class="title-content">
350 <div class="title-content">
342 <div class="title-main">
351 <div class="title-main">
343 ## Repository Group icon
352 ## Repository Group icon
344 <i class="icon-folder-close"></i>
353 <i class="icon-folder-close"></i>
345
354
346 ## repo name with group name
355 ## repo name with group name
347 ${h.breadcrumb_repo_group_link(repo_group_instance)}
356 ${h.breadcrumb_repo_group_link(repo_group_instance)}
348 </div>
357 </div>
349
358
350 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
359 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
351 <div class="repo-group-desc discreet">
360 <div class="repo-group-desc discreet">
352 ${dt.repo_group_desc(repo_group_instance.description_safe, repo_group_instance.personal, c.visual.stylify_metatags)}
361 ${dt.repo_group_desc(repo_group_instance.description_safe, repo_group_instance.personal, c.visual.stylify_metatags)}
353 </div>
362 </div>
354
363
355 </div>
364 </div>
356 </%def>
365 </%def>
357
366
358 <%def name="repo_group_menu(active=None)">
367 <%def name="repo_group_menu(active=None)">
359 <%
368 <%
360 def is_active(selected):
369 def is_active(selected):
361 if selected == active:
370 if selected == active:
362 return "active"
371 return "active"
363
372
364 gr_name = c.repo_group.group_name if c.repo_group else None
373 gr_name = c.repo_group.group_name if c.repo_group else None
365 # create repositories with write permission on group is set to true
374 # create repositories with write permission on group is set to true
366 create_on_write = h.HasPermissionAny('hg.create.write_on_repogroup.true')()
375 create_on_write = h.HasPermissionAny('hg.create.write_on_repogroup.true')()
367 group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'group admin index page')
376 group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'group admin index page')
368 group_write = h.HasRepoGroupPermissionAny('group.write')(gr_name, 'can write into group index page')
377 group_write = h.HasRepoGroupPermissionAny('group.write')(gr_name, 'can write into group index page')
369
378
370 %>
379 %>
371
380
372 <!--- REPO GROUP CONTEXT BAR -->
381 <!--- REPO GROUP CONTEXT BAR -->
373 <div id="context-bar">
382 <div id="context-bar">
374 <div class="wrapper">
383 <div class="wrapper">
375 <div class="title">
384 <div class="title">
376 ${self.repo_group_page_title(c.repo_group)}
385 ${self.repo_group_page_title(c.repo_group)}
377 </div>
386 </div>
378
387
379 <ul id="context-pages" class="navigation horizontal-list">
388 <ul id="context-pages" class="navigation horizontal-list">
380 <li class="${is_active('home')}"><a class="menulink" href="${h.route_path('repo_group_home', repo_group_name=c.repo_group.group_name)}"><div class="menulabel">${_('Group Home')}</div></a></li>
389 <li class="${is_active('home')}"><a class="menulink" href="${h.route_path('repo_group_home', repo_group_name=c.repo_group.group_name)}"><div class="menulabel">${_('Group Home')}</div></a></li>
381 % if c.is_super_admin or group_admin:
390 % if c.is_super_admin or group_admin:
382 <li class="${is_active('settings')}"><a class="menulink" href="${h.route_path('edit_repo_group',repo_group_name=c.repo_group.group_name)}" title="${_('You have admin right to this group, and can edit it')}"><div class="menulabel">${_('Group Settings')}</div></a></li>
391 <li class="${is_active('settings')}"><a class="menulink" href="${h.route_path('edit_repo_group',repo_group_name=c.repo_group.group_name)}" title="${_('You have admin right to this group, and can edit it')}"><div class="menulabel">${_('Group Settings')}</div></a></li>
383 % endif
392 % endif
384
393
385 <li class="${is_active('options')}">
394 <li class="${is_active('options')}">
386 <a class="menulink dropdown">
395 <a class="menulink dropdown">
387 <div class="menulabel">${_('Options')} <div class="show_more"></div></div>
396 <div class="menulabel">${_('Options')} <div class="show_more"></div></div>
388 </a>
397 </a>
389 <ul class="submenu">
398 <ul class="submenu">
390 %if c.is_super_admin or group_admin or (group_write and create_on_write):
399 %if c.is_super_admin or group_admin or (group_write and create_on_write):
391 <li><a href="${h.route_path('repo_new',_query=dict(parent_group=c.repo_group.group_id))}">${_('Add Repository')}</a></li>
400 <li><a href="${h.route_path('repo_new',_query=dict(parent_group=c.repo_group.group_id))}">${_('Add Repository')}</a></li>
392 %endif
401 %endif
393 %if c.is_super_admin or group_admin:
402 %if c.is_super_admin or group_admin:
394 <li><a href="${h.route_path('repo_group_new',_query=dict(parent_group=c.repo_group.group_id))}">${_(u'Add Parent Group')}</a></li>
403 <li><a href="${h.route_path('repo_group_new',_query=dict(parent_group=c.repo_group.group_id))}">${_(u'Add Parent Group')}</a></li>
395 %endif
404 %endif
396 </ul>
405 </ul>
397 </li>
406 </li>
398 </ul>
407 </ul>
399 </div>
408 </div>
400 <div class="clear"></div>
409 <div class="clear"></div>
401 </div>
410 </div>
402
411
403 <!--- REPO GROUP CONTEXT BAR -->
412 <!--- REPO GROUP CONTEXT BAR -->
404
413
405 </%def>
414 </%def>
406
415
407
416
408 <%def name="usermenu(active=False)">
417 <%def name="usermenu(active=False)">
409 ## USER MENU
418 ## USER MENU
410 <li id="quick_login_li" class="${'active' if active else ''}">
419 <li id="quick_login_li" class="${'active' if active else ''}">
411 % if c.rhodecode_user.username == h.DEFAULT_USER:
420 % if c.rhodecode_user.username == h.DEFAULT_USER:
412 <a id="quick_login_link" class="menulink childs" href="${h.route_path('login', _query={'came_from': h.current_route_path(request)})}">
421 <a id="quick_login_link" class="menulink childs" href="${h.route_path('login', _query={'came_from': h.current_route_path(request)})}">
413 ${gravatar(c.rhodecode_user.email, 20)}
422 ${gravatar(c.rhodecode_user.email, 20)}
414 <span class="user">
423 <span class="user">
415 <span>${_('Sign in')}</span>
424 <span>${_('Sign in')}</span>
416 </span>
425 </span>
417 </a>
426 </a>
418 % else:
427 % else:
419 ## logged in user
428 ## logged in user
420 <a id="quick_login_link" class="menulink childs">
429 <a id="quick_login_link" class="menulink childs">
421 ${gravatar(c.rhodecode_user.email, 20)}
430 ${gravatar(c.rhodecode_user.email, 20)}
422 <span class="user">
431 <span class="user">
423 <span class="menu_link_user">${c.rhodecode_user.username}</span>
432 <span class="menu_link_user">${c.rhodecode_user.username}</span>
424 <div class="show_more"></div>
433 <div class="show_more"></div>
425 </span>
434 </span>
426 </a>
435 </a>
427 ## subnav with menu for logged in user
436 ## subnav with menu for logged in user
428 <div class="user-menu submenu">
437 <div class="user-menu submenu">
429 <div id="quick_login">
438 <div id="quick_login">
430 %if c.rhodecode_user.username != h.DEFAULT_USER:
439 %if c.rhodecode_user.username != h.DEFAULT_USER:
431 <div class="">
440 <div class="">
432 <div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div>
441 <div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div>
433 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
442 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
434 <div class="email">${c.rhodecode_user.email}</div>
443 <div class="email">${c.rhodecode_user.email}</div>
435 </div>
444 </div>
436 <div class="">
445 <div class="">
437 <ol class="links">
446 <ol class="links">
438 <li>${h.link_to(_(u'My account'),h.route_path('my_account_profile'))}</li>
447 <li>${h.link_to(_(u'My account'),h.route_path('my_account_profile'))}</li>
439 % if c.rhodecode_user.personal_repo_group:
448 % if c.rhodecode_user.personal_repo_group:
440 <li>${h.link_to(_(u'My personal group'), h.route_path('repo_group_home', repo_group_name=c.rhodecode_user.personal_repo_group.group_name))}</li>
449 <li>${h.link_to(_(u'My personal group'), h.route_path('repo_group_home', repo_group_name=c.rhodecode_user.personal_repo_group.group_name))}</li>
441 % endif
450 % endif
442 <li>${h.link_to(_(u'Pull Requests'), h.route_path('my_account_pullrequests'))}</li>
451 <li>${h.link_to(_(u'Pull Requests'), h.route_path('my_account_pullrequests'))}</li>
443 ## bookmark-items
452 ## bookmark-items
444 <li class="bookmark-items">
453 <li class="bookmark-items">
445 ${_('Bookmarks')}
454 ${_('Bookmarks')}
446 <div class="pull-right">
455 <div class="pull-right">
447 <a href="${h.route_path('my_account_bookmarks')}">${_('Manage')}</a>
456 <a href="${h.route_path('my_account_bookmarks')}">${_('Manage')}</a>
448 </div>
457 </div>
449 </li>
458 </li>
450 % if not c.bookmark_items:
459 % if not c.bookmark_items:
451 <li>
460 <li>
452 <a href="${h.route_path('my_account_bookmarks')}">${_('No Bookmarks yet.')}</a>
461 <a href="${h.route_path('my_account_bookmarks')}">${_('No Bookmarks yet.')}</a>
453 </li>
462 </li>
454 % endif
463 % endif
455 % for item in c.bookmark_items:
464 % for item in c.bookmark_items:
456 <li>
465 <li>
457 % if item.repository:
466 % if item.repository:
458 <div>
467 <div>
459 <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}">
468 <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}">
460 <code>${item.position}</code>
469 <code>${item.position}</code>
461 % if item.repository.repo_type == 'hg':
470 % if item.repository.repo_type == 'hg':
462 <i class="icon-hg" title="${_('Repository')}" style="font-size: 16px"></i>
471 <i class="icon-hg" title="${_('Repository')}" style="font-size: 16px"></i>
463 % elif item.repository.repo_type == 'git':
472 % elif item.repository.repo_type == 'git':
464 <i class="icon-git" title="${_('Repository')}" style="font-size: 16px"></i>
473 <i class="icon-git" title="${_('Repository')}" style="font-size: 16px"></i>
465 % elif item.repository.repo_type == 'svn':
474 % elif item.repository.repo_type == 'svn':
466 <i class="icon-svn" title="${_('Repository')}" style="font-size: 16px"></i>
475 <i class="icon-svn" title="${_('Repository')}" style="font-size: 16px"></i>
467 % endif
476 % endif
468 ${(item.title or h.shorter(item.repository.repo_name, 30))}
477 ${(item.title or h.shorter(item.repository.repo_name, 30))}
469 </a>
478 </a>
470 </div>
479 </div>
471 % elif item.repository_group:
480 % elif item.repository_group:
472 <div>
481 <div>
473 <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}">
482 <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}">
474 <code>${item.position}</code>
483 <code>${item.position}</code>
475 <i class="icon-folder-close" title="${_('Repository group')}" style="font-size: 16px"></i>
484 <i class="icon-folder-close" title="${_('Repository group')}" style="font-size: 16px"></i>
476 ${(item.title or h.shorter(item.repository_group.group_name, 30))}
485 ${(item.title or h.shorter(item.repository_group.group_name, 30))}
477 </a>
486 </a>
478 </div>
487 </div>
479 % else:
488 % else:
480 <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}">
489 <a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}">
481 <code>${item.position}</code>
490 <code>${item.position}</code>
482 ${item.title}
491 ${item.title}
483 </a>
492 </a>
484 % endif
493 % endif
485 </li>
494 </li>
486 % endfor
495 % endfor
487
496
488 <li class="logout">
497 <li class="logout">
489 ${h.secure_form(h.route_path('logout'), request=request)}
498 ${h.secure_form(h.route_path('logout'), request=request)}
490 ${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")}
499 ${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")}
491 ${h.end_form()}
500 ${h.end_form()}
492 </li>
501 </li>
493 </ol>
502 </ol>
494 </div>
503 </div>
495 %endif
504 %endif
496 </div>
505 </div>
497 </div>
506 </div>
498 ## unread counter
507 ## unread counter
499 <div class="pill_container">
508 <div class="pill_container">
500 <a class="menu_link_notifications ${'empty' if c.unread_notifications == 0 else ''}" href="${h.route_path('notifications_show_all')}">${c.unread_notifications}</a>
509 <a class="menu_link_notifications ${'empty' if c.unread_notifications == 0 else ''}" href="${h.route_path('notifications_show_all')}">${c.unread_notifications}</a>
501 </div>
510 </div>
502 % endif
511 % endif
503 </li>
512 </li>
504 </%def>
513 </%def>
505
514
506 <%def name="menu_items(active=None)">
515 <%def name="menu_items(active=None)">
507 <%
516 <%
508 def is_active(selected):
517 def is_active(selected):
509 if selected == active:
518 if selected == active:
510 return "active"
519 return "active"
511 return ""
520 return ""
512 %>
521 %>
513
522
514 <ul id="quick" class="main_nav navigation horizontal-list">
523 <ul id="quick" class="main_nav navigation horizontal-list">
515 ## notice box for important system messages
524 ## notice box for important system messages
516 <li style="display: none">
525 <li style="display: none">
517 <a class="notice-box" href="#openNotice" onclick="showNoticeBox(); return false">
526 <a class="notice-box" href="#openNotice" onclick="showNoticeBox(); return false">
518 <div class="menulabel-notice" >
527 <div class="menulabel-notice" >
519 0
528 0
520 </div>
529 </div>
521 </a>
530 </a>
522 </li>
531 </li>
523
532
524 ## Main filter
533 ## Main filter
525 <li>
534 <li>
526 <div class="menulabel main_filter_box">
535 <div class="menulabel main_filter_box">
527 <div class="main_filter_input_box">
536 <div class="main_filter_input_box">
528 <ul class="searchItems">
537 <ul class="searchItems">
529
538
530 % if c.template_context['search_context']['repo_id']:
539 % if c.template_context['search_context']['repo_id']:
531 <li class="searchTag searchTagFilter searchTagHidable" >
540 <li class="searchTag searchTagFilter searchTagHidable" >
532 ##<a href="${h.route_path('search_repo',repo_name=c.template_context['search_context']['repo_name'])}">
541 ##<a href="${h.route_path('search_repo',repo_name=c.template_context['search_context']['repo_name'])}">
533 <span class="tag">
542 <span class="tag">
534 This repo
543 This repo
535 <a href="#removeGoToFilter" onclick="removeGoToFilter(); return false"><i class="icon-delete"></i></a>
544 <a href="#removeGoToFilter" onclick="removeGoToFilter(); return false"><i class="icon-delete"></i></a>
536 </span>
545 </span>
537 ##</a>
546 ##</a>
538 </li>
547 </li>
539 % elif c.template_context['search_context']['repo_group_id']:
548 % elif c.template_context['search_context']['repo_group_id']:
540 <li class="searchTag searchTagFilter searchTagHidable">
549 <li class="searchTag searchTagFilter searchTagHidable">
541 ##<a href="${h.route_path('search_repo_group',repo_group_name=c.template_context['search_context']['repo_group_name'])}">
550 ##<a href="${h.route_path('search_repo_group',repo_group_name=c.template_context['search_context']['repo_group_name'])}">
542 <span class="tag">
551 <span class="tag">
543 This group
552 This group
544 <a href="#removeGoToFilter" onclick="removeGoToFilter(); return false"><i class="icon-delete"></i></a>
553 <a href="#removeGoToFilter" onclick="removeGoToFilter(); return false"><i class="icon-delete"></i></a>
545 </span>
554 </span>
546 ##</a>
555 ##</a>
547 </li>
556 </li>
548 % endif
557 % endif
549
558
550 <li class="searchTagInput">
559 <li class="searchTagInput">
551 <input class="main_filter_input" id="main_filter" size="15" type="text" name="main_filter" placeholder="${_('search / go to...')}" value="" />
560 <input class="main_filter_input" id="main_filter" size="15" type="text" name="main_filter" placeholder="${_('search / go to...')}" value="" />
552 </li>
561 </li>
553 <li class="searchTag searchTagHelp">
562 <li class="searchTag searchTagHelp">
554 <a href="#showFilterHelp" onclick="showMainFilterBox(); return false">?</a>
563 <a href="#showFilterHelp" onclick="showMainFilterBox(); return false">?</a>
555 </li>
564 </li>
556 </ul>
565 </ul>
557 </div>
566 </div>
558 </div>
567 </div>
559
568
560 <div id="main_filter_help" style="display: none">
569 <div id="main_filter_help" style="display: none">
561 - Use '/' key to quickly access this field.
570 - Use '/' key to quickly access this field.
562
571
563 - Enter a name of repository, or repository group for quick search.
572 - Enter a name of repository, or repository group for quick search.
564
573
565 - Prefix query to allow special search:
574 - Prefix query to allow special search:
566
575
567 user:admin, to search for usernames, always global
576 user:admin, to search for usernames, always global
568
577
569 user_group:devops, to search for user groups, always global
578 user_group:devops, to search for user groups, always global
570
579
571 commit:efced4, to search for commits, scoped to repositories or groups
580 commit:efced4, to search for commits, scoped to repositories or groups
572
581
573 file:models.py, to search for file paths, scoped to repositories or groups
582 file:models.py, to search for file paths, scoped to repositories or groups
574
583
575 % if c.template_context['search_context']['repo_id']:
584 % if c.template_context['search_context']['repo_id']:
576 For advanced full text search visit: <a href="${h.route_path('search_repo',repo_name=c.template_context['search_context']['repo_name'])}">repository search</a>
585 For advanced full text search visit: <a href="${h.route_path('search_repo',repo_name=c.template_context['search_context']['repo_name'])}">repository search</a>
577 % elif c.template_context['search_context']['repo_group_id']:
586 % elif c.template_context['search_context']['repo_group_id']:
578 For advanced full text search visit: <a href="${h.route_path('search_repo_group',repo_group_name=c.template_context['search_context']['repo_group_name'])}">repository group search</a>
587 For advanced full text search visit: <a href="${h.route_path('search_repo_group',repo_group_name=c.template_context['search_context']['repo_group_name'])}">repository group search</a>
579 % else:
588 % else:
580 For advanced full text search visit: <a href="${h.route_path('search')}">global search</a>
589 For advanced full text search visit: <a href="${h.route_path('search')}">global search</a>
581 % endif
590 % endif
582 </div>
591 </div>
583 </li>
592 </li>
584
593
585 ## ROOT MENU
594 ## ROOT MENU
586 <li class="${is_active('home')}">
595 <li class="${is_active('home')}">
587 <a class="menulink" title="${_('Home')}" href="${h.route_path('home')}">
596 <a class="menulink" title="${_('Home')}" href="${h.route_path('home')}">
588 <div class="menulabel">${_('Home')}</div>
597 <div class="menulabel">${_('Home')}</div>
589 </a>
598 </a>
590 </li>
599 </li>
591
600
592 %if c.rhodecode_user.username != h.DEFAULT_USER:
601 %if c.rhodecode_user.username != h.DEFAULT_USER:
593 <li class="${is_active('journal')}">
602 <li class="${is_active('journal')}">
594 <a class="menulink" title="${_('Show activity journal')}" href="${h.route_path('journal')}">
603 <a class="menulink" title="${_('Show activity journal')}" href="${h.route_path('journal')}">
595 <div class="menulabel">${_('Journal')}</div>
604 <div class="menulabel">${_('Journal')}</div>
596 </a>
605 </a>
597 </li>
606 </li>
598 %else:
607 %else:
599 <li class="${is_active('journal')}">
608 <li class="${is_active('journal')}">
600 <a class="menulink" title="${_('Show Public activity journal')}" href="${h.route_path('journal_public')}">
609 <a class="menulink" title="${_('Show Public activity journal')}" href="${h.route_path('journal_public')}">
601 <div class="menulabel">${_('Public journal')}</div>
610 <div class="menulabel">${_('Public journal')}</div>
602 </a>
611 </a>
603 </li>
612 </li>
604 %endif
613 %endif
605
614
606 <li class="${is_active('gists')}">
615 <li class="${is_active('gists')}">
607 <a class="menulink childs" title="${_('Show Gists')}" href="${h.route_path('gists_show')}">
616 <a class="menulink childs" title="${_('Show Gists')}" href="${h.route_path('gists_show')}">
608 <div class="menulabel">${_('Gists')}</div>
617 <div class="menulabel">${_('Gists')}</div>
609 </a>
618 </a>
610 </li>
619 </li>
611
620
612 % if c.is_super_admin or c.is_delegated_admin:
621 % if c.is_super_admin or c.is_delegated_admin:
613 <li class="${is_active('admin')}">
622 <li class="${is_active('admin')}">
614 <a class="menulink childs" title="${_('Admin settings')}" href="${h.route_path('admin_home')}">
623 <a class="menulink childs" title="${_('Admin settings')}" href="${h.route_path('admin_home')}">
615 <div class="menulabel">${_('Admin')} </div>
624 <div class="menulabel">${_('Admin')} </div>
616 </a>
625 </a>
617 </li>
626 </li>
618 % endif
627 % endif
619
628
620 ## render extra user menu
629 ## render extra user menu
621 ${usermenu(active=(active=='my_account'))}
630 ${usermenu(active=(active=='my_account'))}
622
631
623 % if c.debug_style:
632 % if c.debug_style:
624 <li>
633 <li>
625 <a class="menulink" title="${_('Style')}" href="${h.route_path('debug_style_home')}">
634 <a class="menulink" title="${_('Style')}" href="${h.route_path('debug_style_home')}">
626 <div class="menulabel">${_('[Style]')}</div>
635 <div class="menulabel">${_('[Style]')}</div>
627 </a>
636 </a>
628 </li>
637 </li>
629 % endif
638 % endif
630 </ul>
639 </ul>
631
640
632 <script type="text/javascript">
641 <script type="text/javascript">
633 var visualShowPublicIcon = "${c.visual.show_public_icon}" == "True";
642 var visualShowPublicIcon = "${c.visual.show_public_icon}" == "True";
634
643
635 var formatRepoResult = function(result, container, query, escapeMarkup) {
644 var formatRepoResult = function(result, container, query, escapeMarkup) {
636 return function(data, escapeMarkup) {
645 return function(data, escapeMarkup) {
637 if (!data.repo_id){
646 if (!data.repo_id){
638 return data.text; // optgroup text Repositories
647 return data.text; // optgroup text Repositories
639 }
648 }
640
649
641 var tmpl = '';
650 var tmpl = '';
642 var repoType = data['repo_type'];
651 var repoType = data['repo_type'];
643 var repoName = data['text'];
652 var repoName = data['text'];
644
653
645 if(data && data.type == 'repo'){
654 if(data && data.type == 'repo'){
646 if(repoType === 'hg'){
655 if(repoType === 'hg'){
647 tmpl += '<i class="icon-hg"></i> ';
656 tmpl += '<i class="icon-hg"></i> ';
648 }
657 }
649 else if(repoType === 'git'){
658 else if(repoType === 'git'){
650 tmpl += '<i class="icon-git"></i> ';
659 tmpl += '<i class="icon-git"></i> ';
651 }
660 }
652 else if(repoType === 'svn'){
661 else if(repoType === 'svn'){
653 tmpl += '<i class="icon-svn"></i> ';
662 tmpl += '<i class="icon-svn"></i> ';
654 }
663 }
655 if(data['private']){
664 if(data['private']){
656 tmpl += '<i class="icon-lock" ></i> ';
665 tmpl += '<i class="icon-lock" ></i> ';
657 }
666 }
658 else if(visualShowPublicIcon){
667 else if(visualShowPublicIcon){
659 tmpl += '<i class="icon-unlock-alt"></i> ';
668 tmpl += '<i class="icon-unlock-alt"></i> ';
660 }
669 }
661 }
670 }
662 tmpl += escapeMarkup(repoName);
671 tmpl += escapeMarkup(repoName);
663 return tmpl;
672 return tmpl;
664
673
665 }(result, escapeMarkup);
674 }(result, escapeMarkup);
666 };
675 };
667
676
668 var formatRepoGroupResult = function(result, container, query, escapeMarkup) {
677 var formatRepoGroupResult = function(result, container, query, escapeMarkup) {
669 return function(data, escapeMarkup) {
678 return function(data, escapeMarkup) {
670 if (!data.repo_group_id){
679 if (!data.repo_group_id){
671 return data.text; // optgroup text Repositories
680 return data.text; // optgroup text Repositories
672 }
681 }
673
682
674 var tmpl = '';
683 var tmpl = '';
675 var repoGroupName = data['text'];
684 var repoGroupName = data['text'];
676
685
677 if(data){
686 if(data){
678
687
679 tmpl += '<i class="icon-folder-close"></i> ';
688 tmpl += '<i class="icon-folder-close"></i> ';
680
689
681 }
690 }
682 tmpl += escapeMarkup(repoGroupName);
691 tmpl += escapeMarkup(repoGroupName);
683 return tmpl;
692 return tmpl;
684
693
685 }(result, escapeMarkup);
694 }(result, escapeMarkup);
686 };
695 };
687
696
688 var escapeRegExChars = function (value) {
697 var escapeRegExChars = function (value) {
689 return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
698 return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
690 };
699 };
691
700
692 var getRepoIcon = function(repo_type) {
701 var getRepoIcon = function(repo_type) {
693 if (repo_type === 'hg') {
702 if (repo_type === 'hg') {
694 return '<i class="icon-hg"></i> ';
703 return '<i class="icon-hg"></i> ';
695 }
704 }
696 else if (repo_type === 'git') {
705 else if (repo_type === 'git') {
697 return '<i class="icon-git"></i> ';
706 return '<i class="icon-git"></i> ';
698 }
707 }
699 else if (repo_type === 'svn') {
708 else if (repo_type === 'svn') {
700 return '<i class="icon-svn"></i> ';
709 return '<i class="icon-svn"></i> ';
701 }
710 }
702 return ''
711 return ''
703 };
712 };
704
713
705 var autocompleteMainFilterFormatResult = function (data, value, org_formatter) {
714 var autocompleteMainFilterFormatResult = function (data, value, org_formatter) {
706
715
707 if (value.split(':').length === 2) {
716 if (value.split(':').length === 2) {
708 value = value.split(':')[1]
717 value = value.split(':')[1]
709 }
718 }
710
719
711 var searchType = data['type'];
720 var searchType = data['type'];
712 var valueDisplay = data['value_display'];
721 var valueDisplay = data['value_display'];
713
722
714 var pattern = '(' + escapeRegExChars(value) + ')';
723 var pattern = '(' + escapeRegExChars(value) + ')';
715
724
716 valueDisplay = Select2.util.escapeMarkup(valueDisplay);
725 valueDisplay = Select2.util.escapeMarkup(valueDisplay);
717
726
718 // highlight match
727 // highlight match
719 if (searchType != 'text') {
728 if (searchType != 'text') {
720 valueDisplay = valueDisplay.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>');
729 valueDisplay = valueDisplay.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>');
721 }
730 }
722
731
723 var icon = '';
732 var icon = '';
724
733
725 if (searchType === 'hint') {
734 if (searchType === 'hint') {
726 icon += '<i class="icon-folder-close"></i> ';
735 icon += '<i class="icon-folder-close"></i> ';
727 }
736 }
728 // full text search
737 // full text search
729 else if (searchType === 'search') {
738 else if (searchType === 'search') {
730 icon += '<i class="icon-more"></i> ';
739 icon += '<i class="icon-more"></i> ';
731 }
740 }
732 // repository
741 // repository
733 else if (searchType === 'repo') {
742 else if (searchType === 'repo') {
734
743
735 var repoIcon = getRepoIcon(data['repo_type']);
744 var repoIcon = getRepoIcon(data['repo_type']);
736 icon += repoIcon;
745 icon += repoIcon;
737
746
738 if (data['private']) {
747 if (data['private']) {
739 icon += '<i class="icon-lock" ></i> ';
748 icon += '<i class="icon-lock" ></i> ';
740 }
749 }
741 else if (visualShowPublicIcon) {
750 else if (visualShowPublicIcon) {
742 icon += '<i class="icon-unlock-alt"></i> ';
751 icon += '<i class="icon-unlock-alt"></i> ';
743 }
752 }
744 }
753 }
745 // repository groups
754 // repository groups
746 else if (searchType === 'repo_group') {
755 else if (searchType === 'repo_group') {
747 icon += '<i class="icon-folder-close"></i> ';
756 icon += '<i class="icon-folder-close"></i> ';
748 }
757 }
749 // user group
758 // user group
750 else if (searchType === 'user_group') {
759 else if (searchType === 'user_group') {
751 icon += '<i class="icon-group"></i> ';
760 icon += '<i class="icon-group"></i> ';
752 }
761 }
753 // user
762 // user
754 else if (searchType === 'user') {
763 else if (searchType === 'user') {
755 icon += '<img class="gravatar" src="{0}"/>'.format(data['icon_link']);
764 icon += '<img class="gravatar" src="{0}"/>'.format(data['icon_link']);
756 }
765 }
757 // commit
766 // commit
758 else if (searchType === 'commit') {
767 else if (searchType === 'commit') {
759 var repo_data = data['repo_data'];
768 var repo_data = data['repo_data'];
760 var repoIcon = getRepoIcon(repo_data['repository_type']);
769 var repoIcon = getRepoIcon(repo_data['repository_type']);
761 if (repoIcon) {
770 if (repoIcon) {
762 icon += repoIcon;
771 icon += repoIcon;
763 } else {
772 } else {
764 icon += '<i class="icon-tag"></i>';
773 icon += '<i class="icon-tag"></i>';
765 }
774 }
766 }
775 }
767 // file
776 // file
768 else if (searchType === 'file') {
777 else if (searchType === 'file') {
769 var repo_data = data['repo_data'];
778 var repo_data = data['repo_data'];
770 var repoIcon = getRepoIcon(repo_data['repository_type']);
779 var repoIcon = getRepoIcon(repo_data['repository_type']);
771 if (repoIcon) {
780 if (repoIcon) {
772 icon += repoIcon;
781 icon += repoIcon;
773 } else {
782 } else {
774 icon += '<i class="icon-tag"></i>';
783 icon += '<i class="icon-tag"></i>';
775 }
784 }
776 }
785 }
777 // generic text
786 // generic text
778 else if (searchType === 'text') {
787 else if (searchType === 'text') {
779 icon = '';
788 icon = '';
780 }
789 }
781
790
782 var tmpl = '<div class="ac-container-wrap">{0}{1}</div>';
791 var tmpl = '<div class="ac-container-wrap">{0}{1}</div>';
783 return tmpl.format(icon, valueDisplay);
792 return tmpl.format(icon, valueDisplay);
784 };
793 };
785
794
786 var handleSelect = function(element, suggestion) {
795 var handleSelect = function(element, suggestion) {
787 if (suggestion.type === "hint") {
796 if (suggestion.type === "hint") {
788 // we skip action
797 // we skip action
789 $('#main_filter').focus();
798 $('#main_filter').focus();
790 }
799 }
791 else if (suggestion.type === "text") {
800 else if (suggestion.type === "text") {
792 // we skip action
801 // we skip action
793 $('#main_filter').focus();
802 $('#main_filter').focus();
794
803
795 } else {
804 } else {
796 window.location = suggestion['url'];
805 window.location = suggestion['url'];
797 }
806 }
798 };
807 };
799
808
800 var autocompleteMainFilterResult = function (suggestion, originalQuery, queryLowerCase) {
809 var autocompleteMainFilterResult = function (suggestion, originalQuery, queryLowerCase) {
801 if (queryLowerCase.split(':').length === 2) {
810 if (queryLowerCase.split(':').length === 2) {
802 queryLowerCase = queryLowerCase.split(':')[1]
811 queryLowerCase = queryLowerCase.split(':')[1]
803 }
812 }
804 if (suggestion.type === "text") {
813 if (suggestion.type === "text") {
805 // special case we don't want to "skip" display for
814 // special case we don't want to "skip" display for
806 return true
815 return true
807 }
816 }
808 return suggestion.value_display.toLowerCase().indexOf(queryLowerCase) !== -1;
817 return suggestion.value_display.toLowerCase().indexOf(queryLowerCase) !== -1;
809 };
818 };
810
819
811 var cleanContext = {
820 var cleanContext = {
812 repo_view_type: null,
821 repo_view_type: null,
813
822
814 repo_id: null,
823 repo_id: null,
815 repo_name: "",
824 repo_name: "",
816
825
817 repo_group_id: null,
826 repo_group_id: null,
818 repo_group_name: null
827 repo_group_name: null
819 };
828 };
820 var removeGoToFilter = function () {
829 var removeGoToFilter = function () {
821 $('.searchTagHidable').hide();
830 $('.searchTagHidable').hide();
822 $('#main_filter').autocomplete(
831 $('#main_filter').autocomplete(
823 'setOptions', {params:{search_context: cleanContext}});
832 'setOptions', {params:{search_context: cleanContext}});
824 };
833 };
825
834
826 $('#main_filter').autocomplete({
835 $('#main_filter').autocomplete({
827 serviceUrl: pyroutes.url('goto_switcher_data'),
836 serviceUrl: pyroutes.url('goto_switcher_data'),
828 params: {
837 params: {
829 "search_context": templateContext.search_context
838 "search_context": templateContext.search_context
830 },
839 },
831 minChars:2,
840 minChars:2,
832 maxHeight:400,
841 maxHeight:400,
833 deferRequestBy: 300, //miliseconds
842 deferRequestBy: 300, //miliseconds
834 tabDisabled: true,
843 tabDisabled: true,
835 autoSelectFirst: false,
844 autoSelectFirst: false,
836 formatResult: autocompleteMainFilterFormatResult,
845 formatResult: autocompleteMainFilterFormatResult,
837 lookupFilter: autocompleteMainFilterResult,
846 lookupFilter: autocompleteMainFilterResult,
838 onSelect: function (element, suggestion) {
847 onSelect: function (element, suggestion) {
839 handleSelect(element, suggestion);
848 handleSelect(element, suggestion);
840 return false;
849 return false;
841 },
850 },
842 onSearchError: function (element, query, jqXHR, textStatus, errorThrown) {
851 onSearchError: function (element, query, jqXHR, textStatus, errorThrown) {
843 if (jqXHR !== 'abort') {
852 if (jqXHR !== 'abort') {
844 alert("Error during search.\nError code: {0}".format(textStatus));
853 alert("Error during search.\nError code: {0}".format(textStatus));
845 window.location = '';
854 window.location = '';
846 }
855 }
847 }
856 }
848 });
857 });
849
858
850 showMainFilterBox = function () {
859 showMainFilterBox = function () {
851 $('#main_filter_help').toggle();
860 $('#main_filter_help').toggle();
852 };
861 };
853
862
854 $('#main_filter').on('keydown.autocomplete', function (e) {
863 $('#main_filter').on('keydown.autocomplete', function (e) {
855
864
856 var BACKSPACE = 8;
865 var BACKSPACE = 8;
857 var el = $(e.currentTarget);
866 var el = $(e.currentTarget);
858 if(e.which === BACKSPACE){
867 if(e.which === BACKSPACE){
859 var inputVal = el.val();
868 var inputVal = el.val();
860 if (inputVal === ""){
869 if (inputVal === ""){
861 removeGoToFilter()
870 removeGoToFilter()
862 }
871 }
863 }
872 }
864 });
873 });
865
874
866 </script>
875 </script>
867 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
876 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
868 </%def>
877 </%def>
869
878
870 <div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
879 <div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
871 <div class="modal-dialog">
880 <div class="modal-dialog">
872 <div class="modal-content">
881 <div class="modal-content">
873 <div class="modal-header">
882 <div class="modal-header">
874 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
883 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
875 <h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4>
884 <h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4>
876 </div>
885 </div>
877 <div class="modal-body">
886 <div class="modal-body">
878 <div class="block-left">
887 <div class="block-left">
879 <table class="keyboard-mappings">
888 <table class="keyboard-mappings">
880 <tbody>
889 <tbody>
881 <tr>
890 <tr>
882 <th></th>
891 <th></th>
883 <th>${_('Site-wide shortcuts')}</th>
892 <th>${_('Site-wide shortcuts')}</th>
884 </tr>
893 </tr>
885 <%
894 <%
886 elems = [
895 elems = [
887 ('/', 'Use quick search box'),
896 ('/', 'Use quick search box'),
888 ('g h', 'Goto home page'),
897 ('g h', 'Goto home page'),
889 ('g g', 'Goto my private gists page'),
898 ('g g', 'Goto my private gists page'),
890 ('g G', 'Goto my public gists page'),
899 ('g G', 'Goto my public gists page'),
891 ('g 0-9', 'Goto bookmarked items from 0-9'),
900 ('g 0-9', 'Goto bookmarked items from 0-9'),
892 ('n r', 'New repository page'),
901 ('n r', 'New repository page'),
893 ('n g', 'New gist page'),
902 ('n g', 'New gist page'),
894 ]
903 ]
895 %>
904 %>
896 %for key, desc in elems:
905 %for key, desc in elems:
897 <tr>
906 <tr>
898 <td class="keys">
907 <td class="keys">
899 <span class="key tag">${key}</span>
908 <span class="key tag">${key}</span>
900 </td>
909 </td>
901 <td>${desc}</td>
910 <td>${desc}</td>
902 </tr>
911 </tr>
903 %endfor
912 %endfor
904 </tbody>
913 </tbody>
905 </table>
914 </table>
906 </div>
915 </div>
907 <div class="block-left">
916 <div class="block-left">
908 <table class="keyboard-mappings">
917 <table class="keyboard-mappings">
909 <tbody>
918 <tbody>
910 <tr>
919 <tr>
911 <th></th>
920 <th></th>
912 <th>${_('Repositories')}</th>
921 <th>${_('Repositories')}</th>
913 </tr>
922 </tr>
914 <%
923 <%
915 elems = [
924 elems = [
916 ('g s', 'Goto summary page'),
925 ('g s', 'Goto summary page'),
917 ('g c', 'Goto changelog page'),
926 ('g c', 'Goto changelog page'),
918 ('g f', 'Goto files page'),
927 ('g f', 'Goto files page'),
919 ('g F', 'Goto files page with file search activated'),
928 ('g F', 'Goto files page with file search activated'),
920 ('g p', 'Goto pull requests page'),
929 ('g p', 'Goto pull requests page'),
921 ('g o', 'Goto repository settings'),
930 ('g o', 'Goto repository settings'),
922 ('g O', 'Goto repository permissions settings'),
931 ('g O', 'Goto repository permissions settings'),
923 ]
932 ]
924 %>
933 %>
925 %for key, desc in elems:
934 %for key, desc in elems:
926 <tr>
935 <tr>
927 <td class="keys">
936 <td class="keys">
928 <span class="key tag">${key}</span>
937 <span class="key tag">${key}</span>
929 </td>
938 </td>
930 <td>${desc}</td>
939 <td>${desc}</td>
931 </tr>
940 </tr>
932 %endfor
941 %endfor
933 </tbody>
942 </tbody>
934 </table>
943 </table>
935 </div>
944 </div>
936 </div>
945 </div>
937 <div class="modal-footer">
946 <div class="modal-footer">
938 </div>
947 </div>
939 </div><!-- /.modal-content -->
948 </div><!-- /.modal-content -->
940 </div><!-- /.modal-dialog -->
949 </div><!-- /.modal-dialog -->
941 </div><!-- /.modal -->
950 </div><!-- /.modal -->
942
951
@@ -1,267 +1,252 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 ## owner, description, downloads, statistics
144
144
145 ## Owner
145 ## Owner
146 <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;">
147 <div class="left-label-summary">
147 <div class="left-label-summary">
148 <p>${_('Owner')}</p>
148 <p>${_('Owner')}</p>
149 <div class="right-label-summary">
149 <div class="right-label-summary">
150 ${base.gravatar_with_user(c.rhodecode_db_repo.user.email, 16)}
150 ${base.gravatar_with_user(c.rhodecode_db_repo.user.email, 16)}
151 </div>
151 </div>
152
152
153 </div>
153 </div>
154 </div>
154 </div>
155
155
156 ## Description
156 ## Description
157 <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;">
158 <div class="left-label-summary">
158 <div class="left-label-summary">
159 <p>${_('Description')}</p>
159 <p>${_('Description')}</p>
160
160
161 <div class="right-label-summary input ${summary(c.show_stats)}">
161 <div class="right-label-summary input ${summary(c.show_stats)}">
162 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
162 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
163 ${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)}
164 </div>
164 </div>
165 </div>
165 </div>
166 </div>
166 </div>
167
167
168 ## Downloads
168 ## Downloads
169 % if show_downloads:
169 % if show_downloads:
170 <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;">
171 <div class="left-label-summary">
171 <div class="left-label-summary">
172 <p>${_('Downloads')}</p>
172 <p>${_('Downloads')}</p>
173
173
174 <div class="right-label-summary input ${summary(c.show_stats)} downloads">
174 <div class="right-label-summary input ${summary(c.show_stats)} downloads">
175 % 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:
176 <span class="disabled">
176 <span class="disabled">
177 ${_('There are no downloads yet')}
177 ${_('There are no downloads yet')}
178 </span>
178 </span>
179 % elif not c.enable_downloads:
179 % elif not c.enable_downloads:
180 <span class="disabled">
180 <span class="disabled">
181 ${_('Downloads are disabled for this repository')}.
181 ${_('Downloads are disabled for this repository')}.
182 </span>
182 </span>
183 % if c.is_super_admin:
183 % if c.is_super_admin:
184 ${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'))}
185 % endif
185 % endif
186 % else:
186 % else:
187 <span class="enabled">
187 <span class="enabled">
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')}">
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')}">
189 <i class="icon-archive"></i> tip.zip
189 <i class="icon-archive"></i> tip.zip
190 ## replaced by some JS on select
190 ## replaced by some JS on select
191 </a>
191 </a>
192 </span>
192 </span>
193 ${h.hidden('download_options')}
193 ${h.hidden('download_options')}
194 % endif
194 % endif
195 </div>
195 </div>
196 </div>
196 </div>
197 </div>
197 </div>
198 % endif
198 % endif
199
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
200 ## Repo size
216 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
201 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
217 <div class="left-label-summary">
202 <div class="left-label-summary">
218 <p>${_('Repository size')}</p>
203 <p>${_('Repository size')}</p>
219
204
220 <div class="right-label-summary">
205 <div class="right-label-summary">
221 <div class="tags">
206 <div class="tags">
222 ## repo size
207 ## repo size
223 % if commit_rev == -1:
208 % if commit_rev == -1:
224 <span class="stats-bullet">0 B</span>
209 <span class="stats-bullet">0 B</span>
225 % else:
210 % else:
226 <span>
211 <span>
227 <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a>
212 <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a>
228 </span>
213 </span>
229 <span class="stats-bullet" id="repo_size_container" style="display:none">
214 <span class="stats-bullet" id="repo_size_container" style="display:none">
230 ${_('Calculating Repository Size...')}
215 ${_('Calculating Repository Size...')}
231 </span>
216 </span>
232 % endif
217 % endif
233 </div>
218 </div>
234 </div>
219 </div>
235 </div>
220 </div>
236 </div>
221 </div>
237
222
238 ## Statistics
223 ## Statistics
239 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
224 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
240 <div class="left-label-summary">
225 <div class="left-label-summary">
241 <p>${_('Code Statistics')}</p>
226 <p>${_('Code Statistics')}</p>
242
227
243 <div class="right-label-summary input ${summary(c.show_stats)} statistics">
228 <div class="right-label-summary input ${summary(c.show_stats)} statistics">
244 % if c.show_stats:
229 % if c.show_stats:
245 <div id="lang_stats" class="enabled">
230 <div id="lang_stats" class="enabled">
246 <a href="#showSize" onclick="calculateSize(); $('#show-repo-size').hide(); $(this).hide(); return false" id="show-repo-size">Show code statistics</a>
231 <a href="#showSize" onclick="calculateSize(); $('#show-repo-size').hide(); $(this).hide(); return false" id="show-repo-size">Show code statistics</a>
247 </div>
232 </div>
248 % else:
233 % else:
249 <span class="disabled">
234 <span class="disabled">
250 ${_('Statistics are disabled for this repository')}.
235 ${_('Statistics are disabled for this repository')}.
251 </span>
236 </span>
252 % if c.is_super_admin:
237 % if c.is_super_admin:
253 ${h.link_to(_('Enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))}
238 ${h.link_to(_('Enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))}
254 % endif
239 % endif
255 % endif
240 % endif
256 </div>
241 </div>
257
242
258 </div>
243 </div>
259 </div>
244 </div>
260
245
261
246
262 </div><!--end summary-detail-->
247 </div><!--end summary-detail-->
263
248
264 <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details">
249 <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details">
265 ${_('Show More')}
250 ${_('Show More')}
266 </div>
251 </div>
267 </%def>
252 </%def>
General Comments 0
You need to be logged in to leave comments. Login now