mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
181 lines
7.7 KiB
Text
181 lines
7.7 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 mod_forum/forum_post_email_htmlemail
|
|
|
|
Template which defines a forum post for sending in a single-post HTML email.
|
|
|
|
Classes required for JS:
|
|
* none
|
|
|
|
Data attributes required for JS:
|
|
* none
|
|
|
|
Example context (json):
|
|
{
|
|
}
|
|
}}
|
|
<article id="p{{id}}" class="relativelink mb-2" tabindex="-1" data-post-id="{{id}}">
|
|
|
|
<!-- The firstpost and starter classes below aren't used for anything other than to identify the first post in behat -->
|
|
<div
|
|
class="d-flex border p-2 mb-2 forumpost {{#unread}}unread{{/unread}} {{#firstpost}}firstpost starter{{/firstpost}}"
|
|
aria-label='{{#str}} postbyuser, mod_forum, {"post": "{{subject}}", "user": "{{author.fullname}}"} {{/str}}'
|
|
>
|
|
{{#isfirstunread}}<a id="unread"></a>{{/isfirstunread}}
|
|
<div style="width: 45px;">
|
|
{{^isdeleted}}
|
|
{{#author}}
|
|
{{#urls.profileimage}}
|
|
<img class="rounded-circle w-100" src="{{{.}}}">
|
|
{{/urls.profileimage}}
|
|
{{#groups}}
|
|
<img class="rounded-circle w-100" src="{{{urls.image}}}">
|
|
{{/groups}}
|
|
{{/author}}
|
|
{{/isdeleted}}
|
|
</div>
|
|
|
|
<div class="d-flex flex-column ml-2 w-100">
|
|
<header class="mb-2 header row">
|
|
<h3 class="h6 font-weight-bold mb-0">{{$subject}}{{{subject}}}{{/subject}}</h3>
|
|
{{^isdeleted}}
|
|
<address>
|
|
{{{html.authorsubheading}}}
|
|
</address>
|
|
{{/isdeleted}}
|
|
</header>
|
|
<div>
|
|
{{{message}}}
|
|
</div>
|
|
|
|
{{^isdeleted}}
|
|
{{#haswordcount}}
|
|
<p class="font-italic mb-0"><small>{{#str}} numwords, core, {{wordcount}} {{/str}}</small></p>
|
|
{{/haswordcount}}
|
|
|
|
{{#attachments}}
|
|
{{#isimage}}
|
|
<div>
|
|
<img src="{{{url}}}" alt="{{filename}}" style="max-width: 100%">
|
|
{{#urls.export}}
|
|
<a href="{{{.}}}" title="{{#str}} addtoportfolio, core_portfolio {{/str}}">
|
|
{{#pix}} t/portfolioadd, core {{/pix}}
|
|
</a>
|
|
{{/urls.export}}
|
|
{{#html.plagiarism}}
|
|
<div>{{{.}}}</div>
|
|
{{/html.plagiarism}}
|
|
</div>
|
|
{{/isimage}}
|
|
{{/attachments}}
|
|
|
|
{{{html.taglist}}}
|
|
|
|
{{#attachments}}
|
|
{{^isimage}}
|
|
<div>
|
|
<a href="{{{url}}}">{{#pix}} {{icon}}, core {{/pix}} {{filename}}</a>
|
|
{{#urls.export}}
|
|
<a href="{{{.}}}" title="{{#str}} addtoportfolio, core_portfolio {{/str}}">
|
|
{{#pix}} t/portfolioadd, core {{/pix}}
|
|
</a>
|
|
{{/urls.export}}
|
|
{{#html.plagiarism}}
|
|
<div>{{{.}}}</div>
|
|
{{/html.plagiarism}}
|
|
</div>
|
|
{{/isimage}}
|
|
{{/attachments}}
|
|
|
|
{{#html.rating}}
|
|
<div class="mt-2">{{{.}}}</div>
|
|
{{/html.rating}}
|
|
|
|
{{$actions}}
|
|
{{^readonly}}
|
|
<div class="d-flex justify-content-end">
|
|
{{#capabilities}}
|
|
{{#view}}
|
|
<a href="{{{urls.view}}}" class="btn btn-link">
|
|
{{#str}} permalink, mod_forum {{/str}}
|
|
</a>
|
|
{{/view}}
|
|
{{#controlreadstatus}}
|
|
{{#unread}}
|
|
<a href="{{{urls.markasread}}}" class="btn btn-link">
|
|
{{#str}} markread, mod_forum {{/str}}
|
|
</a>
|
|
{{/unread}}
|
|
{{^unread}}
|
|
<a href="{{{urls.markasunread}}}" class="btn btn-link">
|
|
{{#str}} markunread, mod_forum {{/str}}
|
|
</a>
|
|
{{/unread}}
|
|
{{/controlreadstatus}}
|
|
{{#urls.viewparent}}
|
|
<a href="{{{.}}}" class="btn btn-link">
|
|
{{#str}} parent, mod_forum {{/str}}
|
|
</a>
|
|
{{/urls.viewparent}}
|
|
{{#edit}}
|
|
<a href="{{{urls.edit}}}" class="btn btn-link">
|
|
{{#str}} edit, mod_forum {{/str}}
|
|
</a>
|
|
{{/edit}}
|
|
{{#split}}
|
|
<a href="{{{urls.split}}}" class="btn btn-link">
|
|
{{#str}} prune, mod_forum {{/str}}
|
|
</a>
|
|
{{/split}}
|
|
{{#delete}}
|
|
<a href="{{{urls.delete}}}" class="btn btn-link">
|
|
{{#str}} delete, mod_forum {{/str}}
|
|
</a>
|
|
{{/delete}}
|
|
{{#reply}}
|
|
{{$replyoutput}}
|
|
<a href="{{{urls.reply}}}" class="btn btn-link">
|
|
{{#str}} reply, mod_forum {{/str}}
|
|
</a>
|
|
{{/replyoutput}}
|
|
{{/reply}}
|
|
{{#export}}
|
|
<a href="{{{urls.export}}}" class="btn btn-link">
|
|
{{#str}} addtoportfolio, core_portfolio {{/str}}
|
|
</a>
|
|
{{/export}}
|
|
{{/capabilities}}
|
|
</div>
|
|
{{/readonly}}
|
|
{{/actions}}
|
|
|
|
{{$footer}}{{/footer}}
|
|
{{/isdeleted}}
|
|
</div>
|
|
</div>
|
|
|
|
{{$replies}}
|
|
{{#hasreplies}}
|
|
<div>
|
|
{{#replies}}
|
|
{{> mod_forum/forum_discussion_post }}
|
|
{{/replies}}
|
|
</div>
|
|
{{/hasreplies}}
|
|
{{/replies}}
|
|
</article>
|