Removes "all books" link from profile when there are none

This commit is contained in:
Mouse Reeve 2023-08-06 19:40:59 -07:00
parent 185486c6fc
commit 63b60ad62c

View file

@ -51,9 +51,15 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
{% empty %}
<p class="column">
<em>No books found.</em>
</p>
{% endfor %} {% endfor %}
</div> </div>
{% if shelves.exists %}
<small><a href="{% url 'user-shelves' user|username %}">{% trans "View all books" %}</a></small> <small><a href="{% url 'user-shelves' user|username %}">{% trans "View all books" %}</a></small>
{% endif %}
</div> </div>
{% endif %} {% endif %}
@ -119,16 +125,16 @@
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% for activity in activities %} {% for activity in activities %}
<div class="block" id="feed_{{ activity.id }}"> <div class="block" id="feed_{{ activity.id }}">
{% include 'snippets/status/status.html' with status=activity %} {% include 'snippets/status/status.html' with status=activity %}
</div> </div>
{% endfor %} {% empty %}
{% if not activities %}
<div class="block"> <div class="block">
<p><em>{% trans "No activities yet!" %}</em></p> <p><em>{% trans "No activities yet!" %}</em></p>
</div> </div>
{% endif %} {% endfor %}
{% include 'snippets/pagination.html' with page=activities path=user.local_path anchor="#feed" mode="chronological" %} {% include 'snippets/pagination.html' with page=activities path=user.local_path anchor="#feed" mode="chronological" %}
</div> </div>