##// END OF EJS Templates
pull-requests: reorder navigation on repo pull requests, fixes #2995
marcink -
r283:d0db6bab default
parent child Browse files
Show More
@@ -1,132 +1,132 b''
1 1 <%inherit file="/base/base.html"/>
2 2
3 3 <%def name="title()">
4 4 ${_('%s Pull Requests') % c.repo_name}
5 5 %if c.rhodecode_name:
6 6 &middot; ${h.branding(c.rhodecode_name)}
7 7 %endif
8 8 </%def>
9 9
10 10 <%def name="breadcrumbs_links()">
11 11
12 12 </%def>
13 13
14 14 <%def name="menu_bar_nav()">
15 15 ${self.menu_items(active='repositories')}
16 16 </%def>
17 17
18 18
19 19 <%def name="menu_bar_subnav()">
20 20 ${self.repo_menu(active='showpullrequest')}
21 21 </%def>
22 22
23 23
24 24 <%def name="main()">
25 25 <div class="box">
26 26 <div class="title">
27 27 ${self.repo_page_title(c.rhodecode_db_repo)}
28 28
29 29 <ul class="links">
30 30 <li>
31 31 %if c.rhodecode_user.username != h.DEFAULT_USER:
32 32 <span>
33 33 <a id="open_new_pull_request" class="btn btn-small btn-success" href="${h.url('pullrequest_home',repo_name=c.repo_name)}">
34 34 ${_('Open new Pull Request')}
35 35 </a>
36 36 </span>
37 37 %endif
38 38 </li>
39 39 </ul>
40 40
41 41 ${self.breadcrumbs()}
42 42 </div>
43 43
44 44 <div class="sidebar-col-wrapper">
45 45 ##main
46 46 <div class="sidebar">
47 47 <ul class="nav nav-pills nav-stacked">
48 48 <li class="${'active' if c.active=='open' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=0)}">${_('Opened')}</a></li>
49 49 <li class="${'active' if c.active=='my' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=0,my=1)}">${_('Opened by me')}</a></li>
50 <li class="${'active' if c.active=='awaiting' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=0,awaiting_review=1)}">${_('Awaiting review')}</a></li>
50 51 <li class="${'active' if c.active=='awaiting_my' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=0,awaiting_my_review=1)}">${_('Awaiting my review')}</a></li>
51 52 <li class="${'active' if c.active=='closed' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=0,closed=1)}">${_('Closed')}</a></li>
52 <li class="${'active' if c.active=='awaiting' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=0,awaiting_review=1)}">${_('Awaiting review')}</a></li>
53 53 <li class="${'active' if c.active=='source' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=1)}">${_('From this repo')}</a></li>
54 54 </ul>
55 55 </div>
56 56
57 57 <div class="main-content-full-width">
58 58 <div class="panel panel-default">
59 59 <div class="panel-heading">
60 60 <h3 class="panel-title">
61 61 %if c.source:
62 62 ${_('Pull Requests from %(repo_name)s repository') % {'repo_name': c.repo_name}}
63 63 %elif c.closed:
64 64 ${_('Closed Pull Requests to repository %(repo_name)s') % {'repo_name': c.repo_name}}
65 65 %elif c.my:
66 66 ${_('Pull Requests to %(repo_name)s repository opened by me') % {'repo_name': c.repo_name}}
67 67 %elif c.awaiting_review:
68 68 ${_('Pull Requests to %(repo_name)s repository awaiting review') % {'repo_name': c.repo_name}}
69 69 %elif c.awaiting_my_review:
70 70 ${_('Pull Requests to %(repo_name)s repository awaiting my review') % {'repo_name': c.repo_name}}
71 71 %else:
72 72 ${_('Pull Requests to %(repo_name)s repository') % {'repo_name': c.repo_name}}
73 73 %endif
74 74 </h3>
75 75 </div>
76 76 <div class="panel-body">
77 77 <table id="pull_request_list_table" class="display"></table>
78 78 </div>
79 79 </div>
80 80 </div>
81 81 </div>
82 82 </div>
83 83
84 84 <script type="text/javascript">
85 85 $(document).ready(function() {
86 86 // object list
87 87 $('#pull_request_list_table').DataTable({
88 88 data: ${c.data|n},
89 89 processing: true,
90 90 serverSide: true,
91 91 deferLoading: ${c.records_total},
92 92 ajax: "",
93 93 dom: 'tp',
94 94 pageLength: ${c.visual.dashboard_items},
95 95 order: [[ 1, "desc" ]],
96 96 columns: [
97 97 { data: {"_": "status",
98 98 "sort": "status"}, title: "", className: "td-status", orderable: false},
99 99 { data: {"_": "name",
100 100 "sort": "name_raw"}, title: "${_('Name')}", className: "td-componentname", "type": "num" },
101 101 { data: {"_": "author",
102 102 "sort": "author_raw"}, title: "${_('Author')}", className: "td-user", orderable: false },
103 103 { data: {"_": "title",
104 104 "sort": "title"}, title: "${_('Title')}", className: "td-description" },
105 105 { data: {"_": "comments",
106 106 "sort": "comments_raw"}, title: "", className: "td-comments", orderable: false},
107 107 { data: {"_": "updated_on",
108 108 "sort": "updated_on_raw"}, title: "${_('Updated on')}", className: "td-time" }
109 109 ],
110 110 language: {
111 111 paginate: DEFAULT_GRID_PAGINATION
112 112 },
113 113 "drawCallback": function( settings, json ) {
114 114 timeagoActivate();
115 115 tooltip_activate();
116 116 },
117 117 "createdRow": function ( row, data, index ) {
118 118 if (data['closed']) {
119 119 $(row).addClass('closed');
120 120 }
121 121 }
122 122 });
123 123 });
124 124 $('#pull_request_list_table').on('xhr.dt', function(e, settings, json, xhr){
125 125 $('#pull_request_list_table').css('opacity', 1);
126 126 });
127 127
128 128 $('#pull_request_list_table').on('preXhr.dt', function(e, settings, data){
129 129 $('#pull_request_list_table').css('opacity', 0.3);
130 130 });
131 131 </script>
132 132 </%def>
General Comments 0
You need to be logged in to leave comments. Login now