Merge branch 'MDL-73054-311' of https://github.com/paulholden/moodle into MOODLE_311_...
[moodle.git] / message / templates / message_drawer_view_conversation_body_day.mustache
blob311dff9f860c0713e494b50ef2674d7f50c26b78
1 {{!
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/>.
17 {{!
18     @template core_message/message_drawer_view_conversation_body_day
20     This template will render a day's worth of messages in the body of the
21     conversation page in the message drawer.
23     Classes required for JS:
24     * none
26     Data attributes required for JS:
27     * All data attributes are required
29     Context variables required for this template:
30     * timestamp
31     * currentyear
32     * messages
34     Example context (json):
35     {
36         "timestamp": 946684800,
37         "currentyear": false,
38         "messages": []
39     }
41 <div class="mt-4" data-region="day-container" data-day-id="{{timestamp}}">
42     <h6 class="text-center mb-4 day">
43         {{#currentyear}}
44             {{#userdate}} {{timestamp}}, {{#str}} strftimedateshort, core_langconfig {{/str}} {{/userdate}}
45         {{/currentyear}}
46         {{^currentyear}}
47             {{#userdate}} {{timestamp}}, {{#str}} strftimedate, core_langconfig {{/str}} {{/userdate}}
48         {{/currentyear}}
49     </h6>
50     {{> core_message/message_drawer_view_conversation_body_messages }}
51 </div>