diff --git a/message/classes/output/renderer.php b/message/classes/output/renderer.php deleted file mode 100644 index 06590649a02..00000000000 --- a/message/classes/output/renderer.php +++ /dev/null @@ -1,52 +0,0 @@ -. - -/** - * Contains class used to render the message area. - * - * @package core_message - * @copyright 2016 Mark Nelson - * @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 - * @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); - } -} \ No newline at end of file diff --git a/message/templates/message_area.mustache b/message/templates/message_area.mustache deleted file mode 100644 index 1a6cbe71aa6..00000000000 --- a/message/templates/message_area.mustache +++ /dev/null @@ -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 . -}} -
-
-
- {{#contacts}} - {{> core_message/message_area_contacts_area }} - {{/contacts}} -
-
- {{#messages}} - {{> core_message/message_area_messages_area }} - {{/messages}} -
-
-
-{{#js}} - require(['core_message/message_area'], - function(Messagearea) { - new Messagearea('.messaging-area-container', {{pollmin}}, {{pollmax}}, {{polltimeout}}); - } - ); -{{/js}} diff --git a/message/templates/message_area_contact.mustache b/message/templates/message_area_contact.mustache deleted file mode 100644 index 2ca50f27611..00000000000 --- a/message/templates/message_area_contact.mustache +++ /dev/null @@ -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 . -}} -
-
- -
-
-
- {{fullname}} - {{#showonlinestatus}} -
- - {{#pix}} t/online, core, {{#str}} online, message {{/str}} {{/pix}} - -
- {{/showonlinestatus}} - - {{#pix}} t/block, core, {{#str}} contactblocked, message {{/str}} {{/pix}} - -
-

- - {{#sentfromcurrentuser}}{{#str}}you, message{{/str}}{{/sentfromcurrentuser}} - - - {{#lastmessage}} - {{.}} - {{/lastmessage}} - -

-
-
- {{unreadcount}} -
-
diff --git a/message/templates/message_area_contacts.mustache b/message/templates/message_area_contacts.mustache deleted file mode 100644 index b922590f8f9..00000000000 --- a/message/templates/message_area_contacts.mustache +++ /dev/null @@ -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 . -}} -{{#contacts}} - {{> core_message/message_area_contact }} -{{/contacts}} -{{^contacts}} -
- {{#isconversation}} - {{#str}}nomessages, message{{/str}} - {{/isconversation}} - {{^isconversation}} - {{#str}}nocontacts, message{{/str}} - {{/isconversation}} -
-{{/contacts}} diff --git a/message/templates/message_area_contacts_area.mustache b/message/templates/message_area_contacts_area.mustache deleted file mode 100644 index b368a0c644c..00000000000 --- a/message/templates/message_area_contacts_area.mustache +++ /dev/null @@ -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 . -}} -
- - - -
-{{#contactsfirst}} - -
- {{> core_message/message_area_contacts }} -
-{{/contactsfirst}} -{{^contactsfirst}} -
- {{> core_message/message_area_contacts }} -
- -{{/contactsfirst}} -{{! Hidden divs to load the other tab and search panels via JS when appropriate. }} - -
- - -
diff --git a/message/templates/message_area_message.mustache b/message/templates/message_area_message.mustache deleted file mode 100644 index c04eba98fe7..00000000000 --- a/message/templates/message_area_message.mustache +++ /dev/null @@ -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 . -}} -{{#displayblocktime}} -
- {{blocktime}} -
-{{/displayblocktime}} -
- -
- - {{{text}}} - - - {{timesent}} - -
-
diff --git a/message/templates/message_area_message_search_results.mustache b/message/templates/message_area_message_search_results.mustache deleted file mode 100644 index 7f6f5b88854..00000000000 --- a/message/templates/message_area_message_search_results.mustache +++ /dev/null @@ -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 . -}} -{{#contacts}} - {{> core_message/message_area_contact }} -{{/contacts}} -{{^contacts}} -
{{#str}}noresults{{/str}}
-{{/contacts}} diff --git a/message/templates/message_area_messages.mustache b/message/templates/message_area_messages.mustache deleted file mode 100644 index 433fc7e087d..00000000000 --- a/message/templates/message_area_messages.mustache +++ /dev/null @@ -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 . -}} -{{#messages}} - {{> core_message/message_area_message }} -{{/messages}} diff --git a/message/templates/message_area_messages_area.mustache b/message/templates/message_area_messages_area.mustache deleted file mode 100644 index 34b2ee44114..00000000000 --- a/message/templates/message_area_messages_area.mustache +++ /dev/null @@ -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 . -}} -{{! - @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}} -
-
- -
-
- -
-
-
- - {{#isblocked}} - - {{#pix}} t/block, core, {{#str}} contactblocked, message {{/str}} {{/pix}} - - {{/isblocked}} -
- {{#showonlinestatus}} -
- {{#str}} offline, message {{/str}} - {{#str}} online, message {{/str}} -
- {{/showonlinestatus}} -
-
- {{#str}} selectmessagestodelete, message {{/str}} -
-
- - -
-
-{{/otheruserid}} -{{#contactsfirst}} -
-
-
- {{#str}}newmessagesearch, message{{/str}} -
-
-
-{{/contactsfirst}} -
- {{> core_message/message_area_messages }} -
-{{#otheruserid}} -
- {{#iscurrentuser}} -
- {{> core_message/message_area_response }} -
- {{/iscurrentuser}} -
- -
-
-{{/otheruserid}} diff --git a/message/templates/message_area_profile.mustache b/message/templates/message_area_profile.mustache deleted file mode 100644 index 1a706aa18c8..00000000000 --- a/message/templates/message_area_profile.mustache +++ /dev/null @@ -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 . -}} -
-
- -
-
-
-
- - {{#str}}pictureof, moodle, {{fullname}}{{/str}} - -
-
{{fullname}}
- {{#showonlinestatus}} -
-
{{#str}} online, message {{/str}}
-
{{#str}} offline, message {{/str}}
-
- {{/showonlinestatus}} -
-
    - {{#email}}
  • {{#str}} email {{/str}}
    {{.}}
  • {{/email}} - {{#country}}
  • {{#str}} country {{/str}}
    {{country}}
  • {{/country}} - {{#city}}
  • {{#str}} city {{/str}}
    {{city}}
  • {{/city}} -
-
-
- -
- {{#isblocked}} - {{#str}}unblockcontact, message{{/str}} - {{/isblocked}} - {{^isblocked}} - {{#str}}blockcontact, message{{/str}} - {{/isblocked}} -
-
- {{#iscontact}} - {{#str}}removecontact, message{{/str}} - {{/iscontact}} - {{^iscontact}} - {{#str}}addcontact, message{{/str}} - {{/iscontact}} -
-
-
diff --git a/message/templates/message_area_response.mustache b/message/templates/message_area_response.mustache deleted file mode 100644 index f7de5456bee..00000000000 --- a/message/templates/message_area_response.mustache +++ /dev/null @@ -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 . -}} -
- -
-
- -
diff --git a/message/templates/message_area_user_search_results.mustache b/message/templates/message_area_user_search_results.mustache deleted file mode 100644 index b395512a55c..00000000000 --- a/message/templates/message_area_user_search_results.mustache +++ /dev/null @@ -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 . -}} -{{#hascontacts}} - {{#contacts}} - {{> core_message/message_area_contact }} - {{/contacts}} -{{/hascontacts}} -{{#hascourses}} -
{{#str}}courses{{/str}}
- {{#courses}} -
- {{fullname}} -
- {{/courses}} -{{/hascourses}} -{{#hasnoncontacts}} -
{{#str}}noncontacts, message{{/str}}
- {{#noncontacts}} - {{> core_message/message_area_contact }} - {{/noncontacts}} -{{/hasnoncontacts}} -{{^hascontacts}} - {{^hascourses}} - {{^hasnoncontacts}} -
{{#str}}noresults{{/str}}
- {{/hasnoncontacts}} - {{/hascourses}} -{{/hascontacts}} diff --git a/message/templates/message_preferences.mustache b/message/templates/message_preferences.mustache deleted file mode 100644 index ebe1c40840c..00000000000 --- a/message/templates/message_preferences.mustache +++ /dev/null @@ -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 . -}} -{{! - @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": "

some help HTML

", - "offlinehelphtml": "

some help HTML

", - "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 - } - ] - } -}} -
-

{{#str}} messagepreferences, message {{/str}}

-
-

{{#str}} contactableprivacy, message {{/str}}

- {{#privacychoices}} - - -
- {{/privacychoices}} -

-
- - - {{#components}} - {{> message/message_preferences_component }} - {{/components}} - -
-
-
-{{#js}} -require(['jquery', 'core_message/message_preferences'], - function($, MessagePreferences) { - - new MessagePreferences($('[data-region="preferences-page-container"]')); -}); -{{/js}} diff --git a/message/templates/message_preferences_component.mustache b/message/templates/message_preferences_component.mustache deleted file mode 100644 index aeac0261a2b..00000000000 --- a/message/templates/message_preferences_component.mustache +++ /dev/null @@ -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 . -}} -{{! - @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": "

some help HTML

", - "offlinehelphtml": "

some help HTML

", - "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}} - - {{displayname}} - -
-
-
- {{#str}} loggedin, message {{/str}} - {{#onlinehelphtml}}{{{.}}}{{/onlinehelphtml}} -
-
- {{#str}} loggedoff, message {{/str}} - {{#offlinehelphtml}}{{{.}}}{{/offlinehelphtml}} -
-
-
- - - {{#processors}} - {{> message/message_preferences_notification_processor }} - {{/processors}} -{{/notifications}} diff --git a/message/templates/message_preferences_notification_processor.mustache b/message/templates/message_preferences_notification_processor.mustache deleted file mode 100644 index 43c38eff4e4..00000000000 --- a/message/templates/message_preferences_notification_processor.mustache +++ /dev/null @@ -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 . -}} -{{! - @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 - } - } - ] - } -}} - - {{displayname}} - - {{#locked}} -
{{lockedmessage}}
- {{/locked}} - {{^locked}} -
{{#str}} disabled, question {{/str}}
-
-
-
-
- {{#loggedin}} - {{< core/hover_tooltip }} - {{$anchor}} - - {{/anchor}} - {{$tooltip}}{{displayname}}{{/tooltip}} - {{/ core/hover_tooltip }} - {{/loggedin}} -
-
- {{#loggedoff}} - {{< core/hover_tooltip }} - {{$anchor}} - - {{/anchor}} - {{$tooltip}}{{displayname}}{{/tooltip}} - {{/ core/hover_tooltip }} - {{/loggedoff}} -
-
-
-
- {{/locked}} - -