{% load guardian_tags %} {% load static %} {% load institutions %} {% load members %} {% load community_badges %} {% load community_buttons %} {% load community_utils %} {% load bootstrap_helpers %} {% load activities %} {% load topics %} {% load uploaded_material %} {% load chats %} {% for institution in topic.institutions %} {% organization_card institution base_id="lead-institution-" %} {% endfor %} {% with body_class="p-0" %} {% card header="Leader" %} {% member_card topic.leader %} {% endcard %} {% card header="Stats" %} {% start_date_badge topic %} {% end_date_badge topic %} {% last_modification_date_badge topic %} {% members_badge topic topic.approved_memberships %} {% endcard %} {% card header="Collaborations" %} {% endcard %} {% if not hide_channels|default:False %} {% card header="Topic channels" %} View all channels
{% for channel_relation in topic.topicchannelrelation_set.all|filter_relations:user|order_by:"-channel__last_comment_modification_date" %} {% with channel=channel_relation.channel %} {% with subscription=channel|subscription_for:user %} {% set_channel_relation channel channel_relation as channel_relation %}
{{ channel|name_for:user }} #{{ channel.channel_id }}
{% endwith %} {% endwith %} {% endfor %}
{% endcard %} {% endif %} {% if not hide_material %} {% with topicmaterial_list=topic.topicmaterialrelation_set.all %} {% get_obj_perms user for topic as "topic_perms" %} {% if topicmaterial_list or perms.topics.change_topic or "change_topic" in topic_perms %} {% card header="Topic Material" %} {% material_links topicmaterial_list.model %} {% material_cards topicmaterial_list limit=5 truncate_name=True %} {% endcard %} {% endif %} {% endwith %} {% endif %} {% if topic.keywords %} {% card header="Keywords" %} {% for keyword in topic.keywords.all %} {% keyword_badge keyword %} {% endfor %} {% endcard %} {% endif %} {% with left_related=topic.relation_left.all right_related=topic.relation_right.all %} {% if left_related.exists or right_related.exists %} {% card header="Related topics" %}
{{ topic.id_name }}
{% endcard %} {% endif %} {% endwith %} {% endwith %}