Template changes for user actions
This commit is contained in:
parent
6952c34aac
commit
51f26e2b25
|
@ -60,6 +60,12 @@ article.media.user-info .content img
|
|||
max-width: 1.5rem;
|
||||
}
|
||||
|
||||
span.account-locked
|
||||
{
|
||||
margin-top: 48px;
|
||||
margin-left: -16px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.media {
|
||||
display: block;
|
||||
|
|
|
@ -22,6 +22,11 @@ Brutaldon - {{ timeline }} timelime
|
|||
</div>
|
||||
<figure class="image is-96x96 card-header-icon">
|
||||
<img src="{{ user.avatar }}" alt="Avatar">
|
||||
{% if user.locked %}
|
||||
<span class="fa fa-lock account-locked">
|
||||
<span class="is-hidden">Private</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
</figure>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
|
@ -30,20 +35,50 @@ Brutaldon - {{ timeline }} timelime
|
|||
</div>
|
||||
<div class="level">
|
||||
<div class="level-left">
|
||||
<a class="level-item fa fa-user-plus" title="follow">
|
||||
<span class="is-hidden">Follow</span>
|
||||
</a>
|
||||
<a class="level-item fa fa-social-home" title="home">
|
||||
{% if relationship.requested %}
|
||||
<a class="level-item fa fa-hourglass" title="cancel request"
|
||||
href="{% url 'follow' user.id %}">
|
||||
<span class="is-hidden">Cancel request</span>
|
||||
</a>
|
||||
{% elif not relationship.following %}
|
||||
<a class="level-item fa fa-user-plus" title="follow"
|
||||
href="{% url 'follow' user.id %}">
|
||||
<span class="is-hidden">Follow</span>
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="level-item fa fa-user-times" title="unfollow"
|
||||
href="{% url 'follow' user.id %}">
|
||||
<span class="is-hidden">Unfollow</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a class="level-item fa fa-social-home"
|
||||
href="{{ user.url }}" title="home">
|
||||
<span class="is-hidden">View on home site</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="level-right">
|
||||
<a class="level-item fa fa-volume-off" title="mute">
|
||||
<span class="is-hidden">Mute</span>
|
||||
</a>
|
||||
<a class="level-item fa fa-ban" title="block">
|
||||
<span class="is-hidden">Block</span>
|
||||
</a>
|
||||
{% if not relationship.muting %}
|
||||
<a class="level-item fa fa-volume-off" title="mute"
|
||||
href="{% url 'mute' user.id %}">
|
||||
<span class="is-hidden">Mute</span>
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="level-item fa fa-volume-up" title="unmute"
|
||||
href="{% url 'mute' user.id %}">
|
||||
<span class="is-hidden">Unmute</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if not relationship.blocking %}
|
||||
<a class="level-item fa fa-ban" title="block"
|
||||
href="{% url 'block' user.id %}">
|
||||
<span class="is-hidden">Block</span>
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="level-item fa fa-circle-o" title="unblock"
|
||||
href="{% url 'block' user.id %}">
|
||||
<span class="is-hidden">Unblock</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -268,8 +268,10 @@ def user(request, username):
|
|||
except IndexError:
|
||||
raise Http404("The user %s could not be found." % username)
|
||||
data = mastodon.account_statuses(user_dict.id)
|
||||
relationship = mastodon.account_relationships(user_dict.id)[0]
|
||||
return render(request, 'main/user.html',
|
||||
{'toots': data, 'user': user_dict,
|
||||
'relationship': relationship,
|
||||
'own_username': request.session['user'].acct,
|
||||
'fullbrutalism': fullbrutalism_p(request)})
|
||||
|
||||
|
|
Loading…
Reference in New Issue