uses "plus" button for adding read dates

This commit is contained in:
Mouse Reeve 2021-01-17 17:22:03 -08:00
parent 2937c592c1
commit aba5c48af9
2 changed files with 22 additions and 16 deletions

View file

@ -148,25 +148,31 @@
</div>
{% if readthroughs.exists %}
<div>
<h2 class="title is-5">Your reading activity</h2>
{% for readthrough in readthroughs %}
{% include 'snippets/readthrough.html' with readthrough=readthrough %}
{% endfor %}
</div>
{% endif %}
<div class="block">
{% include 'snippets/toggle/open_button.html' with text="Add read dates" controls_text="add-readthrough" %}
<div class="hidden box" id="add-readthrough">
<section class="block">
<header class="columns">
<h2 class="column title is-5 mb-1">Your reading activity</h2>
<div class="column is-narrow">
{% include 'snippets/toggle/open_button.html' with text="Add read dates" icon="plus" class="is-small" controls_text="add-readthrough" %}
</div>
</header>
<section class="hidden box" id="add-readthrough">
<form name="add-readthrough" action="/create-readthrough" method="post">
{% include 'snippets/readthrough_form.html' with readthrough=None %}
<div class="field is-grouped">
<button class="button is-primary" type="submit">Create</button>
{% include 'snippets/toggle/close_button.html' with text="Cancel" controls_text="add-readthrough" %}
<div class="control">
<button class="button is-primary" type="submit">Create</button>
</div>
<div class="control">
{% include 'snippets/toggle/close_button.html' with text="Cancel" controls_text="add-readthrough" %}
</div>
</div>
</form>
</div>
</div>
</section>
{% for readthrough in readthroughs %}
{% include 'snippets/readthrough.html' with readthrough=readthrough %}
{% endfor %}
</section>
{% endif %}
{% if request.user.is_authenticated %}
<div class="box">

View file

@ -1,5 +1,5 @@
{% load humanize %}
<div class="content block">
<section class="content block">
<div id="hide-edit-readthrough-{{ readthrough.id }}">
<dl class="mb-1">
{% if readthrough.start_date %}
@ -34,5 +34,5 @@
{% include 'snippets/toggle/close_button.html' with text="Cancel" controls_text="edit-readthrough" controls_uid=readthrough.id %}
</div>
</form>
</div>
</section>
{% include 'snippets/delete_readthrough_modal.html' with controls_text="delete-readthrough" controls_uid=readthrough.id %}