add: community member list
This commit is contained in:
parent
1a2efdba1f
commit
ca0c4b9e0b
12 changed files with 264 additions and 16 deletions
|
@ -165,7 +165,8 @@
|
|||
});
|
||||
};
|
||||
</script>
|
||||
{% endif %} {% endif %} {% if is_owner or is_manager %}
|
||||
{% endif %} {% endif %} {% if can_manage_community or
|
||||
is_manager %}
|
||||
<a
|
||||
href="/community/{{ community.title }}/manage"
|
||||
class="button primary"
|
||||
|
@ -204,7 +205,9 @@
|
|||
|
||||
<div class="w-full flex justify-between items-center">
|
||||
<span class="notification chip">Members</span>
|
||||
<span>{{ community.member_count }}</span>
|
||||
<a href="/community/{{ community.title }}/members"
|
||||
>{{ community.member_count }}</a
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex justify-between items-center">
|
||||
|
|
38
crates/app/src/public/html/communities/members.html
Normal file
38
crates/app/src/public/html/communities/members.html
Normal file
|
@ -0,0 +1,38 @@
|
|||
{% import "macros.html" as macros %} {% import "components.html" as components
|
||||
%} {% extends "communities/base.html" %} {% block content %}
|
||||
<div class="flex flex-col gap-4 w-full">
|
||||
<div class="card-nest">
|
||||
<div class="card small flex gap-2 items-center">
|
||||
{{ icon "users-round" }}
|
||||
<span>{{ text "communities:tab.members" }}</span>
|
||||
</div>
|
||||
|
||||
<div class="card flex flex-col gap-4">
|
||||
<!-- prettier-ignore -->
|
||||
{% for item in list %}
|
||||
<div class="card-nest">
|
||||
<div class="card small flex items-center gap-2 justify-between">
|
||||
<span>
|
||||
Since
|
||||
<span class="date">{{ item[0].created }}</span>
|
||||
</span>
|
||||
|
||||
{% if can_manage_roles %}
|
||||
<a
|
||||
href="/community/{{ community.title }}/manage?uid={{ item[1].id }}#/members"
|
||||
class="button small quaternary"
|
||||
>
|
||||
{{ icon "pencil" }}
|
||||
<span>{{ text "general:action.manage" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{{ components::user_card(user=item[1]) }}
|
||||
</div>
|
||||
{% endfor %} {{ components::pagination(page=page, items=list|length)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -335,6 +335,7 @@
|
|||
BANNED: 1 << 5,
|
||||
REQUESTED: 1 << 6,
|
||||
MANAGE_PINS: 1 << 7,
|
||||
MANAGE_COMMUNITY: 1 << 8,
|
||||
};
|
||||
|
||||
function all_matching_permissions(role) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue