Permalink
Browse files

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

…in plugins setting
  • Loading branch information...
1 parent ca48fe5 commit 8be244b2e29063f092a1deb81327fc9edbc4bb60 @rwijaya rwijaya committed Nov 14, 2012
View
3 admin/blocks.php
@@ -127,7 +127,8 @@
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'undeletable', 'delete', 'settings'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strprotecthdr, $strdelete, $strsettings));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
- $table->set_attribute('class', 'compatibleblockstable blockstable generaltable');
+ $table->set_attribute('class', 'admintable blockstable generaltable');
+ $table->set_attribute('id', 'compatibleblockstable');
$table->setup();
$tablerows = array();
View
5 admin/filters.php
@@ -168,8 +168,9 @@
$table = new html_table();
$table->head = array(get_string('filter'), get_string('isactive', 'filters'),
get_string('order'), get_string('applyto', 'filters'), get_string('settings'), get_string('delete'));
- $table->align = array('left', 'left', 'center', 'left', 'left');
- $table->width = '100%';
+ $table->colclasses = array ('leftalign', 'leftalign', 'centeralign', 'leftalign', 'leftalign', 'leftalign');
+ $table->attributes['class'] = 'admintable generaltable';
+ $table->id = 'filterssetting';
$table->data = array();
$lastactive = null;
View
2 admin/localplugins.php
@@ -77,7 +77,7 @@
$table->define_headers(array(get_string('plugin'), get_string('version'), get_string('delete')));
$table->define_baseurl($PAGE->url);
$table->set_attribute('id', 'localplugins');
-$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
+$table->set_attribute('class', 'admintable generaltable');
$table->setup();
$plugins = array();
View
2 admin/qtypes.php
@@ -195,7 +195,7 @@
get_string('version'), get_string('requires', 'admin'), get_string('availableq', 'question'),
get_string('delete'), get_string('settings')));
$table->set_attribute('id', 'qtypes');
-$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
+$table->set_attribute('class', 'admintable generaltable');
$table->setup();
// Add a row for each question type.
View
5 admin/repository.php
@@ -281,8 +281,11 @@ function repository_action_url($repository) {
// Table to list plug-ins
$table = new html_table();
$table->head = array(get_string('name'), get_string('isactive', 'repository'), get_string('order'), $settingsstr);
- $table->align = array('left', 'center', 'center', 'center', 'center');
+// $table->
+ $table->colclasses = array('leftalign', 'centeralign', 'centeralign', 'centeralign', 'centeralign');
+ $table->id = 'repositoriessetting';
$table->data = array();
+ $table->attributes['class'] = 'admintable generaltable';
// Get list of used plug-ins
$instances = repository::get_types();
View
7 filter/manage.php
@@ -160,12 +160,13 @@
$table = new html_table();
$table->head = array(get_string('filter'), get_string('isactive', 'filters'));
- $table->align = array('left', 'left');
+ $table->colclasses = array('leftalign', 'leftalign');
if ($settingscol) {
$table->head[] = $strsettings;
- $table->align[] = 'left';
+ $table->colclasses[] = 'leftalign';
}
- $table->width = ' ';
+ $table->id = 'frontpagefiltersettings';
+ $table->attributes['class'] = 'admintable';
$table->data = array();
// iterate through filters adding to display table
View
56 lib/adminlib.php
@@ -3608,7 +3608,7 @@ public function write_setting($data) {
public function output_html($data, $query='') {
global $OUTPUT;
- $out = html_writer::start_tag('table', array('border' => 1, 'class' => 'generaltable'));
+ $out = html_writer::start_tag('table', array('border' => 1, 'id' => 'emoticonsetting', 'class' => 'admintable generaltable'));
$out .= html_writer::start_tag('thead');
$out .= html_writer::start_tag('tr');
$out .= html_writer::tag('th', get_string('emoticontext', 'admin'));
@@ -5047,8 +5047,9 @@ public function output_html($data, $query='') {
$table = new html_table();
$table->head = array(get_string('name'), $strusage, $strenable, $strup.'/'.$strdown, $strsettings, $struninstall);
- $table->align = array('left', 'center', 'center', 'center', 'center', 'center');
- $table->width = '90%';
+ $table->colclasses = array('leftalign', 'centeralign', 'centeralign', 'centeralign', 'centeralign', 'centeralign');
+ $table->id = 'courseenrolmentplugins';
+ $table->attributes['class'] = 'admintable generaltable';
$table->data = array();
// iterate through enrol plugins and add to the display table
@@ -5580,9 +5581,10 @@ public function output_html($data, $query='') {
$table = new html_table();
$table->head = array($txt->name, $txt->enable, $txt->updown, $txt->settings);
- $table->align = array('left', 'center', 'center', 'center');
+ $table->colclasses = array('leftalign', 'centeralign', 'centeralign', 'centeralign');
$table->data = array();
- $table->attributes['class'] = 'manageauthtable generaltable';
+ $table->attributes['class'] = 'admintable generaltable';
+ $table->id = 'manageauthtable';
//add always enabled plugins first
$displayname = "<span>".$displayauths['manual']."</span>";
@@ -5760,8 +5762,9 @@ public function output_html($data, $query='') {
$table = new html_table();
$table->head = array($txt->name, $txt->enable, $txt->updown, $txt->settings, $struninstall);
- $table->align = array('left', 'center', 'center', 'center', 'center');
- $table->width = '90%';
+ $table->colclasses = array('leftalign', 'centeralign', 'centeralign', 'centeralign');
+ $table->id = 'editormanagement';
+ $table->attributes['class'] = 'admintable generaltable';
$table->data = array();
// iterate through auth plugins and add to the display table
@@ -5895,8 +5898,9 @@ public function output_html($data, $query='') {
$table = new html_table();
$table->head = array($txt->name, $txt->enable);
- $table->align = array('left', 'center');
- $table->width = '100%';
+ $table->colclasses = array('leftalign', 'centeralign');
+ $table->id = 'availablelicenses';
+ $table->attributes['class'] = 'admintable generaltable';
$table->data = array();
foreach ($licenses as $value) {
@@ -7227,9 +7231,9 @@ public function output_html($data, $query='') {
$table = new html_table();
$table->head = array($strservice, $strplugin, $strfunctions, $strusers, $stredit);
- $table->align = array('left', 'left', 'center', 'center', 'center');
- $table->size = array('30%', '20%', '20%', '20%', '10%');
- $table->width = '100%';
+ $table->colclasses = array('leftalign service', 'leftalign plugin', 'centeralign functions', 'centeralign users', 'centeralign ');
+ $table->id = 'builtinservices';
+ $table->attributes['class'] = 'admintable externalservices generaltable';
$table->data = array();
// iterate through auth plugins and add to the display table
@@ -7267,9 +7271,9 @@ public function output_html($data, $query='') {
$table = new html_table();
$table->head = array($strservice, $strdelete, $strfunctions, $strusers, $stredit);
- $table->align = array('left', 'center', 'center', 'center', 'center');
- $table->size = array('30%', '20%', '20%', '20%', '10%');
- $table->width = '100%';
+ $table->colclasses = array('leftalign service', 'leftalign plugin', 'centeralign functions', 'centeralign users', 'centeralign ');
+ $table->id = 'customservices';
+ $table->attributes['class'] = 'admintable externalservices generaltable';
$table->data = array();
// iterate through auth plugins and add to the display table
@@ -7388,9 +7392,9 @@ public function output_html($data, $query='') {
$table = new html_table();
$table->head = array(get_string('step', 'webservice'), get_string('status'),
get_string('description'));
- $table->size = array('30%', '10%', '60%');
- $table->align = array('left', 'left', 'left');
- $table->width = '90%';
+ $table->colclasses = array('leftalign step', 'leftalign status', 'leftalign description');
+ $table->id = 'onesystemcontrol';
+ $table->attributes['class'] = 'admintable wsoverview generaltable';
$table->data = array();
$return .= $brtag . get_string('onesystemcontrollingdescription', 'webservice')
@@ -7512,9 +7516,9 @@ public function output_html($data, $query='') {
$table = new html_table();
$table->head = array(get_string('step', 'webservice'), get_string('status'),
get_string('description'));
- $table->size = array('30%', '10%', '60%');
- $table->align = array('left', 'left', 'left');
- $table->width = '90%';
+ $table->colclasses = array('leftalign step', 'leftalign status', 'leftalign description');
+ $table->id = 'userasclients';
+ $table->attributes['class'] = 'admintable wsoverview generaltable';
$table->data = array();
$return .= $brtag . get_string('userasclientsdescription', 'webservice') .
@@ -7699,8 +7703,9 @@ public function output_html($data, $query='') {
$table = new html_table();
$table->head = array($strprotocol, $strversion, $strenable, $struninstall, $strsettings);
- $table->align = array('left', 'center', 'center', 'center', 'center');
- $table->width = '100%';
+ $table->colclasses = array('leftalign', 'centeralign', 'centeralign', 'centeralign', 'centeralign');
+ $table->id = 'webserviceprotocols';
+ $table->attributes['class'] = 'admintable generaltable';
$table->data = array();
// iterate through auth plugins and add to the display table
@@ -7813,8 +7818,9 @@ public function output_html($data, $query='') {
$table = new html_table();
$table->head = array($strtoken, $struser, $strservice, $striprestriction, $strvaliduntil, $stroperation);
- $table->align = array('left', 'left', 'left', 'center', 'center', 'center');
- $table->width = '100%';
+ $table->colclasses = array('leftalign', 'leftalign', 'leftalign', 'centeralign', 'centeralign', 'centeralign');
+ $table->id = 'webservicetokens';
+ $table->attributes['class'] = 'admintable generaltable';
$table->data = array();
$tokenpageurl = "$CFG->wwwroot/$CFG->admin/webservice/tokens.php?sesskey=" . sesskey();
View
2 tag/manage.php
@@ -201,7 +201,7 @@
$table->set_attribute('cellspacing', '0');
$table->set_attribute('id', 'tag-management-list');
-$table->set_attribute('class', 'generaltable generalbox');
+$table->set_attribute('class', 'admintable generaltable');
$table->set_control_variables(array(
TABLE_VAR_SORT => 'ssort',
View
48 theme/base/style/admin.css
@@ -3,7 +3,53 @@
**/
.formtable tbody th {font-weight: normal;text-align: right;}
-.path-admin .manageauthtable {width:100%;}
+.path-admin #manageauthtable,
+.path-admin .admintable {width: 100%;}
+
+.path-admin #assignrole {width: 60%;margin-left: auto;margin-right: auto;}
+.path-admin .admintable .leftalign {text-align: left;}
+.path-admin .admintable .centeralign {text-align: center;}
+
+.path-admin .admintable.environmenttable .name,
+.path-admin .admintable.environmenttable .status,
+.path-admin .admintable.environmenttable .info {width: 10%;white-space: nowrap;}
+
+.path-admin #cohorts .admintable .name {width: 20%;}
+.path-admin #cohorts .admintable .id,
+.path-admin #cohorts .admintable .size,
+.path-admin #cohorts .admintable .action,
+.path-admin #cohorts .admintable .source {width:10%;}
+.path-admin #cohorts .admintable .description {width: 40%;}
+
+.path-admin .admintable.externalservices .service {width: 30%;}
+.path-admin .admintable.externalservices .plugin,
+.path-admin .admintable.externalservices .delete {width: 20%;}
+.path-admin .admintable.externalservices .functions {width: 20%;}
+.path-admin .admintable.externalservices .users {width: 20%;}
+.path-admin .admintable.externalservices .action {width: 10%;}
+
+.path-admin .wsoverview.admintable .step {width: 30%;}
+.path-admin .wsoverview.admintable .status {width: 10%;}
+.path-admin .wsoverview.admintable .description {width: 60%;}
+
+.path-admin #assignrole .admintable .role,
+.path-admin #assignrole .admintable .userrole,
+.path-admin #assignrole .admintable .roleholder {white-space: nowrap;}
+
+.path-admin .admintable.environmenttable .report {width: 100%;}
+
+.path-admin #configchanges .admintable .date {width: 30%;}
+.path-admin #configchanges .admintable .name,
+.path-admin #configchanges .admintable .plugin,
+.path-admin #configchanges .admintable .setting {width: 10%;}
+.path-admin #configchanges .admintable .newvalue,
+.path-admin #configchanges .admintable .originalvalue {width: 20%;}
+
+.path-admin .securityreport.admintable .issue {width: 30%;}
+.path-admin .securityreport.admintable .status {width: 10%;}
+.path-admin .securityreport.admintable .desc {width: 50%;}
+.path-admin .securityreport.admintable .config {width: 10%;}
+.path-admin #securityreporttable .admintable .desc {width: 60%;}
#page-admin-index .c0 {vertical-align: top;}
#page-admin-index .c1 {vertical-align: middle;}
View
2 theme/formal_white/style/formal_white.css
@@ -135,7 +135,7 @@ th.header,
.formtable tbody th,
.generalbox th,
.generaltable th.header {background-image:url([[pix:theme|gradient_h]]);background-repeat:repeat-x;border-top:1px solid #C6BDA8;background-color:#E3DFD4;}
-/*#modules, .compatibleblockstable {margin-left:auto; margin-right:auto;} waiting for MDL-26760*/
+#modules, #compatibleblockstable {margin-left:auto; margin-right:auto;}
table.flexible .r0, table.generaltable .r0 {background-color: #F0F0F0;}
table.flexible .r1, table.generaltable .r1 {background-color: #FAFAFA;}
View
2 theme/standard/style/admin.css
@@ -128,7 +128,7 @@ table.flexible .r1 {background-color: #FAFAFA;}
#page-admin-roles-manage .rolecap,
#page-admin-roles-override .rolecap {border:none;border-bottom:1px solid #CECECE;}
-.path-admin .manageauthtable {width:90%;margin:0 auto;}
+.path-admin #manageauthtable {width:90%;margin:0 auto;}
#explaincaps .rolecap.yes {background-color: #DDFFDD;}
#explaincaps .rolecap.no {background-color: #FFDDDD;}

0 comments on commit 8be244b

Please sign in to comment.