diff --git a/admin/repository.php b/admin/repository.php index e677eb454be..278912eee3d 100644 --- a/admin/repository.php +++ b/admin/repository.php @@ -390,6 +390,7 @@ if (($action == 'edit') || ($action == 'new')) { } $table->data[] = array($i->get_readablename(), $OUTPUT->render($select), $updown, $settings, $uninstall); + $table->rowclasses[] = ''; if (!in_array($typename, $alreadyplugins)) { $alreadyplugins[] = $typename; @@ -410,6 +411,7 @@ if (($action == 'edit') || ($action == 'new')) { $uninstall = html_writer::link($uninstallurl, $struninstall); } $table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '', $uninstall); + $table->rowclasses[] = 'dimmed_text'; } } } diff --git a/admin/templates/setting_manage_plugins.mustache b/admin/templates/setting_manage_plugins.mustache index 5c38e51513f..ac7ab8fb967 100644 --- a/admin/templates/setting_manage_plugins.mustache +++ b/admin/templates/setting_manage_plugins.mustache @@ -1,3 +1,54 @@ +{{! + This file is part of Moodle - http://moodle.org/ + + Moodle is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Moodle is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Moodle. If not, see . +}} +{{! + @template core_admin/setting_manage_plugins + + Admin plugin management template. + + Context variables required for this template: + * plugins + + Example context (json): + { + "infocolumnname": "Food", + "plugins": [ + { + "enabled": true, + "plugin": "Forum", + "info": "Lettuce", + "movedownlink": "#", + "toggletarget": false, + "togglelink": "#", + "settingslink": "#", + "uninstalllink": "#" + }, + { + "enabled": false, + "plugin": "Database", + "info": "Cheese", + "moveuplink": "#", + "toggletarget": true, + "togglelink": "#", + "settingslink": "#", + "uninstalllink": "#" + } + ] + } +}} @@ -13,7 +64,7 @@ {{#plugins}} - + {{#infocolumnname}}
{{plugin}} diff --git a/admin/tool/availabilityconditions/index.php b/admin/tool/availabilityconditions/index.php index f76754ea95d..f76b3e205e6 100644 --- a/admin/tool/availabilityconditions/index.php +++ b/admin/tool/availabilityconditions/index.php @@ -99,7 +99,6 @@ foreach ($plugins as $plugin => $name) { $enabledstr = get_string('show'); $class = 'dimmed_text'; } - $namespan = html_writer::span($name, $class); // Make enable control. This is a POST request (using a form control rather // than just a link) because it makes a database change. @@ -107,7 +106,7 @@ foreach ($plugins as $plugin => $name) { $url = new moodle_url('/' . $CFG->admin . '/tool/availabilityconditions/', $params); $enablecontrol = html_writer::link($url, $OUTPUT->pix_icon('t/' . $enabledaction, $enabledstr)); - $table->add_data(array($namespan, $version, $enablecontrol)); + $table->add_data([$name, $version, $enablecontrol], $class); } $table->print_html(); diff --git a/admin/tool/log/classes/setting_managestores.php b/admin/tool/log/classes/setting_managestores.php index bc38e6379cc..0a43199f0c0 100644 --- a/admin/tool/log/classes/setting_managestores.php +++ b/admin/tool/log/classes/setting_managestores.php @@ -178,7 +178,7 @@ class tool_log_setting_managestores extends admin_setting { $hideshow = ""; $hideshow .= $OUTPUT->pix_icon('t/show', $strenable) . ''; $isenabled = false; - $displayname = "$name"; + $displayname = "$name"; } else { $hideshow = ''; $isenabled = false; @@ -230,6 +230,7 @@ class tool_log_setting_managestores extends admin_setting { // Add a row to the table. $table->data[] = array($icon . $displayname, $supportedreports, $version, $hideshow, $updown, $settings, $uninstall); + $table->rowclasses[] = $isenabled ? '' : 'dimmed_text'; $printed[$store] = true; } diff --git a/lib/adminlib.php b/lib/adminlib.php index 82ac4027dac..a16ffc36044 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -7865,6 +7865,7 @@ class admin_setting_managecustomfields extends admin_setting { if ($field->is_enabled()) { $strfieldname = $field->displayname; + $class = ''; $hideshow = html_writer::link($url->out(false, array('action' => 'disable')), $OUTPUT->pix_icon('t/hide', $txt->disable, 'moodle', array('class' => 'iconsmall'))); } else { @@ -7882,6 +7883,7 @@ class admin_setting_managecustomfields extends admin_setting { $uninstall = html_writer::link($uninstallurl, $txt->uninstall); } $row = new html_table_row(array($strfieldname, $hideshow, $uninstall, $settings)); + $row->attributes['class'] = $class; $table->data[] = $row; } $return .= html_writer::table($table);