Skip to content

Commit

Permalink
MDL-39148 Highlight plugin status at the overview screen
Browse files Browse the repository at this point in the history
Plugins that are to be installed and plugins that are missing from disk
are now highlighted at the Plugins overview screen. Other statuses (such as
of plugin to be upgraded) should not be needed at this page as those
are primarily intended for the Plugins checks screen during the upgrade.
  • Loading branch information
mudrd8mz committed Apr 19, 2013
1 parent badf464 commit 9074e47
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
9 changes: 6 additions & 3 deletions admin/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1179,9 +1179,12 @@ public function plugins_control_panel(plugin_manager $pluginman, array $options
} else {
$icon = $this->output->pix_icon('spacer', '', 'moodle', array('class' => 'icon pluginicon noicon'));
}
if ($plugin->get_status() === plugin_manager::PLUGIN_STATUS_MISSING) {
$msg = html_writer::tag('span', get_string('status_missing', 'core_plugin'), array('class' => 'notifyproblem'));
$row->attributes['class'] .= ' missingfromdisk';
$status = $plugin->get_status();
$row->attributes['class'] .= ' status-'.$status;
if ($status === plugin_manager::PLUGIN_STATUS_MISSING) {
$msg = html_writer::tag('span', get_string('status_missing', 'core_plugin'), array('class' => 'statusmsg'));
} else if ($status === plugin_manager::PLUGIN_STATUS_NEW) {
$msg = html_writer::tag('span', get_string('status_new', 'core_plugin'), array('class' => 'statusmsg'));
} else {
$msg = '';
}
Expand Down
6 changes: 5 additions & 1 deletion theme/base/style/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,11 @@
#page-admin-plugins #plugins-control-panel {margin-left:auto; margin-right:auto;}
#page-admin-plugins #plugins-control-panel .pluginname .pluginicon {width:16px;}
#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 .statusmsg {background-color:#eee;padding:3px;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}
#page-admin-plugins #plugins-control-panel .status-missing .pluginname {background-color:#ffd3d9;}
#page-admin-plugins #plugins-control-panel .status-missing .statusmsg {color:#600;}
#page-admin-plugins #plugins-control-panel .status-new .pluginname {background-color:#e7f1c3;}
#page-admin-plugins #plugins-control-panel .status-new .statusmsg {color:#060;}
#page-admin-plugins #plugins-control-panel .disabled .availability {background-color:#eee;}
#page-admin-plugins #plugins-control-panel .extension .source {background-color:#f3f2aa;}
#page-admin-plugins #plugins-control-panel .msg td {text-align:center;}
Expand Down
23 changes: 22 additions & 1 deletion theme/bootstrap/less/moodle/admin.less
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ img.iconsmall {
}

#page-admin-index .adminwarning.availableupdatesinfo .moodleupdateinfo.maturity50 .info.release,
#plugins-control-panel .missingfromdisk .pluginname,
.pluginupdateinfo.maturity50,
#plugins-check .requires-failed,
#plugins-check .missingfromdisk .displayname,
Expand All @@ -552,6 +551,28 @@ img.iconsmall {
background-color: @errorBackground;
}

#plugins-control-panel .statusmsg {
background-color: @grayLighter;
padding: 3px;
.border-radius(5px);
}

#plugins-control-panel .status-missing .pluginname {
background-color: @errorBackground;
}

#plugins-control-panel .status-missing .statusmsg {
color: @errorText;
}

#plugins-control-panel .status-new .pluginname {
background-color: @successBackground;
}

#plugins-control-panel .status-new .statusmsg {
color: @successText;
}

#plugins-control-panel .disabled .availability {
background-color: @inputDisabledBackground;
}
Expand Down
2 changes: 1 addition & 1 deletion theme/bootstrap/style/generated.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions theme/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ DOM changes:
* Cancel buttons have the class btn-cancel.
* Added a z-index for the div#dateselector-calendar-panel so that the calendar pop-up renders above
the filemanager when they overlap, ie. the course settings page (see MDL-39047).
* Trivial change of CSS selectors used to display plugin status at the plugins overview
screen (#plugins-control-panel).

Renderer changes:
* Mymobile theme changed to support more verbose move-block-here descriptions.
Expand Down

0 comments on commit 9074e47

Please sign in to comment.