{% extends "bee_django_course/base.html" %}
{% load bee_django_course_filter %}
{% load bootstrap3 %}
{% block content %}

    <h4>{{ usercoursesection.section.name }}</h4>


    {% for e in usercoursesection.section.sectionvideo_set.all %}
        <div class="video">
            {{ e.video.title }}
            <iframe src="{{ e.video.video_id | get_video_src }}" frameborder="0" width="100%" height="100%"></iframe>
            {{ e.video.info |default:"" | linebreaks }}
        </div>
    {% endfor %}

    <br/>
    <div>
        {{ usercoursesection.section.info | safe }}
    </div>
    <hr>
    <div><h4>附件：</h4></div>
    {% for attach in usercoursesection.section.sectionattach_set.all %}
        <div>
            <span class="text-danger">教材：</span>
            <a href="{{ attach.file.url }}">
                {{ attach.file_name }}
            </a>
        </div>
    {% endfor %}
    <hr>
    <div><h4>要求：</h4></div>
    {% if usercoursesection.section.has_textwork %}
        <h5>{{ usercoursesection.section.textwork_info }}</h5>
    {% endif %}

    {% if usercoursesection.section.has_imagework %}
        <h5>需要上传{{ usercoursesection.section.image_count_req }}张图片</h5>
    {% endif %}

    {% if usercoursesection.section.has_videowork %}
        <h5>需要录制{{ usercoursesection.section.video_length_req }}分钟的作业</h5>
    {% endif %}
    {% if usercoursesection.section.has_questionwork %}
        <h5>需要答题</h5>
    {% endif %}
    <hr>
    {#    <div>#}
    {#        {% if request.user == ucs.user_course.user %}#}
    {#            {% if ucs.section.has_videowork %}#}
    {#                <a href="{% url 'bee_django_course:user_live' request.user.id %}">去练习</a>#}
    {#            {% endif %}#}
    {#            {% if ucs.section.has_imagework or ucs.section.has_videowork %}#}
    {#                <a href="{% url 'bee_django_course:user_assignment' ucs_id=ucs.id %}" class="btn btn-info">去做作业</a> %}#}
    {#            {% endif %}#}
    {##}
    {##}
    {#        {% endif %}#}
    {#    </div>#}

    {#    <div>#}
    {#        <form method="post" action="">#}
    {#            {% csrf_token %}#}
    {#            {% bootstrap_form note_form %}#}
    {#            {% bootstrap_button '提交' %}#}
    {#        </form>#}
    {#    </div>#}


    {#    <ul class="nav nav-tabs">#}
    {##}
    {#        <li class="active"><a href="#other_notes" data-toggle="tab">他山之石</a></li>#}
    {#        <li><a href="#my_note" data-toggle="tab">我的笔记</a></li>#}
    {#    </ul>#}
    {##}
    {#    <div class="tab-content">#}
    {##}
    {#        <div id="other_notes" class="tab-pane active">#}
    {##}
    {#        </div>#}
    {#        <div id="my_note" class="tab-pane">#}
    {#            {% include "bee_django_course/user/section_notes.html" with notes=my_notes %}#}
    {#        </div>#}
    {##}
    {#    </div>#}
    <div><h4>全部笔记：</h4></div>
    <div>
        {% include "bee_django_course/user/section_notes.html" with notes=all_notes %}
        {% bootstrap_pagination all_notes %}
    </div>

{% endblock content %}