##// END OF EJS Templates
pull requests: make the difference between changeset comments with status and PR comments with votes more obvious
Mads Kiilerich -
r4051:fd4ea41c default
parent child Browse files
Show More
@@ -20,7 +20,7 b''
20 %if co.pull_request:
20 %if co.pull_request:
21 <a href="${h.url('pullrequest_show',repo_name=co.pull_request.other_repo.repo_name,pull_request_id=co.pull_request.pull_request_id)}">
21 <a href="${h.url('pullrequest_show',repo_name=co.pull_request.other_repo.repo_name,pull_request_id=co.pull_request.pull_request_id)}">
22 %if co.status_change:
22 %if co.status_change:
23 ${_('Status change on pull request #%s') % co.pull_request.pull_request_id}:
23 ${_('Vote on pull request #%s') % co.pull_request.pull_request_id}:
24 %else:
24 %else:
25 ${_('Comment on pull request #%s') % co.pull_request.pull_request_id}
25 ${_('Comment on pull request #%s') % co.pull_request.pull_request_id}
26 %endif
26 %endif
@@ -142,7 +142,7 b''
142 </%def>
142 </%def>
143
143
144 ## MAIN COMMENT FORM
144 ## MAIN COMMENT FORM
145 <%def name="comments(post_url, cur_status, close_btn=False, change_status=True)">
145 <%def name="comments(post_url, cur_status, is_pr=False, change_status=True)">
146
146
147 <div class="comments">
147 <div class="comments">
148 %if c.rhodecode_user.username != 'default':
148 %if c.rhodecode_user.username != 'default':
@@ -154,7 +154,13 b''
154 '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' %
154 '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' %
155 _('Use @username inside this text to send notification to this RhodeCode user')))|n}
155 _('Use @username inside this text to send notification to this RhodeCode user')))|n}
156 %if change_status:
156 %if change_status:
157 | <a id="show_changeset_link" onClick="change_status_show();"> ${_('Change status')}</a>
157 | <a id="show_changeset_link" onClick="change_status_show();">
158 %if is_pr:
159 ${_('Vote for pull request status')}
160 %else:
161 ${_('Change changeset status')}
162 %endif
163 </a>
158 <input id="show_changeset_status_box" type="checkbox" name="change_changeset_status" style="display: none;" />
164 <input id="show_changeset_status_box" type="checkbox" name="change_changeset_status" style="display: none;" />
159 %endif
165 %endif
160 <div id="preview-btn" class="preview-btn ui-btn small">${_('Preview')}</div>
166 <div id="preview-btn" class="preview-btn ui-btn small">${_('Preview')}</div>
@@ -167,7 +173,7 b''
167 <label for="${status}">${lbl}</label>
173 <label for="${status}">${lbl}</label>
168 </div>
174 </div>
169 %endfor
175 %endfor
170 %if close_btn and change_status:
176 %if is_pr and change_status:
171 <input id="save_close" type="checkbox" name="save_close" disabled="${'1' if cur_status in ['not_reviewed','under_review'] else ''}">
177 <input id="save_close" type="checkbox" name="save_close" disabled="${'1' if cur_status in ['not_reviewed','under_review'] else ''}">
172 <label id="save_close_label" for="save_close" class="${'disabled' if cur_status in ['not_reviewed','under_review'] else ''}">${_("Close (when approved or rejected)")}</label>
178 <label id="save_close_label" for="save_close" class="${'disabled' if cur_status in ['not_reviewed','under_review'] else ''}">${_("Close (when approved or rejected)")}</label>
173 %endif
179 %endif
@@ -101,7 +101,6 b''
101 </div>
101 </div>
102 </div>
102 </div>
103 ${diff_block.diff_block(c.changes[cs.raw_id])}
103 ${diff_block.diff_block(c.changes[cs.raw_id])}
104 ##${comment.comments(cs)}
105
104
106 %endfor
105 %endfor
107 <script type="text/javascript">
106 <script type="text/javascript">
@@ -212,8 +212,8 b''
212 ## main comment form and it status
212 ## main comment form and it status
213 ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name,
213 ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name,
214 pull_request_id=c.pull_request.pull_request_id),
214 pull_request_id=c.pull_request.pull_request_id),
215 c.current_changeset_status,
215 c.current_changeset_status,
216 close_btn=True, change_status=c.allowed_to_change_status)}
216 is_pr=True, change_status=c.allowed_to_change_status)}
217 %endif
217 %endif
218
218
219 <script type="text/javascript">
219 <script type="text/javascript">
General Comments 0
You need to be logged in to leave comments. Login now