Fixes model test

This commit is contained in:
Mouse Reeve
2021-01-31 09:08:06 -08:00
parent d73a1b4ec1
commit 4883231347
7 changed files with 58 additions and 11 deletions

View File

@ -1,2 +1,2 @@
<h4><a href="{{ list.local_path }}">{{ list.name }}</a> {% include 'snippets/privacy-icons.html' with item=list %}</h4>
<h4><a href="{{ list.local_path }}">{{ list.name }}</a> <span class="subtitle">{% include 'snippets/privacy-icons.html' with item=list %}</span></h4>
{% include 'snippets/trimmed_text.html' with full=list.description %}

View File

@ -1,7 +1,44 @@
{% extends 'layout.html' %}
{% block content %}
<h1>{{ list.name }}</h1>
{{ list }}
<header class="columns content">
<div class="column">
<h1 class="title">{{ list.name }} <span class="subtitle">{% include 'snippets/privacy-icons.html' with item=list %}</span></h1>
{% include 'snippets/trimmed_text.html' with full=list.description %}
</div>
<div class="column is-narrow">
{% include 'snippets/toggle/open_button.html' with text="Edit list" icon="pencil" controls_text="edit-list" %}
</div>
</header>
<div class="columns content">
<section class="column">
<h2>Books</h2>
{% if not list.books.exists %}
<p>This list is currently empty</p>
{% else %}
{% for book in list.books.all %}
{{ book }}
{% endfor %}
{% endif %}
</section>
<section class="column is-one-quarter">
<h2>Add Books</h2>
{% for book in suggested_books %}
<div class="block columns">
<div class="column is-narrow">
<a href="{{ book.local_path }}">{% include 'snippets/book_cover.html' with book=book size="small" %}</a>
</div>
<div class="column">
<p>{% include 'snippets/book_titleby.html' with book=book %}</p>
<form name="add-book" method="post" action="{% url 'list-add-book' list.id %}">
{% csrf_token %}
<button type="submit" class="button is-small is-link">Add</button>
</form>
</div>
</div>
{% endfor %}
</section>
</div>
{% endblock %}

View File

@ -67,7 +67,7 @@
{% if request.user.list_set.exists %}
<ul>
{% for list in request.user.list_set.all %}
<li>
<li class="block">
{% include 'lists/list-item.html' with list=list %}
</li>
{% endfor %}
@ -81,7 +81,7 @@
<h2 class="title">Recent Lists</h2>
<ul>
{% for list in lists %}
<li>
<li class="block">
{% include 'lists/list-item.html' with list=list %}
</li>
{% endfor %}