Merge pull request #2947 from bookwyrm-social/small-ui-fixes

Small UI fixes
This commit is contained in:
Mouse Reeve 2023-08-19 15:09:12 -07:00 committed by GitHub
commit c6aaa80c62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 44 additions and 18 deletions

View file

@ -4,11 +4,11 @@
{% block filter %}
<legend class="label">{% trans "Community" %}</legend>
<label class="is-block">
<input type="radio" class="radio" name="scope" value="local" {% if request.GET.scope == "local" %}checked{% endif %}>
<input type="radio" class="radio" name="scope" value="local" {% if scope == "local" %}checked{% endif %}>
{% trans "Local users" %}
</label>
<label class="is-block">
<input type="radio" class="radio" name="scope" value="federated" {% if request.GET.scope == "federated" %}checked{% endif %}>
<input type="radio" class="radio" name="scope" value="federated" {% if scope == "federated" %}checked{% endif %}>
{% trans "Federated community" %}
</label>
{% endblock %}

View file

@ -6,8 +6,8 @@
<div class="control">
<div class="select">
<select name="sort" id="id_sort">
<option value="recent" {% if request.GET.sort == "recent" %}selected{% endif %}>{% trans "Recently active" %}</option>
<option value="suggested" {% if request.GET.sort == "suggested" %}selected{% endif %}>{% trans "Suggested" %}</option>
<option value="recent" {% if sort == "recent" %}selected{% endif %}>{% trans "Recently active" %}</option>
<option value="suggested" {% if sort == "suggested" %}selected{% endif %}>{% trans "Suggested" %}</option>
</select>
</div>
</div>

View file

@ -31,5 +31,7 @@
</div>
</div>
</div>
{% empty %}
<p class="column"><em>{% trans "No groups found." %}</em></p>
{% endfor %}
</div>

View file

@ -46,5 +46,7 @@
</div>
</div>
</div>
{% empty %}
<p class="column"><em>{% trans "No lists found." %}</em></p>
{% endfor %}
</div>

View file

@ -43,7 +43,6 @@
</nav>
{% endif %}
{% if lists %}
<section class="block">
{% include 'lists/list_items.html' with lists=lists %}
</section>
@ -51,7 +50,6 @@
<div>
{% include 'snippets/pagination.html' with page=lists path=path %}
</div>
{% endif %}
{% endblock %}

View file

@ -1,6 +1,10 @@
{% extends 'user/layout.html' %}
{% load i18n %}
{% load utilities %}
{% load i18n %}
{% block title %}
{% trans "Reading Goal" %} - {{ user|username }}
{% endblock %}
{% block header %}
<div class="columns is-mobile">

View file

@ -1,6 +1,11 @@
{% extends 'user/layout.html' %}
{% load utilities %}
{% load i18n %}
{% block title %}
{% trans "Groups" %} - {{ user|username }}
{% endblock %}
{% block header %}
<div class="columns is-mobile">
<div class="column">

View file

@ -1,6 +1,11 @@
{% extends 'user/layout.html' %}
{% load utilities %}
{% load i18n %}
{% block title %}
{% trans "Lists" %} - {{ user|username }}
{% endblock %}
{% block header %}
<div class="columns is-mobile">
<div class="column">

View file

@ -2,7 +2,9 @@
{% load i18n %}
{% load utilities %}
{% block title %}{{ user.display_name }}{% endblock %}
{% block title %}
{% trans "Reviews and Comments" %} - {{ user|username }}
{% endblock %}
{% block header %}
<div class="columns is-mobile">
@ -21,7 +23,7 @@
{% endfor %}
{% if not activities %}
<div class="block">
<p>{% trans "No reviews or comments yet!" %}</p>
<p><em>{% trans "No reviews or comments yet!" %}</em></p>
</div>
{% endif %}

View file

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

View file

@ -23,12 +23,12 @@
<p>
{% if request.user.id == user.id or admin_mode %}
<a href="{% url 'user-relationships' user|username 'followers' %}">{% blocktrans trimmed count counter=user.followers.count %}
{{ counter }} follower
<a href="{% url 'user-relationships' user|username 'followers' %}">{% blocktrans trimmed count counter=user.followers.count with display_count=user.followers.count|intcomma %}
{{ display_count }} follower
{% plural %}
{{ counter }} followers
{{ display_count }} followers
{% endblocktrans %}</a>,
<a href="{% url 'user-relationships' user|username 'following' %}">{% blocktrans trimmed with counter=user.following.count %}
<a href="{% url 'user-relationships' user|username 'following' %}">{% blocktrans trimmed with counter=user.following.count|intcomma %}
{{ counter }} following
{% endblocktrans %}</a>

View file

@ -19,7 +19,7 @@ class Directory(View):
software = request.GET.get("software")
if not software or software == "bookwyrm":
filters["bookwyrm_user"] = True
scope = request.GET.get("scope")
scope = request.GET.get("scope", "federated")
if scope == "local":
filters["local"] = True
@ -38,6 +38,8 @@ class Directory(View):
page.number, on_each_side=2, on_ends=1
),
"users": page,
"sort": sort,
"scope": scope,
}
return TemplateResponse(request, "directory/directory.html", data)