Skip to content

Commit

Permalink
Improvement: Display infos from placeholders not in list but as strin…
Browse files Browse the repository at this point in the history
  • Loading branch information
eynimeni committed Nov 12, 2024
1 parent 3c90286 commit 2fff026
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
39 changes: 39 additions & 0 deletions templates/mod_booking/bookingoption_description_teachers.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{!
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_booking/bookingoption_description_teachers
Classes required for JS:
* none
Data attributes required for JS:
* data-region
Example context (json):
{
"teachers": [
"Maxima Yoga",
"Teacher 1"
]
}
}}
<div {{^teachers}}style="display:none"{{/teachers}}>
<b>{{#str}} teachers, mod_booking {{/str}}:</b>
{{#teachers}}
{{#teacherurl}}<a href="{{.}}" target="_blank">{{/teacherurl}}{{firstname}} {{lastname}}{{#teacherurl}}</a>{{/teacherurl}}{{^last}}, {{/last}}
{{/teachers}}
</div>
59 changes: 59 additions & 0 deletions templates/mod_booking/optiondates_with_entities.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{{!
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_booking/optiondates_only
Classes required for JS:
* none
Data attributes required for JS:
* data-region
Example context (json):
{
"showsessions" : true,
"onesession" : false,
"sessions" : [
{
"key" : [
{
"starttime" : "3 March 2023, 10:30 AM",
"endtime" : "3 March 2023, 11:45 AM"
}
]
}
]
}
}}
{{#showsessions}}
{{#dates}}
<div>
<b>{{{datestring}}}</b>
{{#entitylink}}
<span class="entity-for-optiondate-area">, {{{.}}}
</span>
{{/entitylink}}
</div>
<div {{^customfields}}style="display:none"{{/customfields}}>
{{#customfields}}
<div>
{{name}}{{{value}}}
</div>
{{/customfields}}
</div>
{{/dates}}
{{/showsessions}}

0 comments on commit 2fff026

Please sign in to comment.