{% import "components/nothing.html" as nothing with context %} {% import "components/user.html" as user with context %} {% import "components/paginator.html" as paginator with context %} {% import "partials/course_visibility_toggle.html" as vis with context %} {% extends "layout/basic.html" %} {% block content %} {% include "course_ui_style.html" %} {% include "course_inline_order_style.html" %} {{ vis.style() }}

{{ _('Course') }}

{% if not cdocs.length %} {{ nothing.render('No course yet...') }} {% else %}
    {%- for cdoc in cdocs -%}
  1. {{ cdoc.attend|default(0) }}
    {{ _('Attended') }}

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

    {% if handler.user.hasPerm(perm.PERM_EDIT_DOMAIN) %}
    {% endif %} {{ vis.inline('course', cdoc, cdoc.docId, '', '') }}
    • {{ cdoc['content']|truncate(30, true) }}

    • |
    • {% 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 handler.user.hasPerm(perm.PERM_CREATE_TRAINING) %}

{{ _('Course') }}

{% endif %}
{% endblock %}