Show More
@@ -363,7 +363,7 b' from rhodecode.lib.vcs.utils import auth' | |||||
363 | from rhodecode.lib.utils2 import credentials_filter, age as _age |
|
363 | from rhodecode.lib.utils2 import credentials_filter, age as _age | |
364 | from rhodecode.model.db import User, ChangesetStatus |
|
364 | from rhodecode.model.db import User, ChangesetStatus | |
365 |
|
365 | |||
366 | age = lambda x: _age(x) |
|
366 | age = lambda x,y=False: _age(x,y) | |
367 | capitalize = lambda x: x.capitalize() |
|
367 | capitalize = lambda x: x.capitalize() | |
368 | email = author_email |
|
368 | email = author_email | |
369 | short_id = lambda x: x[:12] |
|
369 | short_id = lambda x: x[:12] |
@@ -349,11 +349,15 b' def engine_from_config(configuration, pr' | |||||
349 | return engine |
|
349 | return engine | |
350 |
|
350 | |||
351 |
|
351 | |||
352 | def age(prevdate): |
|
352 | def age(prevdate, show_short_version=False): | |
353 | """ |
|
353 | """ | |
354 | turns a datetime into an age string. |
|
354 | turns a datetime into an age string. | |
|
355 | If show_short_version is True, then it will generate a not so accurate but shorter string, | |||
|
356 | example: 2days ago, instead of 2 days and 23 hours ago. | |||
|
357 | ||||
355 |
|
358 | |||
356 | :param prevdate: datetime object |
|
359 | :param prevdate: datetime object | |
|
360 | :param show_short_version: if it should aproximate the date and return a shorter string | |||
357 | :rtype: unicode |
|
361 | :rtype: unicode | |
358 | :returns: unicode words describing age |
|
362 | :returns: unicode words describing age | |
359 | """ |
|
363 | """ | |
@@ -423,7 +427,7 b' def age(prevdate):' | |||||
423 | else: |
|
427 | else: | |
424 | sub_value = 0 |
|
428 | sub_value = 0 | |
425 |
|
429 | |||
426 | if sub_value == 0: |
|
430 | if sub_value == 0 or show_short_version: | |
427 | if future: |
|
431 | if future: | |
428 | return _(u'in %s') % fmt_funcs[part](value) |
|
432 | return _(u'in %s') % fmt_funcs[part](value) | |
429 | else: |
|
433 | else: |
@@ -1844,14 +1844,18 b' div.form div.fields div.field div.button' | |||||
1844 | padding: 0 3px 2px; |
|
1844 | padding: 0 3px 2px; | |
1845 | } |
|
1845 | } | |
1846 |
|
1846 | |||
1847 | #summary { |
|
1847 | #content div.box #summary { | |
1848 | float: left; |
|
1848 | /*float: left;*/ | |
1849 | width: 80%; |
|
1849 | /*width: 80%;*/ | |
|
1850 | margin-right: 200px; | |||
1850 | } |
|
1851 | } | |
1851 |
|
1852 | |||
1852 | #summary-menu-stats{ |
|
1853 | #summary-menu-stats{ | |
1853 | float: left; |
|
1854 | float: left; | |
1854 |
width: 20 |
|
1855 | width: 200px; | |
|
1856 | position: absolute; | |||
|
1857 | top: 0; | |||
|
1858 | right: 0; | |||
1855 | } |
|
1859 | } | |
1856 |
|
1860 | |||
1857 | #summary-menu-stats ul { |
|
1861 | #summary-menu-stats ul { | |
@@ -2521,10 +2525,10 b' h3.files_location {' | |||||
2521 | text-align: right; |
|
2525 | text-align: right; | |
2522 | } |
|
2526 | } | |
2523 |
|
2527 | |||
2524 |
#changeset_content .container . |
|
2528 | #changeset_content .container .message { | |
2525 | white-space: pre-wrap; |
|
2529 | white-space: pre-wrap; | |
2526 | } |
|
2530 | } | |
2527 |
#changeset_content .container |
|
2531 | #changeset_content .container .message a:hover { | |
2528 | text-decoration: none; |
|
2532 | text-decoration: none; | |
2529 | } |
|
2533 | } | |
2530 | .cs_files .cur_cs { |
|
2534 | .cs_files .cur_cs { | |
@@ -2620,23 +2624,30 b' h3.files_location {' | |||||
2620 | text-align: left; |
|
2624 | text-align: left; | |
2621 | } |
|
2625 | } | |
2622 |
|
2626 | |||
|
2627 | .table { | |||
|
2628 | position: relative; | |||
|
2629 | } | |||
|
2630 | ||||
2623 | #graph { |
|
2631 | #graph { | |
|
2632 | position: relative; | |||
2624 | overflow: hidden; |
|
2633 | overflow: hidden; | |
2625 | } |
|
2634 | } | |
2626 |
|
2635 | |||
2627 | #graph_nodes { |
|
2636 | #graph_nodes { | |
2628 | float: left; |
|
2637 | position: absolute; | |
2629 | margin-right: 0px; |
|
2638 | } | |
2630 | margin-top: 0px; |
|
2639 | ||
|
2640 | #graph_content, | |||
|
2641 | #graph .info_box, | |||
|
2642 | #graph .container_header { | |||
|
2643 | margin-left: 100px; | |||
2631 | } |
|
2644 | } | |
2632 |
|
2645 | |||
2633 | #graph_content { |
|
2646 | #graph_content { | |
2634 | width: 80%; |
|
2647 | position: relative; | |
2635 | float: left; |
|
2648 | } | |
2636 | } |
|
2649 | ||
2637 |
|
2650 | #graph .container_header { | ||
2638 | #graph_content .container_header { |
|
|||
2639 | border-bottom: 1px solid #DDD; |
|
|||
2640 | padding: 10px; |
|
2651 | padding: 10px; | |
2641 | height: 25px; |
|
2652 | height: 25px; | |
2642 | } |
|
2653 | } | |
@@ -2651,55 +2662,140 b' h3.files_location {' | |||||
2651 | margin: 0px 0px 0px 3px; |
|
2662 | margin: 0px 0px 0px 3px; | |
2652 | } |
|
2663 | } | |
2653 |
|
2664 | |||
|
2665 | #graph_content #changesets { | |||
|
2666 | table-layout: fixed; | |||
|
2667 | border-collapse: collapse; | |||
|
2668 | border-left: none; | |||
|
2669 | border-right: none; | |||
|
2670 | border-color: #cdcdcd; | |||
|
2671 | } | |||
|
2672 | ||||
2654 | #graph_content .container { |
|
2673 | #graph_content .container { | |
2655 | border-bottom: 1px solid #DDD; |
|
2674 | min-height: 5em; | |
2656 | height: 56px; |
|
2675 | } | |
|
2676 | ||||
|
2677 | #graph_content #changesets td { | |||
2657 | overflow: hidden; |
|
2678 | overflow: hidden; | |
|
2679 | text-overflow:ellipsis; | |||
|
2680 | white-space: nowrap; | |||
|
2681 | height: 31px; | |||
|
2682 | border-color: #cdcdcd; | |||
|
2683 | } | |||
|
2684 | ||||
|
2685 | #graph_content .container .author { | |||
|
2686 | width: 105px; | |||
|
2687 | } | |||
|
2688 | ||||
|
2689 | #graph_content .container .hash{ | |||
|
2690 | width: 90px; | |||
|
2691 | font-size: 0.85em; | |||
|
2692 | } | |||
|
2693 | ||||
|
2694 | #graph_content #changesets .container .date{ | |||
|
2695 | width: 76px; | |||
|
2696 | color: #666; | |||
|
2697 | font-size: 10px; | |||
2658 | } |
|
2698 | } | |
2659 |
|
2699 | |||
2660 | #graph_content .container .right { |
|
2700 | #graph_content .container .right { | |
2661 | float: right; |
|
2701 | width: 120px; | |
2662 | width: 23%; |
|
2702 | padding-right: 0px; | |
2663 | text-align: right; |
|
2703 | } | |
2664 | } |
|
2704 | ||
2665 |
|
2705 | /* | ||
2666 |
#graph_content .container . |
|
2706 | #graph_content .container .column3 { | |
2667 | float: left; |
|
2707 | width: 12% | |
2668 | width: 25%; |
|
2708 | } | |
2669 | padding-left: 5px; |
|
2709 | */ | |
2670 | } |
|
|||
2671 |
|
||||
2672 | #graph_content .container .mid { |
|
2710 | #graph_content .container .mid { | |
|
2711 | position: relative; | |||
|
2712 | } | |||
|
2713 | ||||
|
2714 | ||||
|
2715 | ||||
|
2716 | ||||
|
2717 | #graph_content #changesets td.checkbox{ | |||
|
2718 | width: 20px; | |||
|
2719 | } | |||
|
2720 | ||||
|
2721 | #graph_content .container .changeset_range { | |||
2673 | float: left; |
|
2722 | float: left; | |
2674 | width: 49%; |
|
2723 | margin: 6px 3px; | |
2675 | } |
|
2724 | } | |
2676 |
|
2725 | |||
2677 |
|
2726 | |||
2678 | #graph_content .container .left .date { |
|
2727 | ||
2679 | color: #666; |
|
2728 | #graph_content .container .author img { | |
2680 | padding-left: 22px; |
|
2729 | vertical-align: middle; | |
2681 | font-size: 10px; |
|
2730 | } | |
2682 | } |
|
2731 | ||
2683 |
|
2732 | #graph_content .container .author .user { | ||
2684 | #graph_content .container .left .author { |
|
|||
2685 | height: 22px; |
|
|||
2686 | } |
|
|||
2687 |
|
||||
2688 | #graph_content .container .left .author .user { |
|
|||
2689 | color: #444444; |
|
2733 | color: #444444; | |
2690 | float: left; |
|
|||
2691 | margin-left: -4px; |
|
|||
2692 | margin-top: 4px; |
|
|||
2693 | } |
|
2734 | } | |
2694 |
|
2735 | |||
2695 | #graph_content .container .mid .message { |
|
2736 | #graph_content .container .mid .message { | |
2696 | white-space: pre-wrap; |
|
2737 | white-space: pre-wrap; | |
|
2738 | padding: 0; | |||
|
2739 | overflow: hidden; | |||
|
2740 | height: 1.1em; | |||
|
2741 | } | |||
|
2742 | ||||
|
2743 | #graph_content .container .mid .logtags { | |||
|
2744 | display: block; | |||
|
2745 | position: absolute; | |||
|
2746 | top: 0; | |||
|
2747 | right: 0; | |||
|
2748 | padding: 0 5px; | |||
|
2749 | background: #FFFFFF; | |||
|
2750 | } | |||
|
2751 | ||||
|
2752 | #graph_content .right .comments-container, | |||
|
2753 | #graph_content .right .logtags { | |||
|
2754 | display: block; | |||
|
2755 | float: left; | |||
|
2756 | overflow: hidden; | |||
|
2757 | width: 50%; | |||
|
2758 | padding: 0; | |||
|
2759 | margin: 0; | |||
|
2760 | } | |||
|
2761 | ||||
|
2762 | #graph_content .right .comments-container{ | |||
|
2763 | width: 40px; | |||
|
2764 | } | |||
|
2765 | ||||
|
2766 | #graph_content .right .logtags { | |||
|
2767 | width: 80px; | |||
|
2768 | height: 2.5em; | |||
|
2769 | position: absolute; | |||
|
2770 | left: 40px; | |||
|
2771 | } | |||
|
2772 | ||||
|
2773 | #graph_content .right .logtags:hover { | |||
|
2774 | position: absolute; | |||
|
2775 | width: auto; | |||
|
2776 | } | |||
|
2777 | ||||
|
2778 | #graph_content .right .logtags .bookbook, | |||
|
2779 | #graph_content .right .logtags .tagtag { | |||
|
2780 | float: left; | |||
|
2781 | line-height: 1em; | |||
|
2782 | margin-bottom: 1px; | |||
2697 | } |
|
2783 | } | |
2698 |
|
2784 | |||
2699 | #graph_content .container .mid .message a:hover { |
|
2785 | #graph_content .container .mid .message a:hover { | |
2700 | text-decoration: none; |
|
2786 | text-decoration: none; | |
2701 | } |
|
2787 | } | |
2702 |
|
2788 | |||
|
2789 | /* | |||
|
2790 | * Stuff we might want to remove from the changelog, or reposition in a tooltip | |||
|
2791 | */ | |||
|
2792 | #graph_content .container .changeset_id, | |||
|
2793 | #graph_content .container .changes, | |||
|
2794 | #graph_content .container .changed_total, | |||
|
2795 | #graph_content .container .parent { | |||
|
2796 | display: none; | |||
|
2797 | } | |||
|
2798 | ||||
2703 | .revision-link { |
|
2799 | .revision-link { | |
2704 | color:#3F6F9F; |
|
2800 | color:#3F6F9F; | |
2705 | font-weight: bold !important; |
|
2801 | font-weight: bold !important; | |
@@ -2735,17 +2831,18 b' h3.files_location {' | |||||
2735 | .code-header .changeset-status-container .changeset-status-ico, .container .changeset-status-ico { |
|
2831 | .code-header .changeset-status-container .changeset-status-ico, .container .changeset-status-ico { | |
2736 | float: left; |
|
2832 | float: left; | |
2737 | } |
|
2833 | } | |
2738 | .right .comments-container { |
|
|||
2739 | padding-right: 5px; |
|
|||
2740 | margin-top:1px; |
|
|||
2741 | float:right; |
|
|||
2742 | height:14px; |
|
|||
2743 | } |
|
|||
2744 |
|
2834 | |||
2745 | .right .comments-cnt { |
|
2835 | .right .comments-cnt { | |
2746 | float: left; |
|
|||
2747 | color: rgb(136, 136, 136); |
|
2836 | color: rgb(136, 136, 136); | |
2748 |
padding |
|
2837 | padding: 5px 0; | |
|
2838 | } | |||
|
2839 | ||||
|
2840 | .right .comments-cnt a { | |||
|
2841 | background-image: url('../images/icons/comments.png'); | |||
|
2842 | background-repeat: no-repeat; | |||
|
2843 | background-position: 100% 50%; | |||
|
2844 | padding: 5px 0; | |||
|
2845 | padding-right: 20px; | |||
2749 | } |
|
2846 | } | |
2750 |
|
2847 | |||
2751 | .right .changes { |
|
2848 | .right .changes { | |
@@ -2790,7 +2887,6 b' h3.files_location {' | |||||
2790 | padding: 1px 3px 1px 3px; |
|
2887 | padding: 1px 3px 1px 3px; | |
2791 | background-color: #fca062; |
|
2888 | background-color: #fca062; | |
2792 | font-size: 10px; |
|
2889 | font-size: 10px; | |
2793 | font-weight: bold; |
|
|||
2794 | color: #ffffff; |
|
2890 | color: #ffffff; | |
2795 | text-transform: uppercase; |
|
2891 | text-transform: uppercase; | |
2796 | white-space: nowrap; |
|
2892 | white-space: nowrap; | |
@@ -2804,7 +2900,8 b' h3.files_location {' | |||||
2804 | clear:both; |
|
2900 | clear:both; | |
2805 | } |
|
2901 | } | |
2806 | .right .logtags { |
|
2902 | .right .logtags { | |
2807 | padding: 2px 2px 2px 2px; |
|
2903 | /*padding: 2px 2px 2px 2px;*/ | |
|
2904 | line-height: 2.2em; | |||
2808 | } |
|
2905 | } | |
2809 | .right .logtags .branchtag, .right .logtags .tagtag, .right .logtags .booktag { |
|
2906 | .right .logtags .branchtag, .right .logtags .tagtag, .right .logtags .booktag { | |
2810 | margin: 0px 2px; |
|
2907 | margin: 0px 2px; | |
@@ -2814,20 +2911,30 b' h3.files_location {' | |||||
2814 | .logtags .branchtag, |
|
2911 | .logtags .branchtag, | |
2815 | .spantag { |
|
2912 | .spantag { | |
2816 | padding: 1px 3px 1px 3px; |
|
2913 | padding: 1px 3px 1px 3px; | |
2817 | background-color: #bfbfbf; |
|
|||
2818 | font-size: 10px; |
|
2914 | font-size: 10px; | |
2819 | font-weight: bold; |
|
2915 | color: #336699; | |
2820 | color: #ffffff; |
|
|||
2821 | white-space: nowrap; |
|
2916 | white-space: nowrap; | |
2822 |
-webkit-border-radius: |
|
2917 | -webkit-border-radius: 4px; | |
2823 |
border-radius: |
|
2918 | border-radius: 4px; | |
2824 | } |
|
2919 | border: 1px solid #d9e8f8; | |
|
2920 | line-height: 1.5em; | |||
|
2921 | margin: 1.1em 0; | |||
|
2922 | } | |||
|
2923 | ||||
|
2924 | .right .logtags .branchtag, | |||
|
2925 | .logtags .tagtag, | |||
|
2926 | .right .merge { | |||
|
2927 | float: right; | |||
|
2928 | /*height: 1em;*/ | |||
|
2929 | line-height: 1em; | |||
|
2930 | /*padding: 0px 0px !important;*/ | |||
|
2931 | margin: 1px 1px !important; | |||
|
2932 | display: block; | |||
|
2933 | } | |||
|
2934 | ||||
2825 | .right .logtags .branchtag a:hover, .logtags .branchtag a { |
|
2935 | .right .logtags .branchtag a:hover, .logtags .branchtag a { | |
2826 | color: #ffffff; |
|
|||
2827 | } |
|
|||
2828 | .right .logtags .branchtag a:hover, .logtags .branchtag a:hover { |
|
|||
2829 | text-decoration: none; |
|
2936 | text-decoration: none; | |
2830 |
color: # |
|
2937 | color: #336699; | |
2831 | } |
|
2938 | } | |
2832 | .right .logtags .tagtag, .logtags .tagtag { |
|
2939 | .right .logtags .tagtag, .logtags .tagtag { | |
2833 | padding: 1px 3px 1px 3px; |
|
2940 | padding: 1px 3px 1px 3px; | |
@@ -2850,9 +2957,7 b' h3.files_location {' | |||||
2850 | padding: 1px 3px 1px 3px; |
|
2957 | padding: 1px 3px 1px 3px; | |
2851 | background-color: #46A546; |
|
2958 | background-color: #46A546; | |
2852 | font-size: 10px; |
|
2959 | font-size: 10px; | |
2853 | font-weight: bold; |
|
|||
2854 | color: #ffffff; |
|
2960 | color: #ffffff; | |
2855 | text-transform: uppercase; |
|
|||
2856 | white-space: nowrap; |
|
2961 | white-space: nowrap; | |
2857 | -webkit-border-radius: 3px; |
|
2962 | -webkit-border-radius: 3px; | |
2858 | border-radius: 3px; |
|
2963 | border-radius: 3px; | |
@@ -3728,6 +3833,7 b' div#legend_data, div#legend_container, d' | |||||
3728 | } |
|
3833 | } | |
3729 |
|
3834 | |||
3730 | #content div.box div.form, #content div.box div.table, #content div.box div.traffic { |
|
3835 | #content div.box div.form, #content div.box div.table, #content div.box div.traffic { | |
|
3836 | position: relative; | |||
3731 | clear: both; |
|
3837 | clear: both; | |
3732 | overflow: hidden; |
|
3838 | overflow: hidden; | |
3733 | margin: 0; |
|
3839 | margin: 0; | |
@@ -3985,13 +4091,7 b' div.form div.fields div.field div.highli' | |||||
3985 | width: 600px; |
|
4091 | width: 600px; | |
3986 | } |
|
4092 | } | |
3987 |
|
4093 | |||
3988 |
#changeset_content .container . |
|
4094 | #changeset_content .container .date, .ac .match { | |
3989 | float: left; |
|
|||
3990 | width: 75%; |
|
|||
3991 | padding-left: 5px; |
|
|||
3992 | } |
|
|||
3993 |
|
||||
3994 | #changeset_content .container .left .date, .ac .match { |
|
|||
3995 | font-weight: 700; |
|
4095 | font-weight: 700; | |
3996 | padding-top: 5px; |
|
4096 | padding-top: 5px; | |
3997 | padding-bottom: 5px; |
|
4097 | padding-bottom: 5px; |
@@ -16,7 +16,7 b'' | |||||
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
19 |
|
|
19 | ${self.context_bar('changelog')} | |
20 | <div class="box"> |
|
20 | <div class="box"> | |
21 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
22 | <div class="title"> |
|
22 | <div class="title"> | |
@@ -25,11 +25,7 b'' | |||||
25 | <div class="table"> |
|
25 | <div class="table"> | |
26 | % if c.pagination: |
|
26 | % if c.pagination: | |
27 | <div id="graph"> |
|
27 | <div id="graph"> | |
28 | <div id="graph_nodes"> |
|
28 | <div class="info_box" style="clear: both;padding: 10px 6px;text-align: right;"> | |
29 | <canvas id="graph_canvas"></canvas> |
|
|||
30 | </div> |
|
|||
31 | <div id="graph_content"> |
|
|||
32 | <div class="info_box" style="clear: both;padding: 10px 6px;text-align: right;"> |
|
|||
33 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> |
|
29 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> | |
34 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> |
|
30 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> | |
35 |
|
31 | |||
@@ -39,246 +35,267 b'' | |||||
39 | %if h.is_hg(c.rhodecode_repo): |
|
35 | %if h.is_hg(c.rhodecode_repo): | |
40 | <a id="open_new_pr" href="${h.url('pullrequest_form',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a> |
|
36 | <a id="open_new_pr" href="${h.url('pullrequest_form',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a> | |
41 | %endif |
|
37 | %endif | |
|
38 | </div> | |||
|
39 | <div class="container_header"> | |||
|
40 | ${h.form(h.url.current(),method='get')} | |||
|
41 | <div style="float:left"> | |||
|
42 | ${h.submit('set',_('Show'),class_="ui-btn")} | |||
|
43 | ${h.text('size',size=1,value=c.size)} | |||
|
44 | ${_('revisions')} | |||
42 | </div> |
|
45 | </div> | |
43 | <div class="container_header"> |
|
46 | ${h.end_form()} | |
44 | ${h.form(h.url.current(),method='get')} |
|
|||
45 | <div class="info_box" style="float:left"> |
|
|||
46 | ${h.submit('set',_('Show'),class_="ui-btn")} |
|
|||
47 | ${h.text('size',size=1,value=c.size)} |
|
|||
48 | ${_('revisions')} |
|
|||
49 | </div> |
|
|||
50 | ${h.end_form()} |
|
|||
51 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
|
47 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> | |
52 |
|
|
48 | </div> | |
|
49 | <div id="graph_nodes"> | |||
|
50 | <canvas id="graph_canvas"></canvas> | |||
|
51 | </div> | |||
|
52 | <div id="graph_content"> | |||
53 |
|
53 | |||
|
54 | <table id="changesets"> | |||
|
55 | <tbody> | |||
54 | %for cnt,cs in enumerate(c.pagination): |
|
56 | %for cnt,cs in enumerate(c.pagination): | |
55 |
< |
|
57 | <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> | |
56 |
<d |
|
58 | <td class="checkbox"> | |
57 | <div> |
|
|||
58 | ${h.checkbox(cs.raw_id,class_="changeset_range")} |
|
59 | ${h.checkbox(cs.raw_id,class_="changeset_range")} | |
59 | <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> |
|
60 | </td> | |
60 |
|
|
61 | <td class="author"> | |
61 | <div class="author"> |
|
62 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> | |
62 | <div class="gravatar"> |
|
63 | <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span> | |
63 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> |
|
64 | </td> | |
64 |
|
|
65 | <td class="hash"> | |
65 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> |
|
66 | <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"> | |
66 | </div> |
|
67 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"> | |
67 |
< |
|
68 | <span class="changeset_id">${cs.revision} :</span> | |
68 | </div> |
|
69 | <span class="changeset_hash">${h.short_id(cs.raw_id)}</span> | |
69 |
< |
|
70 | </a> | |
|
71 | </span> | |||
|
72 | </td> | |||
|
73 | <td class="date"> | |||
|
74 | <div class="date">${h.age(cs.date,True)}</div> | |||
|
75 | </td> | |||
|
76 | <td class="mid"> | |||
70 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
|
77 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> | |
71 | <div class="expand"><span class="expandtext">↓ ${_('Show more')} ↓</span></div> |
|
78 | <div class="expand"><span class="expandtext">↓ ${_('Show more')} ↓</span></div> | |
72 |
|
|
79 | %if cs.branch: | |
73 |
<div class=" |
|
80 | <div class="logtags"> | |
74 |
<div class="cha |
|
81 | <div class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> | |
75 | <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div> |
|
82 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
76 |
|
|
83 | </div> | |
77 | %if len(c.comments.get(cs.raw_id,[])) > 0: |
|
84 | </div> | |
78 | <div class="comments-cnt" title="${('comments')}"> |
|
85 | %endif | |
79 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> |
|
86 | </td> | |
80 | <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> |
|
87 | ||
81 | <img src="${h.url('/images/icons/comments.png')}"> |
|
88 | <td class="right"> | |
82 |
|
|
89 | <div class="changes"> | |
83 | </div> |
|
90 | <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}"> | |
|
91 | ${len(cs.affected_files)} | |||
|
92 | </div> | |||
|
93 | ||||
|
94 | <div class="changeset-status-container"> | |||
|
95 | %if c.statuses.get(cs.raw_id): | |||
|
96 | <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> | |||
|
97 | <div class="changeset-status-ico"> | |||
|
98 | %if c.statuses.get(cs.raw_id)[2]: | |||
|
99 | <a class="tooltip" title="${_('Click to open associated pull request #%s' % c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> | |||
|
100 | %else: | |||
|
101 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> | |||
84 | %endif |
|
102 | %endif | |
85 |
|
|
103 | </div> | |
86 |
|
|
104 | %endif | |
87 | %if c.statuses.get(cs.raw_id): |
|
105 | </div> | |
88 | <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> |
|
106 | </div> | |
89 | <div class="changeset-status-ico"> |
|
107 | %if cs.parents: | |
90 |
|
|
108 | %for p_cs in reversed(cs.parents): | |
91 | <a class="tooltip" title="${_('Click to open associated pull request #%s' % c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> |
|
109 | <div class="parent">${_('Parent')} | |
92 | %else: |
|
110 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), | |
93 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> |
|
111 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> | |
94 | %endif |
|
|||
95 | </div> |
|
|||
96 | %endif |
|
|||
97 | </div> |
|
|||
98 | </div> |
|
112 | </div> | |
99 |
|
|
113 | %endfor | |
100 |
|
|
114 | %else: | |
101 |
|
|
115 | <div class="parent">${_('No parents')}</div> | |
102 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), |
|
116 | %endif | |
103 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> |
|
117 | <div class="comments-container"> | |
104 | </div> |
|
118 | %if len(c.comments.get(cs.raw_id,[])) > 0: | |
105 |
|
|
119 | <div class="comments-cnt" title="${('comments')}"> | |
106 | %else: |
|
120 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> | |
107 |
|
|
121 | ${len(c.comments[cs.raw_id])} | |
108 |
|
|
122 | </a> | |
109 |
|
123 | </div> | ||
110 |
|
|
124 | %endif | |
111 |
|
|
125 | </div> | |
|
126 | <div class="logtags"> | |||
|
127 | %if len(cs.parents)>1: | |||
112 | <span class="merge">${_('merge')}</span> |
|
128 | <span class="merge">${_('merge')}</span> | |
113 |
|
|
129 | %endif | |
114 |
|
|
130 | ||
115 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
131 | %if h.is_hg(c.rhodecode_repo): | |
116 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
132 | %for book in cs.bookmarks: | |
|
133 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> | |||
|
134 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |||
|
135 | </span> | |||
|
136 | %endfor | |||
|
137 | %endif | |||
|
138 | %for tag in cs.tags: | |||
|
139 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |||
|
140 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |||
117 | </span> |
|
141 | </span> | |
118 |
|
|
142 | %endfor | |
119 | %if h.is_hg(c.rhodecode_repo): |
|
143 | </div> | |
120 | %for book in cs.bookmarks: |
|
144 | </td> | |
121 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
145 | </tr> | |
122 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
|||
123 | </span> |
|
|||
124 | %endfor |
|
|||
125 | %endif |
|
|||
126 | %for tag in cs.tags: |
|
|||
127 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
|||
128 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
|
|||
129 | %endfor |
|
|||
130 | </span> |
|
|||
131 | </div> |
|
|||
132 | </div> |
|
|||
133 |
|
146 | |||
134 | %endfor |
|
147 | %endfor | |
|
148 | </tbody> | |||
|
149 | </table> | |||
|
150 | ||||
|
151 | ||||
135 | <div class="pagination-wh pagination-left"> |
|
152 | <div class="pagination-wh pagination-left"> | |
136 | ${c.pagination.pager('$link_previous ~2~ $link_next')} |
|
153 | ${c.pagination.pager('$link_previous ~2~ $link_next')} | |
137 | </div> |
|
154 | </div> | |
138 | </div> |
|
|||
139 | </div> |
|
155 | </div> | |
|
156 | </div> | |||
140 |
|
157 | |||
141 |
|
|
158 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> | |
142 |
|
|
159 | <script type="text/javascript"> | |
143 |
|
|
160 | YAHOO.util.Event.onDOMReady(function(){ | |
144 |
|
161 | |||
145 |
|
|
162 | //Monitor range checkboxes and build a link to changesets | |
146 |
|
|
163 | //ranges | |
147 |
|
|
164 | var checkboxes = YUD.getElementsByClassName('changeset_range'); | |
148 |
|
|
165 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; | |
149 |
|
|
166 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; | |
150 |
|
167 | |||
151 |
|
|
168 | var checkbox_checker = function(e){ | |
152 |
|
|
169 | var clicked_cb = e.currentTarget; | |
153 |
|
|
170 | var checked_checkboxes = []; | |
154 |
|
|
171 | for (pos in checkboxes){ | |
155 |
|
|
172 | if(checkboxes[pos].checked){ | |
156 |
|
|
173 | checked_checkboxes.push(checkboxes[pos]); | |
157 | } |
|
|||
158 | } |
|
174 | } | |
159 | if(YUD.get('open_new_pr')){ |
|
175 | } | |
160 | if(checked_checkboxes.length>0){ |
|
176 | if(YUD.get('open_new_pr')){ | |
|
177 | if(checked_checkboxes.length>0){ | |||
161 | // modify open pull request to show we have selected cs |
|
178 | // modify open pull request to show we have selected cs | |
162 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; |
|
179 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; | |
163 |
|
|
180 | }else{ | |
164 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; |
|
181 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; | |
165 | } |
|
|||
166 | } |
|
|||
167 |
|
||||
168 | if(checked_checkboxes.length>0){ |
|
|||
169 | var rev_end = checked_checkboxes[0].name; |
|
|||
170 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; |
|
|||
171 | var url = url_tmpl.replace('__REVRANGE__', |
|
|||
172 | rev_start+'...'+rev_end); |
|
|||
173 |
|
||||
174 | var link = (rev_start == rev_end) |
|
|||
175 | ? _TM['Show selected change __S'] |
|
|||
176 | : _TM['Show selected changes __S -> __E']; |
|
|||
177 |
|
||||
178 | link = link.replace('__S',rev_start.substr(0,6)); |
|
|||
179 | link = link.replace('__E',rev_end.substr(0,6)); |
|
|||
180 | YUD.get('rev_range_container').href = url; |
|
|||
181 | YUD.get('rev_range_container').innerHTML = link; |
|
|||
182 | YUD.setStyle('rev_range_container','display',''); |
|
|||
183 | YUD.setStyle('rev_range_clear','display',''); |
|
|||
184 |
|
||||
185 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); |
|
|||
186 |
|
||||
187 | } |
|
|||
188 | else{ |
|
|||
189 | YUD.setStyle('rev_range_container','display','none'); |
|
|||
190 | YUD.setStyle('rev_range_clear','display','none'); |
|
|||
191 | } |
|
|||
192 | }; |
|
|||
193 | YUE.onDOMReady(checkbox_checker); |
|
|||
194 | YUE.on(checkboxes,'click', checkbox_checker); |
|
|||
195 |
|
||||
196 | YUE.on('rev_range_clear','click',function(e){ |
|
|||
197 | for (var i=0; i<checkboxes.length; i++){ |
|
|||
198 | var cb = checkboxes[i]; |
|
|||
199 | cb.checked = false; |
|
|||
200 | } |
|
|||
201 | YUE.preventDefault(e); |
|
|||
202 | }) |
|
|||
203 | var msgs = YUQ('.message'); |
|
|||
204 | // get first element height |
|
|||
205 | var el = YUQ('#graph_content .container')[0]; |
|
|||
206 | var row_h = el.clientHeight; |
|
|||
207 | for(var i=0;i<msgs.length;i++){ |
|
|||
208 | var m = msgs[i]; |
|
|||
209 |
|
||||
210 | var h = m.clientHeight; |
|
|||
211 | var pad = YUD.getStyle(m,'padding'); |
|
|||
212 | if(h > row_h){ |
|
|||
213 | var offset = row_h - (h+12); |
|
|||
214 | YUD.setStyle(m.nextElementSibling,'display','block'); |
|
|||
215 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); |
|
|||
216 | }; |
|
|||
217 | } |
|
|||
218 | YUE.on(YUQ('.expand'),'click',function(e){ |
|
|||
219 | var elem = e.currentTarget.parentNode.parentNode; |
|
|||
220 | YUD.setStyle(e.currentTarget,'display','none'); |
|
|||
221 | YUD.setStyle(elem,'height','auto'); |
|
|||
222 |
|
||||
223 | //redraw the graph, line_count and jsdata are global vars |
|
|||
224 | set_canvas(100); |
|
|||
225 |
|
||||
226 | var r = new BranchRenderer(); |
|
|||
227 | r.render(jsdata,100,line_count); |
|
|||
228 |
|
||||
229 | }) |
|
|||
230 |
|
||||
231 | // Fetch changeset details |
|
|||
232 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ |
|
|||
233 | var id = e.currentTarget.id; |
|
|||
234 | var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"; |
|
|||
235 | var url = url.replace('__CS__',id.replace('changed_total_','')); |
|
|||
236 | ypjax(url,id,function(){tooltip_activate()}); |
|
|||
237 | }); |
|
|||
238 |
|
||||
239 | // change branch filter |
|
|||
240 | YUE.on(YUD.get('branch_filter'),'change',function(e){ |
|
|||
241 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |
|
|||
242 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; |
|
|||
243 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; |
|
|||
244 | var url = url.replace('__BRANCH__',selected_branch); |
|
|||
245 | if(selected_branch != ''){ |
|
|||
246 | window.location = url; |
|
|||
247 | }else{ |
|
|||
248 | window.location = url_main; |
|
|||
249 | } |
|
|||
250 |
|
||||
251 | }); |
|
|||
252 |
|
||||
253 | function set_canvas(width) { |
|
|||
254 | var c = document.getElementById('graph_nodes'); |
|
|||
255 | var t = document.getElementById('graph_content'); |
|
|||
256 | canvas = document.getElementById('graph_canvas'); |
|
|||
257 | var div_h = t.clientHeight; |
|
|||
258 | c.style.height=div_h+'px'; |
|
|||
259 | canvas.setAttribute('height',div_h); |
|
|||
260 | c.style.height=width+'px'; |
|
|||
261 | canvas.setAttribute('width',width); |
|
|||
262 | }; |
|
|||
263 | var heads = 1; |
|
|||
264 | var line_count = 0; |
|
|||
265 | var jsdata = ${c.jsdata|n}; |
|
|||
266 |
|
||||
267 | for (var i=0;i<jsdata.length;i++) { |
|
|||
268 | var in_l = jsdata[i][2]; |
|
|||
269 | for (var j in in_l) { |
|
|||
270 | var m = in_l[j][1]; |
|
|||
271 | if (m > line_count) |
|
|||
272 | line_count = m; |
|
|||
273 | } |
|
182 | } | |
274 | } |
|
183 | } | |
|
184 | ||||
|
185 | if(checked_checkboxes.length>0){ | |||
|
186 | var rev_end = checked_checkboxes[0].name; | |||
|
187 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; | |||
|
188 | var url = url_tmpl.replace('__REVRANGE__', | |||
|
189 | rev_start+'...'+rev_end); | |||
|
190 | ||||
|
191 | var link = (rev_start == rev_end) | |||
|
192 | ? _TM['Show selected change __S'] | |||
|
193 | : _TM['Show selected changes __S -> __E']; | |||
|
194 | ||||
|
195 | link = link.replace('__S',rev_start.substr(0,6)); | |||
|
196 | link = link.replace('__E',rev_end.substr(0,6)); | |||
|
197 | YUD.get('rev_range_container').href = url; | |||
|
198 | YUD.get('rev_range_container').innerHTML = link; | |||
|
199 | YUD.setStyle('rev_range_container','display',''); | |||
|
200 | YUD.setStyle('rev_range_clear','display',''); | |||
|
201 | ||||
|
202 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); | |||
|
203 | ||||
|
204 | } else{ | |||
|
205 | YUD.setStyle('rev_range_container','display','none'); | |||
|
206 | YUD.setStyle('rev_range_clear','display','none'); | |||
|
207 | } | |||
|
208 | }; | |||
|
209 | YUE.onDOMReady(checkbox_checker); | |||
|
210 | YUE.on(checkboxes,'click', checkbox_checker); | |||
|
211 | ||||
|
212 | YUE.on('rev_range_clear','click',function(e){ | |||
|
213 | for (var i=0; i<checkboxes.length; i++){ | |||
|
214 | var cb = checkboxes[i]; | |||
|
215 | cb.checked = false; | |||
|
216 | } | |||
|
217 | YUE.preventDefault(e); | |||
|
218 | }); | |||
|
219 | ||||
|
220 | var msgs = YUQ('.message'); | |||
|
221 | // get first element height | |||
|
222 | var el = YUQ('#graph_content .container')[0]; | |||
|
223 | var row_h = el.clientHeight; | |||
|
224 | for(var i=0;i<msgs.length;i++){ | |||
|
225 | var m = msgs[i]; | |||
|
226 | ||||
|
227 | var h = m.clientHeight; | |||
|
228 | var pad = YUD.getStyle(m,'padding'); | |||
|
229 | if(h > row_h){ | |||
|
230 | var offset = row_h - (h+12); | |||
|
231 | YUD.setStyle(m.nextElementSibling,'display','block'); | |||
|
232 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); | |||
|
233 | }; | |||
|
234 | } | |||
|
235 | YUE.on(YUQ('.expand'),'click',function(e){ | |||
|
236 | var elem = e.currentTarget.parentNode.parentNode; | |||
|
237 | YUD.setStyle(e.currentTarget,'display','none'); | |||
|
238 | YUD.setStyle(elem,'height','auto'); | |||
|
239 | ||||
|
240 | //redraw the graph, line_count and jsdata are global vars | |||
275 | set_canvas(100); |
|
241 | set_canvas(100); | |
276 |
|
242 | |||
277 | var r = new BranchRenderer(); |
|
243 | var r = new BranchRenderer(); | |
278 | r.render(jsdata,100,line_count); |
|
244 | r.render(jsdata,100,line_count); | |
279 |
|
245 | |||
280 | }); |
|
246 | }); | |
281 | </script> |
|
247 | ||
|
248 | // Fetch changeset details | |||
|
249 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ | |||
|
250 | var id = e.currentTarget.id; | |||
|
251 | var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"; | |||
|
252 | var url = url.replace('__CS__',id.replace('changed_total_','')); | |||
|
253 | ypjax(url,id,function(){tooltip_activate()}); | |||
|
254 | }); | |||
|
255 | ||||
|
256 | // change branch filter | |||
|
257 | YUE.on(YUD.get('branch_filter'),'change',function(e){ | |||
|
258 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; | |||
|
259 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; | |||
|
260 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; | |||
|
261 | var url = url.replace('__BRANCH__',selected_branch); | |||
|
262 | if(selected_branch != ''){ | |||
|
263 | window.location = url; | |||
|
264 | }else{ | |||
|
265 | window.location = url_main; | |||
|
266 | } | |||
|
267 | ||||
|
268 | }); | |||
|
269 | ||||
|
270 | function set_canvas(width) { | |||
|
271 | var c = document.getElementById('graph_nodes'); | |||
|
272 | var t = document.getElementById('graph_content'); | |||
|
273 | canvas = document.getElementById('graph_canvas'); | |||
|
274 | var div_h = t.clientHeight; | |||
|
275 | //c.style.height=div_h+'px'; | |||
|
276 | canvas.setAttribute('height',div_h); | |||
|
277 | //c.style.height=width+'px'; | |||
|
278 | canvas.setAttribute('width',width); | |||
|
279 | }; | |||
|
280 | var heads = 1; | |||
|
281 | var line_count = 0; | |||
|
282 | var jsdata = ${c.jsdata|n}; | |||
|
283 | ||||
|
284 | for (var i=0;i<jsdata.length;i++) { | |||
|
285 | var in_l = jsdata[i][2]; | |||
|
286 | for (var j in in_l) { | |||
|
287 | var m = in_l[j][1]; | |||
|
288 | if (m > line_count) | |||
|
289 | line_count = m; | |||
|
290 | } | |||
|
291 | } | |||
|
292 | set_canvas(100); | |||
|
293 | ||||
|
294 | var r = new BranchRenderer(); | |||
|
295 | r.render(jsdata,100,line_count); | |||
|
296 | ||||
|
297 | }); | |||
|
298 | </script> | |||
282 | %else: |
|
299 | %else: | |
283 | ${_('There are no changes yet')} |
|
300 | ${_('There are no changes yet')} | |
284 | %endif |
|
301 | %endif |
General Comments 0
You need to be logged in to leave comments.
Login now