moviewyrm/bookwyrm/templates/ostatus/subscribe.html

64 lines
2.2 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 %}
{% trans "Log in to " %}
{% elif error %}
{% trans "Error following from " %}
2021-11-28 01:43:29 +00:00
{% else %}
2021-11-28 02:28:58 +00:00
{% trans "Follow from " %}
{% endif %}
{% endblock %}
2021-11-28 01:43:29 +00:00
2021-11-28 02:28:58 +00:00
{% block heading %}
2021-11-28 21:03:01 +00:00
{% if not request.user.is_authenticated and not error == 'remote_subscribe' %}
2021-11-28 02:28:58 +00:00
{% trans "Let's log in first..." %}
{% elif error %}
{% trans 'Uh oh...' %}
{% else %}
{% trans 'Follow from ' %}{{ site.name }}
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' %}">
<span class="is-sr-only">{% trans "Locked account" %}</span>
</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 %}
<input name="user" value={{ user.username }} hidden>
<button class="button is-link" type="submit">{% trans "Follow " %} {{ user.display_name }}</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 %}