Skip to content
Snippets Groups Projects
index.twig 2.51 KiB
Newer Older
{% extends "office/disciplines/!base" %}


{% block office_media %}
    {{ HTML.style('static/css/office/list.css')|raw }}
    {{ HTML.style('static/css/tablesorter.theme.materialize.min.css')|raw }}

    {{ HTML.script('static/js/libs/jquery.tablesorter.min.js')|raw }}
    {{ HTML.script('static/js/libs/jquery.tablesorter.widgets.min.js')|raw }}
    {{ HTML.script('static/js/optionLoader.js')|raw }}
    {{ HTML.script('static/js/office/disciplines.js')|raw }}
{% block office_content %}
    <div class="selectBill Margin10 Top Bottom">
        <select class="defaultForm" id="gradeSelect">
            <option value="0">— Выберите курс —</option>
        </select>
    </div>

    <p>Всего: {{ Disciplines | length }}</p>

    <div class="officeList">
        <table id="disciplineTable" class="tablesorter" style="table-layout: fixed; width: 100%;">
            <thead>
            <tr>
                <td style="width: 70px;"></td>
                <td>Название</td>
                <td style="width: 250px;">Автор</td>
                    <td style="width: 100px;">вкл./выкл.</td>
            </tr>
            </thead>
            <tbody>
            {% for discipline in Disciplines %}
                <tr>
                    <td style="text-align: center;">{{ discipline.ID }}</td>
                    <td style="white-space: normal;"><a href="{{ URL.site("discipline/") }}/{{ discipline.ID }}/structure">{{ discipline.SubjectName }}</a></td>
                    <td><a href="{{ URL.site("office/teachers/profile/") }}/{{ Teachers[discipline.ID].ID }}">{{ Text.abbreviateName(Teachers[discipline.ID]) }}</a></td>
                    {%  if InMainList %}
                        <td>
                            {% if discipline.IsInactive %}
                            <a id="discipline_switch_{{ discipline.ID }}" class="disciplineInactiveSwitch disciplineInactive" href="#">
                                выключена
                            </a>
                            {% else %}
                            <a id="discipline_switch_{{ discipline.ID }}" class="disciplineInactiveSwitch disciplineActive" href="#">
                                включена
                            </a>
                            {% endif %}
                        </td>
                    {% endif %}
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>