mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
apply filters to community list
This commit is contained in:
parent
a82950fd03
commit
76bd91e559
1 changed files with 5 additions and 1 deletions
|
@ -86,7 +86,11 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for community in communities.items -%}
|
{% for community in communities.items -%}
|
||||||
<tr class="">
|
{% set content_blocked = (current_user.hide_nsfw == 3 and community.nsfw)
|
||||||
|
or (current_user.hide_nsfl == 3 and community.nsfl) -%}
|
||||||
|
{% set blur_content = (current_user.hide_nsfw == 2 and community.nsfw)
|
||||||
|
or (current_user.hide_nsfl == 2 and community.nsfl) -%}
|
||||||
|
<tr class="{{ 'blocked' if content_blocked }}{{ 'blur' if blur_content }}">
|
||||||
<td width="70">{% if current_user.is_authenticated -%}
|
<td width="70">{% if current_user.is_authenticated -%}
|
||||||
{% if community_membership(current_user, community) in [SUBSCRIPTION_MEMBER, SUBSCRIPTION_MODERATOR, SUBSCRIPTION_OWNER] -%}
|
{% if community_membership(current_user, community) in [SUBSCRIPTION_MEMBER, SUBSCRIPTION_MODERATOR, SUBSCRIPTION_OWNER] -%}
|
||||||
<a class="btn btn-primary btn-sm" href="/community/{{ community.link() }}/unsubscribe" rel="nofollow" aria-label="{{ _('Leave %(name)s', name=community.display_name()) }}">{{ _('Leave') }}</a>
|
<a class="btn btn-primary btn-sm" href="/community/{{ community.link() }}/unsubscribe" rel="nofollow" aria-label="{{ _('Leave %(name)s', name=community.display_name()) }}">{{ _('Leave') }}</a>
|
||||||
|
|
Loading…
Add table
Reference in a new issue