Show More
@@ -296,30 +296,30 b' ul.auth_plugins {' | |||
|
296 | 296 | } |
|
297 | 297 | } |
|
298 | 298 | |
|
299 | // Pull Requests | |
|
299 | ||
|
300 | // My Account PR list | |
|
301 | ||
|
302 | #show_closed { | |
|
303 | margin: 0 1em 0 0; | |
|
304 | } | |
|
300 | 305 | |
|
301 | 306 | .pullrequestlist { |
|
302 | max-width: @pullrequest-width; | |
|
303 | margin-bottom: @space; | |
|
304 | ||
|
305 | // Tweaks for "My Account" / "Pull requests" | |
|
306 | .prwrapper { | |
|
307 | clear: left; | |
|
307 | .closed { | |
|
308 | background-color: @grey6; | |
|
309 | } | |
|
310 | .td-status { | |
|
311 | padding-left: .5em; | |
|
312 | } | |
|
313 | .truncate { | |
|
314 | height: 2.75em; | |
|
315 | white-space: pre-line; | |
|
316 | } | |
|
317 | table.rctable .user { | |
|
318 | padding-left: 0; | |
|
319 | } | |
|
320 | } | |
|
308 | 321 | |
|
309 | .pr { | |
|
310 | margin: 0; | |
|
311 | padding: 0; | |
|
312 | border-bottom: none; | |
|
313 | } | |
|
314 | ||
|
315 | // TODO: johbo: Replace with something that makes up an inline form or | |
|
316 | // similar. | |
|
317 | .repolist_actions { | |
|
318 | display: inline-block; | |
|
319 | } | |
|
320 | } | |
|
321 | ||
|
322 | } | |
|
322 | // Pull Requests | |
|
323 | 323 | |
|
324 | 324 | .pullrequests_section_head { |
|
325 | 325 | display: block; |
@@ -1086,6 +1086,7 b' table.issuetracker {' | |||
|
1086 | 1086 | } |
|
1087 | 1087 | } |
|
1088 | 1088 | |
|
1089 | ||
|
1089 | 1090 | //Permissions Settings |
|
1090 | 1091 | #add_perm { |
|
1091 | 1092 | margin: 0 0 @padding; |
@@ -1,13 +1,12 b'' | |||
|
1 | <%namespace name="base" file="/base/base.html"/> | |
|
1 | 2 | |
|
2 | 3 | <div class="panel panel-default"> |
|
3 | 4 | <div class="panel-body"> |
|
4 | <div class="field"> | |
|
5 | 5 | %if c.show_closed: |
|
6 | 6 | ${h.checkbox('show_closed',checked="checked", label=_('Show Closed Pull Requests'))} |
|
7 | 7 | %else: |
|
8 | 8 | ${h.checkbox('show_closed',label=_('Show Closed Pull Requests'))} |
|
9 | 9 | %endif |
|
10 | </div> | |
|
11 | 10 | </div> |
|
12 | 11 | </div> |
|
13 | 12 | |
@@ -15,29 +14,57 b'' | |||
|
15 | 14 | <div class="panel-heading"> |
|
16 | 15 | <h3 class="panel-title">${_('Pull Requests You Opened')}</h3> |
|
17 | 16 | </div> |
|
18 | ||
|
19 | 17 | <div class="panel-body"> |
|
20 | 18 | <div class="pullrequestlist"> |
|
21 | 19 | %if c.my_pull_requests: |
|
20 | <table class="rctable"> | |
|
21 | <thead> | |
|
22 | <th class="td-status"></th> | |
|
23 | <th>${_('Target Repo')}</th> | |
|
24 | <th>${_('Author')}</th> | |
|
25 | <th></th> | |
|
26 | <th>${_('Title')}</th> | |
|
27 | <th class="td-time">${_('Opened On')}</th> | |
|
28 | <th></th> | |
|
29 | </thead> | |
|
22 | 30 | %for pull_request in c.my_pull_requests: |
|
23 |
< |
|
|
24 |
<d |
|
|
31 | <tr class="${'closed' if pull_request.is_closed() else ''} prwrapper"> | |
|
32 | <td class="td-status"> | |
|
25 | 33 | <div class="${'flag_status %s' % pull_request.calculated_review_status()} pull-left"></div> |
|
26 | <a href="${h.url('pullrequest_show',repo_name=pull_request.target_repo.repo_name,pull_request_id=pull_request.pull_request_id)}"> | |
|
27 | ${_('Pull request #%s opened on %s') % (pull_request.pull_request_id, h.format_date(pull_request.created_on))} | |
|
28 | %if pull_request.is_closed(): | |
|
29 | (${_('Closed')}) | |
|
30 | %endif | |
|
31 | </a> | |
|
32 | <div class="repolist_actions"> | |
|
33 | ${h.secure_form(url('pullrequest_delete', repo_name=pull_request.target_repo.repo_name, pull_request_id=pull_request.pull_request_id),method='delete')} | |
|
34 | ${h.submit('remove_%s' % pull_request.pull_request_id, _('Delete'), | |
|
35 | class_="btn btn-link btn-danger",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} | |
|
36 | ${h.end_form()} | |
|
34 | </td> | |
|
35 | <td class="td-componentname"> | |
|
36 | ${h.link_to(pull_request.target_repo.repo_name,h.url('summary_home',repo_name=pull_request.target_repo.repo_name))} | |
|
37 | </td> | |
|
38 | <td class="user"> | |
|
39 | ${base.gravatar_with_user(pull_request.author.email, 16)} | |
|
40 | </td> | |
|
41 | <td class="td-message expand_commit" data-pr-id="m${pull_request.pull_request_id}" title="${_('Expand commit message')}"> | |
|
42 | <div class="show_more_col"> | |
|
43 | <i class="show_more"></i> | |
|
37 | 44 | </div> |
|
38 |
</d |
|
|
39 | </div> | |
|
45 | </td> | |
|
46 | <td class="mid td-description"> | |
|
47 | <div class="log-container truncate-wrap"> | |
|
48 | <div class="message truncate" id="c-m${pull_request.pull_request_id}"><a href="${h.url('pullrequest_show',repo_name=pull_request.target_repo.repo_name,pull_request_id=pull_request.pull_request_id)}">#${pull_request.pull_request_id}: ${pull_request.title}</a>\ | |
|
49 | %if pull_request.is_closed(): | |
|
50 | (${_('Closed')})\ | |
|
51 | %endif | |
|
52 | <br/>${pull_request.description}</div> | |
|
53 | </div> | |
|
54 | </td> | |
|
55 | ||
|
56 | <td class="td-time"> | |
|
57 | ${h.age_component(pull_request.created_on)} | |
|
58 | </td> | |
|
59 | <td class="td-action repolist_actions"> | |
|
60 | ${h.secure_form(url('pullrequest_delete', repo_name=pull_request.target_repo.repo_name, pull_request_id=pull_request.pull_request_id),method='delete')} | |
|
61 | ${h.submit('remove_%s' % pull_request.pull_request_id, _('Delete'), | |
|
62 | class_="btn btn-link btn-danger",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} | |
|
63 | ${h.end_form()} | |
|
64 | </td> | |
|
65 | </tr> | |
|
40 | 66 | %endfor |
|
67 | </table> | |
|
41 | 68 | %else: |
|
42 | 69 | <h2><span class="empty_data">${_('You currently have no open pull requests.')}</span></h2> |
|
43 | 70 | %endif |
@@ -53,21 +80,49 b'' | |||
|
53 | 80 | <div class="panel-body"> |
|
54 | 81 | <div class="pullrequestlist"> |
|
55 | 82 | %if c.participate_in_pull_requests: |
|
83 | <table class="rctable"> | |
|
84 | <thead> | |
|
85 | <th class="td-status"></th> | |
|
86 | <th>${_('Target Repo')}</th> | |
|
87 | <th>${_('Author')}</th> | |
|
88 | <th></th> | |
|
89 | <th>${_('Title')}</th> | |
|
90 | <th class="td-time">${_('Opened On')}</th> | |
|
91 | </thead> | |
|
56 | 92 | %for pull_request in c.participate_in_pull_requests: |
|
57 |
< |
|
|
58 |
<d |
|
|
59 | <div class="${'flag_status %s' % pull_request.calculated_review_status()} pull-left"></div> | |
|
60 | <a href="${h.url('pullrequest_show',repo_name=pull_request.target_repo.repo_name,pull_request_id=pull_request.pull_request_id)}"> | |
|
61 | ${_('Pull request #%s opened by %s on %s') % (pull_request.pull_request_id, pull_request.author.full_name, h.format_date(pull_request.created_on))} | |
|
62 | </a> | |
|
63 | %if pull_request.is_closed(): | |
|
64 | (${_('Closed')}) | |
|
65 | %endif | |
|
66 |
</d |
|
|
67 | </div> | |
|
93 | <tr class="${'closed' if pull_request.is_closed() else ''} prwrapper"> | |
|
94 | <td class="td-status"> | |
|
95 | <div class="${'flag_status %s' % pull_request.calculated_review_status()} pull-left"></div> | |
|
96 | </td> | |
|
97 | <td class="td-componentname"> | |
|
98 | ${h.link_to(pull_request.target_repo.repo_name,h.url('summary_home',repo_name=pull_request.target_repo.repo_name))} | |
|
99 | </td> | |
|
100 | <td class="user"> | |
|
101 | ${base.gravatar_with_user(pull_request.author.email, 16)} | |
|
102 | </td> | |
|
103 | <td class="td-message expand_commit" data-pr-id="p${pull_request.pull_request_id}" title="${_('Expand commit message')}"> | |
|
104 | <div class="show_more_col"> | |
|
105 | <i class="show_more"></i> | |
|
106 | </div> | |
|
107 | </td> | |
|
108 | <td class="mid td-description"> | |
|
109 | <div class="log-container truncate-wrap"> | |
|
110 | <div class="message truncate" id="c-p${pull_request.pull_request_id}"><a href="${h.url('pullrequest_show',repo_name=pull_request.target_repo.repo_name,pull_request_id=pull_request.pull_request_id)}">#${pull_request.pull_request_id}: ${pull_request.title}</a>\ | |
|
111 | %if pull_request.is_closed(): | |
|
112 | (${_('Closed')})\ | |
|
113 | %endif | |
|
114 | <br/>${pull_request.description}</div> | |
|
115 | </div> | |
|
116 | </td> | |
|
117 | ||
|
118 | <td class="td-time"> | |
|
119 | ${h.age_component(pull_request.created_on)} | |
|
120 | </td> | |
|
121 | </tr> | |
|
68 | 122 | %endfor |
|
123 | </table> | |
|
69 | 124 | %else: |
|
70 |
< |
|
|
125 | <h2 class="empty_data">${_('There are currently no open pull requests requiring your participation.')}</h2> | |
|
71 | 126 | %endif |
|
72 | 127 | </div> |
|
73 | 128 | </div> |
@@ -81,5 +136,18 b'' | |||
|
81 | 136 | else{ |
|
82 | 137 | window.location = "${h.url('my_account_pullrequests')}"; |
|
83 | 138 | } |
|
84 | }) | |
|
139 | }); | |
|
140 | $('.expand_commit').on('click',function(e){ | |
|
141 | var target_expand = $(this); | |
|
142 | var cid = target_expand.data('prId'); | |
|
143 | ||
|
144 | if (target_expand.hasClass('open')){ | |
|
145 | $('#c-'+cid).css({'height': '2.75em', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); | |
|
146 | target_expand.removeClass('open'); | |
|
147 | } | |
|
148 | else { | |
|
149 | $('#c-'+cid).css({'height': 'auto', 'text-overflow': 'initial', 'overflow':'visible'}); | |
|
150 | target_expand.addClass('open'); | |
|
151 | } | |
|
152 | }); | |
|
85 | 153 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now