From 8753653bdb5328e0ecf4eb2525ad0ce263bb4d72 Mon Sep 17 00:00:00 2001 From: Jetha Chan Date: Thu, 5 Feb 2015 15:47:47 +0800 Subject: [PATCH] MDL-49058 tool_timezoneimport: better styling --- admin/tool/timezoneimport/index.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/admin/tool/timezoneimport/index.php b/admin/tool/timezoneimport/index.php index 4277fd036bd..d6b657174ed 100644 --- a/admin/tool/timezoneimport/index.php +++ b/admin/tool/timezoneimport/index.php @@ -113,8 +113,7 @@ $a = new stdClass(); $a->count = count($timezones); $a->source = $importdone; - echo $OUTPUT->heading(get_string('importtimezonescount', 'tool_timezoneimport', $a), 3); - + echo $OUTPUT->notification(get_string('importtimezonescount', 'tool_timezoneimport', $a), 'notifysuccess'); echo $OUTPUT->continue_button(new moodle_url('/admin/index.php')); $timezonelist = array(); @@ -130,15 +129,26 @@ } ksort($timezonelist); - echo "
"; - echo $OUTPUT->box_start(); + $timezonetable = new html_table(); + $timezonetable->head = array( + get_string('timezone', 'moodle'), + get_string('entries', 'moodle') + ); + $rows = array(); foreach ($timezonelist as $name => $count) { - echo "$name ($count)
"; + $row = new html_table_row( + array( + new html_table_cell($name), + new html_table_cell($count) + ) + ); + $rows[] = $row; } - echo $OUTPUT->box_end(); + $timezonetable->data = $rows; + echo html_writer::table($timezonetable); } else { - echo $OUTPUT->heading(get_string('importtimezonesfailed', 'tool_timezoneimport'), 3); + echo $OUTPUT->notification(get_string('importtimezonesfailed', 'tool_timezoneimport')); echo $OUTPUT->continue_button(new moodle_url('/admin/index.php')); }