mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 03:51:08 +00:00
Show shelf description
This commit is contained in:
parent
5ea40e23b7
commit
242ffe5456
1 changed files with 44 additions and 39 deletions
|
@ -63,49 +63,54 @@
|
|||
{% include 'shelf/create_shelf_form.html' with controls_text='create_shelf_form' %}
|
||||
</div>
|
||||
|
||||
<div class="block columns is-mobile">
|
||||
<div class="column">
|
||||
<h2 class="title is-3">
|
||||
{{ shelf.name }}
|
||||
<span class="subtitle">
|
||||
{% include 'snippets/privacy-icons.html' with item=shelf %}
|
||||
</span>
|
||||
{% with count=books.paginator.count %}
|
||||
{% if count %}
|
||||
<p class="help">
|
||||
{% blocktrans trimmed count counter=count with formatted_count=count|intcomma %}
|
||||
{{ formatted_count }} book
|
||||
{% plural %}
|
||||
{{ formatted_count }} books
|
||||
{% endblocktrans %}
|
||||
|
||||
{% if books.has_other_pages %}
|
||||
{% blocktrans trimmed with start=books.start_index end=books.end_index %}
|
||||
(showing {{ start }}-{{ end }})
|
||||
<div>
|
||||
<div class="block columns is-mobile">
|
||||
<div class="column">
|
||||
<h2 class="title is-3">
|
||||
{{ shelf.name }}
|
||||
<span class="subtitle">
|
||||
{% include 'snippets/privacy-icons.html' with item=shelf %}
|
||||
</span>
|
||||
{% with count=books.paginator.count %}
|
||||
{% if count %}
|
||||
<p class="help">
|
||||
{% blocktrans trimmed count counter=count with formatted_count=count|intcomma %}
|
||||
{{ formatted_count }} book
|
||||
{% plural %}
|
||||
{{ formatted_count }} books
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</h2>
|
||||
</div>
|
||||
{% if is_self and shelf.id %}
|
||||
<div class="column is-narrow">
|
||||
<div class="is-flex">
|
||||
{% trans "Edit shelf" as button_text %}
|
||||
{% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="pencil" controls_text="edit_shelf_form" focus="edit_shelf_form_header" %}
|
||||
|
||||
{% if shelf.deletable %}
|
||||
<form class="ml-1" name="delete-shelf" action="/delete-shelf/{{ shelf.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
||||
<button class="button is-danger is-light" type="submit">
|
||||
{% trans "Delete shelf" %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if books.has_other_pages %}
|
||||
{% blocktrans trimmed with start=books.start_index end=books.end_index %}
|
||||
(showing {{ start }}-{{ end }})
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</h2>
|
||||
</div>
|
||||
{% if is_self and shelf.id %}
|
||||
<div class="column is-narrow">
|
||||
<div class="is-flex">
|
||||
{% trans "Edit shelf" as button_text %}
|
||||
{% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="pencil" controls_text="edit_shelf_form" focus="edit_shelf_form_header" %}
|
||||
|
||||
{% if shelf.deletable %}
|
||||
<form class="ml-1" name="delete-shelf" action="/delete-shelf/{{ shelf.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
||||
<button class="button is-danger is-light" type="submit">
|
||||
{% trans "Delete shelf" %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if shelf.description %}
|
||||
<p>{{ shelf.description }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue