Skip to content
Browse files

MDL-36554 Admin settings: make tables class consistent throughout adm…

…in settings
  • Loading branch information...
1 parent ca48fe5 commit 6fc61f2d0840aba9542392038c73a293f8ed8eb9 @rwijaya rwijaya committed Jan 7, 2013
View
14 admin/renderer.php
@@ -1245,10 +1245,9 @@ public function environment_check_table($result, $environment_results) {
get_string('report'),
get_string('status'),
);
- $servertable->align = array('center', 'center', 'left', 'center');
- $servertable->wrap = array('nowrap', '', '', 'nowrap');
- $servertable->size = array('10', 10, '100%', '10');
- $servertable->attributes['class'] = 'environmenttable generaltable';
+ $servertable->colclasses = array('centeralign name', 'centeralign status', 'leftalign report', 'centeralign info');
+ $servertable->attributes['class'] = 'admintable environmenttable generaltable';
+ $servertable->id = 'serverstatus';
$serverdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());
@@ -1258,10 +1257,9 @@ public function environment_check_table($result, $environment_results) {
get_string('report'),
get_string('status'),
);
- $othertable->align = array('center', 'left', 'center');
- $othertable->wrap = array('', '', 'nowrap');
- $othertable->size = array(10, '100%', '10');
- $othertable->attributes['class'] = 'environmenttable generaltable';
+ $othertable->colclasses = array('aligncenter info', 'alignleft report', 'aligncenter status');
+ $othertable->attributes['class'] = 'admintable environmenttable generaltable';
+ $othertable->id = 'otherserverstatus';
$otherdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());
View
12 admin/roles/assign.php
@@ -189,7 +189,7 @@
<form id="assignform" method="post" action="<?php echo $assignurl ?>"><div>
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
- <table summary="" class="roleassigntable generaltable generalbox boxaligncenter" cellspacing="0">
+ <table id="assigningrole" summary="" class="admintable roleassigntable generaltable" cellspacing="0">
<tr>
<td id="existingcell">
<p><label for="removeselect"><?php print_string('extusers', 'role'); ?></label></p>
@@ -278,15 +278,13 @@
// Print overview table
$table = new html_table();
- $table->tablealign = 'center';
- $table->width = '60%';
+ $table->id = 'assignrole';
$table->head = array(get_string('role'), get_string('description'), get_string('userswiththisrole', 'role'));
- $table->wrap = array('nowrap', '', 'nowrap');
- $table->align = array('left', 'left', 'center');
+ $table->colclasses = array('leftalign role', 'leftalign', 'centeralign userrole');
+ $table->attributes['class'] = 'admintable generaltable';
if ($showroleholders) {
$table->headspan = array(1, 1, 2);
- $table->wrap[] = 'nowrap';
- $table->align[] = 'left';
+ $table->colclasses[] = 'leftalign roleholder';
}
foreach ($assignableroles as $roleid => $rolename) {
View
7 admin/roles/manage.php
@@ -186,10 +186,9 @@
/// Initialise table.
$table = new html_table();
- $table->tablealign = 'center';
- $table->align = array('left', 'left', 'left', 'left');
- $table->wrap = array('nowrap', '', 'nowrap','nowrap');
- $table->width = '90%';
+ $table->colclasses = array('leftalign', 'leftalign', 'leftalign', 'leftalign');
+ $table->id = 'roles';
+ $table->attributes['class'] = 'admintable generaltable';
$table->head = array(
get_string('role') . ' ' . $OUTPUT->help_icon('roles', 'role'),
get_string('description'),
View
2 admin/tool/xmldb/actions/main_view/main_view.class.php
@@ -120,7 +120,7 @@ function invoke() {
$result = $this->launch('get_db_directories');
// Display list of DB directories if everything is ok
if ($result && !empty($XMLDB->dbdirs)) {
- $o .= '<table id="listdirectories" border="0" cellpadding="5" cellspacing="1" class="boxaligncenter flexible">';
+ $o .= '<table id="listdirectories" border="0" cellpadding="5" cellspacing="1" class="admintable generaltable">';
$row = 0;
foreach ($XMLDB->dbdirs as $key => $dbdir) {
// Detect if this is the lastused dir
View
19 admin/user.php
@@ -256,25 +256,26 @@
$table = new html_table();
$table->head = array ();
- $table->align = array();
+ $table->colclasses = array();
$table->head[] = $fullnamedisplay;
- $table->align[] = 'left';
+ $table->attributes['class'] = 'admintable generaltable';
+ $table->colclasses[] = 'leftalign';
foreach ($extracolumns as $field) {
$table->head[] = ${$field};
- $table->align[] = 'left';
+ $table->colclasses[] = 'leftalign';
}
$table->head[] = $city;
- $table->align[] = 'left';
+ $table->colclasses[] = 'leftalign';
$table->head[] = $country;
- $table->align[] = 'left';
+ $table->colclasses[] = 'leftalign';
$table->head[] = $lastaccess;
- $table->align[] = 'left';
+ $table->colclasses[] = 'leftalign';
$table->head[] = get_string('edit');
- $table->align[] = 'center';
+ $table->colclasses[] = 'centeralign';
$table->head[] = "";
- $table->align[] = 'center';
+ $table->colclasses[] = 'centeralign';
- $table->width = "95%";
+ $table->id = "users";
foreach ($users as $user) {
if (isguestuser($user)) {
continue; // do not display guest here
View
6 cohort/index.php
@@ -134,9 +134,9 @@
$table = new html_table();
$table->head = array(get_string('name', 'cohort'), get_string('idnumber', 'cohort'), get_string('description', 'cohort'),
get_string('memberscount', 'cohort'), get_string('component', 'cohort'), get_string('edit'));
-$table->size = array('20%', '10%', '40%', '10%', '10%', '10%');
-$table->align = array('left', 'left', 'left', 'left','center', 'center');
-$table->width = '80%';
+$table->colclasses = array('leftalign name', 'leftalign id', 'leftalign description', 'leftalign size','centeralign source', 'centeralign action');
+$table->id = 'cohorts';
+$table->attributes['class'] = 'admintable generaltable';
$table->data = $data;
echo html_writer::table($table);
echo $OUTPUT->paging_bar($cohorts['totalcohorts'], $page, 25, $baseurl);
View
5 comment/locallib.php
@@ -160,8 +160,9 @@ public function print_comments($page = 0) {
get_string('content'),
get_string('action')
);
- $table->align = array ('left', 'left', 'left', 'left');
- $table->attributes = array('class'=>'generaltable commentstable');
+ $table->colclasses = array ('leftalign', 'leftalign', 'leftalign', 'leftalign');
+ $table->attributes = array('class'=>'admintable generaltable');
+ $table->id = 'commentstable';
$table->data = array();
$link = new moodle_url('/comment/index.php', array('action' => 'delete', 'sesskey' => sesskey()));
View
10 course/index.php
@@ -254,7 +254,7 @@
$displaylist[0] = get_string('top');
make_categories_list($displaylist, $parentlist);
-echo '<table class="generaltable editcourse boxaligncenter"><tr class="header">';
+echo '<table id="coursecategories" class="admintable generaltable editcourse"><tr class="header">';
echo '<th class="header" scope="col">'.$strcategories.'</th>';
echo '<th class="header" scope="col">'.$strcourses.'</th>';
echo '<th class="header" scope="col">'.$stredit.'</th>';
@@ -309,7 +309,7 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
$category->context = context_coursecat::instance($category->id);
}
- echo '<tr><td align="left" class="name">';
+ echo '<tr><td class="leftalign name">';
for ($i=0; $i<$depth;$i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
}
@@ -319,9 +319,9 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
format_string($category->name, true, array('context' => $category->context)).'</a>';
echo '</td>';
- echo '<td class="count">'.$category->coursecount.'</td>';
+ echo '<td class="centeralign count">'.$category->coursecount.'</td>';
- echo '<td class="icons">'; /// Print little icons
+ echo '<td class="centeralign icons">'; /// Print little icons
if (has_capability('moodle/category:manage', $category->context)) {
echo '<a title="'.$str->edit.'" href="editcategory.php?id='.$category->id.'"><img'.
@@ -358,7 +358,7 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
}
echo '</td>';
- echo '<td align="left">';
+ echo '<td class="leftalign">';
if (has_capability('moodle/category:manage', $category->context)) {
$tempdisplaylist = $displaylist;
unset($tempdisplaylist[$category->id]);
View
6 report/configlog/index.php
@@ -92,9 +92,9 @@
$table = new html_table();
$table->head = array($hcolumns['timemodified'], $fullnamedisplay, $hcolumns['plugin'], $hcolumns['name'], $hcolumns['value'], $hcolumns['oldvalue']);
-$table->align = array('left', 'left', 'left', 'left', 'left', 'left');
-$table->size = array('30%', '10%', '10%', '10%', '20%', '20%');
-$table->width = '95%';
+$table->colclasses = array('leftalign date', 'leftalign name', 'leftalign plugin', 'leftalign setting', 'leftalign newvalue', 'leftalign originalvalue');
+$table->id = 'configchanges';
+$table->attributes['class'] = 'admintable generaltable';
$table->data = array();
if ($sort == 'firstname' or $sort == 'lastname') {
View
12 report/security/index.php
@@ -76,9 +76,9 @@
$table = new html_table();
$table->head = array($strissue, $strstatus, $strdesc, $strconfig);
- $table->size = array('30%', '10%', '50%', '10%' );
- $table->align = array('left', 'left', 'left', 'left');
- $table->attributes = array('class'=>'scurityreporttable generaltable');
+ $table->rowclasses = array('leftalign issue', 'leftalign status', 'leftalign desc', 'leftalign config');
+ $table->attributes = array('class'=>'admintable securityreport generaltable');
+ $table->id = 'securityissuereporttable';
$table->data = array();
// print detail of one issue only
@@ -103,9 +103,9 @@
$table = new html_table();
$table->head = array($strissue, $strstatus, $strdesc);
- $table->size = array('30%', '10%', '60%' );
- $table->align = array('left', 'left', 'left');
- $table->attributes = array('class'=>'scurityreporttable generaltable');
+ $table->colclasses = array('leftalign issue', 'leftalign status', 'leftalign desc');
+ $table->attributes = array('class'=>'admintable securityreport generaltable');
+ $table->id = 'securityreporttable';
$table->data = array();
foreach ($issues as $issue) {

0 comments on commit 6fc61f2

Please sign in to comment.
Something went wrong with that request. Please try again.