forked from mirrors/bookwyrm
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' %}
|
{% include 'shelf/create_shelf_form.html' with controls_text='create_shelf_form' %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="block columns is-mobile">
|
<div>
|
||||||
<div class="column">
|
<div class="block columns is-mobile">
|
||||||
<h2 class="title is-3">
|
<div class="column">
|
||||||
{{ shelf.name }}
|
<h2 class="title is-3">
|
||||||
<span class="subtitle">
|
{{ shelf.name }}
|
||||||
{% include 'snippets/privacy-icons.html' with item=shelf %}
|
<span class="subtitle">
|
||||||
</span>
|
{% include 'snippets/privacy-icons.html' with item=shelf %}
|
||||||
{% with count=books.paginator.count %}
|
</span>
|
||||||
{% if count %}
|
{% with count=books.paginator.count %}
|
||||||
<p class="help">
|
{% if count %}
|
||||||
{% blocktrans trimmed count counter=count with formatted_count=count|intcomma %}
|
<p class="help">
|
||||||
{{ formatted_count }} book
|
{% blocktrans trimmed count counter=count with formatted_count=count|intcomma %}
|
||||||
{% plural %}
|
{{ formatted_count }} book
|
||||||
{{ formatted_count }} books
|
{% plural %}
|
||||||
{% endblocktrans %}
|
{{ formatted_count }} books
|
||||||
|
|
||||||
{% if books.has_other_pages %}
|
|
||||||
{% blocktrans trimmed with start=books.start_index end=books.end_index %}
|
|
||||||
(showing {{ start }}-{{ end }})
|
|
||||||
{% endblocktrans %}
|
{% 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 %}
|
{% if books.has_other_pages %}
|
||||||
<form class="ml-1" name="delete-shelf" action="/delete-shelf/{{ shelf.id }}" method="post">
|
{% blocktrans trimmed with start=books.start_index end=books.end_index %}
|
||||||
{% csrf_token %}
|
(showing {{ start }}-{{ end }})
|
||||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
{% endblocktrans %}
|
||||||
<button class="button is-danger is-light" type="submit">
|
{% endif %}
|
||||||
{% trans "Delete shelf" %}
|
</p>
|
||||||
</button>
|
{% endif %}
|
||||||
</form>
|
{% endwith %}
|
||||||
{% endif %}
|
</h2>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
{% if shelf.description %}
|
||||||
|
<p>{{ shelf.description }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue