Show More
@@ -1,157 +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 | 15 | <h3 class="panel-title">${_('Pull Requests You Opened')}</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 |
<th class="td-time">${_(' |
|
|
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 | ||
|
58 | 57 | <td class="td-time"> |
|
59 |
${h.age_component(pull_request. |
|
|
58 | ${h.age_component(pull_request.updated_on)} | |
|
60 | 59 | </td> |
|
61 | 60 | <td class="td-action repolist_actions"> |
|
62 | 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')} |
|
63 | 62 | ${h.submit('remove_%s' % pull_request.pull_request_id, _('Delete'), |
|
64 | 63 | class_="btn btn-link btn-danger",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} |
|
65 | 64 | ${h.end_form()} |
|
66 | 65 | </td> |
|
67 | 66 | </tr> |
|
68 | 67 | %endfor |
|
69 | 68 | </table> |
|
70 | 69 | %else: |
|
71 | 70 | <h2><span class="empty_data">${_('You currently have no open pull requests.')}</span></h2> |
|
72 | 71 | %endif |
|
73 | 72 | </div> |
|
74 | 73 | </div> |
|
75 | 74 | </div> |
|
76 | 75 | |
|
77 | 76 | <div class="panel panel-default"> |
|
78 | 77 | <div class="panel-heading"> |
|
79 | 78 | <h3 class="panel-title">${_('Pull Requests You Participate In')}</h3> |
|
80 | 79 | </div> |
|
81 | 80 | |
|
82 | 81 | <div class="panel-body"> |
|
83 | 82 | <div class="pullrequestlist"> |
|
84 | 83 | %if c.participate_in_pull_requests: |
|
85 | 84 | <table class="rctable"> |
|
86 | 85 | <thead> |
|
87 | 86 | <th class="td-status"></th> |
|
88 | 87 | <th>${_('Target Repo')}</th> |
|
89 | 88 | <th>${_('Author')}</th> |
|
90 | 89 | <th></th> |
|
91 | 90 | <th>${_('Title')}</th> |
|
92 |
<th class="td-time">${_(' |
|
|
91 | <th class="td-time">${_('Last Update')}</th> | |
|
93 | 92 | </thead> |
|
94 | 93 | %for pull_request in c.participate_in_pull_requests: |
|
95 | 94 | <tr class="${'closed' if pull_request.is_closed() else ''} prwrapper"> |
|
96 | 95 | <td class="td-status"> |
|
97 | 96 | <div class="${'flag_status %s' % pull_request.calculated_review_status()} pull-left"></div> |
|
98 | 97 | </td> |
|
99 | 98 | <td class="truncate-wrap td-componentname"> |
|
100 | 99 | <div class="truncate"> |
|
101 | 100 | ${h.link_to(pull_request.target_repo.repo_name,h.url('summary_home',repo_name=pull_request.target_repo.repo_name))} |
|
102 | 101 | </div> |
|
103 | 102 | </td> |
|
104 | 103 | <td class="user"> |
|
105 | 104 | ${base.gravatar_with_user(pull_request.author.email, 16)} |
|
106 | 105 | </td> |
|
107 | 106 | <td class="td-message expand_commit" data-pr-id="p${pull_request.pull_request_id}" title="${_('Expand commit message')}"> |
|
108 | 107 | <div class="show_more_col"> |
|
109 | 108 | <i class="show_more"></i> |
|
110 | 109 | </div> |
|
111 | 110 | </td> |
|
112 | 111 | <td class="mid td-description"> |
|
113 | 112 | <div class="log-container truncate-wrap"> |
|
114 | 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>\ |
|
115 | 114 | %if pull_request.is_closed(): |
|
116 | 115 | (${_('Closed')})\ |
|
117 | 116 | %endif |
|
118 | 117 | <br/>${pull_request.description}</div> |
|
119 | 118 | </div> |
|
120 | 119 | </td> |
|
121 | ||
|
122 | 120 | <td class="td-time"> |
|
123 |
${h.age_component(pull_request. |
|
|
121 | ${h.age_component(pull_request.updated_on)} | |
|
124 | 122 | </td> |
|
125 | 123 | </tr> |
|
126 | 124 | %endfor |
|
127 | 125 | </table> |
|
128 | 126 | %else: |
|
129 | 127 | <h2 class="empty_data">${_('There are currently no open pull requests requiring your participation.')}</h2> |
|
130 | 128 | %endif |
|
131 | 129 | </div> |
|
132 | 130 | </div> |
|
133 | 131 | </div> |
|
134 | 132 | |
|
135 | 133 | <script> |
|
136 | 134 | $('#show_closed').on('click', function(e){ |
|
137 | 135 | if($(this).is(":checked")){ |
|
138 | 136 | window.location = "${h.url('my_account_pullrequests', pr_show_closed=1)}"; |
|
139 | 137 | } |
|
140 | 138 | else{ |
|
141 | 139 | window.location = "${h.url('my_account_pullrequests')}"; |
|
142 | 140 | } |
|
143 | 141 | }); |
|
144 | 142 | $('.expand_commit').on('click',function(e){ |
|
145 | 143 | var target_expand = $(this); |
|
146 | 144 | var cid = target_expand.data('prId'); |
|
147 | 145 | |
|
148 | 146 | if (target_expand.hasClass('open')){ |
|
149 | 147 | $('#c-'+cid).css({'height': '2.75em', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); |
|
150 | 148 | target_expand.removeClass('open'); |
|
151 | 149 | } |
|
152 | 150 | else { |
|
153 | 151 | $('#c-'+cid).css({'height': 'auto', 'text-overflow': 'initial', 'overflow':'visible'}); |
|
154 | 152 | target_expand.addClass('open'); |
|
155 | 153 | } |
|
156 | 154 | }); |
|
157 | 155 | </script> |
@@ -1,132 +1,132 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('%s Pull Requests') % c.repo_name} |
|
5 | 5 | %if c.rhodecode_name: |
|
6 | 6 | · ${h.branding(c.rhodecode_name)} |
|
7 | 7 | %endif |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | <%def name="breadcrumbs_links()"> |
|
11 | 11 | |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="menu_bar_nav()"> |
|
15 | 15 | ${self.menu_items(active='repositories')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | |
|
19 | 19 | <%def name="menu_bar_subnav()"> |
|
20 | 20 | ${self.repo_menu(active='showpullrequest')} |
|
21 | 21 | </%def> |
|
22 | 22 | |
|
23 | 23 | |
|
24 | 24 | <%def name="main()"> |
|
25 | 25 | <div class="box"> |
|
26 | 26 | <div class="title"> |
|
27 | 27 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
28 | 28 | |
|
29 | 29 | <ul class="links"> |
|
30 | 30 | <li> |
|
31 | 31 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
32 | 32 | <span> |
|
33 | 33 | <a id="open_new_pull_request" class="btn btn-small btn-success" href="${h.url('pullrequest_home',repo_name=c.repo_name)}"> |
|
34 | 34 | ${_('Open new Pull Request')} |
|
35 | 35 | </a> |
|
36 | 36 | </span> |
|
37 | 37 | %endif |
|
38 | 38 | </li> |
|
39 | 39 | </ul> |
|
40 | 40 | |
|
41 | 41 | ${self.breadcrumbs()} |
|
42 | 42 | </div> |
|
43 | 43 | |
|
44 | 44 | <div class="sidebar-col-wrapper"> |
|
45 | 45 | ##main |
|
46 | 46 | <div class="sidebar"> |
|
47 | 47 | <ul class="nav nav-pills nav-stacked"> |
|
48 | 48 | <li class="${'active' if c.active=='open' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=0)}">${_('Opened')}</a></li> |
|
49 | 49 | <li class="${'active' if c.active=='my' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=0,my=1)}">${_('Opened by me')}</a></li> |
|
50 | 50 | <li class="${'active' if c.active=='awaiting' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=0,awaiting_review=1)}">${_('Awaiting review')}</a></li> |
|
51 | 51 | <li class="${'active' if c.active=='awaiting_my' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=0,awaiting_my_review=1)}">${_('Awaiting my review')}</a></li> |
|
52 | 52 | <li class="${'active' if c.active=='closed' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=0,closed=1)}">${_('Closed')}</a></li> |
|
53 | 53 | <li class="${'active' if c.active=='source' else ''}"><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name,source=1)}">${_('From this repo')}</a></li> |
|
54 | 54 | </ul> |
|
55 | 55 | </div> |
|
56 | 56 | |
|
57 | 57 | <div class="main-content-full-width"> |
|
58 | 58 | <div class="panel panel-default"> |
|
59 | 59 | <div class="panel-heading"> |
|
60 | 60 | <h3 class="panel-title"> |
|
61 | 61 | %if c.source: |
|
62 | 62 | ${_('Pull Requests from %(repo_name)s repository') % {'repo_name': c.repo_name}} |
|
63 | 63 | %elif c.closed: |
|
64 | 64 | ${_('Closed Pull Requests to repository %(repo_name)s') % {'repo_name': c.repo_name}} |
|
65 | 65 | %elif c.my: |
|
66 | 66 | ${_('Pull Requests to %(repo_name)s repository opened by me') % {'repo_name': c.repo_name}} |
|
67 | 67 | %elif c.awaiting_review: |
|
68 | 68 | ${_('Pull Requests to %(repo_name)s repository awaiting review') % {'repo_name': c.repo_name}} |
|
69 | 69 | %elif c.awaiting_my_review: |
|
70 | 70 | ${_('Pull Requests to %(repo_name)s repository awaiting my review') % {'repo_name': c.repo_name}} |
|
71 | 71 | %else: |
|
72 | 72 | ${_('Pull Requests to %(repo_name)s repository') % {'repo_name': c.repo_name}} |
|
73 | 73 | %endif |
|
74 | 74 | </h3> |
|
75 | 75 | </div> |
|
76 | 76 | <div class="panel-body"> |
|
77 | 77 | <table id="pull_request_list_table" class="display"></table> |
|
78 | 78 | </div> |
|
79 | 79 | </div> |
|
80 | 80 | </div> |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | |
|
84 | 84 | <script type="text/javascript"> |
|
85 | 85 | $(document).ready(function() { |
|
86 | 86 | // object list |
|
87 | 87 | $('#pull_request_list_table').DataTable({ |
|
88 | 88 | data: ${c.data|n}, |
|
89 | 89 | processing: true, |
|
90 | 90 | serverSide: true, |
|
91 | 91 | deferLoading: ${c.records_total}, |
|
92 | 92 | ajax: "", |
|
93 | 93 | dom: 'tp', |
|
94 | 94 | pageLength: ${c.visual.dashboard_items}, |
|
95 | 95 | order: [[ 1, "desc" ]], |
|
96 | 96 | columns: [ |
|
97 | 97 | { data: {"_": "status", |
|
98 | 98 | "sort": "status"}, title: "", className: "td-status", orderable: false}, |
|
99 | 99 | { data: {"_": "name", |
|
100 | 100 | "sort": "name_raw"}, title: "${_('Name')}", className: "td-componentname", "type": "num" }, |
|
101 | 101 | { data: {"_": "author", |
|
102 | 102 | "sort": "author_raw"}, title: "${_('Author')}", className: "td-user", orderable: false }, |
|
103 | 103 | { data: {"_": "title", |
|
104 | 104 | "sort": "title"}, title: "${_('Title')}", className: "td-description" }, |
|
105 | 105 | { data: {"_": "comments", |
|
106 | 106 | "sort": "comments_raw"}, title: "", className: "td-comments", orderable: false}, |
|
107 | 107 | { data: {"_": "updated_on", |
|
108 |
"sort": "updated_on_raw"}, title: "${_('Update |
|
|
108 | "sort": "updated_on_raw"}, title: "${_('Last Update')}", className: "td-time" } | |
|
109 | 109 | ], |
|
110 | 110 | language: { |
|
111 | 111 | paginate: DEFAULT_GRID_PAGINATION, |
|
112 | 112 | emptyTable: _gettext("No pull requests available yet.") |
|
113 | 113 | }, |
|
114 | 114 | "drawCallback": function( settings, json ) { |
|
115 | 115 | timeagoActivate(); |
|
116 | 116 | }, |
|
117 | 117 | "createdRow": function ( row, data, index ) { |
|
118 | 118 | if (data['closed']) { |
|
119 | 119 | $(row).addClass('closed'); |
|
120 | 120 | } |
|
121 | 121 | } |
|
122 | 122 | }); |
|
123 | 123 | }); |
|
124 | 124 | $('#pull_request_list_table').on('xhr.dt', function(e, settings, json, xhr){ |
|
125 | 125 | $('#pull_request_list_table').css('opacity', 1); |
|
126 | 126 | }); |
|
127 | 127 | |
|
128 | 128 | $('#pull_request_list_table').on('preXhr.dt', function(e, settings, data){ |
|
129 | 129 | $('#pull_request_list_table').css('opacity', 0.3); |
|
130 | 130 | }); |
|
131 | 131 | </script> |
|
132 | 132 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now