{{!
    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 mod_minilesson/lessonabankitem

    TODO describe template lessonabankitem

    Example context (json):
    {
    }
}}

<div class="col-md-6" data-region="itemcard">
    <div class="itemcontainer row">
        <div class="col-md-4 d-flex flex-column" data-region="image">
            <img src="{{posterimage}}" alt="{{name}}" class="searchimg img-responsive">
        </div>
        <div class="col-md-8 d-flex flex-column">
            <h3 class="itemname mb-1">{{name}}</h3>
            <div class="d-flex">
                <p>{{language}}</p>
                <p class="ml-2">{{languagelevel}}</p>
                {{#nativelanguage}}
                    <p class="ml-auto">{{#str}}nativelang, mod_minilesson{{/str}} : {{{.}}} </p>
                {{/nativelanguage}}
            </div>
            <div class="d-flex">
                <p><b class="mr-2">{{#str}}keywordcolon, mod_minilesson{{/str}}</b>{{keywords}}</p>
            </div>
            <div class="d-flex flex-column">
                <p data-text={{#quote}}{{{description}}}{{/quote}}>
                    <b class="mr-2">{{#str}}descriptioncolon, mod_minilesson{{/str}}</b>
                    {{#shortentext}} 150, {{{description}}} {{/shortentext}}
                </p>
            </div>
            <div class="d-flex">
                <p><b class="mr-2">{{#str}}itemscolon, mod_minilesson{{/str}}</b>{{#itemtypes}}{{{text}}}{{^islast}},{{/islast}}{{/itemtypes}}</p>
            </div>
            <div class="d-flex mt-auto">
                {{#nativelanguage}}
                    <a data-translateimportid="{{id}}" data-sourcelanguage="{{{nativelanguage}}}" data-action="translate" class="btn btn-primary text-white rounded ml-auto">
                        {{#str}}translatetoimport, mod_minilesson{{/str}}
                    </a>
                {{/nativelanguage}}
                <a data-id="{{id}}" data-action="download" data-download="{{name}}" class="btn btn-primary text-white rounded ml-auto">
                    {{#str}}import{{/str}}
                </a>
            </div>
        </div>
    </div>
</div>
