mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 11:26:41 +02:00
96 lines
3.2 KiB
Text
96 lines
3.2 KiB
Text
{{!
|
|
This file is part of Moodle - http://moodle.org/
|
|
|
|
Moodle is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
Moodle is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
}}
|
|
{{!
|
|
@template message/notification_content_item
|
|
|
|
This template will render the notification content item for the
|
|
navigation bar notification menu.
|
|
|
|
Classes required for JS:
|
|
* none
|
|
|
|
Data attributes required for JS:
|
|
* none
|
|
|
|
Context variables required for this template:
|
|
* userid the logged in user id
|
|
|
|
Example context (json):
|
|
{
|
|
}
|
|
|
|
}}
|
|
<div class="content-item-container"
|
|
role="listitem"
|
|
aria-expanded="false"
|
|
aria-label="{{subject}}"
|
|
tabindex="0">
|
|
|
|
{{#contexturl}}
|
|
<a class="content-item-link" href="{{{.}}}">
|
|
{{/contexturl}}
|
|
<div class="content-item">
|
|
<div class="content-item-header">
|
|
<h3 {{#userfromprofileurl}}data-link-url="{{{.}}}" role="link"{{/userfromprofileurl}}>{{userfromfullname}}</h3>
|
|
</div>
|
|
<div class="content-item-body">
|
|
<div class="content-body-short">
|
|
<div class="notification-image">
|
|
<img src="{{{iconurl}}}" alt="{{#str}}notificationimage, message{{/str}}"/>
|
|
</div>
|
|
<p class="notification-message">{{subject}}</p>
|
|
</div>
|
|
<div class="content-body-full" aria-hidden="true">
|
|
<pre>{{fullmessage}}</pre>
|
|
</div>
|
|
</div>
|
|
<div class="content-item-footer">
|
|
<p>{{timecreatedpretty}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="content-item-controls">
|
|
{{#preferenceenabled}}
|
|
{{#preference}}
|
|
<span class="block-button"
|
|
data-preference-key="{{key}}"
|
|
data-preference-loggedin="{{loggedin}}"
|
|
data-preference-loggedoff="{{loggedoff}}">
|
|
<div class="block-icon">{{#pix}} t/block {{/pix}}</div>
|
|
{{> core/loading }}
|
|
</span>
|
|
{{/preference}}
|
|
{{/preferenceenabled}}
|
|
<div class="expand-buttons">
|
|
<span class="show-button"
|
|
tabindex="0"
|
|
role="button"
|
|
aria-label="{{#str}} expandnotification, message {{/str}}">
|
|
{{#pix}} t/sort_desc {{/pix}}
|
|
</span>
|
|
<span class="hide-button"
|
|
tabindex="0"
|
|
role="button"
|
|
aria-hidden="true"
|
|
aria-label="{{#str}} collapsenotification, message {{/str}}">
|
|
{{#pix}} t/sort_asc {{/pix}}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
{{#contexturl}}
|
|
</a>
|
|
{{/contexturl}}
|
|
</div>
|