MDL-39087 Improve the Plugins overview renderer
As suggested by Tim Hunt during the peer-review, rendering methods should not set properties of the page they are producing HTML code for. Additionally, the page now uses correct check that the uninstalling can happen.
This commit is contained in:
@@ -384,9 +384,6 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
|
||||
$pluginname = $pluginman->plugin_name($pluginfo->component);
|
||||
|
||||
$this->page->set_title($pluginname);
|
||||
$this->page->navbar->add(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
|
||||
|
||||
$output .= $this->output->header();
|
||||
$output .= $this->output->heading(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
|
||||
$output .= $this->output->confirm(get_string('uninstallconfirm', 'core_plugin', array('name' => $pluginname)),
|
||||
@@ -411,9 +408,6 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
|
||||
$pluginname = $pluginman->plugin_name($pluginfo->component);
|
||||
|
||||
$this->page->set_title($pluginname);
|
||||
$this->page->navbar->add(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
|
||||
|
||||
$output .= $this->output->header();
|
||||
$output .= $this->output->heading(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
|
||||
|
||||
@@ -448,9 +442,6 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
|
||||
$pluginname = $pluginman->plugin_name($pluginfo->component);
|
||||
|
||||
$this->page->set_title($pluginname);
|
||||
$this->page->navbar->add(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
|
||||
|
||||
$output .= $this->output->header();
|
||||
$output .= $this->output->heading(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user