From d05e100421eaf53946e6cd420b2d32f45b35ab2f Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 28 Nov 2021 13:28:58 +1100 Subject: [PATCH] update ostatus templates --- bookwyrm/templates/ostatus/ostatus_error.html | 19 ------------- .../templates/ostatus/ostatus_subscribe.html | 28 ++++++++++++++----- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/bookwyrm/templates/ostatus/ostatus_error.html b/bookwyrm/templates/ostatus/ostatus_error.html index 5fbc8e945..de2ba988b 100644 --- a/bookwyrm/templates/ostatus/ostatus_error.html +++ b/bookwyrm/templates/ostatus/ostatus_error.html @@ -1,23 +1,4 @@ -{% extends 'ostatus/template.html' %} {% load i18n %} -{% load utilities %} -{% load markdown %} - -{% block title %} -{% if not request.user.is_authenticated %} -{% trans "Log in to " %} -{% else %} -{% trans "Error following from " %} -{% endif %} -{% endblock %} - -{% block heading %} -{% if not request.user.is_authenticated %} -Let's log in first... -{% else %} -Uh oh... -{% endif %} -{% endblock %} {% block content %}
diff --git a/bookwyrm/templates/ostatus/ostatus_subscribe.html b/bookwyrm/templates/ostatus/ostatus_subscribe.html index 7e929202e..9d87d8ef8 100644 --- a/bookwyrm/templates/ostatus/ostatus_subscribe.html +++ b/bookwyrm/templates/ostatus/ostatus_subscribe.html @@ -3,15 +3,30 @@ {% load utilities %} {% load markdown %} -{% if error or not request.user.is_authenticated %} - {% include 'ostatus/ostatus_error.html' %} +{% block title %} +{% if not request.user.is_authenticated %} +{% trans "Log in to " %} +{% elif error %} +{% trans "Error following from " %} {% else %} +{% trans "Follow from " %} +{% endif %} +{% endblock %} -{% block title %}{% trans "Follow from " %}{% endblock %} - -{% block heading %}Follow from {{ site.name }}{% endblock %} +{% block heading %} +{% if not request.user.is_authenticated %} +{% trans "Let's log in first..." %} +{% elif error %} +{% trans 'Uh oh...' %} +{% else %} +{% blocktrans %}Follow from {{ site.name }}{% endblocktrans %} +{% endif %} +{% endblock %} {% block content %} +{% if error or not request.user.is_authenticated %} + {% include 'ostatus/ostatus_error.html' with error=error user=user account=account %} +{% else %}
@@ -43,6 +58,5 @@
-{% endblock %} - {% endif %} +{% endblock %}