{{!
    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 qbank_columnsortorder/add_column

    Add column widget

    Displays a list of currently hidden columns, with links to add them back to the question bank.

    Context variables required for this template:
    * hiddencolumns - list of currently hidden columns

    Example context (json):
    {
        "hashiddencolumns": true,
        "hiddencolumns": [
            {
                "name": "Column A",
                "class": "class_name_A",
                "addurl": "/question/bank/columnsortorder/actions.php?action=add&column=class_name_A"
            },
            {
                "name": "Column B",
                "class": "class_name_B",
                "addurl": "/question/bank/columnsortorder/actions.php?action=add&column=class_name_B"
            }
        ]
    }
}}
{{#hashiddencolumns}}
    <div class="dropdown addcolumn">
        <button class="btn btn-outline-dark dropdown-toggle ms-1" data-bs-toggle="dropdown" id="addcolumndropdown" aria-haspopup="true" aria-expanded="false">
            {{#str}}addcolumns, qbank_columnsortorder{{/str}}
        </button>
        <div class="dropdown-menu" aria-labelledby="addcolumndropdown">
            {{#hiddencolumns}}
                <a class="dropdown-item action-link" href="{{addurl}}" title="{{addtext}}" data-action="add" data-column="{{column}}">
                    {{name}}
                </a>
            {{/hiddencolumns}}
        </div>
    </div>
{{/hashiddencolumns}}
