{{!
    This file is part of the tool_certificate plugin for 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 tool_certificate/content_heading

    Template for showing content heading

    Example context (json):
    {
        "addbutton": true,
        "addbuttontitle": "Add",
        "addbuttonicon": true,
        "addbuttonurl": "",
        "addbuttonclasses": ["disabled", "p-3"],
        "addbuttonattrs": [{"name": "data-foo", "value": "bar"}]
    }
}}
<div>
    {{#addbutton}}
        <a href="{{#addbuttonurl}}{{addbuttonurl}}{{/addbuttonurl}}{{^addbuttonurl}}#{{/addbuttonurl}}" role="button"
           class="btn btn-primary float-right mb-3 iconlarge nomargin{{#addbuttonclasses}} {{.}}{{/addbuttonclasses}}"
           data-element="addbutton" {{#addbuttonattrs}}{{name}}="{{value}}"{{/addbuttonattrs}}>
        {{#addbuttonicon}}{{#pix}}t/add, core{{/pix}}{{/addbuttonicon}}{{#addbuttontitle}}{{addbuttontitle}}{{/addbuttontitle}}
        </a>
    {{/addbutton}}
    {{#heading}}
        <h2>{{{heading}}}</h2>
    {{/heading}}
</div>
<div class="clearfix"></div>
