moviewyrm/bookwyrm/templates/ostatus/subscribe.html

64 lines
2.5 KiB
HTML
Raw Normal View History

2021-11-28 01:43:29 +00:00
{% extends 'ostatus/template.html' %}
{% load i18n %}
{% load utilities %}
{% load markdown %}
2021-11-28 02:28:58 +00:00
{% block title %}
{% if not request.user.is_authenticated %}
2021-11-30 09:46:41 +00:00
{% blocktrans with sitename=site.name %}Log in to {{ sitename }}{% endblocktrans %}
2021-11-28 02:28:58 +00:00
{% elif error %}
2021-11-30 09:46:41 +00:00
{% blocktrans with sitename=site.name %}Error following from {{ sitename }}{% endblocktrans %}
2021-11-28 01:43:29 +00:00
{% else %}
2021-11-30 09:46:41 +00:00
{% blocktrans with sitename=site.name %}Follow from {{ sitename }}{% endblocktrans %}
2021-11-28 02:28:58 +00:00
{% endif %}
{% endblock %}
2021-11-28 01:43:29 +00:00
2021-11-28 02:28:58 +00:00
{% block heading %}
{% if error %}
2021-11-28 02:28:58 +00:00
{% trans 'Uh oh...' %}
{% elif not request.user.is_authenticated %}
{% trans "Let's log in first..." %}
2021-11-28 02:28:58 +00:00
{% else %}
2021-11-30 09:46:41 +00:00
{% blocktrans with sitename=site.name %}Follow from {{ sitename }}{% endblocktrans %}
2021-11-28 02:28:58 +00:00
{% endif %}
{% endblock %}
2021-11-28 01:43:29 +00:00
{% block content %}
2021-11-28 02:28:58 +00:00
{% if error or not request.user.is_authenticated %}
2021-11-28 05:54:25 +00:00
{% include 'ostatus/error.html' with error=error user=user account=account %}
2021-11-28 02:28:58 +00:00
{% else %}
2021-11-28 01:43:29 +00:00
<div class="block card">
<div class="card-content">
<div class="media">
<a href="{{ user.local_path }}" class="media-left">
{% include 'snippets/avatar.html' with user=user large=True %}
</a>
<div class="media-content">
<a href="{{ user.local_path }}" class="is-block mb-2">
<span class="title is-4 is-block">
{{ user.display_name }}
{% if user.manually_approves_followers %}
<span class="icon icon-lock is-size-7" title="{% trans 'Locked account' %}">
2021-12-06 05:26:16 +00:00
<span class="is-sr-only">{% trans 'Locked account' %}</span>
2021-11-28 01:43:29 +00:00
</span>
{% endif %}
</span>
<span class="subtitle is-7 is-block">@{{ user|username }}</span>
</a>
2021-11-28 05:54:25 +00:00
<form name="follow" method="post" action="{% url 'follow' %}/?next={% url 'ostatus-success' %}?following={{ user.username }}">
2021-11-28 10:38:28 +00:00
{% csrf_token %}
2021-12-06 05:26:16 +00:00
<input name="user" value="{{ user.username }}" hidden>
2021-11-30 09:46:41 +00:00
<button class="button is-link" type="submit">{% blocktrans with username=user.display_name %}Follow {{ username }}{% endblocktrans %}</button>
2021-11-28 01:43:29 +00:00
</form>
</div>
</div>
2021-11-28 05:54:25 +00:00
<div>
2021-11-28 01:43:29 +00:00
{% if user.summary %}
{{ user.summary|to_markdown|safe|truncatechars_html:120 }}
{% else %}&nbsp;{% endif %}
</div>
</div>
</div>
{% endif %}
2021-11-28 02:28:58 +00:00
{% endblock %}