##// END OF EJS Templates
Added flash messages support
marcink -
r237:f188b156 default
parent child Browse files
Show More
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
@@ -1,754 +1,809 b''
1 1 /*** Initial Settings ***/
2 2 #mainhtml{
3 3 margin: 15px 50px;
4 4 background: #DBD4C6;
5 5 font-family: sans-serif;
6 6 }
7 7
8 8 a {
9 9 color: #556CB5;
10 10 text-decoration: none;
11 11 }
12 12 a:HOVER{
13 13 text-decoration: underline;
14 14 }
15 15
16 16 /*** end of Initial Settings ***/
17 17
18 18 /*** ***/
19 19 .table_disp {
20 20 border-left: 0px solid #666666;
21 21 border-bottom: 1px solid #666666;
22 22 border-right: 1px solid #666666;
23 23 padding: 0px;
24 24 margin: 0px;
25 25 border-spacing: 0px;
26 26 }
27 27
28 28 .table_disp .header {
29 29 border-top: 1px solid #666666;
30 30 background-color: #556CB5;
31 31 font-weight: bold;
32 32 color: white;
33 33 vertical-align: middle;
34 34 padding: 3px 5px;
35 35 text-align: left;
36 36 font-size: 0.9em;
37 37 }
38 38
39 39 .table_disp .header td {
40 40 padding: 4px;
41 41 vertical-align: middle;
42 42 border-top: 1px solid #AAAAAA;
43 43 border-bottom: 2px solid #666666;
44 44 }
45 45 .table_disp td {
46 46 border-left: 1px solid #AAAAAA;
47 padding-left: 2px;
48 padding-right: 0px;
47 padding-left: 4px;
48 padding-right: 4px;
49 49 }
50 50
51 51 table tr.parity0:hover,table tr.parity1:hover {
52 52 background: #D5E1E6;
53 53 }
54 54
55 55 table tr.parity0 {
56 56 background: #EAEAE9;
57 57 }
58 58
59 59 table tr.parity1 {
60 60 background: #FFFFFF;
61 61 }
62 62
63 63
64 64 /*** ***/
65 65
66 66 /** common settings **/
67 67 .add_icon{
68 68 background: url("/images/icons/add.png") no-repeat scroll 3px;
69 69 height: 16px;
70 70 padding-left: 20px;
71 71 padding-top: 0px;
72 72 text-align: left;
73 73
74 74 }
75 75 .edit_icon{
76 76 background: url("/images/icons/folder_edit.png") no-repeat scroll 3px;
77 77 height: 16px;
78 78 padding-left: 20px;
79 79 padding-top: 0px;
80 80 text-align: left;
81 81 }
82 82
83 83 .delete_icon{
84 84 background: url("/images/icons/delete.png") no-repeat scroll 3px;
85 85 height: 16px;
86 86 padding-left: 20px;
87 87 padding-top: 0px;
88 88 text-align: left;
89 89
90 90 }
91 91
92 92 .action_button{
93 93 border:0px;
94 94 display: block;
95 95 }
96 96 .action_button:hover{
97 97 border:0px;
98 98 font-style:italic;
99 99 cursor: pointer;
100 100 }
101 101
102 .flash_msg ul{
103 margin:0;
104 padding:25px 0px 0px 0px;
105
106 }
107 .error_msg {
108 background-color:#FFCFCF;
109 background-image: url("/images/icons/error_msg.png");
110 border:1px solid #FF9595;
111 color:#CC3300;
112 }
113 .warning_msg {
114 background-color:#FFFBCC;
115 background-image: url("/images/icons/warning_msg.png");
116 border:1px solid #FFF35E;
117 color:#C69E00;
118 }
119 .success_msg {
120 background-color:#D5FFCF;
121 background-image: url("/images/icons/success_msg.png");
122 border:1px solid #97FF88;
123 color:#009900;
124 }
125 .notice_msg {
126 background-color:#DCE3FF;
127 background-image: url("/images/icons/notice_msg.png");
128 border:1px solid #93A8FF;
129 color:#556CB5;
130 }
131
132 .success_msg, .error_msg, .notice_msg, .warning_msg{
133 background-position:10px center;
134 background-repeat:no-repeat;
135 font-size:12px;
136 font-weight:bold;
137 min-height:14px;
138 line-height:14px;
139 margin-bottom:0px;
140 margin-top:0px;
141 padding:3px 10px 3px 40px;
142 display:block;
143 overflow: auto;
144 }
145
146 #msg_close {
147 background:transparent url("icons/cross_grey_small.png") no-repeat scroll 0 0;
148 cursor:pointer;
149 height:16px;
150 position:absolute;
151 right:5px;
152 top:5px;
153 width:16px;
154 }
155
156
102 157 div#main {
103 158 padding: 5px;
104 159 }
105 160
106 161 div#container {
107 162 background: #FFFFFF;
108 163 position: relative;
109 164 color: #666;
110 165 }
111 166
112 167 div.page-header {
113 168 padding: 50px 20px 0;
114 169 background: #556cb5 top left repeat-x;
115 170 position: relative;
116 171 }
117 172
118 173 div.page-header h1 {
119 174 margin: 10px 0 30px;
120 175 font-size: 1.8em;
121 176 font-weight: bold;
122 177 font-family: sans-serif;
123 178 letter-spacing: 1px;
124 179 color: #FFFFFF;
125 180 }
126 181
127 182 div.page-header h1 a {
128 183 font-weight: bold;
129 184 color: #FFFFFF;
130 185 }
131 186
132 187 div.page-header a {
133 188 text-decoration: none;
134 189 }
135 190
136 191 div.page-header form {
137 192 position: absolute;
138 193 margin-bottom: 2px;
139 194 bottom: 0;
140 195 right: 20px;
141 196 }
142 197
143 198 div.page-header form label {
144 199 color: #DDD;
145 200 }
146 201
147 202 div.page-header form input {
148 203 padding: 2px;
149 204 border: solid 1px #DDD;
150 205 }
151 206
152 207 div.page-header form dl {
153 208 overflow: hidden;
154 209 }
155 210
156 211 div.page-header form dl dt {
157 212 font-size: 1.2em;
158 213 }
159 214
160 215 div.page-header form dl dt,div.page-header form dl dd {
161 216 margin: 0 0 0 5px;
162 217 float: left;
163 218 height: 24px;
164 219 line-height: 20px;
165 220 }
166 221
167 222 ul.page-nav {
168 223 margin: 10px 0 0 0;
169 224 list-style-type: none;
170 225 overflow: hidden;
171 226 width: 800px;
172 227 padding: 0;
173 228 }
174 229
175 230 ul.page-nav li {
176 231 margin: 0 4px 0 0;
177 232 float: left;
178 233 height: 24px;
179 234 font-size: 1.1em;
180 235 line-height: 24px;
181 236 text-align: center;
182 237 background: #556CB5;
183 238 }
184 239
185 240 ul.page-nav li.current {
186 241 background: #FFF;
187 242 padding-right: 5px;
188 243 padding-left: 5px;
189 244 }
190 245 ul.page-nav li.current a {
191 246 color: #556CB5;
192 247 }
193 248 ul.page-nav li a {
194 249 height: 24px;
195 250 color: #FFF;
196 251 padding-right: 5px;
197 252 padding-left: 5px;
198 253 display: block;
199 254 text-decoration: none;
200 255 font-weight: bold;
201 256 }
202 257 ul.page-nav li.logout a {
203 258 color: #FDAC9D;
204 259 }
205 260 ul.page-nav li a:hover {
206 261 background: #FFF;
207 262 color: #556CB5;
208 263 }
209 264
210 265 ul.submenu {
211 266 margin: 5px 0px -20px 0px;
212 267 list-style-type: none;
213 268 }
214 269
215 270 ul.submenu li {
216 271 margin: 0 10px 0 0;
217 272 font-size: 0.9em;
218 273 font-weight:bold;
219 274 display: inline;
220 275 }
221 276 ul.submenu .repos {
222 277 background: url("/images/icons/folder_edit.png") no-repeat scroll 3px;
223 278 height: 16px;
224 279 padding-left: 20px;
225 280 padding-top: 0px;
226 281 text-align: left;
227 282
228 283 }
229 284 ul.submenu .users {
230 285 background: url("/images/icons/user_edit.png") no-repeat scroll 3px;
231 286 height: 16px;
232 287 padding-left: 20px;
233 288 padding-top: 0px;
234 289 text-align: left;
235 290 }
236 291 ul.submenu .permissions {
237 292 background: url("/images/icons/folder_key.png") no-repeat scroll 3px;
238 293 height: 16px;
239 294 padding-left: 20px;
240 295 padding-top: 0px;
241 296 text-align: left;
242 297 }
243 298
244 299 ul.submenu .current_submenu {
245 300 border-bottom: 2px solid #556CB5;
246 301 }
247 302
248 303 h2 {
249 304 margin: 20px 0 10px;
250 305 height: 30px;
251 306 line-height: 30px;
252 307 text-indent: 20px;
253 308 background: #FFF;
254 309 font-size: 1.2em;
255 310 border-top: dotted 1px #D5E1E6;
256 311 font-weight: bold;
257 312 color:#556CB5;
258 313 }
259 314
260 315 h2.no-link {
261 316 color: #006699;
262 317 }
263 318
264 319 h2.no-border {
265 320 color: #FFF;
266 321 background: #556CB5;
267 322 border: 0;
268 323 }
269 324
270 325 h2 a {
271 326 font-weight: bold;
272 327 color: #006699;
273 328 }
274 329
275 330 div.page-path {
276 331 text-align: right;
277 332 padding: 20px 30px 10px 0;
278 333 border: solid #d9d8d1;
279 334 border-width: 0px 0px 1px;
280 335 font-size: 1.2em;
281 336 }
282 337
283 338 div.page-footer {
284 339 margin: 50px 0 0;
285 340 position: relative;
286 341 text-align: center;
287 342 font-weight: bold;
288 343 font-size: 90%;
289 344 }
290 345
291 346 div.page-footer p {
292 347 position: relative;
293 348 left: 20px;
294 349 bottom: 5px;
295 350 font-size: 1.2em;
296 351 }
297 352
298 353 ul.rss-logo {
299 354 position: absolute;
300 355 top: -10px;
301 356 right: 20px;
302 357 height: 20px;
303 358 list-style-type: none;
304 359 }
305 360
306 361 ul.rss-logo li {
307 362 display: inline;
308 363 }
309 364
310 365 ul.rss-logo li a {
311 366 padding: 3px 6px;
312 367 line-height: 10px;
313 368 border: 1px solid;
314 369 border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e;
315 370 color: #ffffff;
316 371 background-color: #ff6600;
317 372 font-weight: bold;
318 373 font-family: sans-serif;
319 374 font-size: 10px;
320 375 text-align: center;
321 376 text-decoration: none;
322 377 }
323 378
324 379 div.rss-logo li a:hover {
325 380 background-color: #ee5500;
326 381 }
327 382
328 383 p.normal {
329 384 margin: 20px 0 20px 30px;
330 385 font-size: 1.2em;
331 386 }
332 387
333 388 span.logtags span {
334 389 background-repeat: no-repeat;
335 390 height: 16px;
336 391 padding-left: 20px;
337 392 padding-top: 0px;
338 393 text-align: left;
339 394 font-weight: bold;
340 395 }
341 396
342 397 span.logtags span.tagtag {
343 398 background-image: url("/images/icons/tag_green.png");
344 399 }
345 400
346 401 span.logtags span.branchtag {
347 402 background-image: url("/images/icons/arrow_branch.png");
348 403 color: #628F53;
349 404 }
350 405
351 406 span.logtags span.inbranchtag {
352 407 background-image: url("/images/icons/arrow_branch.png");
353 408 }
354 409
355 410 div.diff pre {
356 411 margin: 10px 0 0 0;
357 412 }
358 413
359 414 div.diff pre span {
360 415 font-family: monospace;
361 416 white-space: pre;
362 417 font-size: 1.2em;
363 418 padding: 3px 0;
364 419 }
365 420
366 421 td.source {
367 422 white-space: pre;
368 423 font-family: monospace;
369 424 margin: 10px 30px 0;
370 425 font-size: 1.2em;
371 426 font-family: monospace;
372 427 }
373 428
374 429 div.source div.parity0,div.source div.parity1 {
375 430 padding: 1px;
376 431 font-size: 1.2em;
377 432 }
378 433
379 434 div.source div.parity0 {
380 435 background: #F1F6F7;
381 436 }
382 437
383 438 div.source div.parity1 {
384 439 background: #FFFFFF;
385 440 }
386 441
387 442 div.parity0:hover,div.parity1:hover {
388 443 background: #D5E1E6;
389 444 }
390 445
391 446 .linenr {
392 447 color: #999;
393 448 text-align: right;
394 449 }
395 450
396 451 .lineno {
397 452 text-align: right;
398 453 }
399 454
400 455 .lineno a {
401 456 color: #999;
402 457 }
403 458
404 459 td.linenr {
405 460 width: 60px;
406 461 }
407 462
408 463 div#powered-by {
409 464 position: absolute;
410 465 width: 75px;
411 466 top: 15px;
412 467 right: 20px;
413 468 font-size: 1.2em;
414 469 }
415 470
416 471 div#powered-by a {
417 472 color: #EEE;
418 473 text-decoration: none;
419 474 }
420 475
421 476 div#powered-by a:hover {
422 477 text-decoration: underline;
423 478 }
424 479
425 480 dl.overview {
426 481 margin: 0 0 0 30px;
427 482 font-size: 1.1em;
428 483 overflow: hidden;
429 484 }
430 485
431 486 dl.overview dt,dl.overview dd {
432 487 margin: 5px 0;
433 488 float: left;
434 489 }
435 490
436 491 dl.overview dt {
437 492 clear: left;
438 493 font-weight: bold;
439 494 width: 150px;
440 495 }
441 496
442 497 #clone_url{
443 498 border: 0px;
444 499 }
445 500 /** end of summary **/
446 501
447 502 /** chagelog **/
448 503 h3.changelog {
449 504 margin: 20px 0 5px 30px;
450 505 padding: 0 0 2px;
451 506 font-size: 1.4em;
452 507 border-bottom: dotted 1px #D5E1E6;
453 508 }
454 509
455 510 ul.changelog-entry {
456 511 margin: 0 0 10px 30px;
457 512 list-style-type: none;
458 513 position: relative;
459 514 }
460 515
461 516 ul.changelog-entry li span.revdate {
462 517 font-size: 1.1em;
463 518 }
464 519
465 520 ul.changelog-entry li.age {
466 521 position: absolute;
467 522 top: -25px;
468 523 right: 10px;
469 524 font-size: 1.4em;
470 525 color: #CCC;
471 526 font-weight: bold;
472 527 font-style: italic;
473 528 }
474 529
475 530 ul.changelog-entry li span.name {
476 531 font-size: 1.2em;
477 532 font-weight: bold;
478 533 }
479 534
480 535 ul.changelog-entry li.description {
481 536 margin: 10px 0 0;
482 537 font-size: 1.1em;
483 538 }
484 539
485 540 /** end of changelog **/
486 541
487 542 /** file **/
488 543 p.files {
489 544 margin: 0 0 0 20px;
490 545 font-size: 2.0em;
491 546 font-weight: bold;
492 547 }
493 548
494 549 /** end of file **/
495 550
496 551 /** changeset **/
497 552 #changeset_content{
498 553 width:60%;
499 554 float:left;
500 555 }
501 556
502 557 #changeset_content .container .wrapper{
503 558 width: 600px;
504 559 }
505 560 #changeset_content .container{
506 561 border:1px solid #CCCCCC;
507 562 height:120px;
508 563 }
509 564
510 565 #changeset_content .container .left{
511 566 float:left;
512 567 width: 70%;
513 568 padding-left: 5px;
514 569 }
515 570
516 571 #changeset_content .container .right{
517 572 float:right;
518 573 width: 25%;
519 574 text-align: right;
520 575 }
521 576
522 577 #changeset_content .container .left .date{
523 578 font-weight:bold;
524 579 }
525 580 #changeset_content .container .left .author{
526 581
527 582 }
528 583 #changeset_content .container .left .message{
529 584 font-style: italic;
530 585 color: #556CB5;
531 586 }
532 587
533 588 .cs_files{
534 589 width: 60%;
535 590 }
536 591
537 592 .cs_files .cs_added{
538 593 background: url("/images/icons/page_white_add.png") no-repeat scroll 3px;
539 594 /*background-color:#BBFFBB;*/
540 595 height: 16px;
541 596 padding-left: 20px;
542 597 margin-top: 7px;
543 598 text-align: left;
544 599 }
545 600 .cs_files .cs_changed{
546 601 background: url("/images/icons/page_white_edit.png") no-repeat scroll 3px;
547 602 /*background-color: #FFDD88;*/
548 603 height: 16px;
549 604 padding-left: 20px;
550 605 margin-top: 7px;
551 606 text-align: left;
552 607 }
553 608 .cs_files .cs_removed{
554 609 background: url("/images/icons/page_white_delete.png") no-repeat scroll 3px;
555 610 /*background-color: #FF8888;*/
556 611 height: 16px;
557 612 padding-left: 20px;
558 613 margin-top: 7px;
559 614 text-align: left;
560 615 }
561 616
562 617 /** end of changeset **/
563 618
564 619 /** canvas **/
565 620 canvas {
566 621 position: absolute;
567 622 z-index: 5;
568 623 top: -0.7em;
569 624 }
570 625 #graph{
571 626 overflow: hidden;
572 627
573 628 }
574 629 #graph_nodes{
575 630 width:160px;
576 631 float:left;
577 632 }
578 633
579 634 #graph_content{
580 635 width:800px;
581 636 float:left;
582 637 }
583 638 #graph_content .container_header{
584 639 border:1px solid #CCCCCC;
585 640 height:30px;
586 641 background: #EEEEEE;
587 642 }
588 643
589 644
590 645 #graph_content .container .wrapper{
591 646 width: 600px;
592 647 }
593 648 #graph_content .container{
594 649 border-bottom: 1px solid #CCCCCC;
595 650 border-left: 1px solid #CCCCCC;
596 651 border-right: 1px solid #CCCCCC;
597 652 height:120px;
598 653 }
599 654
600 655 #graph_content .container .left{
601 656 float:left;
602 657 width: 70%;
603 658 padding-left: 5px;
604 659 }
605 660
606 661 #graph_content .container .right{
607 662 float:right;
608 663 width: 25%;
609 664 text-align: right;
610 665 }
611 666 #graph_content .container .left .date{
612 667 font-weight:bold;
613 668 }
614 669 #graph_content .container .left .author{
615 670
616 671 }
617 672 #graph_content .container .left .message{
618 673 font-size: 80%;
619 674 }
620 675
621 676 .right div{
622 677 clear: both;
623 678 }
624 679 .right .changes .added,.changed,.removed{
625 680 border:1px solid #DDDDDD;
626 681 display:block;
627 682 float:right;
628 683 font-size:0.75em;
629 684 text-align:center;
630 685 min-width:15px;
631 686 }
632 687 .right .changes .added{
633 688 background:#BBFFBB;
634 689 }
635 690 .right .changes .changed{
636 691 background: #FFDD88;
637 692 }
638 693 .right .changes .removed{
639 694 background: #FF8888;
640 695 }
641 696
642 697 .right .merge{
643 698 vertical-align: top;
644 699 font-size: 60%;
645 700 font-weight: bold;
646 701 }
647 702 .right .merge img{
648 703 vertical-align: bottom;
649 704 }
650 705
651 706 .right .parent{
652 707 font-size: 90%;
653 708 font-family: monospace;
654 709 }
655 710 /** end of canvas **/
656 711
657 712 /* FILE BROWSER */
658 713 div.browserblock {
659 714 overflow: hidden;
660 715 padding: 0px;
661 716 border: 1px solid #ccc;
662 717 background: #f8f8f8;
663 718 font-size: 100%;
664 719 line-height: 100%;
665 720 /* new */
666 721 line-height: 125%;
667 722 }
668 723 div.browserblock .browser-header{
669 724 border-bottom: 1px solid #CCCCCC;
670 725 background: #EEEEEE;
671 726 color:blue;
672 727 padding:10px 0 10px 0;
673 728 }
674 729 div.browserblock .browser-header span{
675 730 margin-left:25px;
676 731 font-weight: bold;
677 732 }
678 733 div.browserblock .browser-body{
679 734 background: #EEEEEE;
680 735 }
681 736
682 737 table.code-browser {
683 738 border-collapse:collapse;
684 739 width: 100%;
685 740 }
686 741 table.code-browser tr{
687 742 margin:3px;
688 743 }
689 744
690 745 table.code-browser thead th {
691 746 background-color: #EEEEEE;
692 747 height: 20px;
693 748 font-size: 1.1em;
694 749 font-weight: bold;
695 750 text-align: center;
696 751 text-align: left;
697 752 padding-left: 10px;
698 753 }
699 754 table.code-browser tbody tr {
700 755
701 756 }
702 757
703 758 table.code-browser tbody td {
704 759
705 760 padding-left:10px;
706 761 height: 20px;
707 762 }
708 763
709 764 .info-table {
710 765 background: none repeat scroll 0 0 #FAFAFA;
711 766 border-bottom: 1px solid #DDDDDD;
712 767 width: 100%;
713 768 }
714 769
715 770 .rss_logo {
716 771 background: url("/images/icons/rss_16.png") no-repeat scroll 3px;
717 772 height: 16px;
718 773 padding-left: 20px;
719 774 padding-top: 0px;
720 775 text-align: left;
721 776 }
722 777
723 778 .atom_logo {
724 779 background: url("/images/icons/atom.png") no-repeat scroll 3px;
725 780 height: 16px;
726 781 padding-left: 20px;
727 782 padding-top: 0px;
728 783 text-align: left;
729 784 }
730 785 .archive_logo{
731 786 background: url("/images/icons/compress.png") no-repeat scroll 3px;
732 787 height: 16px;
733 788 padding-left: 20px;
734 789 text-align: left;
735 790 }
736 791
737 792 .browser-file {
738 793 background: url("/images/icons/document_16.png") no-repeat scroll 3px;
739 794 height: 16px;
740 795 padding-left: 20px;
741 796 text-align: left;
742 797 }
743 798
744 799 .browser-dir {
745 800 background: url("/images/icons/folder_16.png") no-repeat scroll 3px;
746 801 height: 16px;
747 802 padding-left: 20px;
748 803 text-align: left;
749 804 }
750 805
751 806 #repos_list {
752 807 border: 1px solid #556CB5;
753 808 background: #FFFFFF;
754 809 } No newline at end of file
@@ -1,143 +1,153 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 4 <head>
5 5 <link rel="icon" href="/images/hgicon.png" type="image/png" />
6 6 <meta name="robots" content="index, nofollow"/>
7 7 <title>${next.title()}</title>
8 8 ##For future use yui reset for cross browser compatability.
9 9 ##<link rel="stylesheet" href="/js/yui/reset-fonts-grids/reset-fonts-grids.css" type="text/css" />
10 10 ${self.css()}
11 11 ${self.js()}
12 12 </head>
13 13
14 14 <body class="mainbody">
15 15 <div id="container">
16 16 <div class="page-header">
17 17 <h1>${next.breadcrumbs()}</h1>
18 18 ${self.page_nav()}
19 <div class="flash_msg">
20 <% messages = h.flash.pop_messages() %>
21 % if messages:
22 <ul id="flash-messages">
23 % for message in messages:
24 <li class="${message.category}_msg">${message}</li>
25 % endfor
26 </ul>
27 % endif
28 </div>
19 29 <div id="main">
20 30 ${next.main()}
21 31 </div>
22 32 <div class="page-footer">
23 33 Hg App ${c.hg_app_version} &copy; 2010 by Marcin Kuzminski
24 34 </div>
25 35
26 36 <div id="powered-by">
27 37 <p>
28 38 <a href="http://mercurial.selenic.com/" title="Mercurial">
29 39 <img src="/images/hglogo.png" width="75" height="90" alt="mercurial"/></a>
30 40 </p>
31 41 </div>
32 42
33 43 <div id="corner-top-left"></div>
34 44 <div id="corner-top-right"></div>
35 45 <div id="corner-bottom-left"></div>
36 46 <div id="corner-bottom-right"></div>
37 47
38 48 </div>
39 49 </body>
40 50 </html>
41 51
42 52 ### MAKO DEFS ###
43 53
44 54 <%def name="page_nav()">
45 55 ${self.menu()}
46 56 ${self.submenu()}
47 57 </%def>
48 58
49 59 <%def name="menu(current)">
50 60 <%
51 61 def is_current(selected):
52 62 if selected == current:
53 63 return "class='current'"
54 64 %>
55 65 %if current not in ['home','admin']:
56 66 ##regular menu
57 67 <script type="text/javascript">
58 68 YAHOO.util.Event.onDOMReady(function(){
59 69 YAHOO.util.Event.addListener('repo_switcher','click',function(){
60 70 if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){
61 71 YAHOO.util.Dom.setStyle('switch_repos','display','none');
62 72 YAHOO.util.Dom.setStyle('repo_switcher','background','');
63 73 YAHOO.util.Dom.removeClass('repo_switcher','selected');
64 74 }
65 75 else{
66 76 YAHOO.util.Dom.setStyle('switch_repos','display','');
67 77 YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF');
68 78 YAHOO.util.Dom.setStyle('repo_switcher','color','#556CB5');
69 79 YAHOO.util.Dom.addClass('repo_switcher','selected');
70 80 }
71 81 });
72 82 YAHOO.util.Event.addListener('repos_list','change',function(e){
73 83 var wa = YAHOO.util.Dom.get('repos_list').value;
74 84
75 85 var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa);
76 86 window.location = url;
77 87 })
78 88 });
79 89 </script>
80 90 <ul class="page-nav">
81 91 <li>
82 92 <a id="repo_switcher" title="${_('Switch repository')}" href="#">&darr;</a>
83 93 <div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px">
84 94 <select id="repos_list" size="=10">
85 95 %for repo in c.cached_repo_list:
86 96 <option value="${repo['name']}">${repo['name']}</option>
87 97 %endfor
88 98 </select>
89 99 </div>
90 100 </li>
91 101 <li ${is_current('summary')}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
92 102 <li ${is_current('shortlog')}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li>
93 103 <li ${is_current('changelog')}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>
94 104 <li ${is_current('branches')}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
95 105 <li ${is_current('tags')}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
96 106 <li ${is_current('files')}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li>
97 107 </ul>
98 108 %else:
99 109 ##Root menu
100 110 <ul class="page-nav">
101 111 <li ${is_current('home')}>${h.link_to(_('Home'),h.url('/'))}</li>
102 112 <li ${is_current('admin')}>${h.link_to(_('Admin'),h.url('admin_home'))}</li>
103 113 <li class="logout">${h.link_to(u'Logout',h.url('logout_home'))}</li>
104 114 </ul>
105 115 %endif
106 116 </div>
107 117 </%def>
108 118 <%def name="submenu(current=None)">
109 119 <%
110 120 def is_current(selected):
111 121 if selected == current:
112 122 return "class='current_submenu'"
113 123 %>
114 124 %if current != None:
115 125 <div>
116 126 <ul class="submenu">
117 127 <li ${is_current('repos')}>${h.link_to(u'repos',h.url('repos'),class_='repos')}</li>
118 128 <li ${is_current('users')}>${h.link_to(u'users',h.url('users'),class_='users')}</li>
119 129 <li ${is_current('permissions')}>${h.link_to(u'permissions',h.url('permissions'),class_='permissions')}</li>
120 130 </ul>
121 131 </div>
122 132 %endif
123 133 </%def>
124 134
125 135
126 136 <%def name="css()">
127 137 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
128 138 </%def>
129 139
130 140 <%def name="js()">
131 141 <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
132 142 </%def>
133 143
134 144 <!-- DEFINITION OF FORM ERROR FETCHER -->
135 145 <%def name="get_form_error(element)">
136 146 %if hasattr(c,'form_errors') and type(c.form_errors) == dict:
137 147 %if c.form_errors.get(element,False):
138 148 <span class="error-message">
139 149 ${c.form_errors.get(element,'')}
140 150 </span>
141 151 %endif
142 152 %endif
143 153 </%def> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now