parent
1ec515034c
commit
e0bd8200ad
8 changed files with 49 additions and 37 deletions
|
@ -72,6 +72,7 @@
|
|||
<script>
|
||||
var csrf_token = '{{ csrf_token }}';
|
||||
</script>
|
||||
<script src="/static/js/unfetch.js"></script>
|
||||
<script src="/static/js/shared.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
{% if request.user == user %}
|
||||
{% elif request.user in user.follower_requests.all %}
|
||||
|
||||
<div>
|
||||
Follow request already sent.
|
||||
</div>
|
||||
{% elif not request.user in user.followers.all %}
|
||||
<form action="/follow/" method="post">
|
||||
|
||||
{% else %}
|
||||
|
||||
<form action="/follow/" method="POST" onsubmit="interact(event)" class="follow-{{ user.id }} {% if request.user in user.followers.all %}hidden{%endif %}" data-id="follow-{{ user.id }}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ user.username }}"></input>
|
||||
{% if user.manually_approves_followers %}
|
||||
|
@ -13,8 +16,7 @@ Follow request already sent.
|
|||
<button type="submit">Follow</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% else %}
|
||||
<form action="/unfollow/" method="post">
|
||||
<form action="/unfollow/" method="POST" onsubmit="interact(event)" class="follow-{{ user.id }} {% if not request.user in user.followers.all %}hidden{%endif %}" data-id="follow-{{ user.id }}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ user.username }}"></input>
|
||||
<button type="submit">Unfollow</button>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</button>
|
||||
</form>
|
||||
|
||||
<form name="boost" action="/boost/{{ activity.id }}" method="POST" onsubmit="return interact(event)" class="{% if False %}active{% endif %}">
|
||||
<form name="boost" action="/boost/{{ activity.id }}" method="post" onsubmit="return interact(event)" class="boost-{{ status.id }} {% if False %}hidden{% endif %}" data-id="boost-{{ status.id }}">
|
||||
{% csrf_token %}
|
||||
<button type="submit">
|
||||
<span class="icon icon-boost">
|
||||
|
@ -20,8 +20,16 @@
|
|||
</span>
|
||||
</button>
|
||||
</form>
|
||||
<form name="unboost" action="/unboost/{{ activity.id }}" method="post" onsubmit="return interact(event)" class="boost-{{ status.id }} active {% if not False %}hidden{% endif %}" data-id="boost-{{ status.id }}">
|
||||
{% csrf_token %}
|
||||
<button type="submit">
|
||||
<span class="icon icon-boost">
|
||||
<span class="hidden-text">Un-boost status</span>
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<form name="favorite" action="/favorite/{{ activity.id }}" method="POST" onsubmit="return interact(event)" class="{% if request.user|liked:status %}active{% endif %}">
|
||||
<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 }}">
|
||||
{% csrf_token %}
|
||||
<button type="submit">
|
||||
<span class="icon icon-heart">
|
||||
|
@ -29,5 +37,13 @@
|
|||
</span>
|
||||
</button>
|
||||
</form>
|
||||
<form name="favorite" action="/favorite/{{ 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 }}">
|
||||
{% csrf_token %}
|
||||
<button type="submit">
|
||||
<span class="icon icon-heart">
|
||||
<span class="hidden-text">Un-like status</span>
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
<div id="content">
|
||||
<div class="content-container">
|
||||
{% for result in results %}
|
||||
<div>
|
||||
<h2>{{ result.username }}</h2>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue