{% extends "base_detail.html" %} {% load guardian_tags %} {% load institutions %} {% load community_buttons %} {% load community_badges %} {% load activities %} {% load bootstrap_helpers %} {% load community_utils %} {% load members %} {% load topics %} {% block title %}Member Profile{% endblock %} {% block headline %}{% if communitymember.title %}{{ communitymember.get_title_display }} {% endif %}{{ communitymember.first_name }} {{ communitymember.last_name }}{% endblock %} {% block subtitle %} {% member_roles communitymember as roles %} {{ roles|capfirst }} {% endblock %} {% block breadcrumbs %} {% url 'members:members' as members_url %} {% with members_url=members_url|add:'?end_date__isnull=True&is_member=True' %} {% breadcrumbs "Members"|combine:members_url communitymember|combine:request.path %} {% endwith %} {% endblock %} {% block action_buttons %} {% get_obj_perms user for communitymember as "member_perms" %} {% url "members:profile" as profile_url %} {% if perms.members.change_communitymember or "change_communitymember" in member_perms %} {% if request.path == profile_url %} {% else %} {% edit_button communitymember %} {% endif %} {% endif %} {% if not communitymember.is_member %} {% if request.path == profile_url or user.communitymember.pk == communitymember.pk %} {% url 'members:self-become-member' as become_member_url %} {% if become_member_url %} {% endif %} {% elif user.communitymember.is_member %} {% url 'members:approve-member' communitymember.pk as become_member_url %} {% if become_member_url %} {% endif %} {% endif %} {% endif %} {% if perms.reversion.view_revision %} {% endif %} {% endblock %} {% block sidebar_below %} {% block sidebar_left %} {% for membership in communitymember.active_memberships %} {% organization_card membership.organization.organization.parent_institution base_id="member-institution-" %} {% endfor %} {% with body_class="p-0" %} {% card header="Contact" %} {% endcard %} {% card header="Stats" %} {% start_date_badge communitymember %} {% end_date_badge communitymember %} {% active_topics_badge communitymember communitymember.open_topicmemberships %} {% endcard %} {% with activities=communitymember.activities.all %} {% if activities %} {% card header="Working/Project Groups" %} {% for activity in activities %} {% activity_badge activity %} {% endfor %} {% endcard %} {% endif %} {% endwith %} {% endwith %} {% endblock %} {% endblock %} {% block content %} {% if communitymember.description %}
{{ communitymember.description }}
{% endif %} {% with card_class="mb-4" %} {% with memberships=communitymember.active_memberships %} {% if memberships %} {% collapsible_card "Affiliations" "affiliations" "" body_class="p-0" show=True %} {% affiliation_rows memberships True %} {% endcollapsible_card %} {% endif %} {% endwith %} {% with topics=communitymember.open_topics %} {% if topics %} {% collapsible_card "Active topics" "active-topics-" "" body_class="p-0" show=True %} {% topic_rows topics %} {% endcollapsible_card %} {% endif %} {% endwith %} {% with lead=communitymember.activity_leader.all_active contact=communitymember.organization_contact.all %} {% if lead or contact %} {% collapsible_card "Roles in the community" "roles" "" body_class="p-0" %} {% if lead %} {% card header=communitymember|stringformat:"s"|add:" is the leader of the following activities" %} {% activity_cards lead %} {% endcard %} {% endif %} {% if contact %} {% card header=communitymember|stringformat:"s"|add:" is the contact person of the following organizations" %} {% institution_rows contact True False "all" base_id="contact-organization-" %} {% endcard %} {% endif %} {% endcollapsible_card %} {% endif %} {% endwith %} {% with memberships=communitymember.former_memberships %} {% if memberships %} {% collapsible_card "Former affiliations" "former-affiliations" "" body_class="p-0" %} {% affiliation_rows memberships True %} {% endcollapsible_card %} {% endif %} {% endwith %} {% with topics=communitymember.finished_topics %} {% if topics %} {% collapsible_card "Finished topics" "inactive-topics-" "" body_class="p-0" %} {% topic_rows topics %} {% endcollapsible_card %} {% endif %} {% endwith %} {% endwith %} {% endblock %}