Show More
@@ -1,174 +1,174 | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${c.repo_name} ${_('Pull request #%s') % c.pull_request.pull_request_id} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | 9 | » |
|
10 | 10 | ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))} |
|
11 | 11 | » |
|
12 | 12 | ${_('Pull request #%s') % c.pull_request.pull_request_id} |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="main()"> |
|
16 | 16 | |
|
17 | 17 | <div class="box"> |
|
18 | 18 | <!-- box / title --> |
|
19 | 19 | <div class="title"> |
|
20 | 20 | ${self.breadcrumbs()} |
|
21 | 21 | </div> |
|
22 | 22 | %if c.pull_request.is_closed(): |
|
23 | 23 | <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))}</div> |
|
24 | 24 | %endif |
|
25 | 25 | <h3>${_('Title')}: ${c.pull_request.title} |
|
26 | 26 | <div class="changeset-status-container" style="float:none"> |
|
27 | 27 | %if c.current_changeset_status: |
|
28 | 28 | <div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div> |
|
29 | 29 | <div class="changeset-status-ico" style="padding:4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div> |
|
30 | 30 | %endif |
|
31 | 31 | </div> |
|
32 | 32 | </h3> |
|
33 | 33 | <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div> |
|
34 | 34 | <div style="padding:4px 4px 10px 20px"> |
|
35 | 35 | <div>${_('Created on')}: ${h.fmt_date(c.pull_request.created_on)}</div> |
|
36 | 36 | </div> |
|
37 | 37 | |
|
38 | <div> | |
|
38 | <div style="min-height:160px"> | |
|
39 | 39 | ##DIFF |
|
40 | 40 | <div class="table" style="float:left;clear:none"> |
|
41 | 41 | <div id="body" class="diffblock"> |
|
42 | 42 | <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div> |
|
43 | 43 | </div> |
|
44 | 44 | <div id="changeset_compare_view_content"> |
|
45 | 45 | ##CS |
|
46 | 46 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Incoming changesets')}</div> |
|
47 | 47 | <%include file="/compare/compare_cs.html" /> |
|
48 | 48 | |
|
49 | 49 | ## FILES |
|
50 | 50 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> |
|
51 | 51 | <div class="cs_files"> |
|
52 | 52 | %for fid, change, f, stat in c.files: |
|
53 | 53 | <div class="cs_${change}"> |
|
54 | 54 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div> |
|
55 | 55 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
56 | 56 | </div> |
|
57 | 57 | %endfor |
|
58 | 58 | </div> |
|
59 | 59 | </div> |
|
60 | 60 | </div> |
|
61 | 61 | ## REVIEWERS |
|
62 | 62 | <div style="float:left; border-left:1px dashed #eee"> |
|
63 | 63 | <h4>${_('Pull request reviewers')}</h4> |
|
64 | 64 | <div id="reviewers" style="padding:0px 0px 0px 15px"> |
|
65 | 65 | ## members goes here ! |
|
66 | 66 | <div class="group_members_wrap"> |
|
67 | 67 | <ul id="review_members" class="group_members"> |
|
68 | 68 | %for member,status in c.pull_request_reviewers: |
|
69 | 69 | <li id="reviewer_${member.user_id}"> |
|
70 | 70 | <div class="reviewers_member"> |
|
71 | 71 | <div style="float:left;padding:0px 3px 0px 0px" class="tooltip" title="${h.tooltip(h.changeset_status_lbl(status[0][1].status if status else 'not_reviewed'))}"> |
|
72 | 72 | <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/> |
|
73 | 73 | </div> |
|
74 | 74 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> |
|
75 | 75 | <div style="float:left">${member.full_name} (${_('owner')})</div> |
|
76 | 76 | <input type="hidden" value="${member.user_id}" name="review_members" /> |
|
77 | 77 | %if not c.pull_request.is_closed(): |
|
78 | 78 | <span class="delete_icon action_button" onclick="removeReviewer(${member.user_id})"></span> |
|
79 | 79 | %endif |
|
80 | 80 | </div> |
|
81 | 81 | </li> |
|
82 | 82 | %endfor |
|
83 | 83 | </ul> |
|
84 | 84 | </div> |
|
85 | 85 | %if not c.pull_request.is_closed(): |
|
86 | 86 | <div class='ac'> |
|
87 | 87 | <div class="reviewer_ac"> |
|
88 | 88 | ${h.text('user', class_='yui-ac-input')} |
|
89 | 89 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> |
|
90 | 90 | <div id="reviewers_container"></div> |
|
91 | 91 | </div> |
|
92 | 92 | <div style="padding:0px 10px"> |
|
93 | 93 | <span id="update_pull_request" class="ui-btn xsmall">${_('save')}</span> |
|
94 | 94 | </div> |
|
95 | 95 | </div> |
|
96 | 96 | %endif |
|
97 | 97 | </div> |
|
98 | 98 | </div> |
|
99 | 99 | </div> |
|
100 | 100 | <script> |
|
101 | 101 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
102 | 102 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
103 | 103 | AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"; |
|
104 | 104 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
105 | 105 | AJAX_UPDATE_PULLREQUEST = "${url('pullrequest_update',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}" |
|
106 | 106 | </script> |
|
107 | 107 | |
|
108 | 108 | ## diff block |
|
109 | 109 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
110 | 110 | %for fid, change, f, stat in c.files: |
|
111 | 111 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
112 | 112 | %endfor |
|
113 | 113 | |
|
114 | 114 | ## template for inline comment form |
|
115 | 115 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
116 | 116 | ${comment.comment_inline_form()} |
|
117 | 117 | |
|
118 | 118 | ## render comments and inlines |
|
119 | 119 | ${comment.generate_comments()} |
|
120 | 120 | |
|
121 | 121 | % if not c.pull_request.is_closed(): |
|
122 | 122 | ## main comment form and it status |
|
123 | 123 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, |
|
124 | 124 | pull_request_id=c.pull_request.pull_request_id), |
|
125 | 125 | c.current_changeset_status, |
|
126 | 126 | close_btn=True)} |
|
127 | 127 | %endif |
|
128 | 128 | |
|
129 | 129 | <script type="text/javascript"> |
|
130 | 130 | YUE.onDOMReady(function(){ |
|
131 | 131 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
132 | 132 | |
|
133 | 133 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
134 | 134 | var show = 'none'; |
|
135 | 135 | var target = e.currentTarget; |
|
136 | 136 | if(target.checked){ |
|
137 | 137 | var show = '' |
|
138 | 138 | } |
|
139 | 139 | var boxid = YUD.getAttribute(target,'id_for'); |
|
140 | 140 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
141 | 141 | for(c in comments){ |
|
142 | 142 | YUD.setStyle(comments[c],'display',show); |
|
143 | 143 | } |
|
144 | 144 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
145 | 145 | for(c in btns){ |
|
146 | 146 | YUD.setStyle(btns[c],'display',show); |
|
147 | 147 | } |
|
148 | 148 | }) |
|
149 | 149 | |
|
150 | 150 | YUE.on(YUQ('.line'),'click',function(e){ |
|
151 | 151 | var tr = e.currentTarget; |
|
152 | 152 | injectInlineForm(tr); |
|
153 | 153 | }); |
|
154 | 154 | |
|
155 | 155 | // inject comments into they proper positions |
|
156 | 156 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
157 | 157 | renderInlineComments(file_comments); |
|
158 | 158 | |
|
159 | 159 | YUE.on(YUD.get('update_pull_request'),'click',function(e){ |
|
160 | 160 | |
|
161 | 161 | var reviewers_ids = []; |
|
162 | 162 | var ids = YUQ('#review_members input'); |
|
163 | 163 | for(var i=0; i<ids.length;i++){ |
|
164 | 164 | var id = ids[i].value |
|
165 | 165 | reviewers_ids.push(id); |
|
166 | 166 | } |
|
167 | 167 | updateReviewers(reviewers_ids); |
|
168 | 168 | }) |
|
169 | 169 | }) |
|
170 | 170 | </script> |
|
171 | 171 | |
|
172 | 172 | </div> |
|
173 | 173 | |
|
174 | 174 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now