Merge commit 'FETCH_HEAd'

This commit is contained in:
Sam Hemelryk 2011-10-03 13:29:26 +13:00
commit ef6380f042

View File

@ -96,6 +96,7 @@ if (!empty($CFG->enabledevicedetection) && empty($device)) {
$devices = get_device_type_list();
foreach ($devices as $device) {
$headingthemename = ''; // To output the picked theme name when needed
$themename = get_selected_theme_for_device_type($device);
if (!$themename && $device == 'default') {
$themename = theme_config::DEFAULT_THEME;
@ -114,6 +115,8 @@ if (!empty($CFG->enabledevicedetection) && empty($device)) {
$screenshoturl = new moodle_url('/theme/image.php', array('theme' => $themename, 'image' => 'screenshot', 'component' => 'theme'));
// Contents of the screenshot/preview cell.
$screenshotcell = html_writer::empty_tag('img', array('src' => $screenshoturl, 'alt' => $strthemename));
// Show the name of the picked theme
$headingthemename = $OUTPUT->heading($strthemename, 3);
}
}
@ -123,7 +126,7 @@ if (!empty($CFG->enabledevicedetection) && empty($device)) {
$table->data[] = array(
$device,
$screenshotcell,
$OUTPUT->render($select)
$headingthemename . $OUTPUT->render($select)
);
}
} else {