Merge pull request #662 from mouse-reeve/titles

Puts titles in templates instead of views
This commit is contained in:
Mouse Reeve
2021-02-28 16:15:39 -08:00
committed by GitHub
61 changed files with 431 additions and 331 deletions

View File

@ -1,14 +1,17 @@
{% extends 'user/user_layout.html' %}
{% load bookwyrm_tags %}
{% load i18n %}
{% block title %}{% blocktrans with username=user.display_name %}Shelves: {{ username }}{% endblocktrans %}{% endblock %}
{% block header %}
<header class="columns">
<h1 class="title">
{% if is_self %}Your
{% if is_self %}
{% trans "Your Shelves" %}
{% else %}
{% include 'snippets/username.html' with user=user possessive=True %}
{% blocktrans with username=user.display_name %}{{ username }}: Shelves{% endblocktrans %}
{% endif %}
shelves
</h1>
</header>
{% endblock %}
@ -29,7 +32,8 @@
{% if is_self %}
<div class="column is-narrow">
{% include 'snippets/toggle/open_button.html' with text="Create shelf" icon="plus" controls_text="create-shelf-form" focus="create-shelf-form-header" %}
{% trans "Create Shelf" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text icon="plus" controls_text="create-shelf-form" focus="create-shelf-form-header" %}
</div>
{% endif %}
</div>