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