forked from mirrors/bookwyrm
improve new group member adding
The add-members page now looks almost identical to the group page and is clearer.
This commit is contained in:
parent
1a02af1450
commit
e15eef16c5
4 changed files with 29 additions and 42 deletions
|
@ -1,6 +1,8 @@
|
|||
{% extends 'groups/group.html' %}
|
||||
|
||||
{% block panel %}
|
||||
<h1 class="title">Add users to <a href="{{ group.local_path }}">{{ group.name }}</a></h1>
|
||||
{% block searchresults %}
|
||||
<h2 class="title is-5">
|
||||
Add new members!
|
||||
</h2>
|
||||
{% include 'groups/suggested_users.html' with suggested_users=suggested_users query=query %}
|
||||
{% endblock %}
|
|
@ -8,9 +8,12 @@
|
|||
<div class="columns mt-3">
|
||||
<section class="column is-three-quarters">
|
||||
|
||||
{% block searchresults %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "groups/members.html" %}
|
||||
|
||||
<h2 class="heading">Lists</h2>
|
||||
<h2 class="title is-5">Lists</h2>
|
||||
{% if not lists %}
|
||||
<p>{% trans "This group has no lists" %}</p>
|
||||
{% else %}
|
||||
|
@ -57,5 +60,24 @@
|
|||
{% endif %}
|
||||
{% include "snippets/pagination.html" with page=items %}
|
||||
</section>
|
||||
|
||||
<section class="column is-one-quarter">
|
||||
<div class="block">
|
||||
<h2 class="title is-5">Find new members</h2>
|
||||
<form class="field has-addons" method="get" action="{% url 'group-find-users' group.id %}">
|
||||
<div class="control">
|
||||
<input type="text" name="query" value="{{ request.GET.query }}" class="input" placeholder="{% trans 'Search to add a user' %}" aria-label="{% trans 'Search to add a user' %}">
|
||||
</div>
|
||||
<div class="control">
|
||||
<button class="button" type="submit">
|
||||
<span class="icon icon-search" title="{% trans 'Search' %}">
|
||||
<span class="is-sr-only">{% trans "Search" %}</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,34 +2,10 @@
|
|||
{% load utilities %}
|
||||
{% load humanize %}
|
||||
{% load bookwyrm_tags %}
|
||||
<!-- TODO: do we need this? -->
|
||||
{% if request.GET.updated %}
|
||||
<div class="notification is-primary">
|
||||
{% trans "You successfully added a user to this group!" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2 class="heading">Group Members</h2>
|
||||
<h2 class="title is-5">Group Members</h2>
|
||||
<p class="subtitle is-6">{% trans "Members can add and remove books on your group's book lists" %}</p>
|
||||
|
||||
{% block panel %}
|
||||
<div class="block">
|
||||
<form class="field has-addons" method="get" action="{% url 'group-find-users' group.id %}">
|
||||
<div class="control">
|
||||
<input type="text" name="query" value="{{ request.GET.query }}" class="input" placeholder="{% trans 'Search to add a user' %}" aria-label="{% trans 'Search to add a user' %}">
|
||||
</div>
|
||||
<div class="control">
|
||||
<button class="button" type="submit">
|
||||
<span class="icon icon-search" title="{% trans 'Search' %}">
|
||||
<span class="is-sr-only">{% trans "Search" %}</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{% include 'snippets/suggested_users.html' with suggested_users=suggested_users %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
<div class="column is-flex is-flex-grow-0">
|
||||
{% for member in group.members.all %}
|
||||
<div class="box has-text-centered is-shadowless has-background-white-bis my-0 mx-2">
|
||||
|
|
|
@ -1,20 +1,7 @@
|
|||
{% load i18n %}
|
||||
{% load utilities %}
|
||||
{% load humanize %}
|
||||
<div class="block">
|
||||
<form class="field has-addons" method="get" action="{% url 'group-find-users' group.id %}">
|
||||
<div class="control">
|
||||
<input type="text" name="query" value="{{ request.GET.query }}" class="input" placeholder="{% trans 'Search to add a user' %}" aria-label="{% trans 'Search to add a user' %}">
|
||||
</div>
|
||||
<div class="control">
|
||||
<button class="button" type="submit">
|
||||
<span class="icon icon-search" title="{% trans 'Search' %}">
|
||||
<span class="is-sr-only">{% trans "Search" %}</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% if suggested_users %}
|
||||
<div class="columns is-mobile scroll-x mb-0">
|
||||
{% for user in suggested_users %}
|
||||
|
|
Loading…
Reference in a new issue