Merge pull request #534 from mouse-reeve/post-release-ui-fixes

UI fixes for latest release
This commit is contained in:
Mouse Reeve 2021-01-18 12:54:37 -08:00 committed by GitHub
commit 043c1f75a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 5 deletions

View file

@ -247,7 +247,7 @@ class AnnualGoal(BookWyrmModel):
''' the books you've read this year ''' ''' the books you've read this year '''
return self.user.readthrough_set.filter( return self.user.readthrough_set.filter(
finish_date__year__gte=self.year finish_date__year__gte=self.year
).order_by('finish_date').all() ).order_by('-finish_date').all()
@property @property

View file

@ -4,10 +4,12 @@
{% endblock %} {% endblock %}
</header> </header>
{% if not status or status.status_type != 'GeneratedNote' or status.book or status.mention_books.exists or status.mention_users.exists %}
<section class="card-content"> <section class="card-content">
{% block card-content %} {% block card-content %}
{% endblock %} {% endblock %}
</section> </section>
{% endif %}
<footer class="card-footer has-background-white-bis"> <footer class="card-footer has-background-white-bis">
{% block card-footer %} {% block card-footer %}

View file

@ -4,11 +4,12 @@
{% with book.id|uuid as uuid %} {% with book.id|uuid as uuid %}
{% active_shelf book as active_shelf %} {% active_shelf book as active_shelf %}
<div class="field has-addons"> <div class="field has-addons">
{% if switch_mode and active_shelf.book != book %}
<div class="control"> <div class="control">
{% if switch_mode and active_shelf.book != book %}
{% include 'snippets/switch_edition_button.html' with edition=book size='is-small' %} {% include 'snippets/switch_edition_button.html' with edition=book size='is-small' %}
{% else %} </div>
{% else %}
<div class="control">
{% if active_shelf.shelf.identifier == 'read' %} {% if active_shelf.shelf.identifier == 'read' %}
<button class="button is-small" disabled> <button class="button is-small" disabled>
<span>Read</span> <span class="icon icon-check"></span> <span>Read</span> <span class="icon icon-check"></span>

View file

@ -1,5 +1,5 @@
<form name="switch-edition" action="/switch-edition" method="POST"> <form name="switch-edition" action="/switch-edition" method="POST">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="edition" value="{{ edition.id }}"> <input type="hidden" name="edition" value="{{ edition.id }}">
<button class="button {{ size }}">Switch to this edition</button> <button type="submit" class="button {{ size }}">Switch to this edition</button>
</form> </form>