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 | .pullrequestlist { |
|
306 | .pullrequestlist { | |
302 | max-width: @pullrequest-width; |
|
307 | .closed { | |
303 | margin-bottom: @space; |
|
308 | background-color: @grey6; | |
304 |
|
309 | } | ||
305 | // Tweaks for "My Account" / "Pull requests" |
|
310 | .td-status { | |
306 | .prwrapper { |
|
311 | padding-left: .5em; | |
307 | clear: left; |
|
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 { |
|
322 | // Pull Requests | |
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 | } |
|
|||
323 |
|
323 | |||
324 | .pullrequests_section_head { |
|
324 | .pullrequests_section_head { | |
325 | display: block; |
|
325 | display: block; | |
@@ -1086,6 +1086,7 b' table.issuetracker {' | |||||
1086 | } |
|
1086 | } | |
1087 | } |
|
1087 | } | |
1088 |
|
1088 | |||
|
1089 | ||||
1089 | //Permissions Settings |
|
1090 | //Permissions Settings | |
1090 | #add_perm { |
|
1091 | #add_perm { | |
1091 | margin: 0 0 @padding; |
|
1092 | margin: 0 0 @padding; |
@@ -1,13 +1,12 b'' | |||||
|
1 | <%namespace name="base" file="/base/base.html"/> | |||
1 |
|
2 | |||
2 | <div class="panel panel-default"> |
|
3 | <div class="panel panel-default"> | |
3 | <div class="panel-body"> |
|
4 | <div class="panel-body"> | |
4 | <div class="field"> |
|
|||
5 | %if c.show_closed: |
|
5 | %if c.show_closed: | |
6 | ${h.checkbox('show_closed',checked="checked", label=_('Show Closed Pull Requests'))} |
|
6 | ${h.checkbox('show_closed',checked="checked", label=_('Show Closed Pull Requests'))} | |
7 | %else: |
|
7 | %else: | |
8 | ${h.checkbox('show_closed',label=_('Show Closed Pull Requests'))} |
|
8 | ${h.checkbox('show_closed',label=_('Show Closed Pull Requests'))} | |
9 | %endif |
|
9 | %endif | |
10 | </div> |
|
|||
11 | </div> |
|
10 | </div> | |
12 | </div> |
|
11 | </div> | |
13 |
|
12 | |||
@@ -15,29 +14,57 b'' | |||||
15 | <div class="panel-heading"> |
|
14 | <div class="panel-heading"> | |
16 | <h3 class="panel-title">${_('Pull Requests You Opened')}</h3> |
|
15 | <h3 class="panel-title">${_('Pull Requests You Opened')}</h3> | |
17 | </div> |
|
16 | </div> | |
18 |
|
||||
19 | <div class="panel-body"> |
|
17 | <div class="panel-body"> | |
20 | <div class="pullrequestlist"> |
|
18 | <div class="pullrequestlist"> | |
21 | %if c.my_pull_requests: |
|
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 | %for pull_request in c.my_pull_requests: |
|
30 | %for pull_request in c.my_pull_requests: | |
23 |
< |
|
31 | <tr class="${'closed' if pull_request.is_closed() else ''} prwrapper"> | |
24 |
<d |
|
32 | <td class="td-status"> | |
25 | <div class="${'flag_status %s' % pull_request.calculated_review_status()} pull-left"></div> |
|
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)}"> |
|
34 | </td> | |
27 | ${_('Pull request #%s opened on %s') % (pull_request.pull_request_id, h.format_date(pull_request.created_on))} |
|
35 | <td class="td-componentname"> | |
28 | %if pull_request.is_closed(): |
|
36 | ${h.link_to(pull_request.target_repo.repo_name,h.url('summary_home',repo_name=pull_request.target_repo.repo_name))} | |
29 | (${_('Closed')}) |
|
37 | </td> | |
30 | %endif |
|
38 | <td class="user"> | |
31 | </a> |
|
39 | ${base.gravatar_with_user(pull_request.author.email, 16)} | |
32 | <div class="repolist_actions"> |
|
40 | </td> | |
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')} |
|
41 | <td class="td-message expand_commit" data-pr-id="m${pull_request.pull_request_id}" title="${_('Expand commit message')}"> | |
34 | ${h.submit('remove_%s' % pull_request.pull_request_id, _('Delete'), |
|
42 | <div class="show_more_col"> | |
35 | class_="btn btn-link btn-danger",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} |
|
43 | <i class="show_more"></i> | |
36 | ${h.end_form()} |
|
|||
37 | </div> |
|
44 | </div> | |
38 |
</d |
|
45 | </td> | |
39 | </div> |
|
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 | %endfor |
|
66 | %endfor | |
|
67 | </table> | |||
41 | %else: |
|
68 | %else: | |
42 | <h2><span class="empty_data">${_('You currently have no open pull requests.')}</span></h2> |
|
69 | <h2><span class="empty_data">${_('You currently have no open pull requests.')}</span></h2> | |
43 | %endif |
|
70 | %endif | |
@@ -53,21 +80,49 b'' | |||||
53 | <div class="panel-body"> |
|
80 | <div class="panel-body"> | |
54 | <div class="pullrequestlist"> |
|
81 | <div class="pullrequestlist"> | |
55 | %if c.participate_in_pull_requests: |
|
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 | %for pull_request in c.participate_in_pull_requests: |
|
92 | %for pull_request in c.participate_in_pull_requests: | |
57 |
< |
|
93 | <tr class="${'closed' if pull_request.is_closed() else ''} prwrapper"> | |
58 |
<d |
|
94 | <td class="td-status"> | |
59 | <div class="${'flag_status %s' % pull_request.calculated_review_status()} pull-left"></div> |
|
95 | <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)}"> |
|
96 | </td> | |
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))} |
|
97 | <td class="td-componentname"> | |
62 | </a> |
|
98 | ${h.link_to(pull_request.target_repo.repo_name,h.url('summary_home',repo_name=pull_request.target_repo.repo_name))} | |
63 | %if pull_request.is_closed(): |
|
99 | </td> | |
64 | (${_('Closed')}) |
|
100 | <td class="user"> | |
65 | %endif |
|
101 | ${base.gravatar_with_user(pull_request.author.email, 16)} | |
66 |
</d |
|
102 | </td> | |
67 | </div> |
|
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 | %endfor |
|
122 | %endfor | |
|
123 | </table> | |||
69 | %else: |
|
124 | %else: | |
70 |
< |
|
125 | <h2 class="empty_data">${_('There are currently no open pull requests requiring your participation.')}</h2> | |
71 | %endif |
|
126 | %endif | |
72 | </div> |
|
127 | </div> | |
73 | </div> |
|
128 | </div> | |
@@ -81,5 +136,18 b'' | |||||
81 | else{ |
|
136 | else{ | |
82 | window.location = "${h.url('my_account_pullrequests')}"; |
|
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 | </script> |
|
153 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now