2 This file is part of Moodle - http://moodle.org/
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 @template core_admin/themeselector/theme_card
20 This template renders the singular card for a theme.
22 Example context (json):
26 "image": "http://moodlesite/theme/image.php?theme=boost&image=screenshot&component=theme",
28 "actionurl": "http://moodlesite/admin/themeselector.php",
30 "settingsurl": "http://moodlesite/admin/settings.php?section=themesettingboost",
31 "reporturl": "http://moodlesite/report/themeusage/index.php?themechoice=boost"
34 <div class="card theme-card" role="listitem" id="theme-card-{{choose}}" aria-labelledby="theme-name-{{choose}} {{#current}}current-theme-{{choose}}{{/current}}">
35 <div class="card-img card-img-top" style='background-image: url("{{image}}");'></div>
36 <div class="card-body p-3">
38 <div class="flex-grow-1">
39 <h3 class="h5" id="theme-name-{{choose}}">{{name}}</h3>
44 id="theme-preview-{{choose}}"
45 class="btn btn-link p-0"
46 title="{{#str}}previewthemename, moodle, {{name}}{{/str}}"
49 data-image="{{image}}"
50 data-current="{{current}}"
51 data-actionurl="{{actionurl}}"
52 data-choose="{{choose}}"
53 data-sesskey="{{sesskey}}">
54 <i class="icon fa fa-info-circle m-0" aria-hidden="true"></i>
55 <span class="visually-hidden">{{#str}}previewthemename, moodle, {{name}}{{/str}}</span>
60 id="theme-usage-report-{{choose}}"
61 class="btn btn-link p-0 ms-2"
62 title="{{#str}}themeusagereportname, admin, {{name}}{{/str}}">
63 <i class="icon fa fa-area-chart m-0" aria-hidden="true"></i>
64 <span class="visually-hidden">{{#str}}themeusagereportname, admin, {{name}}{{/str}}</span>
69 href="{{settingsurl}}"
70 id="theme-settings-{{choose}}"
71 class="btn btn-link p-0 ms-2"
72 title="{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}">
73 <i class="icon fa fa-cog m-0" aria-hidden="true"></i>
74 <span class="visually-hidden">{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}</span>
80 <div class="d-flex align-items-end flex-column p-3">
82 <strong><span class="text-success" id="current-theme-{{choose}}">{{#str}}currenttheme, moodle{{/str}}</span></strong>
84 <div class="alert alert-info p-1">{{#str}}configoverride, admin{{/str}}</div>
89 <form method="post" action="{{actionurl}}" id="theme-select-form-{{choose}}">
90 <input type="hidden" name="sesskey" value="{{sesskey}}">
91 <input type="hidden" name="choose" value="{{choose}}">
92 <button type="submit" class="btn btn-primary">
93 <span aria-hidden="true">{{#str}}selecttheme, moodle{{/str}}</span>
94 <span class="visually-hidden">{{#str}}selectthemename, moodle, {{name}}{{/str}}</span>