2020-03-09 20:27:54 -04:00
|
|
|
{% load fr_display %}
|
2020-11-02 14:46:23 -05:00
|
|
|
{% with activity.id|uuid as uuid %}
|
2020-09-28 21:25:05 -04:00
|
|
|
<div class="card-footer-item">
|
2020-03-27 13:11:32 -04:00
|
|
|
{% if request.user.is_authenticated %}
|
2020-03-21 19:50:49 -04:00
|
|
|
<form name="reply" action="/reply" method="post" onsubmit="return reply(event)">
|
2020-09-28 21:25:05 -04:00
|
|
|
<div class="field is-grouped">
|
2020-02-21 18:39:25 -05:00
|
|
|
{% csrf_token %}
|
2020-10-27 14:32:15 -04:00
|
|
|
<input type="hidden" name="reply_parent" value="{{ activity.id }}">
|
|
|
|
<input type="hidden" name="user" value="{{ request.user.id }}">
|
2020-10-27 18:16:17 -04:00
|
|
|
<input type="hidden" name="privacy" value="{{ activity.privacy }}">
|
2020-11-02 14:46:23 -05:00
|
|
|
<textarea name="content" placeholder="Leave a comment..." id="id_content_{{ activity.id }}-{{ uuid }}" required="true"></textarea>
|
2020-09-28 21:25:05 -04:00
|
|
|
<button class="button" type="submit">
|
2020-03-15 18:25:43 -04:00
|
|
|
<span class="icon icon-comment">
|
2020-09-30 18:10:37 -04:00
|
|
|
<span class="is-sr-only">Comment</span>
|
2020-03-15 18:25:43 -04:00
|
|
|
</span>
|
|
|
|
</button>
|
2020-09-28 21:25:05 -04:00
|
|
|
</div>
|
2020-03-15 18:25:43 -04:00
|
|
|
</form>
|
|
|
|
|
2020-11-02 14:46:23 -05:00
|
|
|
<form name="boost" action="/boost/{{ activity.id }}" method="post" onsubmit="return interact(event)" class="boost-{{ status.id }} {% if request.user|boosted:status %}hidden{% endif %}" data-id="boost-{{ status.id }}-{{ uuid }}">
|
2020-03-15 18:25:43 -04:00
|
|
|
{% csrf_token %}
|
2020-09-28 21:25:05 -04:00
|
|
|
<button class="button" type="submit">
|
2020-03-15 18:25:43 -04:00
|
|
|
<span class="icon icon-boost">
|
2020-09-30 18:10:37 -04:00
|
|
|
<span class="is-sr-only">Boost status</span>
|
2020-03-15 18:25:43 -04:00
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
</form>
|
2020-11-02 14:46:23 -05:00
|
|
|
<form name="unboost" action="/unboost/{{ activity.id }}" method="post" onsubmit="return interact(event)" class="boost-{{ status.id }} active {% if not request.user|boosted:status %}hidden{% endif %}" data-id="boost-{{ status.id }}-{{ uuid }}">
|
2020-03-21 17:29:39 -04:00
|
|
|
{% csrf_token %}
|
2020-09-28 21:25:05 -04:00
|
|
|
<button class="button is-success" type="submit">
|
2020-03-21 17:29:39 -04:00
|
|
|
<span class="icon icon-boost">
|
2020-09-30 18:10:37 -04:00
|
|
|
<span class="is-sr-only">Un-boost status</span>
|
2020-03-21 17:29:39 -04:00
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
</form>
|
2020-03-15 18:25:43 -04:00
|
|
|
|
2020-11-02 14:46:23 -05:00
|
|
|
<form name="favorite" action="/favorite/{{ activity.id }}" method="POST" onsubmit="return interact(event)" class="fav-{{ status.id }} {% if request.user|liked:status %}hidden{% endif %}" data-id="fav-{{ status.id }}-{{ uuid }}">
|
2020-03-15 18:25:43 -04:00
|
|
|
{% csrf_token %}
|
2020-09-28 21:25:05 -04:00
|
|
|
<button class="button" type="submit">
|
2020-03-15 18:25:43 -04:00
|
|
|
<span class="icon icon-heart">
|
2020-09-30 18:10:37 -04:00
|
|
|
<span class="is-sr-only">Like status</span>
|
2020-03-15 18:25:43 -04:00
|
|
|
</span>
|
|
|
|
</button>
|
2020-02-21 18:39:25 -05:00
|
|
|
</form>
|
2020-11-02 14:46:23 -05:00
|
|
|
<form name="unfavorite" action="/unfavorite/{{ activity.id }}" method="POST" onsubmit="return interact(event)" class="fav-{{ status.id }} active {% if not request.user|liked:status %}hidden{% endif %}" data-id="fav-{{ status.id }}-{{ uuid }}">
|
2020-03-21 17:29:39 -04:00
|
|
|
{% csrf_token %}
|
2020-09-28 21:25:05 -04:00
|
|
|
<button class="button is-success" type="submit">
|
2020-03-21 17:29:39 -04:00
|
|
|
<span class="icon icon-heart">
|
2020-09-30 18:10:37 -04:00
|
|
|
<span class="is-sr-only">Un-like status</span>
|
2020-03-21 17:29:39 -04:00
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
</form>
|
2020-03-27 13:11:32 -04:00
|
|
|
{% else %}
|
|
|
|
<a href="/login">
|
|
|
|
<span class="icon icon-comment">
|
2020-09-30 18:10:37 -04:00
|
|
|
<span class="is-sr-only">Comment</span>
|
2020-03-27 13:11:32 -04:00
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="icon icon-boost">
|
2020-09-30 18:10:37 -04:00
|
|
|
<span class="is-sr-only">Boost status</span>
|
2020-03-27 13:11:32 -04:00
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="icon icon-heart">
|
2020-09-30 18:10:37 -04:00
|
|
|
<span class="is-sr-only">Like status</span>
|
2020-03-27 13:11:32 -04:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2020-02-21 18:39:25 -05:00
|
|
|
</div>
|
2020-11-02 14:46:23 -05:00
|
|
|
{% endwith %}
|