{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template block_deft/manager

    This template renders the manage for the deft response block.

    Example context (json):
    {
        "id": 3,
        "contextid": 50,
        "main": "...content..."
    }
}}
<div id="deft-manage-{{uniqid}}"
     data-region="deft-manage">
    <div data-region="deft-manage-content container" class="pt-3">
        <div class="row">
            <div {{# blockpresent }} class = "col-12" {{/ blockpresent }}
                 {{^ blockpresent }} class="col-12 col-md-8 col-lg-9" {{/ blockpresent }}>
                <form onsubmit="return false;" class="pb-3">
                {{# canedit }}
                     <button name="addtask" value="choice" class="btn btn-secondary">{{# str }} addchoice, block_deft {{/ str }}</button>
                     <button name="addtask" value="comments" class="btn btn-secondary">{{# str }} addcomments, block_deft {{/ str }}</button>
                     <button name="addtask" value="text" class="btn btn-secondary">{{# str }} addtext, block_deft {{/ str }}</button>
                     <button name="addtask" value="venue" class="btn btn-secondary">{{# str }} addvenue, block_deft {{/ str }}</button>
                {{/ canedit }}
                <button name="action" value="saveall" class="btn btn-primary float-right">{{# str }} saveallchanges, block_deft {{/ str }}</button>
                <div style="height: 24px; width: 140px"></div>
                </form>
                <div class="container-fluid bg-gray tasks">
                   {{> block_deft/tasks }}
                </div>
                <div>
                {{# report }}
                    {{> block_deft/report }}
                {{/ report }}
                </div>
            </div>
            {{^ blockpresent }}
            <div class="col-12 col-md-4 col-lg-3">
                {{{ main }}}
            </div>
            {{/ blockpresent }}
        </div>
    </div>
</div>
{{# js }}
    require(['block_deft/manage'], function(Manage) {
        Manage.init({{ contextid }});
    });
{{/ js }}
