mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-68861 core_contentbank: Fix translation in add button
This commit is contained in:
parent
0641366181
commit
7e5a395854
@ -101,7 +101,7 @@ class bankcontent implements renderable, templatable {
|
||||
// The tools are displayed in the action bar on the index page.
|
||||
foreach ($this->toolbar as $tool) {
|
||||
// Customize the output of a tool, like dropdowns.
|
||||
$method = 'export_tool_'.$tool['name'];
|
||||
$method = 'export_tool_'.$tool['action'];
|
||||
if (method_exists($this, $method)) {
|
||||
$this->$method($tool);
|
||||
}
|
||||
|
@ -70,7 +70,12 @@ if (has_capability('moodle/contentbank:useeditor', $context)) {
|
||||
if (!empty($editabletypes)) {
|
||||
// Editor base URL.
|
||||
$editbaseurl = new moodle_url('/contentbank/edit.php', ['contextid' => $contextid]);
|
||||
$toolbar[] = ['name' => get_string('add'), 'link' => $editbaseurl, 'dropdown' => true, 'contenttypes' => $editabletypes];
|
||||
$toolbar[] = [
|
||||
'name' => get_string('add'),
|
||||
'link' => $editbaseurl, 'dropdown' => true,
|
||||
'contenttypes' => $editabletypes,
|
||||
'action' => 'add'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,7 +85,12 @@ if (has_capability('moodle/contentbank:upload', $context)) {
|
||||
$accepted = $cb->get_supported_extensions_as_string($context);
|
||||
if (!empty($accepted)) {
|
||||
$importurl = new moodle_url('/contentbank/upload.php', ['contextid' => $contextid]);
|
||||
$toolbar[] = array('name' => get_string('upload', 'contentbank'), 'link' => $importurl, 'icon' => 'i/upload');
|
||||
$toolbar[] = [
|
||||
'name' => get_string('upload', 'contentbank'),
|
||||
'link' => $importurl,
|
||||
'icon' => 'i/upload',
|
||||
'action' => 'upload'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user