@@ -136,6 +136,25 @@ <h1>{{ submission.name }}</h1>
136136 {% csrf_token %}
137137 {% include "patchwork/partials/patch-forms.html" %}
138138</ form >
139+ {% if create_note_form %}
140+ < form id ="maintainer-note-form " method ="post ">
141+ < h2 > New Note</ h2 >
142+ {% csrf_token %}
143+ {{ create_note_form.as_div }}
144+ < input type ="submit " class ="patch-form-submit btn btn-primary " value ="Add ">
145+ </ form >
146+ {% endif %}
147+ {% if edit_note_form %}
148+ < form id ="maintainer-note-form " method ="post ">
149+ < h2 > Edit Note</ h2 >
150+ {% csrf_token %}
151+ {{ edit_note_form.as_div }}
152+ < div class ="form-actions ">
153+ < input type ="submit " class ="patch-form-submit btn btn-primary " value ="Save ">
154+ < button type ="submit " name ="cancel " value ="Cancel "> Cancel</ button >
155+ </ div >
156+ </ form >
157+ {% endif %}
139158
140159{% if submission.pull_url %}
141160< h2 > Pull-request</ h2 >
@@ -187,68 +206,15 @@ <h2>Message</h2>
187206 </ pre >
188207</ div >
189208
190- {% for item in comments %}
191- {% if forloop.first %}
209+ {% if note or comments %}
192210< h2 > Comments</ h2 >
211+ {% if note %}
212+ {% include "patchwork/partials/comment.html" with item=note %}
193213{% endif %}
194- {% is_editable item user as comment_is_editable %}
195- < a name ="{{ item.id }} "> </ a >
196- < div class ="submission-message ">
197- < div class ="meta ">
198- {{ item.submitter|personify:project }}
199- < span class ="message-date "> {{ item.date }} UTC |
200- < a href ="{% url 'comment-redirect' comment_id=item.id %} "> #{{ forloop.counter }}</ a >
201- </ span >
202- {% if item.addressed == None %}
203- < div class ="comment-status-bar-action-required " data-comment-id ={{item.id}} >
204- {% else %}
205- < div class ="comment-status-bar-action-required hidden " data-comment-id ={{item.id}} >
206- {% endif %}
207- {% if editable or comment_is_editable %}
208- < button class ="comment-action-unaddressed text-warning " value ="false ">
209- < span class ="glyphicon glyphicon-warning-sign " aria-hidden ="true "> </ span >
210- Mark Action Required
211- </ button >
212- {% endif %}
213- </ div >
214- {% if item.addressed == True %}
215- < div class ="comment-status-bar-addressed " data-comment-id ={{item.id}} >
216- {% else %}
217- < div class ="comment-status-bar-addressed hidden " data-comment-id ={{item.id}} >
218- {% endif %}
219- < div class ="comment-status-label text-success mx-3 ">
220- < span class ="glyphicon glyphicon-ok-circle " aria-hidden ="true "> </ span >
221- Addressed
222- </ div >
223- {% if editable or comment_is_editable %}
224- < button class ="comment-action-unaddressed text-warning " value ="false ">
225- < span class ="glyphicon glyphicon-warning-sign " aria-hidden ="true "> </ span >
226- Mark Unaddressed
227- </ button >
228- {% endif %}
229- </ div >
230- {% if item.addressed == False %}
231- < div class ="comment-status-bar-unaddressed " data-comment-id ={{item.id}} >
232- {% else %}
233- < div class ="comment-status-bar-unaddressed hidden " data-comment-id ={{item.id}} >
234- {% endif %}
235- < div class ="comment-status-label text-warning mx-3 ">
236- < span class ="glyphicon glyphicon-warning-sign " aria-hidden ="true "> </ span >
237- Unaddressed
238- </ div >
239- {% if editable or comment_is_editable %}
240- < button class ="comment-action-addressed text-success " value ="true ">
241- < span class ="glyphicon glyphicon-ok-circle " aria-hidden ="true "> </ span >
242- Mark Addressed
243- </ button >
244- {% endif %}
245- </ div >
246- </ div >
247- < pre class ="content ">
248- {{ item|commentsyntax }}
249- </ pre >
250- </ div >
214+ {% for item in comments %}
215+ {% include "patchwork/partials/comment.html" %}
251216{% endfor %}
217+ {% endif %}
252218
253219{% if submission.diff %}
254220< div >
0 commit comments