MDL-49650 Templates: Move templates out of invalid sub directory.
authorDamyon Wiese <damyon@moodle.com>
Thu, 9 Apr 2015 05:17:59 +0000 (13:17 +0800)
committerDamyon Wiese <damyon@moodle.com>
Thu, 9 Apr 2015 05:17:59 +0000 (13:17 +0800)
Also add comments so they render in the template library.

lib/outputrenderers.php
lib/templates/notification_message.mustache [moved from lib/templates/output/notification_message.mustache with 89% similarity]
lib/templates/notification_problem.mustache [moved from lib/templates/output/notification_problem.mustache with 88% similarity]
lib/templates/notification_redirect.mustache [moved from lib/templates/output/notification_redirect.mustache with 88% similarity]
lib/templates/notification_success.mustache [moved from lib/templates/output/notification_success.mustache with 88% similarity]

index 054296c..019dbaf 100644 (file)
@@ -2932,19 +2932,19 @@ EOD;
         $templatename = '';
         switch($data->type) {
             case \core\output\notification::NOTIFY_MESSAGE:
-                $templatename = 'core/output/notification_message';
+                $templatename = 'core/notification_message';
                 break;
             case \core\output\notification::NOTIFY_SUCCESS:
-                $templatename = 'core/output/notification_success';
+                $templatename = 'core/notification_success';
                 break;
             case \core\output\notification::NOTIFY_PROBLEM:
-                $templatename = 'core/output/notification_problem';
+                $templatename = 'core/notification_problem';
                 break;
             case \core\output\notification::NOTIFY_REDIRECT:
-                $templatename = 'core/output/notification_redirect';
+                $templatename = 'core/notification_redirect';
                 break;
             default:
-                $templatename = 'core/output/notification_message';
+                $templatename = 'core/notification_message';
                 break;
         }
 
@@ -27,5 +27,8 @@
 
     Context variables required for this template:
     * message A cleaned string (use clean_text()) to display.
+
+    Example context (json):
+    { "message": "Your pants are on fire!" }
 }}
-<div class="alert alert-info">{{{message}}}</div>
\ No newline at end of file
+<div class="alert alert-info">{{{message}}}</div>
@@ -27,5 +27,8 @@
 
     Context variables required for this template:
     * message A cleaned string (use clean_text()) to display.
+
+    Example context (json):
+    { "message": "Your pants are on fire!" }
 }}
-<div class="alert alert-error">{{{message}}}</div>
\ No newline at end of file
+<div class="alert alert-error">{{{message}}}</div>
@@ -27,5 +27,8 @@
 
     Context variables required for this template:
     * message A cleaned string (use clean_text()) to display.
+
+    Example context (json):
+    { "message": "Your pants are on fire!" }
 }}
-<div class="alert alert-block alert-info">{{{message}}}</div>
\ No newline at end of file
+<div class="alert alert-block alert-info">{{{message}}}</div>
@@ -27,5 +27,8 @@
 
     Context variables required for this template:
     * message A cleaned string (use clean_text()) to display.
+
+    Example context (json):
+    { "message": "Your pants are on fire!" }
 }}
-<div class="alert alert-success">{{{message}}}</div>
\ No newline at end of file
+<div class="alert alert-success">{{{message}}}</div>