{% extends "learning/activity/base.html" %} {% load i18n learning django_bootstrap_breadcrumbs %} {% block title %}{{ block.super }} − {% blocktrans with name=activity.name %}Activity “{{ name }}”{% endblocktrans %} {% endblock %} {% block breadcrumbs %} {{ block.super }} {% breadcrumb "My activities" "learning:activity/my" %} {% if activity.name|length >= 70 %} {% breadcrumb activity.name|truncatechars:40 "learning:activity/detail" activity.slug %} {% else %} {% breadcrumb activity.name "learning:activity/detail" activity.slug %} {% endif %} {% endblock %} {% block sidebar %} {% include "learning/activity/_includes/sidebar.html" %} {% endblock %} {% block learning_content %} {% if request.GET.course in request.get_full_path %}
{% endif %}
{# Name and permalink to the activity #}

{% if activity.name|length >= 70 %} {{ activity.name|truncatechars:40 }} {% else %} {{ activity.name }} {% endif %}

{% get_object_perms activity user as activity_perms %} {# Button to change the activity #} {% if "change_activity" in activity_perms %} {% trans "Edit" %} {% endif %} {# Button to delete the activity #} {% if "delete_activity" in activity_perms %} {% endif %}
{# Activity description line: status badges, author, tags and country #}
{% include "learning/_includes/object_tags_line.html" %}
{% include "learning/_includes/object_language.html" %} {% blocktrans with author=activity.author %}Writen by {{ author }}{% endblocktrans %}

{% if user == activity.author or contribution%} {% include "learning/activity/_includes/details/status_line.html" %}
{% endif %} {# Activity description content #}
{{ activity.description | render_markdown | safe }}
{# Activity objectives #} {% if objectives %} {% include "learning/taxonomy/objective/detail/objective_list.html" with object=activity objectives=objectives.page_obj object_name='activity'%} {% endif %}
{# Resources linked to the activity #}

{% trans "Resources" %}

{# The user can change the activity, thus can add resources. This displays the window to create or attach one #} {% if "change_activity" in activity_perms %}
{% trans "Associate an existing resource" %} {% trans "Create a resource" %}
{% endif %}

{# Display activity resources #} {% with resources=activity.resources.all %} {% if resources %}
{% for resource in resources %} {% include "learning/resource/_includes/block/resource_block.html" with resource=resource unlink=True linked_activity=activity %} {% endfor %}
{% else %} {% endif %} {% endwith %} {% endblock %}