forked from mirrors/bookwyrm
update templates for groups
This commit is contained in:
parent
b74cd37096
commit
71b1c6117c
2 changed files with 48 additions and 0 deletions
42
bookwyrm/templates/user/groups.html
Normal file
42
bookwyrm/templates/user/groups.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
{% extends 'user/layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block header %}
|
||||
<div class="columns is-mobile">
|
||||
<div class="column">
|
||||
<h1 class="title">
|
||||
{% if is_self %}
|
||||
{% trans "Your Groups" %}
|
||||
{% else %}
|
||||
{% blocktrans with username=user.display_name %}Groups: {{ username }}{% endblocktrans %}
|
||||
{% endif %}
|
||||
</h1>
|
||||
</div>
|
||||
{% if is_self %}
|
||||
<div class="column is-narrow">
|
||||
{% trans "Create group" as button_text %}
|
||||
{% include 'snippets/toggle/open_button.html' with controls_text="create_group" icon_with_text="plus" text=button_text %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block panel %}
|
||||
<section class="block">
|
||||
<form name="create-group" method="post" action="{% url 'groups' %}" class="box is-hidden" id="create_group">
|
||||
<header class="columns">
|
||||
<h3 class="title column">{% trans "Create group" %}</h3>
|
||||
<div class="column is-narrow">
|
||||
{% include 'snippets/toggle/toggle_button.html' with controls_text="create_group" label="close" class="delete" nonbutton=True %}
|
||||
</div>
|
||||
</header>
|
||||
{% include 'groups/form.html' %}
|
||||
</form>
|
||||
|
||||
<!-- {% include 'lists/list_items.html' with lists=lists %} -->
|
||||
</section>
|
||||
<div>
|
||||
<!-- {% include 'snippets/pagination.html' with page=user_groups path=path %} -->
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -75,6 +75,12 @@
|
|||
<a href="{{ url }}">{% trans "Lists" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_self or user.groups_set.exists %}
|
||||
{% url 'user-groups' user|username as url %}
|
||||
<li{% if url in request.path %} class="is-active"{% endif %}>
|
||||
<a href="{{ url }}">{% trans "Groups" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if user.shelf_set.exists %}
|
||||
{% url 'user-shelves' user|username as url %}
|
||||
<li{% if url in request.path %} class="is-active"{% endif %}>
|
||||
|
|
Loading…
Reference in a new issue