Skip to content

Commit

Permalink
Merge branch 'MDL-64953' of https://github.com/Chocolate-lightning/mo…
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Aug 6, 2019
2 parents f6666a7 + 28cbff4 commit c79835a
Show file tree
Hide file tree
Showing 26 changed files with 521 additions and 13 deletions.
29 changes: 29 additions & 0 deletions blocks/search_forums/templates/search_form.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
{{!
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 block_search_forums/search_form
This template renders the search form.
Example context (json):
{
"actionurl": "https://domain.example/mod/forum/search.php",
"courseid": "2",
"advancedsearchurl": "https://domain.example/mod/forum/search.php?id=2",
"helpicon": "<a class='btn'><i class='icon fa fa-question-circle'></i></a>"
}
}}
<div class="searchform">
<form action="{{actionurl}}" class="form-inline">
<input type="hidden" name="id" value="{{courseid}}">
Expand Down
29 changes: 29 additions & 0 deletions blocks/settings/templates/search_form.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
{{!
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 block_settings/search_form
This template renders the search form.
Example context (json):
{
"action": "https://domain.example/admin/search.php",
"label": "Search in settings",
"searchvalue": "Find this setting",
"quote": "Search"
}
}}
<form method="get" action="{{action}}" class="adminsearchform form-inline" role="search">
<div class="form-group">
<label class="sr-only" for="adminsearchquery">{{label}}</label>
Expand Down
15 changes: 15 additions & 0 deletions course/templates/course_search_form.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@
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_course/course_search_form
This template renders the search form.
Example context (json):
{
"searchurl": "https://domain.example/course/search.php",
"id": "coursesearch",
"inputid": "coursesearchbox",
"inputsize": "30",
"value": "Find in course",
"helpicon": "<a class='btn'><i class='icon fa fa-question-circle'></i></a>"
}
}}
<form action="{{searchurl}}" id="{{id}}" method="get" class="form-inline">
<fieldset class="coursesearchbox invisiblefieldset">
<label for="{{inputid}}">{{#str}}searchcourses{{/str}}</label>
Expand Down
42 changes: 42 additions & 0 deletions grade/report/history/templates/user_button.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
{{!
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 gradereport_history/user_button
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):
{
"name": "showreport",
"label": "Select users",
"value": "1",
"classes": "singlebutton selectusersbutton gradereport_history_plugin",
"method": "get",
"url": "/grade/report/history/index.php",
"formid": "selectusersbutton{generated}",
"params": "true",
"id": "single_button{generated}",
"tooltip": "Select users",
"disabled": ""
}
}}
<div class="{{classes}}">
<div method="{{method}}" action="{{url}}" id="{{formid}}">
{{#params}}
Expand Down
18 changes: 18 additions & 0 deletions grade/report/singleview/templates/bulk_insert.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,25 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template gradereport_singleview/bulk_insert
Bulk insert attribute.
Example context (json):
{
"applyname": "Apply-name",
"applylabel": "Perform bulk insert",
"label": "Bulk insert",
"menuname": "Menu-name",
"menulabel": "For",
"menuoptions": "JSON object",
"value": "all",
"selected": "",
"name": "All grades",
"valuename": "Value-name",
"valuelabel": "Insert value",
"valuefield": "PARSED HTML"
}
}}
<div class="enable">
<input type="checkbox" name="{{applyname}}" value="1" id="{{applyname}}">
Expand Down
8 changes: 8 additions & 0 deletions grade/report/singleview/templates/button.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template gradereport_singleview/button
Button.
Example context (json):
{
"type": "submit",
"value": "Save"
}
}}
<input type="{{type}}" value={{#quote}}{{value}}{{/quote}} class="btn btn-secondary">
11 changes: 11 additions & 0 deletions grade/report/singleview/templates/dropdown_attribute.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template gradereport_singleview/dropdown_attribute
Dropdown attribute.
Example context (json):
{
"name": "Awesome-test",
"disabled": "true",
"options": "true",
"value": "1",
"selected": "true"
}
}}
<select id="{{name}}" name="{{name}}" class="custom-select" tabindex="1" {{#disabled}}disabled{{/disabled}}>
{{#options}}
Expand Down
11 changes: 11 additions & 0 deletions grade/report/singleview/templates/text_attribute.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template gradereport_singleview/text_attribute
Text attribute.
Example context (json):
{
"name": "Awesome-report",
"label": "Text label",
"value": "Text information",
"tabindex": "1",
"disabled": "true"
}
}}
<label for="{{name}}" class="accesshide">{{label}}</label>
<input id="{{name}}" name="{{name}}" type="text" value="{{value}}" class="form-control" {{#tabindex}}tabindex="{{.}}"{{/tabindex}} {{#disabled}}disabled{{/disabled}}>
Expand Down
15 changes: 15 additions & 0 deletions grade/templates/edit_tree.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,22 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_grades/edit_tree
Edit tree.
Example context (json):
{
"actionurl": "https://domain.example/grade/edit/tree/index.php?id=4",
"sesskey": "fakesesskey",
"notification": "",
"table": "<table class='generaltable simple setup-grades' id='grade_edit_tree_table'><thead> <tr><th>Name</th><th>Weights</th><th>Max grade</th><th>Actions</th> </tr></thead><tbody></tbody></table>",
"showsave": "true",
"showbulkmove": "true",
"bulkmoveoptions": "{'value' : '1', 'name' : 'Test grade category'}",
"value": "1",
"name": "Test grade category"
}
}}

<form id="gradetreeform" method="post" action="{{actionurl}}">
Expand Down
9 changes: 9 additions & 0 deletions grade/templates/weight_field.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_grades/weight_field
Weight field.
Example context (json):
{
"itemname": "Awesome test",
"id": "2",
"value": "100"
}
}}
<label class="accesshide" for="weight_{{id}}">
{{#str}}extracreditvalue, grades, {{itemname}}{{/str}}
Expand Down
12 changes: 11 additions & 1 deletion grade/templates/weight_override_field.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
Weight field.
@template core_grades/weight_override_field
Weight override field.
Example context (json):
{
"itemname": "Awesome test",
"id": "2",
"checked": "true",
"value": "100"
}
}}
<div class="form-inline">
<label class="accesshide" for="weightoverride_{{id}}">
Expand Down
2 changes: 1 addition & 1 deletion lib/behat/classes/behat_config_util.php
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ protected function get_list_of_themes() {
* Return the theme config for a given theme name.
* This is done so we can mock it in PHPUnit.
*
* @param $themename name of theme
* @param string $themename name of theme
* @return theme_config
*/
public function get_theme_config($themename) {
Expand Down
2 changes: 1 addition & 1 deletion lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ public function should_display_navbar_logo() {
/**
* Whether we should display the main logo.
*
* @param int $headinglevel
* @param int $headinglevel The heading level we want to check against.
* @return bool
*/
public function should_display_main_logo($headinglevel = 1) {
Expand Down
32 changes: 32 additions & 0 deletions lib/templates/custom_menu_item.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
{{!
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/custom_menu_item
This template renders a node as part of a submenu.
Example context (json):
{
"divider": "",
"haschildren": "1",
"uniqid": "Unique string",
"text": "Moodle community",
"children": "[custom_menu_item object]",
"title": "Moodle community",
"url": "https://moodle.org"
}
}}
{{^divider}}
{{#haschildren}}
<li class="dropdown nav-item">
Expand Down
26 changes: 25 additions & 1 deletion lib/templates/filemanager_confirmdialog.mustache
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
{{!
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/filemanager_confirmdialog
This template renders the popup confirm dialogue windows.
Example context (json):
{}
}}
<div class="filemanager fp-dlg">
<p class="fp-dlg-text"></p>
<button class="fp-dlg-butconfirm btn-primary btn">{{#str}}ok{{/str}}</button>
<button class="fp-dlg-butcancel btn-secondary btn">{{#str}}cancel{{/str}}</button>
</div>
</div>
26 changes: 25 additions & 1 deletion lib/templates/filemanager_default_searchform.mustache
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
{{!
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/filemanager_default_searchform
This template renders the default repository searchform to be passed to Filepicker.
Example context (json):
{}
}}
<div class="fp-def-search form-group">
<label class="sr-only">{{#str}}searchrepo, repository{{/str}}</label>
<input type="search" class="form-control" id="reposearch" name="s" placeholder="{{#str}}search, repository{{/str}}"/>
</div>
</div>
Loading

0 comments on commit c79835a

Please sign in to comment.