{% macro livelabel(live=None, nowlive=None) %} {% if live or nowlive %} Live {% endif %} {% endmacro %} {% macro preview(lecture) %}
    • Vorschaubild
    • {{ lecture.course.title }} {{livelabel(0, lecture.livehandle)}}
    • {{ lecture['time']|fulldate }}
    • {% if lecture['speaker'] %}
    • Gehalten von {{ lecture['speaker']|safe }}
    • {% endif %}
    • {{ lecture['title']|fixnl|safe }}
  • {% endmacro %} {% macro player(lecture, videos, msgs=[], autoplay=True, seek=None) %} {% if seek == None %} {% set mfrag = "" %} {% else %} {% set mfrag = "#t="+seek %} {% endif %} {% endmacro %} {% macro course_list_item(course,show_semester=False) %}
  • {% if show_semester %} {{ course.semester|semester }} {% else %} {% endif %} {{ course.title }}{% if ismod() %} ({{course.id}}){% endif %} {% if course.chapter_count|d(0) > 0 and ismod() %} {{ course.chapter_count }} {% endif %} {{ course.organizer }} {{ course.subject }}
  • {% endmacro %} {% macro video_download_btn(videos) %} {% if not ismod() %} {% endif %} {% if not ismod() %} {% endif %} {% endmacro %} {%macro video_embed_btn(lectureid, course=None) %} Einbetten {% endmacro %} {% macro lecture_list_item(lecture,videos,global_permissions,chapters=[]) %}
  • {% if ismod() or (videos|length > 0) %}
    {% if (not videos|length is equalto 0) or ismod() %} {% endif %}
    {% else %}
    {% endif %}
  • {% endmacro %} {% macro moderator_editor (path,value,reload=false) %} {% if ismod() %} {{ value|fixnl|safe }} {% else %} {{value|fixnl|safe}} {% endif %} {% endmacro %} {% macro moderator_checkbox (path,value) %} {% if ismod() %} {% endif %} {% endmacro %} {% macro moderator_delete (path) %} {% if ismod() %} {% endif %} {% endmacro %} {% macro moderator_permissioneditor(type,id,perm,global_permissions) %} {% set tmp = global_permissions.extend(perm) %} {% set permdescription = perm|permdescr %} {% set permlogos = '' %} {% if permdescription[0] == 'public' %} {% set permlogos = '' %} {% endif %} {% if permdescription[0] == 'none' %} {% set permlogos = '' %} {% endif %} {% if permdescription[0] == 'password' %} {% set permlogos = '' %} {% endif %} {% if permdescription[0] == 'l2p' %} {% set permlogos = '' %} {% endif %} {% if permdescription[0] == 'rwth' %} {% set permlogos = '' %} {% endif %} {% if permdescription[0] == 'fsmpi' %} {% set permlogos = '' %} {% endif %} {% if ismod() %} {% else %} {{ permlogos|safe }} {% endif %} {% endmacro %} {% macro vtttime(time) %}{{ time|time_offset }}.000{% endmacro %} {% macro stats_viewsperday(id, req, title, type="scatter", param=None, maxtraces=7) %} {% endmacro %} {% macro featured_content(item) %} {# This macro is used in a panel div after the panel header #} {% if item.type == 'image' %} {% if ismod() %}

    {{moderator_editor(('featured',item.id,'param'), item.param)}}

    {% endif %} {% if item.text or ismod() %}
    {{ moderator_editor(('featured',item.id,'text'), item.text) }}
    {% endif %} {% elif item.type == 'courses' %} {% if item.text or ismod() %}
    {{ moderator_editor(('featured',item.id,'text'), item.text) }}
    {% endif %} {% elif item.type == 'video' %}
    {{ moderator_editor(('featured',item.id,'text'), item.text) }}
    {% if item.videos %} {{ player(item.lecture, item.videos, autoplay=False)}} {% endif %} {% if ismod() %}
    ID des Videos: {{ moderator_editor(('featured',item.id,'param'), item.param, reload=True) }}
    {% endif %}
    {{ moderator_editor(('featured',item.id,'param2'), item.param2) }}
    {% else %} {% if item.text or ismod() %}
    {{ moderator_editor(('featured',item.id,'text'), item.text) }}
    {% endif %} {% endif %} {% endmacro %}