Show More
@@ -1,155 +1,155 b'' | |||
|
1 | 1 | <%namespace name="base" file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <div class="panel panel-default"> |
|
4 | 4 | <div class="panel-body"> |
|
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 | 10 | </div> |
|
11 | 11 | </div> |
|
12 | 12 | |
|
13 | 13 | <div class="panel panel-default"> |
|
14 | 14 | <div class="panel-heading"> |
|
15 | <h3 class="panel-title">${_('Pull Requests You Opened')}</h3> | |
|
15 | <h3 class="panel-title">${_('Pull Requests You Opened')}: ${len(c.my_pull_requests)}</h3> | |
|
16 | 16 | </div> |
|
17 | 17 | <div class="panel-body"> |
|
18 | 18 | <div class="pullrequestlist"> |
|
19 | 19 | %if c.my_pull_requests: |
|
20 | 20 | <table class="rctable"> |
|
21 | 21 | <thead> |
|
22 | 22 | <th class="td-status"></th> |
|
23 | 23 | <th>${_('Target Repo')}</th> |
|
24 | 24 | <th>${_('Author')}</th> |
|
25 | 25 | <th></th> |
|
26 | 26 | <th>${_('Title')}</th> |
|
27 | 27 | <th class="td-time">${_('Last Update')}</th> |
|
28 | 28 | <th></th> |
|
29 | 29 | </thead> |
|
30 | 30 | %for pull_request in c.my_pull_requests: |
|
31 | 31 | <tr class="${'closed' if pull_request.is_closed() else ''} prwrapper"> |
|
32 | 32 | <td class="td-status"> |
|
33 | 33 | <div class="${'flag_status %s' % pull_request.calculated_review_status()} pull-left"></div> |
|
34 | 34 | </td> |
|
35 | 35 | <td class="truncate-wrap td-componentname"> |
|
36 | 36 | <div class="truncate"> |
|
37 | 37 | ${h.link_to(pull_request.target_repo.repo_name,h.url('summary_home',repo_name=pull_request.target_repo.repo_name))} |
|
38 | 38 | </div> |
|
39 | 39 | </td> |
|
40 | 40 | <td class="user"> |
|
41 | 41 | ${base.gravatar_with_user(pull_request.author.email, 16)} |
|
42 | 42 | </td> |
|
43 | 43 | <td class="td-message expand_commit" data-pr-id="m${pull_request.pull_request_id}" title="${_('Expand commit message')}"> |
|
44 | 44 | <div class="show_more_col"> |
|
45 | 45 | <i class="show_more"></i> |
|
46 | 46 | </div> |
|
47 | 47 | </td> |
|
48 | 48 | <td class="mid td-description"> |
|
49 | 49 | <div class="log-container truncate-wrap"> |
|
50 | 50 | <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>\ |
|
51 | 51 | %if pull_request.is_closed(): |
|
52 | 52 | (${_('Closed')})\ |
|
53 | 53 | %endif |
|
54 | 54 | <br/>${pull_request.description}</div> |
|
55 | 55 | </div> |
|
56 | 56 | </td> |
|
57 | 57 | <td class="td-time"> |
|
58 | 58 | ${h.age_component(pull_request.updated_on)} |
|
59 | 59 | </td> |
|
60 | 60 | <td class="td-action repolist_actions"> |
|
61 | 61 | ${h.secure_form(url('pullrequest_delete', repo_name=pull_request.target_repo.repo_name, pull_request_id=pull_request.pull_request_id),method='delete')} |
|
62 | 62 | ${h.submit('remove_%s' % pull_request.pull_request_id, _('Delete'), |
|
63 | 63 | class_="btn btn-link btn-danger",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} |
|
64 | 64 | ${h.end_form()} |
|
65 | 65 | </td> |
|
66 | 66 | </tr> |
|
67 | 67 | %endfor |
|
68 | 68 | </table> |
|
69 | 69 | %else: |
|
70 | 70 | <h2><span class="empty_data">${_('You currently have no open pull requests.')}</span></h2> |
|
71 | 71 | %endif |
|
72 | 72 | </div> |
|
73 | 73 | </div> |
|
74 | 74 | </div> |
|
75 | 75 | |
|
76 | 76 | <div class="panel panel-default"> |
|
77 | 77 | <div class="panel-heading"> |
|
78 | <h3 class="panel-title">${_('Pull Requests You Participate In')}</h3> | |
|
78 | <h3 class="panel-title">${_('Pull Requests You Participate In')}: ${len(c.participate_in_pull_requests)}</h3> | |
|
79 | 79 | </div> |
|
80 | 80 | |
|
81 | 81 | <div class="panel-body"> |
|
82 | 82 | <div class="pullrequestlist"> |
|
83 | 83 | %if c.participate_in_pull_requests: |
|
84 | 84 | <table class="rctable"> |
|
85 | 85 | <thead> |
|
86 | 86 | <th class="td-status"></th> |
|
87 | 87 | <th>${_('Target Repo')}</th> |
|
88 | 88 | <th>${_('Author')}</th> |
|
89 | 89 | <th></th> |
|
90 | 90 | <th>${_('Title')}</th> |
|
91 | 91 | <th class="td-time">${_('Last Update')}</th> |
|
92 | 92 | </thead> |
|
93 | 93 | %for pull_request in c.participate_in_pull_requests: |
|
94 | 94 | <tr class="${'closed' if pull_request.is_closed() else ''} prwrapper"> |
|
95 | 95 | <td class="td-status"> |
|
96 | 96 | <div class="${'flag_status %s' % pull_request.calculated_review_status()} pull-left"></div> |
|
97 | 97 | </td> |
|
98 | 98 | <td class="truncate-wrap td-componentname"> |
|
99 | 99 | <div class="truncate"> |
|
100 | 100 | ${h.link_to(pull_request.target_repo.repo_name,h.url('summary_home',repo_name=pull_request.target_repo.repo_name))} |
|
101 | 101 | </div> |
|
102 | 102 | </td> |
|
103 | 103 | <td class="user"> |
|
104 | 104 | ${base.gravatar_with_user(pull_request.author.email, 16)} |
|
105 | 105 | </td> |
|
106 | 106 | <td class="td-message expand_commit" data-pr-id="p${pull_request.pull_request_id}" title="${_('Expand commit message')}"> |
|
107 | 107 | <div class="show_more_col"> |
|
108 | 108 | <i class="show_more"></i> |
|
109 | 109 | </div> |
|
110 | 110 | </td> |
|
111 | 111 | <td class="mid td-description"> |
|
112 | 112 | <div class="log-container truncate-wrap"> |
|
113 | 113 | <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>\ |
|
114 | 114 | %if pull_request.is_closed(): |
|
115 | 115 | (${_('Closed')})\ |
|
116 | 116 | %endif |
|
117 | 117 | <br/>${pull_request.description}</div> |
|
118 | 118 | </div> |
|
119 | 119 | </td> |
|
120 | 120 | <td class="td-time"> |
|
121 | 121 | ${h.age_component(pull_request.updated_on)} |
|
122 | 122 | </td> |
|
123 | 123 | </tr> |
|
124 | 124 | %endfor |
|
125 | 125 | </table> |
|
126 | 126 | %else: |
|
127 | 127 | <h2 class="empty_data">${_('There are currently no open pull requests requiring your participation.')}</h2> |
|
128 | 128 | %endif |
|
129 | 129 | </div> |
|
130 | 130 | </div> |
|
131 | 131 | </div> |
|
132 | 132 | |
|
133 | 133 | <script> |
|
134 | 134 | $('#show_closed').on('click', function(e){ |
|
135 | 135 | if($(this).is(":checked")){ |
|
136 | 136 | window.location = "${h.url('my_account_pullrequests', pr_show_closed=1)}"; |
|
137 | 137 | } |
|
138 | 138 | else{ |
|
139 | 139 | window.location = "${h.url('my_account_pullrequests')}"; |
|
140 | 140 | } |
|
141 | 141 | }); |
|
142 | 142 | $('.expand_commit').on('click',function(e){ |
|
143 | 143 | var target_expand = $(this); |
|
144 | 144 | var cid = target_expand.data('prId'); |
|
145 | 145 | |
|
146 | 146 | if (target_expand.hasClass('open')){ |
|
147 | 147 | $('#c-'+cid).css({'height': '2.75em', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); |
|
148 | 148 | target_expand.removeClass('open'); |
|
149 | 149 | } |
|
150 | 150 | else { |
|
151 | 151 | $('#c-'+cid).css({'height': 'auto', 'text-overflow': 'initial', 'overflow':'visible'}); |
|
152 | 152 | target_expand.addClass('open'); |
|
153 | 153 | } |
|
154 | 154 | }); |
|
155 | 155 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now