f63e95933e78c5690572b56d447bbad82ea9b9da
[moodle.git] / message / templates / message_area_contact.mustache
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/>.
16 }}
17 <div class="contact {{#selected}}selected{{/selected}} {{#lastmessage}}{{^isread}}unread{{/isread}}{{/lastmessage}}"
18      data-action="view-contact-msg"
19      data-userid="{{userid}}" data-messageid="{{#messageid}}{{.}}{{isread}}{{/messageid}}" data-region="contact" role="button"
20      aria-pressed="{{#selected}}true{{/selected}}{{^selected}}false{{/selected}}" tabindex="0">
21     <div class="picture">
22         <img src="{{profileimageurl}}" alt="" />
23     </div>
24     <div class="information">
25         <div class="name">
26             {{fullname}}
27             {{#showonlinestatus}}
28                 <span {{^isonline}}class="hidden"{{/isonline}} data-region="contact-icon-online">
29                     {{#pix}} t/go, core, {{#str}} online, message {{/str}} {{/pix}}
30                 </span>
31             {{/showonlinestatus}}
32             <span {{^isblocked}}class="hidden"{{/isblocked}} data-region="contact-icon-blocked">
33                 {{#pix}} t/block, core, {{#str}} contactblocked, message {{/str}} {{/pix}}
34             </span>
35         </div>
36         <p class="lastmessage" data-region="last-message-area">
37             <span data-region="last-message-user">
38                 {{#sentfromcurrentuser}}{{#str}}you, message{{/str}}{{/sentfromcurrentuser}}
39             </span>
40             <span data-region="last-message-text">
41                 {{#lastmessage}}
42                     {{.}}
43                 {{/lastmessage}}
44             </span>
45         </p>
46     </div>
47     <div class="unread-count-container">
48         <span data-region="unread-count" class="badge badge-important">{{unreadcount}}</span>
49     </div>
50 </div>