MDL-64506 templates: BS2 pull-x -> BS4 float-x
[moodle.git] / message / templates / message_drawer_view_conversation_header_content_type_public.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 flex-column">
39     <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>
42                 {{> core_message/message_drawer_icon_back }}
43             </a>
44         </div>
45         <div class="d-flex text-truncate">
46             <a class="d-flex text-truncate text-decoration-none" href="#" data-action="view-group-info">
47                 {{#imageurl}}
48                     <img
49                         class="rounded-circle"
50                         src="{{{.}}}"
51                         alt="{{name}}"
52                         aria-hidden="true"
53                         style="height: 38px"
54                     >
55                 {{/imageurl}}
56                 <div class="w-100 text-truncate ml-2">
57                     <div class="d-flex">
58                         <strong class="m-0 text-truncate">{{name}}</strong>
59                         <span class="{{^isfavourite}}hidden{{/isfavourite}} ml-1 text-primary" data-region="favourite-icon-container">
60                             {{#pix}} i/star-rating, core {{/pix}}
61                         </span>
62                         <span class="{{^ismuted}}hidden{{/ismuted}} ml-1 text-primary" data-region="muted-icon-container">
63                             {{#pix}} i/muted, core {{/pix}}
64                         </span>
65                     </div>
66                     <p class="m-0 text-truncate">{{subname}}</p>
67                 </div>
68             </a>
69         </div>
70         <div class="ml-auto dropdown">
71             <button class="btn btn-link btn-icon icon-size-3" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
72                 {{#pix}} i/moremenu, core {{/pix}}
73             </button>
74             <div class="dropdown-menu float-right">
75                 <a class="dropdown-item" href="#" data-action="view-group-info">
76                     {{#str}} groupinfo, core_message {{/str}}
77                 </a>
78                 <a class="dropdown-item {{#isfavourite}}hidden{{/isfavourite}}" href="#" data-action="confirm-favourite">
79                     {{#str}} addtofavourites, core_message {{/str}}
80                 </a>
81                 <a class="dropdown-item {{^isfavourite}}hidden{{/isfavourite}}" href="#" data-action="confirm-unfavourite">
82                     {{#str}} removefromfavourites, core_message {{/str}}
83                 </a>
84                 <a class="dropdown-item {{#ismuted}}hidden{{/ismuted}}" href="#" data-action="confirm-mute">
85                     {{#str}} muteconversation, core_message {{/str}}
86                 </a>
87                 <a class="dropdown-item {{^ismuted}}hidden{{/ismuted}}" href="#" data-action="confirm-unmute">
88                     {{#str}} unmuteconversation, core_message {{/str}}
89                 </a>
90             </div>
91         </div>
92     </div>
93     <div class="d-flex">
94         <!-- These are just placeholder elements to align the text below correctly with the name text above -->
95         <div class="mr-2 icon" aria-hidden="true"></div>
96         {{#imageurl}}<div style="width: 38px" aria-hidden="true"></div>{{/imageurl}}
97         <!-- End placeholders -->
98         <a class="text-decoration-none line-height-3 ml-2" href="#" data-action="view-group-info">
99             <small class="m-0 text-muted text-truncate">
100                 {{#str}} numparticipants, core_message, {{totalmembercount}} {{/str}}
101             </small>
102         </a>
103     </div>
104 </div>