create group curated lists
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
{% load i18n %}
|
||||
{% csrf_token %}
|
||||
{% load utilities %}
|
||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
||||
|
||||
<div class="columns">
|
||||
@ -31,6 +32,35 @@
|
||||
<input type="radio" name="curation" value="open"{% if list.curation == 'open' %} checked{% endif %}> {% trans "Open" %}
|
||||
<p class="help mb-2">{% trans "Anyone can add books to this list" %}</p>
|
||||
</label>
|
||||
|
||||
<label class="field">
|
||||
<input type="radio" name="curation" value="group"{% if list.curation == 'group' %} checked{% endif %}> {% trans "Group" %}
|
||||
<p class="help mb-2">{% trans "Group members can add to and remove from this list" %}</p>
|
||||
</label>
|
||||
|
||||
<!-- TODO: add a list picker on-select for group lists -->
|
||||
|
||||
<!-- TODO: change the submission url -->
|
||||
<!-- <form name="list-add" method="post" action="{% url 'list-add-book' %}"> -->
|
||||
{% if user_groups %}
|
||||
{% csrf_token %}
|
||||
<label class="label" for="id_group">{% trans "Select Group" %}</label>
|
||||
<div class="field has-addons">
|
||||
<div class="select control">
|
||||
<select name="group" id="id_group">
|
||||
<option value="{{ group.id }}" disabled selected></option>
|
||||
{% for group in user_groups %}
|
||||
<option value="{{ group.id }}">{{ group.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{% with user|username as username %}
|
||||
{% url 'user-groups' user|username as url %}
|
||||
<div>{% trans "You must create a " %}<a href="{{ url }}">{% trans "Group" %}</a>{% trans " before you can create Group lists!" %}</div>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
{% include 'lists/edit_form.html' with controls_text="edit_list" %}
|
||||
{% include 'lists/edit_form.html' with controls_text="edit_list" user_groups=user_groups %}
|
||||
</div>
|
||||
|
||||
{% block panel %}{% endblock %}
|
||||
|
Reference in New Issue
Block a user