MDL-36553 Admin settings: make tables class consistent throughout admin plugins setting

This commit is contained in:
Rossiani Wijaya 2012-11-14 10:30:50 +08:00
parent ca48fe5f97
commit 8be244b2e2
11 changed files with 96 additions and 38 deletions

View File

@ -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 File

@ -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 File

@ -77,7 +77,7 @@ $table->define_columns(array('name', 'version', 'delete'));
$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 File

@ -195,7 +195,7 @@ $table->define_headers(array(get_string('questiontype', 'question'), get_string(
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 File

@ -281,8 +281,11 @@ if (($action == 'edit') || ($action == 'new')) {
// 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 File

@ -160,12 +160,13 @@ if (empty($availablefilters)) {
$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 File

@ -3608,7 +3608,7 @@ class admin_setting_emoticons extends admin_setting {
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 @@ class admin_setting_manageenrols extends admin_setting {
$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 @@ class admin_setting_manageauths extends admin_setting {
$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 @@ class admin_setting_manageeditors extends admin_setting {
$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 @@ class admin_setting_managelicenses extends admin_setting {
$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 @@ class admin_setting_manageexternalservices extends admin_setting {
$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 @@ class admin_setting_manageexternalservices extends admin_setting {
$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 @@ class admin_setting_webservicesoverview extends admin_setting {
$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 @@ class admin_setting_webservicesoverview extends admin_setting {
$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 @@ class admin_setting_managewebserviceprotocols extends admin_setting {
$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 @@ class admin_setting_managewebservicetokens extends admin_setting {
$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 File

@ -201,7 +201,7 @@ $table->sortable(true, 'flag', SORT_DESC);
$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 File

@ -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 File

@ -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 File

@ -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;}