Merge branch 'main' into themes
This commit is contained in:
@ -352,7 +352,7 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% if request.user.list_set.exists %}
|
||||
{% if list_options.exists %}
|
||||
<form name="list-add" method="post" action="{% url 'list-add-book' %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
@ -361,7 +361,7 @@
|
||||
<div class="field has-addons">
|
||||
<div class="select control is-clipped">
|
||||
<select name="book_list" id="id_list">
|
||||
{% for list in user.list_set.all %}
|
||||
{% for list in list_options %}
|
||||
<option value="{{ list.id }}">{{ list.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
@ -33,7 +33,7 @@
|
||||
</div>
|
||||
<footer class="card-footer">
|
||||
{% if user != request.user %}
|
||||
{% if user.mutuals %}
|
||||
{% if user.mutuals and not user.hide_follows %}
|
||||
<div class="card-footer-item">
|
||||
<div class="has-text-centered">
|
||||
<p class="title is-6 mb-0">{{ user.mutuals }}</p>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<span title="@{{ user|username }}" class="is-block pb-3">@{{ user|username|truncatechars:8 }}</span>
|
||||
</a>
|
||||
{% include 'snippets/add_to_group_button.html' with user=user group=group %}
|
||||
{% if user.mutuals %}
|
||||
{% if user.mutuals and not user.hide_follows %}
|
||||
<p class="help">
|
||||
{% blocktrans trimmed with mutuals=user.mutuals|intcomma count counter=user.mutuals %}
|
||||
{{ mutuals }} follower you follow
|
||||
|
@ -30,13 +30,23 @@
|
||||
|
||||
<div class="columns mt-3">
|
||||
<section class="column is-three-quarters">
|
||||
{% if request.GET.updated %}
|
||||
<div class="notification is-primary">
|
||||
{% if list.curation != "open" and request.user != list.user and not list.group|is_member:request.user %}
|
||||
{% trans "You successfully suggested a book for this list!" %}
|
||||
{% else %}
|
||||
{% trans "You successfully added a book to this list!" %}
|
||||
{% endif %}
|
||||
{% if add_failed %}
|
||||
<div class="notification is-danger is-light">
|
||||
<span class="icon icon-x" aria-hidden="true"></span>
|
||||
<span>
|
||||
{% trans "That book is already on this list." %}
|
||||
</span>
|
||||
</div>
|
||||
{% elif add_succeeded %}
|
||||
<div class="notification is-success is-light">
|
||||
<span class="icon icon-check" aria-hidden="true"></span>
|
||||
<span>
|
||||
{% if list.curation != "open" and request.user != list.user and not list.group|is_member:request.user %}
|
||||
{% trans "You successfully suggested a book for this list!" %}
|
||||
{% else %}
|
||||
{% trans "You successfully added a book to this list!" %}
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
@ -117,6 +117,12 @@
|
||||
{% trans "Manually approve followers" %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="checkbox label" for="id_hide_follows">
|
||||
{{ form.hide_follows }}
|
||||
{% trans "Hide followers and following on profile" %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label" for="id_default_post_privacy">
|
||||
{% trans "Default post privacy:" %}
|
||||
|
@ -4,7 +4,19 @@
|
||||
|
||||
{% block header %}
|
||||
{% trans "Add instance" %}
|
||||
<a href="{% url 'settings-federation' %}" class="has-text-weight-normal help">{% trans "Back to instance list" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
|
||||
<ul>
|
||||
<li><a href="{% url 'settings-federation' %}">{% trans "Federated Instances" %}</a></li>
|
||||
<li class="is-active">
|
||||
<a href="#" aria-current="page">
|
||||
{% trans "Add instance" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
@ -73,9 +85,13 @@
|
||||
<label class="label" for="id_notes">
|
||||
{% trans "Notes:" %}
|
||||
</label>
|
||||
<textarea name="notes" cols="40" rows="5" class="textarea" id="id_notes">
|
||||
{{ form.notes.value|default:'' }}
|
||||
</textarea>
|
||||
<textarea
|
||||
name="notes"
|
||||
cols="40"
|
||||
rows="5"
|
||||
class="textarea"
|
||||
id="id_notes"
|
||||
>{{ form.notes.value|default:'' }}</textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="button is-primary">
|
||||
|
@ -9,8 +9,26 @@
|
||||
|
||||
{% if server.status == "blocked" %}<span class="icon icon-x has-text-danger is-size-5" title="{% trans 'Blocked' %}"><span class="is-sr-only">{% trans "Blocked" %}</span></span>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
<a href="{% url 'settings-federation' %}" class="has-text-weight-normal help">{% trans "Back to list" %}</a>
|
||||
{% block edit-button %}
|
||||
<form name="reload" method="POST" action="{% url 'settings-federated-server-refresh' server.id %}">
|
||||
{% csrf_token %}
|
||||
<button class="button" type="submit">{% trans "Refresh data" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
|
||||
<ul>
|
||||
<li><a href="{% url 'settings-federation' %}">{% trans "Federated Instances" %}</a></li>
|
||||
<li class="is-active">
|
||||
<a href="#" aria-current="page">
|
||||
{{ server.server_name }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
|
@ -4,7 +4,19 @@
|
||||
|
||||
{% block header %}
|
||||
{% trans "Import Blocklist" %}
|
||||
<a href="{% url 'settings-federation' %}" class="has-text-weight-normal help">{% trans "Back to instance list" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
|
||||
<ul>
|
||||
<li><a href="{% url 'settings-federation' %}">{% trans "Federated Instances" %}</a></li>
|
||||
<li class="is-active">
|
||||
<a href="#" aria-current="page">
|
||||
{% trans "Import Blocklist" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
|
@ -16,11 +16,11 @@
|
||||
<ul>
|
||||
{% url 'settings-federation' status='federated' as url %}
|
||||
<li {% if request.path in url %}class="is-active" aria-current="page"{% endif %}>
|
||||
<a href="{{ url }}">{% trans "Federated" %}</a>
|
||||
<a href="{{ url }}">{% trans "Federated" %} ({{ federated_count }})</a>
|
||||
</li>
|
||||
{% url 'settings-federation' status='blocked' as url %}
|
||||
<li {% if url in request.path %}class="is-active" aria-current="page"{% endif %}>
|
||||
<a href="{{ url }}">{% trans "Blocked" %}</a>
|
||||
<a href="{{ url }}">{% trans "Blocked" %} ({{ blocked_count }})</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -71,7 +71,9 @@
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<input type="hidden" name="shelf" value="{{ user_shelf.id }}">
|
||||
<button class="button is-fullwidth is-small is-radiusless is-danger is-light" type="submit">{% trans "Remove from" %} {{ user_shelf.name }}</button>
|
||||
<button class="button is-fullwidth is-small is-radiusless is-danger is-light" type="submit">
|
||||
{% blocktrans with name=user_shelf|translate_shelf_name %}Remove from {{ name }}{% endblocktrans %}
|
||||
</button>
|
||||
</form>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
@ -63,7 +63,7 @@
|
||||
<input type="hidden" name="book" value="{{ active_shelf.book.id }}">
|
||||
<input type="hidden" name="shelf" value="{{ active_shelf.shelf.id }}">
|
||||
<button class="button is-fullwidth is-small{% if dropdown %} is-radiusless{% endif %} is-danger is-light" type="submit">
|
||||
{% blocktrans with name=active_shelf.shelf.name %}Remove from {{ name }}{% endblocktrans %}
|
||||
{% blocktrans with name=active_shelf.shelf|translate_shelf_name %}Remove from {{ name }}{% endblocktrans %}
|
||||
</button>
|
||||
</form>
|
||||
</li>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<span title="@{{ user|username }}" class="is-block pb-3">@{{ user|username|truncatechars:8 }}</span>
|
||||
</a>
|
||||
{% include 'snippets/follow_button.html' with user=user minimal=True %}
|
||||
{% if user.mutuals %}
|
||||
{% if user.mutuals and not user.hide_follows %}
|
||||
<p class="help">
|
||||
{% blocktrans trimmed with mutuals=user.mutuals|intcomma count counter=user.mutuals %}
|
||||
{{ mutuals }} follower you follow
|
||||
|
@ -1,12 +1,4 @@
|
||||
{% load i18n %}
|
||||
{% if shelf.identifier == 'all' %}
|
||||
{% trans "All books" %}
|
||||
{% elif shelf.identifier == 'to-read' %}
|
||||
{% trans "To Read" %}
|
||||
{% elif shelf.identifier == 'reading' %}
|
||||
{% trans "Currently Reading" %}
|
||||
{% elif shelf.identifier == 'read' %}
|
||||
{% trans "Read" %}
|
||||
{% else %}
|
||||
{{ shelf.name }}
|
||||
{% endif %}
|
||||
{% load shelf_tags %}
|
||||
|
||||
{{ shelf|translate_shelf_name }}
|
||||
|
@ -28,16 +28,22 @@
|
||||
|
||||
{% elif request.user.is_authenticated %}
|
||||
|
||||
{% mutuals_count user as mutuals %}
|
||||
<a href="{% url 'user-followers' user|username %}">
|
||||
{% if mutuals %}
|
||||
{% blocktrans with mutuals_display=mutuals|intcomma count counter=mutuals %}{{ mutuals_display }} follower you follow{% plural %}{{ mutuals_display }} followers you follow{% endblocktrans %}
|
||||
{% elif request.user in user.following.all %}
|
||||
{% trans "Follows you" %}
|
||||
{% else %}
|
||||
{% trans "No followers you follow" %}
|
||||
{% if user.hide_follows %}
|
||||
{% if request.user in user.following.all %}
|
||||
{% trans "Follows you" %}
|
||||
{% endif %}
|
||||
</a>
|
||||
{% else %}
|
||||
{% mutuals_count user as mutuals %}
|
||||
<a href="{% url 'user-followers' user|username %}">
|
||||
{% if mutuals %}
|
||||
{% blocktrans with mutuals_display=mutuals|intcomma count counter=mutuals %}{{ mutuals_display }} follower you follow{% plural %}{{ mutuals_display }} followers you follow{% endblocktrans %}
|
||||
{% elif request.user in user.following.all %}
|
||||
{% trans "Follows you" %}
|
||||
{% else %}
|
||||
{% trans "No followers you follow" %}
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
</p>
|
||||
|
Reference in New Issue
Block a user