Skip to content

Commit

Permalink
feat(members): added link to members table for privileged users
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoeejoee committed Apr 8, 2023
1 parent c0e10e6 commit 7f689c0
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 93 deletions.
9 changes: 7 additions & 2 deletions fiesta/apps/sections/views/members.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ class Meta:
)


@with_breadcrumb(_("Section Members"))
@with_breadcrumb(_("Section"))
@with_breadcrumb(_("Members"))
class SectionMembersView(FiestaTableView):
request: HttpRequest
template_name = "fiestatables/page.html"
Expand All @@ -98,6 +99,10 @@ def get_queryset(self):
.get_queryset()
.filter(
section=self.request.membership.section,
role=SectionMembership.Role.MEMBER,
role__in=(
SectionMembership.Role.MEMBER,
SectionMembership.Role.EDITOR,
SectionMembership.Role.ADMIN,
),
)
)
17 changes: 11 additions & 6 deletions fiesta/templates/fiesta/parts/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,19 @@
{% active_plugins_as_navigation_items as items %}

<div
x-show="menu"
class="w-full md:flex md:w-auto md:order-1 justify-between items-center"
x-show="menu"
class="w-full md:flex md:w-auto md:order-1 justify-between items-center"
>
<ul class="flex flex-col mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium">
<li>
{# TODO: documentation content and ES deploy#}
{# <a class="Menu__link" href="{% url "wiki:index" %}">Docs</a>#}
</li>
{% if request.membership.is_privileged %}
<li>
<a class="Menu__link" href="{% url "sections:section-members" %}">{% trans "Members" %}</a>
</li>
{% endif %}
{# <li>#}
{# TODO: documentation content and ES deploy#}
{# <a class="Menu__link" href="{% url "wiki:index" %}">Docs</a>#}
{# </li>#}
{% for item in items %}
<li>
{% if item.active %}
Expand Down
Loading

0 comments on commit 7f689c0

Please sign in to comment.