Permalink
Browse files

MDL-57338 templates: add missing example context

  • Loading branch information...
danpoltawski committed Dec 9, 2016
1 parent 6b5bff8 commit 5f0e1523f7e68ad949a711010d82c4b887614549
@@ -17,8 +17,7 @@
{{!
@template core/dataformat_selector
Template for all html emails. Note that it may wrap content formatted
elsewhere in another a module template.
Template for dataformat selection and download form.
Context variables required for this template:
* label
@@ -28,6 +27,16 @@
* options
* sesskey
* submit
Example context (json):
{
"base": "http://example.org/",
"name": "test",
"label": "Download table data as",
"params": false,
"options": [{"label": "CSV", "name": "csv"}, {"label": "Excel", "name": "excel"}],
"submit": "Download"
}
}}
<form method="get" action="{{base}}" class="dataformatselector">
<div class="mdl-align">
@@ -15,7 +15,7 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core/email_html
@template core/email_fromname
Template for all email subjects.
@@ -31,5 +31,10 @@
* fromname
* replyto
* replytoname
Example context (json):
{
"fromname": "Joe Bloggs"
}
}}
{{{fromname}}}
@@ -34,5 +34,10 @@
* replyto
* replytoname
* body
Example context (json):
{
"body": "Email body"
}
}}
{{{body}}}
@@ -15,7 +15,7 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core/email_html
@template core/email_subject
Template for all email subjects.
@@ -31,5 +31,10 @@
* fromname
* replyto
* replytoname
Example context (json):
{
"subject": "Email subject"
}
}}
{{{subject}}}
@@ -33,5 +33,10 @@
* replyto
* replytoname
* body
Example context (json):
{
"body": "Email body"
}
}}
{{{body}}}
@@ -33,8 +33,9 @@
Example context (json):
{
"attributes": [
{ "name": "src", "value": "http://moodle.com/wp-content/themes/moodle/images/logo-hat2.png" },
{ "name": "class", "value": "iconsmall" }
{ "name": "src", "value": "https://moodle.org/logo/moodle-logo.svg" },
{ "name": "class", "value": "iconsmall" },
{"name": "alt", "value": "Alt text for icon"}
]
}

0 comments on commit 5f0e152

Please sign in to comment.