{% import "components/user.html" as user with context %} {% import "components/paginator.html" as paginator with context %} {% import "components/ui/v1.html" as ui_v1 %} {% import "partials/course_visibility_toggle.html" as vis with context %} {% extends "layout/basic.html" %} {% block content %}

{{ _('Course') }}

{% if canOrderCourses %} {{ _('Adjust Course Order') }} {% endif %}
{% if not cdocs.length %}
{{ ui_v1.empty_state(_('No course yet...')) }}
{% else %}
    {%- for cdoc in cdocs -%}
  1. {{ cdoc.attend|default(0) }}
    {{ _('Enrollees') }}

    {{ cdoc['title'] }}{{ vis.badge(cdoc) }}

    {% set courseSummary = cdoc.content|default('')|markdown|striptags|trim %} {% if courseSummary %}

    {{ courseSummary|truncate(100, true) }}

    {% endif %}
    {% if cstdict[cdoc.docId]['enroll'] %} {{ _('Enrolled') }} {% elif handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {{ _('Not Enrolled') }} {% endif %}
  2. {%- endfor -%}
{% if page and cpcount %}{{ paginator.render(page, cpcount) }}{% endif %}
{% endif %}
{% if canCreate %} {% endif %}
{% endblock %}