e28b29a667767457bdb7c8d850d070c7e06d2943
[moodle.git] / message / templates / message_drawer_view_conversation_header_content_type_private.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 {{!
18     @template core_message/message_drawer_view_conversation_heeader_content
20     This template will render the header content of the conversation page in
21     the message 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     * userid The logged in user id
31     * urls The URLs for the popover
33     Example context (json):
34     {}
36 }}
38 <div class="d-flex align-items-center">
39     <div class="align-self-stretch" >
40         <a class="h-100 mr-2 d-flex align-items-center" href="#" data-route-back role="button">
41             {{> core_message/message_drawer_icon_back }}
42         </a>
43     </div>
44     <div class="d-flex text-truncate">
45         <a class="d-flex text-truncate text-decoration-none" href="#" data-action="view-contact" role="button">
46             {{#imageurl}}
47                 <div class="d-flex align-items-center">
48                     <img
49                         class="rounded-circle"
50                         src="{{{.}}}"
51                         alt="{{name}}"
52                         aria-hidden="true"
53                         style="height: 38px"
54                     >
55                 </div>
56             {{/imageurl}}
57             <div class="w-100 text-truncate ml-2">
58                 <div class="d-flex">
59                     <strong class="m-0 text-truncate">{{name}}</strong>
60                     <span class="{{^isfavourite}}hidden{{/isfavourite}} ml-1 text-primary" data-region="favourite-icon-container"
61                     aria-label="{{#str}} favourites, core {{/str}}">
62                         {{#pix}} i/star-rating, core {{/pix}}
63                     </span>
64                     <span class="{{^ismuted}}hidden{{/ismuted}} ml-1 text-primary" data-region="muted-icon-container">
65                         {{#pix}} i/muted, core {{/pix}}
66                     </span>
67                 </div>
68                 {{#showonlinestatus}}
69                     <p class="m-0 font-weight-light text-truncate">
70                         {{#isonline}}{{#str}} loggedin, core_message {{/str}}{{/isonline}}
71                         {{^isonline}}{{#str}} loggedoff, core_message {{/str}}{{/isonline}}
72                     </p>
73                 {{/showonlinestatus}}
74             </div>
75         </a>
76     </div>
77     <div class="ml-auto dropdown">
78         <button class="btn btn-link btn-icon icon-size-3" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
79             {{#pix}} i/moremenu, core {{/pix}}
80         </button>
81         <div class="dropdown-menu float-right">
82             <a class="dropdown-item" href="#" data-action="view-contact">
83                 {{#str}} info, core_message {{/str}}
84             </a>
85             <a class="dropdown-item {{#isfavourite}}hidden{{/isfavourite}} {{^showfavourite}}hidden{{/showfavourite}}" href="#" data-action="confirm-favourite">
86                 {{#str}} addtofavourites, core_message {{/str}}
87             </a>
88             <a class="dropdown-item {{^isfavourite}}hidden{{/isfavourite}} {{^showfavourite}}hidden{{/showfavourite}}" href="#" data-action="confirm-unfavourite">
89                 {{#str}} removefromfavourites, core_message {{/str}}
90             </a>
91             <a class="dropdown-item {{#isblocked}}hidden{{/isblocked}}" href="#" data-action="request-block">
92                 {{#str}} blockuser, core_message {{/str}}
93             </a>
94             <a class="dropdown-item {{^isblocked}}hidden{{/isblocked}}" href="#" data-action="request-unblock">
95                 {{#str}} unblockuser, core_message {{/str}}
96             </a>
97             <a class="dropdown-item {{#ismuted}}hidden{{/ismuted}}" href="#" data-action="confirm-mute">
98                 {{#str}} muteconversation, core_message {{/str}}
99             </a>
100             <a class="dropdown-item {{^ismuted}}hidden{{/ismuted}}" href="#" data-action="confirm-unmute">
101                 {{#str}} unmuteconversation, core_message {{/str}}
102             </a>
103             <a class="dropdown-item" href="#" data-action="request-delete-conversation">
104                 {{#str}} deleteconversation, core_message {{/str}}
105             </a>
106             <a class="dropdown-item {{#iscontact}}hidden{{/iscontact}}" href="#" data-action="request-add-contact">
107                 {{#str}} addtoyourcontacts, core_message {{/str}}
108             </a>
109             <a class="dropdown-item {{^iscontact}}hidden{{/iscontact}}" href="#" data-action="request-remove-contact">
110                 {{#str}} removefromyourcontacts, core_message {{/str}}
111             </a>
112         </div>
113     </div>
114 </div>