##// END OF EJS Templates
pull-requests: added commit flow into pr listing tables
super-admin -
r5170:a77dd674 default
parent child Browse files
Show More
@@ -91,6 +91,10 b' formencode==2.0.1'
91 six==1.16.0
91 six==1.16.0
92 gunicorn==21.2.0
92 gunicorn==21.2.0
93 packaging==23.1
93 packaging==23.1
94 gevent==23.7.0
95 greenlet==2.0.2
96 zope.event==5.0.0
97 zope.interface==6.0.0
94 infrae.cache==1.0.1
98 infrae.cache==1.0.1
95 beaker==1.12.1
99 beaker==1.12.1
96 repoze.lru==0.7
100 repoze.lru==0.7
@@ -706,6 +706,7 b' class MyAccountView(BaseAppView, DataGri'
706 'my_status': _render('pullrequest_status',
706 'my_status': _render('pullrequest_status',
707 my_review_status),
707 my_review_status),
708 'title': _render('pullrequest_title', pr.title, pr.description),
708 'title': _render('pullrequest_title', pr.title, pr.description),
709 'pr_flow': _render('pullrequest_commit_flow', pr),
709 'description': h.escape(pr.description),
710 'description': h.escape(pr.description),
710 'updated_on': _render('pullrequest_updated_on',
711 'updated_on': _render('pullrequest_updated_on',
711 h.datetime_to_time(pr.updated_on),
712 h.datetime_to_time(pr.updated_on),
@@ -124,6 +124,7 b' class RepoPullRequestsView(RepoAppView, '
124 'my_status': _render('pullrequest_status',
124 'my_status': _render('pullrequest_status',
125 my_review_status),
125 my_review_status),
126 'title': _render('pullrequest_title', pr.title, pr.description),
126 'title': _render('pullrequest_title', pr.title, pr.description),
127 'pr_flow': _render('pullrequest_commit_flow', pr),
127 'description': h.escape(pr.description),
128 'description': h.escape(pr.description),
128 'updated_on': _render('pullrequest_updated_on',
129 'updated_on': _render('pullrequest_updated_on',
129 h.datetime_to_time(pr.updated_on),
130 h.datetime_to_time(pr.updated_on),
@@ -95,6 +95,12 b''
95 },
95 },
96 {
96 {
97 data: {
97 data: {
98 "_": "pr_flow",
99 "sort": "pr_flow"
100 }, title: "${_('Flow')}", className: "td-componentname"
101 },
102 {
103 data: {
98 "_": "author",
104 "_": "author",
99 "sort": "author_raw"
105 "sort": "author_raw"
100 }, title: "${_('Author')}", className: "td-user", orderable: false
106 }, title: "${_('Author')}", className: "td-user", orderable: false
@@ -374,6 +374,25 b''
374 ${title}
374 ${title}
375 </%def>
375 </%def>
376
376
377 <%def name="pullrequest_commit_flow(pull_request)">
378 <div class="pr-commit-flow">
379 <%!
380 def pr_ref_type_to_icon(ref_type):
381 return dict(
382 branch='branch',
383 book='bookmark',
384 rev='history',
385 ).get(ref_type, 'branch')
386
387 %>
388 ## Source
389 <code class="pr-source-info"><i class="icon-${pr_ref_type_to_icon(pull_request.source_ref_parts.type)}"></i>${pull_request.source_ref_parts.name}</code>
390 &rarr;
391 ## Target
392 <code class="pr-target-info"><i class="icon-${pr_ref_type_to_icon(pull_request.target_ref_parts.type)}"></i>${pull_request.target_ref_parts.name}</code>
393 </div>
394 </%def>
395
377 <%def name="pullrequest_comments(comments_nr)">
396 <%def name="pullrequest_comments(comments_nr)">
378 <i class="icon-comment"></i> ${comments_nr}
397 <i class="icon-comment"></i> ${comments_nr}
379 </%def>
398 </%def>
@@ -91,48 +91,54 b''
91 pageLength: ${c.visual.dashboard_items},
91 pageLength: ${c.visual.dashboard_items},
92 order: [[ 2, "desc" ]],
92 order: [[ 2, "desc" ]],
93 columns: [
93 columns: [
94 {
94 {
95 data: {
95 data: {
96 "_": "status",
96 "_": "status",
97 "sort": "status"
97 "sort": "status"
98 }, title: "PR", className: "td-status", orderable: false
98 }, title: "PR", className: "td-status", orderable: false
99 },
99 },
100 {
100 {
101 data: {
101 data: {
102 "_": "my_status",
102 "_": "my_status",
103 "sort": "status"
103 "sort": "status"
104 }, title: "You", className: "td-status", orderable: false
104 }, title: "You", className: "td-status", orderable: false
105 },
105 },
106 {
106 {
107 data: {
107 data: {
108 "_": "name",
108 "_": "name",
109 "sort": "name_raw"
109 "sort": "name_raw"
110 }, title: "${_('Id')}", className: "td-componentname", "type": "num"
110 }, title: "${_('Id')}", className: "td-componentname", "type": "num"
111 },
111 },
112 {
112 {
113 data: {
113 data: {
114 "_": "title",
114 "_": "title",
115 "sort": "title"
115 "sort": "title"
116 }, title: "${_('Title')}", className: "td-description"
116 }, title: "${_('Title')}", className: "td-description"
117 },
117 },
118 {
118 {
119 data: {
119 data: {
120 "_": "author",
120 "_": "pr_flow",
121 "sort": "author_raw"
121 "sort": "pr_flow"
122 }, title: "${_('Author')}", className: "td-user", orderable: false
122 }, title: "${_('Flow')}", className: "td-componentname"
123 },
123 },
124 {
124 {
125 data: {
125 data: {
126 "_": "comments",
126 "_": "author",
127 "sort": "comments_raw"
127 "sort": "author_raw"
128 }, title: "", className: "td-comments", orderable: false
128 }, title: "${_('Author')}", className: "td-user", orderable: false
129 },
129 },
130 {
130 {
131 data: {
131 data: {
132 "_": "updated_on",
132 "_": "comments",
133 "sort": "updated_on_raw"
133 "sort": "comments_raw"
134 }, title: "${_('Last Update')}", className: "td-time"
134 }, title: "", className: "td-comments", orderable: false
135 }
135 },
136 {
137 data: {
138 "_": "updated_on",
139 "sort": "updated_on_raw"
140 }, title: "${_('Last Update')}", className: "td-time"
141 }
136 ],
142 ],
137 language: {
143 language: {
138 paginate: DEFAULT_GRID_PAGINATION,
144 paginate: DEFAULT_GRID_PAGINATION,
General Comments 0
You need to be logged in to leave comments. Login now