forked from mirrors/bookwyrm
user groups listing template
- creates groups/user_groups template for listing a user's groups on their user page
This commit is contained in:
parent
273ad9a466
commit
8c326ec52f
2 changed files with 36 additions and 1 deletions
35
bookwyrm/templates/groups/user_groups.html
Normal file
35
bookwyrm/templates/groups/user_groups.html
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{% load i18n %}
|
||||||
|
{% load markdown %}
|
||||||
|
{% load interaction %}
|
||||||
|
|
||||||
|
<div class="columns is-multiline">
|
||||||
|
{% for group in groups %}
|
||||||
|
<div class="column is-one-quarter">
|
||||||
|
<div class="card is-stretchable">
|
||||||
|
<header class="card-header">
|
||||||
|
<h4 class="card-header-title">
|
||||||
|
<a href="{{ group.local_path }}">{{ group.name }}</a> <span class="subtitle">{% include 'snippets/privacy-icons.html' with item=group %}</span>
|
||||||
|
</h4>
|
||||||
|
{% if request.user.is_authenticated and request.user|saved:list %}
|
||||||
|
<div class="card-header-icon">
|
||||||
|
{% trans "Saved" as text %}
|
||||||
|
<span class="icon icon-bookmark has-text-grey" title="{{ text }}">
|
||||||
|
<span class="is-sr-only">{{ text }}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="card-content is-flex-grow-0">
|
||||||
|
<div class="is-clipped" {% if group.description %}title="{{ group.description }}"{% endif %}>
|
||||||
|
{% if group.description %}
|
||||||
|
{{ group.description|to_markdown|safe|truncatechars_html:30 }}
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
|
@ -34,7 +34,7 @@
|
||||||
{% include 'groups/form.html' %}
|
{% include 'groups/form.html' %}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% include 'groups/group_items.html' with groups=groups %}
|
{% include 'groups/user_groups.html' with groups=groups %}
|
||||||
</section>
|
</section>
|
||||||
<div>
|
<div>
|
||||||
{% include 'snippets/pagination.html' with page=user_groups path=path %}
|
{% include 'snippets/pagination.html' with page=user_groups path=path %}
|
||||||
|
|
Loading…
Reference in a new issue