MDL-59383 core_calendar: create summary modal templates

Part of MDL-59333.
This commit is contained in:
Simey Lameze 2017-07-10 10:07:40 +08:00
parent dfdde9ad35
commit 68c3e21a89
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,37 @@
{{!
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 core_calendar/event_summary_body
This template renders the body of calendar events summary modal.
Example context (json):
{
"timestart": 1490320388,
"description": "An random event description",
"eventtype": "open",
}
}}
<div class="container">
<h4>{{#str}} when, core_calendar {{/str}}</h4>
{{#userdate}} {{timestart}}, {{#str}} strftimerecentfull {{/str}} {{/userdate}}
<br>
<h4>{{#str}} description {{/str}}</h4>
{{{description}}}
<h4>{{#str}} eventtype, core_calendar {{/str}}</h4>
{{eventtype}}
</div>

View File

@ -0,0 +1,32 @@
{{!
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 core_calendar/event_summary_modal
This template renders the calendar events summary modal.
Example context (json):
{
"title": "Assignment due 1",
}
}}
{{< core/modal }}
{{$footer}}
<button type="button" class="btn btn-secondary pull-xs-left" data-action="delete">{{#str}} delete {{/str}}</button>
<button type="button" class="btn btn-primary" data-action="edit">{{#str}} edit {{/str}}</button>
{{/footer}}
{{/ core/modal }}