| 1 |
{# The reader's own annotation on this commit. It is stored in their annotation |
| 2 |
repository, not in the one being browsed, so it needs no push right here and |
| 3 |
nobody else can see it. P7c renders annotations across the browse surface; |
| 4 |
this partial is the write half. #} |
| 5 |
{% if can_annotate %} |
| 6 |
{% if let Some(token) = csrf_token %} |
| 7 |
<div class="git-annotation" id="annotation"> |
| 8 |
{% if annotation_merged %} |
| 9 |
<p class="git-note-merged"> |
| 10 |
You edited this annotation in two places at once. Both versions were kept, |
| 11 |
so what is below is not exactly what you typed. |
| 12 |
</p> |
| 13 |
{% endif %} |
| 14 |
<form class="git-note-form" method="post" action="/git/{{ owner }}/{{ repo_name }}/commit/{{ detail.oid }}/annotate"> |
| 15 |
<input type="hidden" name="_csrf" value="{{ token }}"> |
| 16 |
<div class="form-group"> |
| 17 |
<label for="annotation-body">Your own note on this commit</label> |
| 18 |
<textarea id="annotation-body" name="content" rows="6" maxlength="50000" placeholder="Markdown. Stored in your own annotations repository, private to you, and it clones and exports like anything else.">{{ annotation_source }}</textarea> |
| 19 |
</div> |
| 20 |
<button type="submit">Save annotation</button> |
| 21 |
</form> |
| 22 |
{% if !annotation_source.is_empty() %} |
| 23 |
<form class="git-note-delete" method="post" action="/git/{{ owner }}/{{ repo_name }}/commit/{{ detail.oid }}/annotate/delete"> |
| 24 |
<input type="hidden" name="_csrf" value="{{ token }}"> |
| 25 |
<button type="submit">Remove your annotation</button> |
| 26 |
</form> |
| 27 |
{% endif %} |
| 28 |
</div> |
| 29 |
{% endif %} |
| 30 |
{% endif %} |
| 31 |
|