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