From: moodler Date: Wed, 29 Mar 2006 18:29:16 +0000 (+0000) Subject: Support for a new CSS template, allowing you to use CSS in the other templates X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=68635e6f6d1f75f833dfe45778336becc859b698;p=moodle.git Support for a new CSS template, allowing you to use CSS in the other templates --- diff --git a/mod/data/css.php b/mod/data/css.php new file mode 100755 index 0000000000..6e9cf07f94 --- /dev/null +++ b/mod/data/css.php @@ -0,0 +1,40 @@ +csstemplate; + } diff --git a/mod/data/templates.php b/mod/data/templates.php index 56dc23a596..7c3568f501 100755 --- a/mod/data/templates.php +++ b/mod/data/templates.php @@ -142,7 +142,7 @@ /// Add the HTML editor(s). echo ''; - $usehtmleditor = can_use_html_editor(); + $usehtmleditor = can_use_html_editor() && ($mode != 'csstemplate'); if ($mode == 'listtemplate'){ // Print the list template header. echo ''; diff --git a/mod/data/view.php b/mod/data/view.php index d5405f6c98..5d6a9f4f3a 100755 --- a/mod/data/view.php +++ b/mod/data/view.php @@ -139,16 +139,19 @@ } } -/// RSS meta - $rssmeta = ''; +/// RSS and CSS meta + $meta = ''; if (isset($CFG->enablerssfeeds) && isset($CFG->data_enablerssfeeds) && $data->rssarticles > 0) { $rsspath = rss_get_url($course->id, $USER->id, 'data', $data->id); - $rssmeta = 'shortname.': %fullname%" href="'.$rsspath.'" />'; + $meta .= 'shortname.': %fullname%" href="'.$rsspath.'" />'; + } + if ($data->csstemplate) { + $meta .= ' '; } /// Print the page header - $PAGE->print_header($course->shortname.': %fullname%', '', $rssmeta); + $PAGE->print_header($course->shortname.': %fullname%', '', $meta); echo '';