mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-63915 core_message: removed unused templates
Also removed no longer used renderer.
This commit is contained in:
parent
07203d34f1
commit
b01d0535bc
@ -1,52 +0,0 @@
|
||||
<?php
|
||||
// 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/>.
|
||||
|
||||
/**
|
||||
* Contains class used to render the message area.
|
||||
*
|
||||
* @package core_message
|
||||
* @copyright 2016 Mark Nelson <markn@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace core_message\output;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
use plugin_renderer_base;
|
||||
|
||||
/**
|
||||
* Renderer class for the message area.
|
||||
*
|
||||
* @package core_message
|
||||
* @copyright 2016 Mark Nelson <markn@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class renderer extends plugin_renderer_base {
|
||||
|
||||
/**
|
||||
* Renders the message area.
|
||||
*
|
||||
* Defer to template.
|
||||
*
|
||||
* @param \core_message\output\messagearea\message_area $page
|
||||
* @return string html for the page
|
||||
*/
|
||||
public function render_message_area(\core_message\output\messagearea\message_area $page) {
|
||||
$data = $page->export_for_template($this);
|
||||
return parent::render_from_template('core_message/message_area', $data);
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
<div class="messaging-area-container" data-userid="{{userid}}" data-displaycontacts="{{contactsfirst}}">
|
||||
<div class="messaging-area {{#requestedconversation}}show-messages{{/requestedconversation}}
|
||||
{{^requestedconversation}}hide-messages{{/requestedconversation}}" data-region="messaging-area">
|
||||
<div class="contacts-area" data-region="contacts-area" role="tablist">
|
||||
{{#contacts}}
|
||||
{{> core_message/message_area_contacts_area }}
|
||||
{{/contacts}}
|
||||
</div>
|
||||
<div class="messages-area" data-region="messages-area" role="log">
|
||||
{{#messages}}
|
||||
{{> core_message/message_area_messages_area }}
|
||||
{{/messages}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{#js}}
|
||||
require(['core_message/message_area'],
|
||||
function(Messagearea) {
|
||||
new Messagearea('.messaging-area-container', {{pollmin}}, {{pollmax}}, {{polltimeout}});
|
||||
}
|
||||
);
|
||||
{{/js}}
|
@ -1,52 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
<div class="contact {{#selected}}selected{{/selected}} {{#lastmessage}}{{^isread}}unread{{/isread}}{{/lastmessage}}"
|
||||
data-action="view-contact-msg"
|
||||
data-userid="{{userid}}" data-messageid="{{#messageid}}{{.}}{{isread}}{{/messageid}}" data-region="contact" role="button"
|
||||
aria-pressed="{{#selected}}true{{/selected}}{{^selected}}false{{/selected}}" tabindex="0">
|
||||
<div class="picture">
|
||||
<img src="{{profileimageurl}}" alt="" />
|
||||
</div>
|
||||
<div class="information">
|
||||
<div class="name">
|
||||
{{fullname}}
|
||||
{{#showonlinestatus}}
|
||||
<div {{#isonline}}class="d-inline status online"{{/isonline}}{{^isonline}}class="hidden"{{/isonline}}>
|
||||
<span class="online-text" data-region="contact-icon-online">
|
||||
{{#pix}} t/online, core, {{#str}} online, message {{/str}} {{/pix}}
|
||||
</span>
|
||||
</div>
|
||||
{{/showonlinestatus}}
|
||||
<span {{^isblocked}}class="hidden"{{/isblocked}} data-region="contact-icon-blocked">
|
||||
{{#pix}} t/block, core, {{#str}} contactblocked, message {{/str}} {{/pix}}
|
||||
</span>
|
||||
</div>
|
||||
<p class="lastmessage" data-region="last-message-area">
|
||||
<span data-region="last-message-user">
|
||||
{{#sentfromcurrentuser}}{{#str}}you, message{{/str}}{{/sentfromcurrentuser}}
|
||||
</span>
|
||||
<span data-region="last-message-text">
|
||||
{{#lastmessage}}
|
||||
{{.}}
|
||||
{{/lastmessage}}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="unread-count-container">
|
||||
<span data-region="unread-count" class="badge badge-important">{{unreadcount}}</span>
|
||||
</div>
|
||||
</div>
|
@ -1,29 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
{{#contacts}}
|
||||
{{> core_message/message_area_contact }}
|
||||
{{/contacts}}
|
||||
{{^contacts}}
|
||||
<div class="nocontacts" data-region="no-contacts">
|
||||
{{#isconversation}}
|
||||
{{#str}}nomessages, message{{/str}}
|
||||
{{/isconversation}}
|
||||
{{^isconversation}}
|
||||
{{#str}}nocontacts, message{{/str}}
|
||||
{{/isconversation}}
|
||||
</div>
|
||||
{{/contacts}}
|
@ -1,48 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
<div class="searchtextarea" data-region="search-text-area">
|
||||
<label class="accesshide" for="searchtext">{{#str}}search{{/str}}</label>
|
||||
<input data-region="search-box" type="text" id="searchtext" placeholder="{{#contactsfirst}} {{#str}}searchforuserorcourse, message{{/str}} {{/contactsfirst}} {{^contactsfirst}} {{#str}}searchmessages, message{{/str}} {{/contactsfirst}}">
|
||||
<div data-region="search-filter-area" class="searchfilterarea" style="display:none" role="button" tabindex="0">
|
||||
<div data-region="search-filter" class="searchfilter"></div>
|
||||
<div data-action="search-filter-delete" class="searchfilterdelete">{{#pix}}t/delete{{/pix}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{#contactsfirst}}
|
||||
<div class="contacts" data-region="contacts" data-region-content="conversations" style="display:none;" role="tabpanel" id="conversations-tab-panel"></div>
|
||||
<div class="contacts" data-region="contacts" data-region-content="contacts" role="tabpanel" id="contacts-tab-panel">
|
||||
{{> core_message/message_area_contacts }}
|
||||
</div>
|
||||
{{/contactsfirst}}
|
||||
{{^contactsfirst}}
|
||||
<div class="contacts" data-region="contacts" data-region-content="conversations" role="tabpanel" id="conversations-tab-panel">
|
||||
{{> core_message/message_area_contacts }}
|
||||
</div>
|
||||
<div class="contacts" data-region="contacts" data-region-content="contacts" style="display:none;" role="tabpanel" id="contacts-tab-panel"></div>
|
||||
{{/contactsfirst}}
|
||||
{{! Hidden divs to load the other tab and search panels via JS when appropriate. }}
|
||||
<div class="contacts searcharea" data-region="search-results-area" style="display:none;"></div>
|
||||
<div class="tabs" role="tablist">
|
||||
<div class="tab tabconversations {{^contactsfirst}}selected{{/contactsfirst}} " data-action="conversations-view" role="tab" aria-controls="conversations-tab-panel" aria-selected="{{^contactsfirst}}true{{/contactsfirst}}{{#contactsfirst}}false{{/contactsfirst}}" tabindex="0">
|
||||
<div class="tabimage">{{#pix}}t/message, moodle{{/pix}}</div>
|
||||
<div>{{#str}}messages, message{{/str}}</div>
|
||||
</div>
|
||||
<div class="tab tabcontacts {{#contactsfirst}}selected{{/contactsfirst}}" data-action="contacts-view" role="tab" aria-controls="contacts-tab-panel" aria-selected="{{#contactsfirst}}true{{/contactsfirst}}{{^contactsfirst}}false{{/contactsfirst}}" tabindex="-1">
|
||||
<div class="tabimage">{{#pix}}i/cohort, moodle{{/pix}}</div>
|
||||
<div>{{#str}}contacts, message{{/str}}</div>
|
||||
</div>
|
||||
</div>
|
@ -1,41 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
{{#displayblocktime}}
|
||||
<div class="blocktime" data-region="blocktime" data-blocktime="{{blocktime}}" data-id="{{id}}{{isread}}">
|
||||
{{blocktime}}
|
||||
</div>
|
||||
{{/displayblocktime}}
|
||||
<div class="message d-flex row-fluid"
|
||||
data-region="message"
|
||||
data-blocktime="{{blocktime}}"
|
||||
data-id="{{id}}{{isread}}"
|
||||
data-useridto="{{useridto}}"
|
||||
data-useridfrom="{{useridfrom}}"
|
||||
data-messageid="{{id}}"
|
||||
data-messageread="{{isread}}"
|
||||
data-timecreated="{{timecreated}}"
|
||||
tabindex="0">
|
||||
|
||||
<div class="content {{position}}">
|
||||
<span class="text" data-region="message-text">
|
||||
{{{text}}}
|
||||
</span>
|
||||
<span class="timesent">
|
||||
{{timesent}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
@ -1,22 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
{{#contacts}}
|
||||
{{> core_message/message_area_contact }}
|
||||
{{/contacts}}
|
||||
{{^contacts}}
|
||||
<div class="noresults">{{#str}}noresults{{/str}}</div>
|
||||
{{/contacts}}
|
@ -1,19 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
{{#messages}}
|
||||
{{> core_message/message_area_message }}
|
||||
{{/messages}}
|
@ -1,108 +0,0 @@
|
||||
{{!
|
||||
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 core_message/message_area_messages_area
|
||||
|
||||
Messages area template.
|
||||
|
||||
Classes required for JS:
|
||||
* none
|
||||
|
||||
Data attributes required for JS:
|
||||
* none
|
||||
|
||||
Context variables required for this template:
|
||||
* isonline - boolean
|
||||
* isblocked - boolean
|
||||
* otheruserid - int
|
||||
* otheruserfullname - string
|
||||
* messages - array of messages
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"isonline": true,
|
||||
"isblocked": true,
|
||||
"otheruserid": 1,
|
||||
"otheruserfullname": "Sam Student",
|
||||
"messages": [
|
||||
{
|
||||
"text": "Hello there!"
|
||||
}
|
||||
]
|
||||
}
|
||||
}}
|
||||
{{#otheruserid}}
|
||||
<div class="messages-header">
|
||||
<div class="view-toggle btn-container">
|
||||
<button class="btn btn-link" data-action="show-contacts">< {{#str}} messages, message {{/str}}</button>
|
||||
</div>
|
||||
<div class="delete-all btn-container">
|
||||
<button class="btn btn-link" data-action="delete-all-messages" aria-label="{{#str}} deleteallmessages, message {{/str}}">
|
||||
{{#str}} deleteall {{/str}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="name-container">
|
||||
<div class="name">
|
||||
<button class="btn btn-link" data-action="view-contact-profile" data-userid="{{otheruserid}}">{{otheruserfullname}}</button>
|
||||
{{#isblocked}}
|
||||
<span data-region="contact-icon-blocked">
|
||||
{{#pix}} t/block, core, {{#str}} contactblocked, message {{/str}} {{/pix}}
|
||||
</span>
|
||||
{{/isblocked}}
|
||||
</div>
|
||||
{{#showonlinestatus}}
|
||||
<div class="status {{#isonline}}online{{/isonline}}">
|
||||
<span class="offline-text">{{#str}} offline, message {{/str}}</span>
|
||||
<span class="online-text">{{#str}} online, message {{/str}}</span>
|
||||
</div>
|
||||
{{/showonlinestatus}}
|
||||
</div>
|
||||
<div class="delete-instructions">
|
||||
{{#str}} selectmessagestodelete, message {{/str}}
|
||||
</div>
|
||||
<div class="actions" data-region="messages-header-actions">
|
||||
<button class="btn btn-link messages-delete" data-action="start-delete-messages"
|
||||
aria-label="{{#str}} editmessages, message {{/str}}">{{#str}}edit{{/str}}</button>
|
||||
<button class="btn btn-link cancel-messages-delete" data-action="cancel-delete-messages"
|
||||
aria-label="{{#str}} canceledit, message {{/str}}">{{#str}}cancel{{/str}}</button>
|
||||
</div>
|
||||
</div>
|
||||
{{/otheruserid}}
|
||||
{{#contactsfirst}}
|
||||
<div class="messages-header">
|
||||
<div class="name-container">
|
||||
<div class="name">
|
||||
{{#str}}newmessagesearch, message{{/str}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/contactsfirst}}
|
||||
<div class="messages" data-region="messages" data-userid="{{otheruserid}}">
|
||||
{{> core_message/message_area_messages }}
|
||||
</div>
|
||||
{{#otheruserid}}
|
||||
<div class="response" data-region="response">
|
||||
{{#iscurrentuser}}
|
||||
<div class="message-box">
|
||||
{{> core_message/message_area_response }}
|
||||
</div>
|
||||
{{/iscurrentuser}}
|
||||
<div class="delete-confirmation">
|
||||
<button class="btn btn-link confirm" data-action="delete-messages">{{#str}} deleteselectedmessages, message {{/str}}</button>
|
||||
</div>
|
||||
</div>
|
||||
{{/otheruserid}}
|
@ -1,65 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
<div class="profile-header">
|
||||
<div class="view-toggle btn-container">
|
||||
<button class="btn btn-link show-contacts" data-action="show-contacts">< {{#str}} contacts, message {{/str}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile" data-userid="{{userid}}" data-region="profile">
|
||||
<div class="user-container">
|
||||
<a data-action="profile-view" href="#">
|
||||
<img class="profile-picture" src="{{profileimageurl}}"
|
||||
alt="{{#str}}pictureof, moodle, {{fullname}}{{/str}}"
|
||||
title="{{#str}}pictureof, moodle, {{fullname}}{{/str}}" />
|
||||
</a>
|
||||
<div class="name-container">
|
||||
<div class="name">{{fullname}}</div>
|
||||
{{#showonlinestatus}}
|
||||
<div class="status {{#isonline}}online{{/isonline}}">
|
||||
<div class="online-text">{{#str}} online, message {{/str}}</div>
|
||||
<div class="offline-text">{{#str}} offline, message {{/str}}</div>
|
||||
</div>
|
||||
{{/showonlinestatus}}
|
||||
</div>
|
||||
<ul class="information">
|
||||
{{#email}}<li><div class="name">{{#str}} email {{/str}}</div><div class="value">{{.}}</div></li>{{/email}}
|
||||
{{#country}}<li><div class="name">{{#str}} country {{/str}}</div><div class="value">{{country}}</div></li>{{/country}}
|
||||
{{#city}}<li><div class="name">{{#str}} city {{/str}}</div><div class="value">{{city}}</div></li>{{/city}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="separator">
|
||||
<a data-action="profile-send-message" href="#">{{#str}}sendmessage, message{{/str}}</a>
|
||||
</div>
|
||||
<div class="separator">
|
||||
{{#isblocked}}
|
||||
<a data-action="profile-unblock-contact" href="#">{{#str}}unblockcontact, message{{/str}}</a>
|
||||
{{/isblocked}}
|
||||
{{^isblocked}}
|
||||
<a class="danger" data-action="profile-block-contact" href="#">{{#str}}blockcontact, message{{/str}}</a>
|
||||
{{/isblocked}}
|
||||
</div>
|
||||
<div class="separator">
|
||||
{{#iscontact}}
|
||||
<a class="danger" data-action="profile-remove-contact" href="#">{{#str}}removecontact, message{{/str}}</a>
|
||||
{{/iscontact}}
|
||||
{{^iscontact}}
|
||||
<a data-action="profile-add-contact" href="#">{{#str}}addcontact, message{{/str}}</a>
|
||||
{{/iscontact}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,28 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
<div class="message-text-container">
|
||||
<textarea data-region="send-message-txt"
|
||||
rows="1"
|
||||
data-auto-rows
|
||||
data-max-rows="5"
|
||||
role="textbox"
|
||||
aria-label="{{#str}} writeamessage, message {{/str}}"
|
||||
placeholder="{{#str}} writeamessage, message {{/str}}"></textarea>
|
||||
</div>
|
||||
<div class="send-button-container">
|
||||
<button class="btn btn-link" data-action="send-message">{{#str}}send, message{{/str}}</button>
|
||||
</div>
|
@ -1,42 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
{{#hascontacts}}
|
||||
{{#contacts}}
|
||||
{{> core_message/message_area_contact }}
|
||||
{{/contacts}}
|
||||
{{/hascontacts}}
|
||||
{{#hascourses}}
|
||||
<div class="heading">{{#str}}courses{{/str}}</div>
|
||||
{{#courses}}
|
||||
<div class="course" data-action="search-users-in-course" data-courseid="{{id}}" data-region="course" role="button" tabindex="0">
|
||||
{{fullname}}
|
||||
</div>
|
||||
{{/courses}}
|
||||
{{/hascourses}}
|
||||
{{#hasnoncontacts}}
|
||||
<div class="heading">{{#str}}noncontacts, message{{/str}}</div>
|
||||
{{#noncontacts}}
|
||||
{{> core_message/message_area_contact }}
|
||||
{{/noncontacts}}
|
||||
{{/hasnoncontacts}}
|
||||
{{^hascontacts}}
|
||||
{{^hascourses}}
|
||||
{{^hasnoncontacts}}
|
||||
<div class="noresults">{{#str}}noresults{{/str}}</div>
|
||||
{{/hasnoncontacts}}
|
||||
{{/hascourses}}
|
||||
{{/hascontacts}}
|
@ -1,119 +0,0 @@
|
||||
{{!
|
||||
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 core_message/message_preferences
|
||||
|
||||
The message preferences page
|
||||
|
||||
Classes required for JS:
|
||||
* None
|
||||
|
||||
Data attibutes required for JS:
|
||||
* All data attributes are required
|
||||
|
||||
Context variables required for this template:
|
||||
* userid The logged in user id
|
||||
* disableall If the user has disabled notifications
|
||||
* components The list of notification components
|
||||
* privacychoices The choice options for the contactable privacy setting
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"userid": 1,
|
||||
"disableall": 0,
|
||||
"components": [
|
||||
{
|
||||
"notifications": [
|
||||
{
|
||||
"displayname": "Notices about minor problems",
|
||||
"preferencekey": "message_provider_moodle_notices",
|
||||
"onlinehelphtml": "<p>some help HTML</p>",
|
||||
"offlinehelphtml": "<p>some help HTML</p>",
|
||||
"processors": [
|
||||
{
|
||||
"displayname": "Popup notification",
|
||||
"name": "popup",
|
||||
"locked": 0,
|
||||
"userconfigured": 1,
|
||||
"loggedin": {
|
||||
"name": "loggedin",
|
||||
"displayname": "When I'm logged in",
|
||||
"checked": 0,
|
||||
"disableall": 0
|
||||
},
|
||||
"loggedoff": {
|
||||
"name": "loggedoff",
|
||||
"displayname": "When I'm offline",
|
||||
"checked": 0,
|
||||
"disableall": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"privacychoices": [
|
||||
{
|
||||
"value": 1,
|
||||
"text": "My contacts only",
|
||||
"checked": 0
|
||||
},
|
||||
{
|
||||
"value": 2,
|
||||
"text": "Anyone within courses I am a member of",
|
||||
"checked": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}}
|
||||
<div class="preferences-page-container" data-region="preferences-page-container">
|
||||
<h2>{{#str}} messagepreferences, message {{/str}}</h2>
|
||||
<div class="privacy-setting-container"
|
||||
data-user-id="{{userid}}"
|
||||
data-region="privacy-setting-container"
|
||||
data-preference-key="message_blocknoncontacts">
|
||||
<p>{{#str}} contactableprivacy, message {{/str}}</p>
|
||||
{{#privacychoices}}
|
||||
<input id="action-selection-option-{{value}}"
|
||||
type="radio"
|
||||
name="message_blocknoncontacts"
|
||||
value="{{value}}"
|
||||
{{#checked}}checked="checked"{{/checked}}/>
|
||||
<label for="action-selection-option-{{value}}">{{text}}</label>
|
||||
<br>
|
||||
{{/privacychoices}}
|
||||
</div><br>
|
||||
<div class="preferences-container {{#disableall}}disabled{{/disableall}}"
|
||||
data-user-id="{{userid}}"
|
||||
data-region="preferences-container">
|
||||
<table class="table table-hover preference-table" data-region="preference-table">
|
||||
<tbody>
|
||||
{{#components}}
|
||||
{{> message/message_preferences_component }}
|
||||
{{/components}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{#js}}
|
||||
require(['jquery', 'core_message/message_preferences'],
|
||||
function($, MessagePreferences) {
|
||||
|
||||
new MessagePreferences($('[data-region="preferences-page-container"]'));
|
||||
});
|
||||
{{/js}}
|
@ -1,84 +0,0 @@
|
||||
{{!
|
||||
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 core_message/message_preferences_component
|
||||
|
||||
The message preferences page
|
||||
|
||||
Classes required for JS:
|
||||
* None
|
||||
|
||||
Data attibutes required for JS:
|
||||
* All data attributes are required
|
||||
|
||||
Context variables required for this template:
|
||||
* notifications The list of notifications
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"notifications": [
|
||||
{
|
||||
"displayname": "Notices about minor problems",
|
||||
"preferencekey": "message_provider_moodle_notices",
|
||||
"onlinehelphtml": "<p>some help HTML</p>",
|
||||
"offlinehelphtml": "<p>some help HTML</p>",
|
||||
"processors": [
|
||||
{
|
||||
"displayname": "Popup notification",
|
||||
"name": "popup",
|
||||
"locked": 0,
|
||||
"userconfigured": 1,
|
||||
"loggedin": {
|
||||
"name": "loggedin",
|
||||
"displayname": "When I'm logged in",
|
||||
"checked": 0,
|
||||
"disableall": 0
|
||||
},
|
||||
"loggedoff": {
|
||||
"name": "loggedoff",
|
||||
"displayname": "When I'm offline",
|
||||
"checked": 0,
|
||||
"disableall": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}}
|
||||
{{#notifications}}
|
||||
<tr data-preference-key="{{preferencekey}}">
|
||||
<th>{{displayname}}</th>
|
||||
<td class="align-bottom">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span6 col-xs-6">
|
||||
{{#str}} loggedin, message {{/str}}
|
||||
{{#onlinehelphtml}}{{{.}}}{{/onlinehelphtml}}
|
||||
</div>
|
||||
<div class="span6 col-xs-6">
|
||||
{{#str}} loggedoff, message {{/str}}
|
||||
{{#offlinehelphtml}}{{{.}}}{{/offlinehelphtml}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#processors}}
|
||||
{{> message/message_preferences_notification_processor }}
|
||||
{{/processors}}
|
||||
{{/notifications}}
|
@ -1,127 +0,0 @@
|
||||
{{!
|
||||
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 core_message/message_preferences_notification_processor
|
||||
|
||||
The message preferences page
|
||||
|
||||
Classes required for JS:
|
||||
* None
|
||||
|
||||
Data attibutes required for JS:
|
||||
* All data attributes are required
|
||||
|
||||
Context variables required for this template:
|
||||
* displayname The display name of the processor
|
||||
* name The name of the processor
|
||||
* locked Whether the processor is locked
|
||||
* loggedin The logged in settings
|
||||
* loggedoff The logged off settings
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"displayname": "Notices about minor problems",
|
||||
"preferencekey": "message_provider_moodle_notices",
|
||||
"processors": [
|
||||
{
|
||||
"displayname": "Popup notification",
|
||||
"name": "popup",
|
||||
"locked": 0,
|
||||
"userconfigured": 1,
|
||||
"loggedin": {
|
||||
"name": "loggedin",
|
||||
"displayname": "When I'm logged in",
|
||||
"checked": 0,
|
||||
"disableall": 0
|
||||
},
|
||||
"loggedoff": {
|
||||
"name": "loggedoff",
|
||||
"displayname": "When I'm offline",
|
||||
"checked": 0,
|
||||
"disableall": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}}
|
||||
<tr class="preference-row" data-region="preference-row" data-preference-key="{{preferencekey}}">
|
||||
<td class="preference-name">{{displayname}}</td>
|
||||
<td {{^userconfigured}}class="disabled"{{/userconfigured}} data-processor-name="{{name}}">
|
||||
{{#locked}}
|
||||
<div class="dimmed_text">{{lockedmessage}}</div>
|
||||
{{/locked}}
|
||||
{{^locked}}
|
||||
<div class="disabled-message">{{#str}} disabled, question {{/str}}</div>
|
||||
<form>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span6 col-xs-6">
|
||||
{{#loggedin}}
|
||||
{{< core/hover_tooltip }}
|
||||
{{$anchor}}
|
||||
<label class="preference-state"
|
||||
title="{{displayname}}"
|
||||
data-state="{{name}}">
|
||||
|
||||
<span class="accesshide">{{displayname}}</span>
|
||||
<input type="checkbox"
|
||||
tabindex="-1"
|
||||
class="accesshide"
|
||||
{{#checked}}checked{{/checked}}
|
||||
{{#disableall}}disabled{{/disableall}} />
|
||||
<div class="preference-state-status-container" tabindex="0">
|
||||
<span class="on-text">{{#str}} on, message {{/str}}</span>
|
||||
<span class="off-text">{{#str}} off, message {{/str}}</span>
|
||||
{{> core/loading }}
|
||||
</div>
|
||||
</label>
|
||||
{{/anchor}}
|
||||
{{$tooltip}}{{displayname}}{{/tooltip}}
|
||||
{{/ core/hover_tooltip }}
|
||||
{{/loggedin}}
|
||||
</div>
|
||||
<div class="span6 col-xs-6">
|
||||
{{#loggedoff}}
|
||||
{{< core/hover_tooltip }}
|
||||
{{$anchor}}
|
||||
<label class="preference-state"
|
||||
title="{{displayname}}"
|
||||
data-state="{{name}}">
|
||||
|
||||
<span class="accesshide">{{displayname}}</span>
|
||||
<input type="checkbox"
|
||||
tabindex="-1"
|
||||
class="accesshide"
|
||||
{{#checked}}checked{{/checked}}
|
||||
{{#disableall}}disabled{{/disableall}} />
|
||||
<div class="preference-state-status-container" tabindex="0">
|
||||
<span class="on-text">{{#str}} on, message {{/str}}</span>
|
||||
<span class="off-text">{{#str}} off, message {{/str}}</span>
|
||||
{{> core/loading }}
|
||||
</div>
|
||||
</label>
|
||||
{{/anchor}}
|
||||
{{$tooltip}}{{displayname}}{{/tooltip}}
|
||||
{{/ core/hover_tooltip }}
|
||||
{{/loggedoff}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{{/locked}}
|
||||
</td>
|
||||
</tr>
|
Loading…
x
Reference in New Issue
Block a user