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_message/message_drawer_view_conversation_body_message
20 This template will render a single message for the body of the conversation page
21 in the message drawer.
23 Classes required for JS:
26 Data attributes required for JS:
27 * All data attributes are required
29 Context variables required for this template:
30 * userid The logged in user id
31 * urls The URLs for the popover
33 Example context (json):
38 class="message clickable d-flex flex-column p-2 mx-1 position-relative {{#fromloggedinuser}}send {{/fromloggedinuser}}{{^fromloggedinuser}}received{{/fromloggedinuser}} rounded mb-2 mt-2"
40 data-message-id="{{id}}"
45 <div class="tail position-absolute"></div>
46 <div class="d-flex align-items-center {{^fromloggedinuser}}pb-2{{/fromloggedinuser}}">
48 <div style="flex-shrink: 0">
50 class="rounded-circle"
51 src="{{{userfrom.profileimageurl}}}"
52 alt="{{userfrom.fullname}}"
57 <div class="text-truncate pl-2 pr-2">
58 <h6 class="text-truncate m-0 font-weight-bold">{{userfrom.fullname}}</h6>
63 class="ml-auto small text-right time {{^formattedtime}}hidden{{/formattedtime}}"
64 style="flex-shrink: 0"
65 data-region="time-created"
70 class="ml-auto small {{#formattedtime}}hidden{{/formattedtime}}"
71 {{#formattedtime}}aria-hidden="true"{{/formattedtime}}
72 {{^formattedtime}}aria-hidden="false"{{/formattedtime}}
73 data-region="loading-icon-container"
77 <div role="alert" class="text-danger hidden small" aria-hidden="true" data-region="error-message-container">
78 <div class="d-flex align-items-center">
79 {{#pix}} req, core {{/pix}}
80 <span class="ml-1" data-region="error-message"></span>
84 class="ml-auto btn btn-link p-0 line-height-3 hidden"
86 data-region="retry-send"
87 title="{{#str}} retry, core {{/str}}"
89 <span class="text-primary small">{{#str}} retry, core {{/str}}</span>
91 <span class="hidden ml-2 small" data-region="not-selected-icon">{{#pix}} i/uncheckedcircle, core {{/pix}}</span>
92 <span class="hidden ml-2 small" data-region="selected-icon">{{#pix}} i/checkedcircle, core {{/pix}}</span>
94 <div dir="auto" align="initial" data-region="text-container">{{{text}}}</div>