MDL-39087 Improve the Plugins overview table layout
This patch returns the layout of the Uninstall | Settings links to two columns. There is no space saved on the screen by using the single column and two columns align better. The reasoning for using single column was that there would be multiple links in the 'Actions' column but that does not seem to happen anytime soon.
This commit is contained in:
+13
-10
@@ -1160,22 +1160,23 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
get_string('actions', 'core_plugin'),
|
||||
get_string('notes','core_plugin'),
|
||||
);
|
||||
$table->headspan = array(1, 1, 1, 1, 2, 1);
|
||||
$table->colclasses = array(
|
||||
'pluginname', 'source', 'version', 'availability', 'actions', 'notes'
|
||||
'pluginname', 'source', 'version', 'availability', 'settings', 'uninstall', 'notes'
|
||||
);
|
||||
|
||||
foreach ($plugininfo as $type => $plugins) {
|
||||
|
||||
$header = new html_table_cell($pluginman->plugintype_name_plural($type));
|
||||
$header->header = true;
|
||||
$header->colspan = count($table->head);
|
||||
$header->colspan = array_sum($table->headspan);
|
||||
$header = new html_table_row(array($header));
|
||||
$header->attributes['class'] = 'plugintypeheader type-' . $type;
|
||||
$table->data[] = $header;
|
||||
|
||||
if (empty($plugins)) {
|
||||
$msg = new html_table_cell(get_string('noneinstalled', 'core_plugin'));
|
||||
$msg->colspan = count($table->head);
|
||||
$msg->colspan = array_sum($table->headspan);
|
||||
$row = new html_table_row(array($msg));
|
||||
$row->attributes['class'] .= 'msg msg-noneinstalled';
|
||||
$table->data[] = $row;
|
||||
@@ -1222,19 +1223,21 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
$availability = new html_table_cell(get_string('plugindisabled', 'core_plugin'));
|
||||
}
|
||||
|
||||
$actions = array();
|
||||
|
||||
$settingsurl = $plugin->get_settings_url();
|
||||
if (!is_null($settingsurl)) {
|
||||
$actions[] = html_writer::link($settingsurl, get_string('settings', 'core_plugin'), array('class' => 'settings'));
|
||||
$settings = html_writer::link($settingsurl, get_string('settings', 'core_plugin'), array('class' => 'settings'));
|
||||
} else {
|
||||
$settings = '';
|
||||
}
|
||||
$settings = new html_table_cell($settings);
|
||||
|
||||
if ($pluginman->can_uninstall_plugin($plugin->component)) {
|
||||
$uninstallurl = $plugin->get_uninstall_url();
|
||||
$actions[] = html_writer::link($uninstallurl, get_string('uninstall', 'core_plugin'), array('class' => 'uninstall'));
|
||||
$uninstall = html_writer::link($uninstallurl, get_string('uninstall', 'core_plugin'));
|
||||
} else {
|
||||
$uninstall = '';
|
||||
}
|
||||
|
||||
$actions = new html_table_cell(implode(html_writer::tag('span', ' ', array('class' => 'separator')), $actions));
|
||||
$uninstall = new html_table_cell($uninstall);
|
||||
|
||||
$requriedby = $pluginman->other_plugins_that_require($plugin->component);
|
||||
if ($requriedby) {
|
||||
@@ -1254,7 +1257,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
$notes = new html_table_cell($requiredby.$updateinfo);
|
||||
|
||||
$row->cells = array(
|
||||
$pluginname, $source, $version, $availability, $actions, $notes
|
||||
$pluginname, $source, $version, $availability, $settings, $uninstall, $notes
|
||||
);
|
||||
$table->data[] = $row;
|
||||
}
|
||||
|
||||
@@ -294,8 +294,6 @@
|
||||
#page-admin-plugins #plugins-control-panel .pluginname .componentname {font-size:0.8em;color:#999;margin-left:26px;}
|
||||
#page-admin-plugins #plugins-control-panel .missingfromdisk .pluginname {background-color:#ffd3d9;}
|
||||
#page-admin-plugins #plugins-control-panel .disabled .availability {background-color:#eee;}
|
||||
#page-admin-plugins #plugins-control-panel .actions a {padding:0 10px;}
|
||||
#page-admin-plugins #plugins-control-panel .actions .separator {border-left:1px dotted #999;}
|
||||
#page-admin-plugins #plugins-control-panel .extension .source {background-color:#f3f2aa;}
|
||||
#page-admin-plugins #plugins-control-panel .msg td {text-align:center;}
|
||||
#page-admin-plugins #plugins-control-panel .requiredby {font-size:0.8em;color:#999;}
|
||||
@@ -308,7 +306,7 @@
|
||||
#page-admin-plugins #plugins-overview-filter .filter-item.active {font-weight:bold;}
|
||||
#page-admin-plugins #plugins-overview-filter .separator {border-left:1px dotted #999;}
|
||||
#page-admin-plugins #plugins-control-panel .displayname img.icon { padding-top:0; padding-bottom: 0; }
|
||||
#page-admin-plugins #plugins-control-panel .actions .uninstall {color:#900;}
|
||||
#page-admin-plugins #plugins-control-panel .uninstall a {color:#900;}
|
||||
#page-admin-plugins #plugins-control-panel .notes .pluginupdateinfo {padding:5px 10px;margin:10px;background-color:#d2ebff;-moz-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;}
|
||||
#page-admin-plugins #plugins-control-panel .notes .pluginupdateinfo.maturity50 {background-color:#ffd3d9;}
|
||||
#page-admin-plugins #plugins-control-panel .notes .pluginupdateinfo.maturity100,
|
||||
|
||||
@@ -601,8 +601,7 @@ img.iconsmall {
|
||||
}
|
||||
|
||||
#plugins-overview-filter .filter-item,
|
||||
#plugins-overview-panel .info,
|
||||
#plugins-control-panel .actions a {
|
||||
#plugins-overview-panel .info {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
@@ -638,7 +637,7 @@ img.iconsmall {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
#plugins-control-panel .actions .uninstall {
|
||||
#plugins-control-panel .uninstall a {
|
||||
color: @errorText;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user