MDL-29552 themes - show the name of the picked theme when working with device detection enabled
This commit is contained in:
committed by
Sam Hemelryk
parent
ddf0d0dcd7
commit
e438ff9942
+4
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user