Skip to content

Commit

Permalink
Upated registry queries to fetch member communities
Browse files Browse the repository at this point in the history
  • Loading branch information
sab-LC committed Oct 14, 2024
1 parent f98332c commit 1beae71
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ def registry(request, filtertype=None):
if filtertype == "community-all":
cards = c
elif filtertype == "community-members":
cards = c.filter(is_approved=True)
cards = c.filter(is_member=True)
elif filtertype == "institution-all":
cards = i
elif filtertype == "institution-subscribed":
Expand Down
2 changes: 1 addition & 1 deletion localcontexts/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ class BCLabelAdmin(admin.ModelAdmin):
class CommunityAdmin(admin.ModelAdmin):
form = CommunityModelForm
list_display = (
'community_name', 'community_creator', 'contact_name', 'contact_email', 'is_approved',
'community_name', 'community_creator', 'contact_name', 'contact_email', 'is_member',
'created', 'country'
)
search_fields = (
Expand Down
4 changes: 2 additions & 2 deletions templates/partials/infocards/_community-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<div class="flex-this column w-50">
<div class="subscribed-icon-wrapper">
<h3 class="dashcard-h3 darkteal-text">{{ community.community_name }}</h3>
{% if community.is_approved %}
<i class="fa-sharp fa-solid fa-circle-check subscribed-icon fa-lg" title="Active"></i>
{% if community.is_member %}
<i class="fa-sharp fa-solid fa-circle-check subscribed-icon fa-lg" title="Member"></i>
{% endif %}
</div>
<div>
Expand Down
4 changes: 2 additions & 2 deletions templates/public.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{% join_request_comm community.id request.user as request_exists %}
{% if request_exists or community in user_communities %}
<div class="primary-btn disabled-btn">Request sent <i class="fa fa-check" aria-hidden="true"></i></div>
{% else %}
{% elif community.is_member %}
<div class="mt-8 mb-8">
<a id="openRequestToJoinModalBtn" class="default-a">Request to join</a>
</div>
Expand Down Expand Up @@ -92,7 +92,7 @@
<div class="flex-this column dashcard-text-container">
<div class="subscribed-icon-wrapper">
<h3 class="dashcard-h3">{{ community }}</h3>
{% if community and community.is_approved %}
{% if community and community.is_member %}
<i class="fa-sharp fa-solid fa-circle-check subscribed-icon fa-lg" title="Active"></i>
{% endif %}
</div>
Expand Down

0 comments on commit 1beae71

Please sign in to comment.