pull-requests: add indication of state change in list of pull-requests and actually show them in the list.
This commit is contained in:
parent
2912fa1059
commit
a6a1f6694a
6 changed files with 21 additions and 7 deletions
|
|
@ -669,8 +669,7 @@ class MyAccountView(BaseAppView, DataGridAppView):
|
|||
'name_raw': pr.pull_request_id,
|
||||
'status': _render('pullrequest_status',
|
||||
pr.calculated_review_status()),
|
||||
'title': _render(
|
||||
'pullrequest_title', pr.title, pr.description),
|
||||
'title': _render('pullrequest_title', pr.title, pr.description),
|
||||
'description': h.escape(pr.description),
|
||||
'updated_on': _render('pullrequest_updated_on',
|
||||
h.datetime_to_time(pr.updated_on)),
|
||||
|
|
@ -678,6 +677,7 @@ class MyAccountView(BaseAppView, DataGridAppView):
|
|||
'created_on': _render('pullrequest_updated_on',
|
||||
h.datetime_to_time(pr.created_on)),
|
||||
'created_on_raw': h.datetime_to_time(pr.created_on),
|
||||
'state': pr.pull_request_state,
|
||||
'author': _render('pullrequest_author',
|
||||
pr.author.full_contact, ),
|
||||
'author_raw': pr.author.full_name,
|
||||
|
|
|
|||
|
|
@ -112,8 +112,7 @@ class RepoPullRequestsView(RepoAppView, DataGridAppView):
|
|||
'name_raw': pr.pull_request_id,
|
||||
'status': _render('pullrequest_status',
|
||||
pr.calculated_review_status()),
|
||||
'title': _render(
|
||||
'pullrequest_title', pr.title, pr.description),
|
||||
'title': _render('pullrequest_title', pr.title, pr.description),
|
||||
'description': h.escape(pr.description),
|
||||
'updated_on': _render('pullrequest_updated_on',
|
||||
h.datetime_to_time(pr.updated_on)),
|
||||
|
|
@ -121,6 +120,7 @@ class RepoPullRequestsView(RepoAppView, DataGridAppView):
|
|||
'created_on': _render('pullrequest_updated_on',
|
||||
h.datetime_to_time(pr.created_on)),
|
||||
'created_on_raw': h.datetime_to_time(pr.created_on),
|
||||
'state': pr.pull_request_state,
|
||||
'author': _render('pullrequest_author',
|
||||
pr.author.full_contact, ),
|
||||
'author_raw': pr.author.full_name,
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class PullRequestModel(BaseModel):
|
|||
|
||||
def _prepare_get_all_query(self, repo_name, source=False, statuses=None,
|
||||
opened_by=None, order_by=None,
|
||||
order_dir='desc', only_created=True):
|
||||
order_dir='desc', only_created=False):
|
||||
repo = None
|
||||
if repo_name:
|
||||
repo = self._get_repo(repo_name)
|
||||
|
|
|
|||
|
|
@ -333,10 +333,18 @@ ul.auth_plugins {
|
|||
margin: 0 1em 0 0;
|
||||
}
|
||||
|
||||
.pullrequestlist {
|
||||
#pull_request_list_table {
|
||||
.closed {
|
||||
background-color: @grey6;
|
||||
}
|
||||
|
||||
.state-creating,
|
||||
.state-updating,
|
||||
.state-merging
|
||||
{
|
||||
background-color: @grey6;
|
||||
}
|
||||
|
||||
.td-status {
|
||||
padding-left: .5em;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@ $(document).ready(function() {
|
|||
if (data['owned']) {
|
||||
$(row).addClass('owned');
|
||||
}
|
||||
if (data['state'] !== 'created') {
|
||||
$(row).addClass('state-' + data['state']);
|
||||
}
|
||||
}
|
||||
});
|
||||
$pullRequestListTable.on('xhr.dt', function(e, settings, json, xhr){
|
||||
|
|
|
|||
|
|
@ -98,7 +98,10 @@ $(document).ready(function() {
|
|||
},
|
||||
"createdRow": function ( row, data, index ) {
|
||||
if (data['closed']) {
|
||||
$(row).addClass('closed');
|
||||
$(row).addClass('closed');
|
||||
}
|
||||
if (data['state'] !== 'created') {
|
||||
$(row).addClass('state-' + data['state']);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue