##// END OF EJS Templates
new summary for opened pull requests...
marcink -
r2712:7224882c beta
parent child Browse files
Show More
@@ -192,6 +192,7 b' class PullrequestsController(BaseRepoCon'
192
192
193 reviewers_ids = map(int, filter(lambda v: v not in [None, ''],
193 reviewers_ids = map(int, filter(lambda v: v not in [None, ''],
194 request.POST.get('reviewers_ids', '').split(',')))
194 request.POST.get('reviewers_ids', '').split(',')))
195
195 PullRequestModel().update_reviewers(pull_request_id, reviewers_ids)
196 PullRequestModel().update_reviewers(pull_request_id, reviewers_ids)
196 Session.commit()
197 Session.commit()
197 return True
198 return True
@@ -266,12 +267,15 b' class PullrequestsController(BaseRepoCon'
266 cs_statuses[st.author.username] += [st]
267 cs_statuses[st.author.username] += [st]
267
268
268 c.pull_request_reviewers = []
269 c.pull_request_reviewers = []
270 c.pull_request_pending_reviewers = []
269 for o in c.pull_request.reviewers:
271 for o in c.pull_request.reviewers:
270 st = cs_statuses.get(o.user.username, None)
272 st = cs_statuses.get(o.user.username, None)
271 if st:
273 if st:
272 sorter = lambda k: k.version
274 sorter = lambda k: k.version
273 st = [(x, list(y)[0])
275 st = [(x, list(y)[0])
274 for x, y in (groupby(sorted(st, key=sorter), sorter))]
276 for x, y in (groupby(sorted(st, key=sorter), sorter))]
277 else:
278 c.pull_request_pending_reviewers.append(o.user)
275 c.pull_request_reviewers.append([o.user, st])
279 c.pull_request_reviewers.append([o.user, st])
276
280
277 # pull_requests repo_name we opened it against
281 # pull_requests repo_name we opened it against
@@ -22,14 +22,33 b''
22 %if c.pull_request.is_closed():
22 %if c.pull_request.is_closed():
23 <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))}</div>
23 <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))}</div>
24 %endif
24 %endif
25 <h3>${_('Title')}: ${c.pull_request.title}
25 <h3>${_('Title')}: ${c.pull_request.title}</h3>
26 <div class="changeset-status-container" style="float:none">
26
27 %if c.current_changeset_status:
27 <div class="form">
28 <div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div>
28 <div id="summary" class="fields">
29 <div class="changeset-status-ico" style="padding:4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div>
29 <div class="field">
30 %endif
30 <div class="label-summary">
31 </div>
31 <label>${_('Status')}:</label>
32 </h3>
32 </div>
33 <div class="input">
34 <div class="changeset-status-container" style="float:none;clear:both">
35 %if c.current_changeset_status:
36 <div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div>
37 <div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div>
38 %endif
39 </div>
40 </div>
41 </div>
42 <div class="field">
43 <div class="label-summary">
44 <label>${_('Still not reviewed by')}:</label>
45 </div>
46 <div class="input">
47 <div>${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div>
48 </div>
49 </div>
50 </div>
51 </div>
33 <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div>
52 <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div>
34 <div style="padding:4px 4px 10px 20px">
53 <div style="padding:4px 4px 10px 20px">
35 <div>${_('Created on')}: ${h.fmt_date(c.pull_request.created_on)}</div>
54 <div>${_('Created on')}: ${h.fmt_date(c.pull_request.created_on)}</div>
General Comments 0
You need to be logged in to leave comments. Login now