Skip to content

Commit

Permalink
MDL-36553 Admin settings: make tables class consistent throughout adm…
Browse files Browse the repository at this point in the history
…in plugins setting
  • Loading branch information
Rossiani Wijaya committed Jan 14, 2013
1 parent ca48fe5 commit 8be244b
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 38 deletions.
3 changes: 2 additions & 1 deletion admin/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
5 changes: 3 additions & 2 deletions admin/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion admin/localplugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion admin/qtypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion admin/repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 4 additions & 3 deletions filter/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
56 changes: 31 additions & 25 deletions lib/adminlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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>";
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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') .
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tag/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
48 changes: 47 additions & 1 deletion theme/base/style/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;}
Expand Down
2 changes: 1 addition & 1 deletion theme/formal_white/style/formal_white.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;}

Expand Down
2 changes: 1 addition & 1 deletion theme/standard/style/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;}
Expand Down

0 comments on commit 8be244b

Please sign in to comment.