{{!
    This file is part of Moodle - https://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 local_amos/timeline_change

    Render info about a particular string change.

    Example context (json):
    {
        "hascontent": true,
        "displaysince": "3.9+",
        "langcode": "cs",
        "displaydate": "2006-05-03 16:26 UTC",
        "userinfo": "David Mudrak <david.mudrak@gmail.com>",
        "commitmsg": "David's first translations of 1.6 files.",
        "commitsource": "git",
        "hascommithash": true,
        "commiturl": "https://github.com/mudrd8mz/moodle-lang/commit/f51d8940de39cc21cfa22d0fba0ef1b724d214b6",
        "commithash": "f51d8940de39cc21cfa22d0fba0ef1b724d214b6",
        "displaytext": "Kurz"
    }
}}

{{#hascontent}}
    <div class="p-2 bg-light">
        <div class="small">
            <div>{{displaysince}} | {{langcode}} | {{displaydate}}</div>
            <div>{{userinfo}}</div>
            <div><em>{{commitmsg}}</em></div>
            <div><span class="badge badge-secondary">{{commitsource}}</span></div>
            {{#hascommithash}}
                <div>
                    <a href="{{commiturl}}" target="_blank">{{commithash}}</a>
                </div>
            {{/hascommithash}}
        </div>
        <div class="bg-white mt-1 p-2">
            {{{displaytext}}}
        </div>
    </div>
{{/hascontent}}
