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_header_content_type_private
20 This template will render the header content of the conversation page in
21 the message 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 <div class="d-flex align-items-center">
40 <div class="align-self-stretch" >
41 <a class="h-100 mr-2 d-flex align-items-center" href="#" data-route-back role="button">
42 {{> core_message/message_drawer_icon_back }}
46 <div class="d-flex text-truncate">
47 <a class="d-flex text-truncate text-decoration-none" href="#" data-action="view-contact" role="button">
49 <div class="d-flex align-items-center">
51 class="rounded-circle"
59 <div class="w-100 text-truncate ml-2">
61 <strong class="m-0 text-truncate">{{name}}</strong>
63 class="{{^isfavourite}}hidden{{/isfavourite}} ml-1 text-primary"
64 data-region="favourite-icon-container"
66 {{#pix}} i/star-rating, core, {{#str}} favourites, core {{/str}} {{/pix}}
69 class="{{^ismuted}}hidden{{/ismuted}} ml-1 text-primary"
70 data-region="muted-icon-container"
72 {{#pix}} i/muted, core, {{#str}} mutedconversation, core_message {{/str}} {{/pix}}
76 <p class="m-0 font-weight-light text-truncate">
77 {{#isonline}}{{#str}} loggedin, core_message {{/str}}{{/isonline}}
78 {{^isonline}}{{#str}} loggedoff, core_message {{/str}}{{/isonline}}
84 <div class="ml-auto dropdown">
85 <button id="conversation-actions-menu-button" class="btn btn-link btn-icon icon-size-3" type="button"
86 data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
87 aria-label="{{#str}} conversationactions, core_message {{/str}}" aria-controls="conversation-actions-menu">
88 {{#pix}} i/moremenu, core {{/pix}}
90 <div id="conversation-actions-menu" class="dropdown-menu float-right" role="menu"
91 aria-labelledby="conversation-actions-menu-button">
92 <a class="dropdown-item" href="#" data-action="view-contact" role="menuitem">
93 {{#str}} info, core_message {{/str}}
95 <a class="dropdown-item {{#isfavourite}}hidden{{/isfavourite}} {{^showfavourite}}hidden{{/showfavourite}}" href="#"
96 data-action="confirm-favourite" role="menuitem">
97 {{#str}} addtofavourites, core_message {{/str}}
99 <a class="dropdown-item {{^isfavourite}}hidden{{/isfavourite}} {{^showfavourite}}hidden{{/showfavourite}}" href="#"
100 data-action="confirm-unfavourite" role="menuitem">
101 {{#str}} removefromfavourites, core_message {{/str}}
103 <a class="dropdown-item {{#isblocked}}hidden{{/isblocked}}" href="#" data-action="request-block" role="menuitem">
104 {{#str}} blockuser, core_message {{/str}}
106 <a class="dropdown-item {{^isblocked}}hidden{{/isblocked}}" href="#" data-action="request-unblock" role="menuitem">
107 {{#str}} unblockuser, core_message {{/str}}
109 <a class="dropdown-item {{#ismuted}}hidden{{/ismuted}}" href="#" data-action="confirm-mute" role="menuitem">
110 {{#str}} muteconversation, core_message {{/str}}
112 <a class="dropdown-item {{^ismuted}}hidden{{/ismuted}}" href="#" data-action="confirm-unmute" role="menuitem">
113 {{#str}} unmuteconversation, core_message {{/str}}
115 <a class="dropdown-item" href="#" data-action="request-delete-conversation" role="menuitem">
116 {{#str}} deleteconversation, core_message {{/str}}
118 <a class="dropdown-item {{#iscontact}}hidden{{/iscontact}}" href="#" data-action="request-add-contact" role="menuitem">
119 {{#str}} addtoyourcontacts, core_message {{/str}}
121 <a class="dropdown-item {{^iscontact}}hidden{{/iscontact}}" href="#" data-action="request-remove-contact"
123 {{#str}} removefromyourcontacts, core_message {{/str}}