pull-requests: added awaiting my review filter for users pull-requests.
- additionally the awaiting my review now properly filters pull requests that have no review votes on them
This commit is contained in:
parent
0031dcc28b
commit
aded27dc31
11 changed files with 347 additions and 131 deletions
|
|
@ -1,17 +1,29 @@
|
|||
<%namespace name="base" file="/base/base.mako"/>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div style="height: 35px">
|
||||
<%
|
||||
selected_filter = 'all'
|
||||
if c.closed:
|
||||
selected_filter = 'all_closed'
|
||||
%>
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">${_('Pull Requests You Participate In')}</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body panel-body-min-height">
|
||||
<div class="title">
|
||||
<ul class="button-links">
|
||||
<li class="btn ${h.is_active('all', selected_filter)}"><a href="${h.route_path('my_account_pullrequests')}">${_('All')}</a></li>
|
||||
<li class="btn ${h.is_active('all_closed', selected_filter)}"><a href="${h.route_path('my_account_pullrequests', _query={'pr_show_closed':1})}">${_('All + Closed')}</a></li>
|
||||
<li><a class="btn ${h.is_active('all', c.selected_filter)}"
|
||||
href="${h.route_path('my_account_pullrequests', _query={})}">
|
||||
${_('Open')}
|
||||
</a>
|
||||
</li>
|
||||
<li><a class="btn ${h.is_active('all_closed', c.selected_filter)}"
|
||||
href="${h.route_path('my_account_pullrequests', _query={'closed':1})}">
|
||||
${_('All + Closed')}
|
||||
</a>
|
||||
</li>
|
||||
<li><a class="btn ${h.is_active('awaiting_my_review', c.selected_filter)}"
|
||||
href="${h.route_path('my_account_pullrequests', _query={'awaiting_my_review':1})}">
|
||||
|
||||
${_('Awaiting my review')}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="grid-quick-filter">
|
||||
|
|
@ -20,19 +32,13 @@
|
|||
<i class="icon-search"></i>
|
||||
</li>
|
||||
<li class="grid-filter-box-input">
|
||||
<input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
|
||||
<input class="q_filter_box" id="q_filter" size="15" type="text" name="filter"
|
||||
placeholder="${_('quick filter...')}" value=""/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">${_('Pull Requests You Participate In')}</h3>
|
||||
</div>
|
||||
<div class="panel-body panel-body-min-height">
|
||||
<table id="pull_request_list_table" class="rctable table-bordered"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -52,6 +58,7 @@
|
|||
"url": "${h.route_path('my_account_pullrequests_data')}",
|
||||
"data": function (d) {
|
||||
d.closed = "${c.closed}";
|
||||
d.awaiting_my_review = "${c.awaiting_my_review}";
|
||||
},
|
||||
"dataSrc": function (json) {
|
||||
return json.data;
|
||||
|
|
@ -60,13 +67,19 @@
|
|||
|
||||
dom: 'rtp',
|
||||
pageLength: ${c.visual.dashboard_items},
|
||||
order: [[1, "desc"]],
|
||||
order: [[2, "desc"]],
|
||||
columns: [
|
||||
{
|
||||
data: {
|
||||
"_": "status",
|
||||
"sort": "status"
|
||||
}, title: "", className: "td-status", orderable: false
|
||||
}, title: "PR", className: "td-status", orderable: false
|
||||
},
|
||||
{
|
||||
data: {
|
||||
"_": "my_status",
|
||||
"sort": "status"
|
||||
}, title: "You", className: "td-status", orderable: false
|
||||
},
|
||||
{
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -23,13 +23,14 @@
|
|||
|
||||
<div class="box">
|
||||
<div class="title">
|
||||
|
||||
<ul class="button-links">
|
||||
<li class="btn ${h.is_active('open', c.active)}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0})}">${_('Opened')}</a></li>
|
||||
<li class="btn ${h.is_active('my', c.active)}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'my':1})}">${_('Opened by me')}</a></li>
|
||||
<li class="btn ${h.is_active('awaiting', c.active)}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'awaiting_review':1})}">${_('Awaiting review')}</a></li>
|
||||
<li class="btn ${h.is_active('awaiting_my', c.active)}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'awaiting_my_review':1})}">${_('Awaiting my review')}</a></li>
|
||||
<li class="btn ${h.is_active('closed', c.active)}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'closed':1})}">${_('Closed')}</a></li>
|
||||
<li class="btn ${h.is_active('source', c.active)}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':1})}">${_('From this repo')}</a></li>
|
||||
<li><a class="btn ${h.is_active('open', c.active)}" href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'open':1})}">${_('Open')}</a></li>
|
||||
<li><a class="btn ${h.is_active('my', c.active)}" href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'my':1})}">${_('Created by me')}</a></li>
|
||||
<li><a class="btn ${h.is_active('awaiting', c.active)}" href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'awaiting_review':1})}">${_('Awaiting review')}</a></li>
|
||||
<li><a class="btn ${h.is_active('awaiting_my', c.active)}" href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'awaiting_my_review':1})}">${_('Awaiting my review')}</a></li>
|
||||
<li><a class="btn ${h.is_active('closed', c.active)}" href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'closed':1})}">${_('Closed')}</a></li>
|
||||
<li><a class="btn ${h.is_active('source', c.active)}" href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':1})}">${_('From this repo')}</a></li>
|
||||
</ul>
|
||||
|
||||
<ul class="links">
|
||||
|
|
@ -88,20 +89,50 @@ $(document).ready(function() {
|
|||
},
|
||||
dom: 'rtp',
|
||||
pageLength: ${c.visual.dashboard_items},
|
||||
order: [[ 1, "desc" ]],
|
||||
order: [[ 2, "desc" ]],
|
||||
columns: [
|
||||
{ data: {"_": "status",
|
||||
"sort": "status"}, title: "", className: "td-status", orderable: false},
|
||||
{ data: {"_": "name",
|
||||
"sort": "name_raw"}, title: "${_('Id')}", className: "td-componentname", "type": "num" },
|
||||
{ data: {"_": "title",
|
||||
"sort": "title"}, title: "${_('Title')}", className: "td-description" },
|
||||
{ data: {"_": "author",
|
||||
"sort": "author_raw"}, title: "${_('Author')}", className: "td-user", orderable: false },
|
||||
{ data: {"_": "comments",
|
||||
"sort": "comments_raw"}, title: "", className: "td-comments", orderable: false},
|
||||
{ data: {"_": "updated_on",
|
||||
"sort": "updated_on_raw"}, title: "${_('Last Update')}", className: "td-time" }
|
||||
{
|
||||
data: {
|
||||
"_": "status",
|
||||
"sort": "status"
|
||||
}, title: "PR", className: "td-status", orderable: false
|
||||
},
|
||||
{
|
||||
data: {
|
||||
"_": "my_status",
|
||||
"sort": "status"
|
||||
}, title: "You", className: "td-status", orderable: false
|
||||
},
|
||||
{
|
||||
data: {
|
||||
"_": "name",
|
||||
"sort": "name_raw"
|
||||
}, title: "${_('Id')}", className: "td-componentname", "type": "num"
|
||||
},
|
||||
{
|
||||
data: {
|
||||
"_": "title",
|
||||
"sort": "title"
|
||||
}, title: "${_('Title')}", className: "td-description"
|
||||
},
|
||||
{
|
||||
data: {
|
||||
"_": "author",
|
||||
"sort": "author_raw"
|
||||
}, title: "${_('Author')}", className: "td-user", orderable: false
|
||||
},
|
||||
{
|
||||
data: {
|
||||
"_": "comments",
|
||||
"sort": "comments_raw"
|
||||
}, title: "", className: "td-comments", orderable: false
|
||||
},
|
||||
{
|
||||
data: {
|
||||
"_": "updated_on",
|
||||
"sort": "updated_on_raw"
|
||||
}, title: "${_('Last Update')}", className: "td-time"
|
||||
}
|
||||
],
|
||||
language: {
|
||||
paginate: DEFAULT_GRID_PAGINATION,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue