$sourcelabel = html_writer::span(get_string('sourcestd', 'core_plugin'), 'sourcetext label');
} else {
$row->attributes['class'] .= ' extension';
- $sourcelabel = html_writer::span(get_string('sourceext', 'core_plugin'), 'sourcetext label label-info');
+ $sourcelabel = html_writer::span(get_string('sourceext', 'core_plugin'), 'sourcetext badge badge-info');
}
$coredependency = $plugin->is_core_dependency_satisfied($version);
$statusclass = 'statustext label ';
switch ($statuscode) {
case core_plugin_manager::PLUGIN_STATUS_NEW:
- $statusclass .= $dependenciesok ? 'label-success' : 'label-warning';
+ $statusclass .= $dependenciesok ? 'badge-success' : 'badge-warning';
break;
case core_plugin_manager::PLUGIN_STATUS_UPGRADE:
- $statusclass .= $dependenciesok ? 'label-info' : 'label-warning';
+ $statusclass .= $dependenciesok ? 'badge-info' : 'badge-warning';
break;
case core_plugin_manager::PLUGIN_STATUS_MISSING:
case core_plugin_manager::PLUGIN_STATUS_DOWNGRADE:
case core_plugin_manager::PLUGIN_STATUS_DELETE:
- $statusclass .= 'label-important';
+ $statusclass .= 'badge-danger';
break;
case core_plugin_manager::PLUGIN_STATUS_NODB:
case core_plugin_manager::PLUGIN_STATUS_UPTODATE:
- $statusclass .= $dependenciesok ? '' : 'label-warning';
+ $statusclass .= $dependenciesok ? '' : 'badge-warning';
break;
}
$status = html_writer::span(get_string('status_' . $statuscode, 'core_plugin'), $statusclass);
$supportedmoodles = array();
foreach ($plugin->version->supportedmoodles as $moodle) {
if ($CFG->branch == str_replace('.', '', $moodle->release)) {
- $supportedmoodles[] = html_writer::span($moodle->release, 'label label-success');
+ $supportedmoodles[] = html_writer::span($moodle->release, 'badge badge-success');
} else {
$supportedmoodles[] = html_writer::span($moodle->release, 'label');
}
$label = '';
} else {
$class = 'requires-failed';
- $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-important');
+ $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-danger');
}
$requires[] = html_writer::tag('li',
html_writer::span(get_string('moodleversion', 'core_plugin', $plugin->versionrequires), 'dep dep-core').
} else if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_MISSING) {
if ($reqinfo->availability == $pluginman::REQUIREMENT_AVAILABLE) {
- $label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'label label-warning');
- $label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'label label-warning');
+ $label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'badge badge-warning');
+ $label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'badge badge-warning');
$class = 'requires-failed requires-missing requires-available';
$actions[] = html_writer::link(
new moodle_url('https://moodle.org/plugins/view.php', array('plugin' => $reqname)),
);
} else {
- $label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'label label-important');
+ $label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'badge badge-danger');
$label .= ' '.html_writer::span(get_string('dependencyunavailable', 'core_plugin'),
- 'label label-important');
+ 'badge badge-danger');
$class = 'requires-failed requires-missing requires-unavailable';
}
$displayuploadlink = true;
} else if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_OUTDATED) {
if ($reqinfo->availability == $pluginman::REQUIREMENT_AVAILABLE) {
- $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-warning');
- $label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'label label-warning');
+ $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-warning');
+ $label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'badge badge-warning');
$class = 'requires-failed requires-outdated requires-available';
$displayupdateslink = true;
} else {
- $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-important');
+ $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-danger');
$label .= ' '.html_writer::span(get_string('dependencyunavailable', 'core_plugin'),
- 'label label-important');
+ 'badge badge-danger');
$class = 'requires-failed requires-outdated requires-unavailable';
}
$displayuploadlink = true;
$source = '';
} else {
$row->attributes['class'] .= ' extension';
- $source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source label label-info');
+ $source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source badge badge-info');
}
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
- $msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg label label-important');
+ $msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg badge badge-danger');
} else if ($status === core_plugin_manager::PLUGIN_STATUS_NEW) {
- $msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg label label-success');
+ $msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg badge badge-success');
} else {
$msg = '';
}
// Format error or warning line
if ($errorline) {
$messagetype = 'error';
- $statusclass = 'label-important';
+ $statusclass = 'badge-danger';
} else if ($warningline) {
$messagetype = 'warn';
- $statusclass = 'label-warning';
+ $statusclass = 'badge-warning';
} else {
$messagetype = 'ok';
- $statusclass = 'label-success';
+ $statusclass = 'badge-success';
}
$status = html_writer::span($status, 'label ' . $statusclass);
// Here we'll store all the feedback found