{{!
    @template block_ned_teacher_tools/menu_bar

    Context variables required for this template:
    * id - text, id of block
    * class - text, class of block
    * add_body_class - text, add class to page body
    * hasapps - bool
    * apps - array of html
    * hasselectors - bool
    * selectors - array of html
    * course_link - html
}}
{{#showclassesbar}}
    <div class="menu-bar courses-menu-bar">
        {{#displayschool}}
            <a class="school-link ml-2 mr-3" href="{{schoollink}}" target="_blank">
                {{schoolcode}}
            </a>
        {{/displayschool}}
        <div class="flex-grow d-flex flex-wrap course-links pt-2 pb-2">
            {{#courses}}
                <a class="p-1 mr-1 {{#active}}active{{/active}}" href="{{url}}">{{name}}</a>
            {{/courses}}
        </div>
        {{#all_classes_link}}
            <a class="allclasses text-align-right pr-3 mr-2" href="{{all_classes_link}}" target="_blank">
                {{#str}}classlist, block_ned_teacher_tools{{/str}} <i class="fa fa-external-link" aria-hidden="true"></i>
            </a>
        {{/all_classes_link}}
    </div>
    <div class="mb-2 menu-bar classes-menu-bar">
        <div class="flex-grow d-flex flex-wrap class-links pt-2 pb-2">
            {{#classes}}
                <a class="p-1  mr-1 {{#active}}active{{/active}}" href="{{url}}">{{name}}</a>
            {{/classes}}
        </div>
    </div>
{{/showclassesbar}}
<div {{#id}} id="{{id}}" {{/id}} {{#class}} class="{{class}}" {{/class}}>
    {{#add_body_class}}
        <script type="text/javascript">
            window.document.body.className += ' {{add_body_class}}';
        </script>
    {{/add_body_class}}
    <div class="tt-school {{school_link_class}}">
        {{{school_link}}}
    </div>
    {{#hasapps}}
        <div class="tt-apps">
            {{#apps}}
                {{{.}}}
            {{/apps}}
        </div>
    {{/hasapps}}
    {{#hasselectors}}
        <div class="tt-selectors">
            {{#selectors}}
                {{{.}}}
            {{/selectors}}
        </div>
    {{/hasselectors}}
    {{#course_link}}
        <div class="tt-course">
            {{{course_link}}}
        </div>
    {{/course_link}}
</div>

