mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
61 lines
2 KiB
Text
61 lines
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 {{^read}}unread{{/read}}"
|
|
data-region="notification-content-item-container"
|
|
data-id="{{id}}"
|
|
role="listitem"
|
|
{{#read}}aria-label="{{subject}}"{{/read}}
|
|
{{^read}}aria-label="{{#str}} unreadnotification, message, {{subject}} {{/str}}"{{/read}}
|
|
tabindex="0">
|
|
|
|
{{#contexturl}}
|
|
<a class="content-item-link" href="{{{.}}}" data-region="content-item-link">
|
|
{{/contexturl}}
|
|
<div class="content-item-body">
|
|
<div class="notification-image">
|
|
<img src="{{{iconurl}}}" alt="{{#str}}notificationimage, message{{/str}}"/>
|
|
</div>
|
|
<div class="notification-message">{{shortenedsubject}}</div>
|
|
</div>
|
|
<div class="content-item-footer">
|
|
<div class="timestamp">{{timecreatedpretty}}</div>
|
|
</div>
|
|
{{#contexturl}}
|
|
</a>
|
|
{{/contexturl}}
|
|
{{#viewmoreurl}}<a href="{{{.}}}" class="view-more">{{#str}} viewmore {{/str}}</a>{{/viewmoreurl}}
|
|
</div>
|