##// END OF EJS Templates
pull-requests: add indication of state change in list of pull-requests and actually show them in the list.
dan -
r3816:18ef8156 stable
parent child Browse files
Show More
@@ -669,8 +669,7 b' class MyAccountView(BaseAppView, DataGri'
669 'name_raw': pr.pull_request_id,
669 'name_raw': pr.pull_request_id,
670 'status': _render('pullrequest_status',
670 'status': _render('pullrequest_status',
671 pr.calculated_review_status()),
671 pr.calculated_review_status()),
672 'title': _render(
672 'title': _render('pullrequest_title', pr.title, pr.description),
673 'pullrequest_title', pr.title, pr.description),
674 'description': h.escape(pr.description),
673 'description': h.escape(pr.description),
675 'updated_on': _render('pullrequest_updated_on',
674 'updated_on': _render('pullrequest_updated_on',
676 h.datetime_to_time(pr.updated_on)),
675 h.datetime_to_time(pr.updated_on)),
@@ -678,6 +677,7 b' class MyAccountView(BaseAppView, DataGri'
678 'created_on': _render('pullrequest_updated_on',
677 'created_on': _render('pullrequest_updated_on',
679 h.datetime_to_time(pr.created_on)),
678 h.datetime_to_time(pr.created_on)),
680 'created_on_raw': h.datetime_to_time(pr.created_on),
679 'created_on_raw': h.datetime_to_time(pr.created_on),
680 'state': pr.pull_request_state,
681 'author': _render('pullrequest_author',
681 'author': _render('pullrequest_author',
682 pr.author.full_contact, ),
682 pr.author.full_contact, ),
683 'author_raw': pr.author.full_name,
683 'author_raw': pr.author.full_name,
@@ -112,8 +112,7 b' class RepoPullRequestsView(RepoAppView, '
112 'name_raw': pr.pull_request_id,
112 'name_raw': pr.pull_request_id,
113 'status': _render('pullrequest_status',
113 'status': _render('pullrequest_status',
114 pr.calculated_review_status()),
114 pr.calculated_review_status()),
115 'title': _render(
115 'title': _render('pullrequest_title', pr.title, pr.description),
116 'pullrequest_title', pr.title, pr.description),
117 'description': h.escape(pr.description),
116 'description': h.escape(pr.description),
118 'updated_on': _render('pullrequest_updated_on',
117 'updated_on': _render('pullrequest_updated_on',
119 h.datetime_to_time(pr.updated_on)),
118 h.datetime_to_time(pr.updated_on)),
@@ -121,6 +120,7 b' class RepoPullRequestsView(RepoAppView, '
121 'created_on': _render('pullrequest_updated_on',
120 'created_on': _render('pullrequest_updated_on',
122 h.datetime_to_time(pr.created_on)),
121 h.datetime_to_time(pr.created_on)),
123 'created_on_raw': h.datetime_to_time(pr.created_on),
122 'created_on_raw': h.datetime_to_time(pr.created_on),
123 'state': pr.pull_request_state,
124 'author': _render('pullrequest_author',
124 'author': _render('pullrequest_author',
125 pr.author.full_contact, ),
125 pr.author.full_contact, ),
126 'author_raw': pr.author.full_name,
126 'author_raw': pr.author.full_name,
@@ -139,7 +139,7 b' class PullRequestModel(BaseModel):'
139
139
140 def _prepare_get_all_query(self, repo_name, source=False, statuses=None,
140 def _prepare_get_all_query(self, repo_name, source=False, statuses=None,
141 opened_by=None, order_by=None,
141 opened_by=None, order_by=None,
142 order_dir='desc', only_created=True):
142 order_dir='desc', only_created=False):
143 repo = None
143 repo = None
144 if repo_name:
144 if repo_name:
145 repo = self._get_repo(repo_name)
145 repo = self._get_repo(repo_name)
@@ -333,10 +333,18 b' ul.auth_plugins {'
333 margin: 0 1em 0 0;
333 margin: 0 1em 0 0;
334 }
334 }
335
335
336 .pullrequestlist {
336 #pull_request_list_table {
337 .closed {
337 .closed {
338 background-color: @grey6;
338 background-color: @grey6;
339 }
339 }
340
341 .state-creating,
342 .state-updating,
343 .state-merging
344 {
345 background-color: @grey6;
346 }
347
340 .td-status {
348 .td-status {
341 padding-left: .5em;
349 padding-left: .5em;
342 }
350 }
@@ -77,6 +77,9 b''
77 if (data['owned']) {
77 if (data['owned']) {
78 $(row).addClass('owned');
78 $(row).addClass('owned');
79 }
79 }
80 if (data['state'] !== 'created') {
81 $(row).addClass('state-' + data['state']);
82 }
80 }
83 }
81 });
84 });
82 $pullRequestListTable.on('xhr.dt', function(e, settings, json, xhr){
85 $pullRequestListTable.on('xhr.dt', function(e, settings, json, xhr){
@@ -100,6 +100,9 b''
100 if (data['closed']) {
100 if (data['closed']) {
101 $(row).addClass('closed');
101 $(row).addClass('closed');
102 }
102 }
103 if (data['state'] !== 'created') {
104 $(row).addClass('state-' + data['state']);
105 }
103 }
106 }
104 });
107 });
105
108
General Comments 0
You need to be logged in to leave comments. Login now