2020-02-22 00:03:05 +00:00
|
|
|
{% extends 'layout.html' %}
|
2020-10-30 21:01:43 +00:00
|
|
|
{% load fr_display %}
|
2020-02-22 00:03:05 +00:00
|
|
|
{% block content %}
|
2020-11-10 21:39:37 +00:00
|
|
|
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<h1 class="title">
|
|
|
|
{% if is_self %}Your
|
|
|
|
{% else %}
|
|
|
|
{% include 'snippets/username.html' with user=user possessive=True %}
|
|
|
|
{% endif %}
|
|
|
|
shelves
|
|
|
|
</h1>
|
|
|
|
</div>
|
2020-11-10 22:52:04 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% include 'snippets/user_header.html' with user=user %}
|
|
|
|
|
|
|
|
<div class="block columns">
|
|
|
|
<div class="column">
|
2020-11-10 22:57:44 +00:00
|
|
|
<div class="tabs" role="tablist">
|
2020-11-10 22:52:04 +00:00
|
|
|
<ul>
|
|
|
|
{% for shelf_tab in shelves %}
|
|
|
|
<li class="{% if shelf_tab.identifier == shelf.identifier %}is-active{% endif %}">
|
|
|
|
<a href="/user/{{ user | username }}/shelf/{{ shelf_tab.identifier }}" role="tab" aria-selected="{% if shelf_tab.identifier == shelf.identifier %}true{% else %}false{% endif %}">{{ shelf_tab.name }}</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-11-10 21:39:37 +00:00
|
|
|
{% if is_self %}
|
|
|
|
<div class="column is-narrow">
|
2020-11-10 22:52:04 +00:00
|
|
|
<label for="create-shelf-form">
|
|
|
|
<div role="button" tabindex="0">
|
|
|
|
<span class="icon icon-plus">
|
|
|
|
<span class="is-sr-only">Create new shelf</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
2020-11-10 21:39:37 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
2020-11-10 22:52:04 +00:00
|
|
|
<input type="checkbox" id="create-shelf-form" class="toggle-control">
|
|
|
|
<div class="toggle-content hidden">
|
|
|
|
<div class="box mb-5">
|
|
|
|
<h2 class="title is-4">Create new shelf</h2>
|
|
|
|
<form name="create-shelf" action="/create-shelf/" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="user" value="{{ request.user.id }}">
|
|
|
|
<div class="field">
|
|
|
|
<label class="label" for="id_name">Name:</label>
|
|
|
|
<input type="text" name="name" maxlength="100" class="input" required="" id="id_name">
|
|
|
|
</div>
|
2020-02-22 00:03:05 +00:00
|
|
|
|
2020-11-10 22:52:04 +00:00
|
|
|
<label class="label">
|
|
|
|
<p>Shelf privacy:</p>
|
|
|
|
{% include 'snippets/privacy_select.html' with no_label=True%}
|
|
|
|
</label>
|
|
|
|
<div class="field is-grouped">
|
|
|
|
<button class="button is-primary" type="submit">Create shelf</button>
|
|
|
|
<label role="button" class="button" for="create-shelf-form" tabindex="0">Cancel<label>
|
|
|
|
</div>
|
|
|
|
</form>
|
2020-10-30 21:01:43 +00:00
|
|
|
</div>
|
2020-09-30 02:48:10 +00:00
|
|
|
</div>
|
|
|
|
|
2020-11-10 22:52:04 +00:00
|
|
|
<div class="block columns">
|
2020-11-10 21:39:37 +00:00
|
|
|
<div class="column">
|
2020-11-11 00:18:48 +00:00
|
|
|
<h2 class="title is-3">
|
|
|
|
{{ shelf.name }}
|
|
|
|
<span class="subtitle">
|
|
|
|
{% include 'snippets/privacy-icons.html' with item=shelf %}
|
|
|
|
</span>
|
|
|
|
</h2>
|
2020-11-10 21:39:37 +00:00
|
|
|
</div>
|
|
|
|
{% if is_self %}
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<a href="/edit-shelf/{{ shelf.identifier }}">
|
|
|
|
<span class="icon icon-pencil">
|
|
|
|
<span class="is-sr-only">Edit shelf</span>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
2020-09-29 21:11:55 +00:00
|
|
|
<div class="block">
|
2020-02-22 00:03:05 +00:00
|
|
|
<div>
|
|
|
|
{% include 'snippets/shelf.html' with shelf=shelf ratings=ratings %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|