Skip to content

Commit

Permalink
MDL-29552 themes - show the name of the picked theme when working wit…
Browse files Browse the repository at this point in the history
…h device detection enabled
  • Loading branch information
stronk7 committed Sep 28, 2011
1 parent 228d24f commit 43c741b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion theme/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
$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;
Expand All @@ -114,6 +115,8 @@
$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);
}
}

Expand All @@ -123,7 +126,7 @@
$table->data[] = array(
$device,
$screenshotcell,
$OUTPUT->render($select)
$headingthemename . $OUTPUT->render($select)
);
}
} else {
Expand Down

0 comments on commit 43c741b

Please sign in to comment.