Skip to content

Commit

Permalink
MDL-24485 fixed lowercase theme names (credit goes to Anthony Borrow)…
Browse files Browse the repository at this point in the history
… + using get_string() to show real theme name on the theme selection page
  • Loading branch information
skodak committed Oct 3, 2010
1 parent 7f38a28 commit edda2b9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions theme/index.php
Expand Up @@ -100,6 +100,7 @@
// designer mode is switched off we will respect that decision.
continue;
}
$strthemename = get_string('pluginname', 'theme_'.$themename);

// Build the table row, and also a list of items to go in the second cell.
$row = array();
Expand All @@ -122,10 +123,10 @@
// link to the screenshot, now mandatory - the image path is hardcoded because we need image from other themes, not the current one
$screenshotpath = new moodle_url('/theme/image.php', array('theme'=>$themename, 'image'=>'screenshot','component'=>'theme'));
// Contents of the first screenshot/preview cell.
$row[] = html_writer::empty_tag('img', array('src'=>$screenshotpath, 'alt'=>$themename));
$row[] = html_writer::empty_tag('img', array('src'=>$screenshotpath, 'alt'=>$strthemename));

// Contents of the second cell.
$infocell = $OUTPUT->heading($themename, 3);
$infocell = $OUTPUT->heading($strthemename, 3);

// Button to choose this as the main theme
$maintheme = new single_button(new moodle_url('/theme/index.php', array('choose' => $themename, 'sesskey' => sesskey())), get_string('useformaintheme'), 'get');
Expand All @@ -136,9 +137,9 @@
$legacytheme = new single_button(new moodle_url('/theme/index.php', array('chooselegacy' => $themename, 'sesskey' => sesskey())), get_string('useforlegacytheme'), 'get');
$legacytheme->disabled = $ischosenlegacytheme;
$infocell .= $OUTPUT->render($legacytheme);

$row[] = $infocell;

$table->data[$themename] = $row;
$table->rowclasses[$themename] = join(' ', $rowclasses);
}
Expand Down
2 changes: 1 addition & 1 deletion theme/magazine/lang/en/theme_magazine.php
@@ -1,5 +1,5 @@
<?php
$string['pluginname'] = 'magazine';
$string['pluginname'] = 'Magazine';
$string['region-side-post'] = 'Right';
$string['region-side-pre'] = 'Left';
$string['choosereadme'] = '<div class="clearfix"><div class="theme_screenshot"><h2>Magazine</h2><img src="magazine/pix/screenshot.png" /><h3>Theme Discussion Forum:</h3><p><a href="http://moodle.org/mod/forum/view.php?id=46">http://moodle.org/mod/forum/view.php?id=46</a></p><h3>Theme Credits</h3><p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p><h3>Theme Documentation:</h3><p><a href="http://docs.moodle.org/en/Themes">http://docs.moodle.org/en/Themes</a></p><h3>Report a bug:</h3><p><a href="http://tracker.moodle.org">http://tracker.moodle.org</a></p></div><div class="theme_description"><h2>About</h2><p>Magazine is a three column fluid-width theme for Moodle 2.0. <h2>Tweaks</h2><p>This theme is built upon both Base and Canvas, two parent themes included in the Moodle core. If you want to modify this theme, we recommend that you first duplicate it, then rename it before making your changes. This will prevent your customized theme from being overwritten by future Moodle upgrades, and you\'ll still have the original files if you make a mess. More information on modifying themes can be found in the <a href="http://docs.moodle.org/en/Theme">MoodleDocs</a>.</p><h3>License</h3><p>This, and all other themes included in the Moodle core, are licensed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>. Some icons used in this theme are from the Splashy Icon set and are freely available at http://splashyfish.com/icons/. </div></div>';
Expand Down
2 changes: 1 addition & 1 deletion theme/overlay/lang/en/theme_overlay.php
Expand Up @@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['pluginname'] = 'overlay';
$string['pluginname'] = 'Overlay';
$string['region-side-post'] = 'Right';
$string['region-side-pre'] = 'Left';
$string['choosereadme'] = '<div class="clearfix"><div class="theme_screenshot"><h2>overlay</h2><img src="overlay/pix/screenshot.jpg" /><h3>Theme Discussion Forum:</h3><p><a href="http://moodle.org/mod/forum/view.php?id=46">http://moodle.org/mod/forum/view.php?id=46</a></p><h3>Theme Credits</h3><p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p><h3>Theme Documentation:</h3><p><a href="http://docs.moodle.org/en/Themes">http://docs.moodle.org/en/Themes</a></p><h3>Report a bug:</h3><p><a href="http://tracker.moodle.org">http://tracker.moodle.org</a></p></div><div class="theme_description"><h2>About</h2><p>overlay is a nontraditional, three-column, fluid-width theme for Moodle. It\'s nontraditional in the sense that it uses a fresh three-column layout that displays the content to the left of both block columns.<h2>Tweaks</h2><p>This theme is built upon both Base and Canvas, two parent themes included in the Moodle core. If you want to modify this theme, we recommend that you first duplicate it, then rename it before making your changes. This will prevent your customized theme from being overwritten by future Moodle upgrades, and you\'ll still have the original files if you make a mess. More information on modifying themes can be found in the <a href="http://docs.moodle.org/en/Theme">MoodleDocs</a>.</p><h3>License</h3><p>This, and all other themes included in the Moodle core, are licensed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>.</div></div>';
Expand Down

0 comments on commit edda2b9

Please sign in to comment.