mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-69262-master-2' of git://github.com/junpataleta/moodle into master
This commit is contained in:
commit
afb05bf276
@ -4682,6 +4682,12 @@ class action_menu_link extends action_link implements renderable {
|
||||
*/
|
||||
public $actionmenu = null;
|
||||
|
||||
/**
|
||||
* The number of instances of this action menu link (and its subclasses).
|
||||
* @var int
|
||||
*/
|
||||
protected static $instance = 1;
|
||||
|
||||
/**
|
||||
* Constructs the object.
|
||||
*
|
||||
@ -4705,10 +4711,8 @@ class action_menu_link extends action_link implements renderable {
|
||||
* @return stdClass
|
||||
*/
|
||||
public function export_for_template(renderer_base $output) {
|
||||
static $instance = 1;
|
||||
|
||||
$data = parent::export_for_template($output);
|
||||
$data->instance = $instance++;
|
||||
$data->instance = self::$instance++;
|
||||
|
||||
// Ignore what the parent did with the attributes, except for ID and class.
|
||||
$data->attributes = [];
|
||||
|
@ -27,7 +27,14 @@
|
||||
}
|
||||
}}
|
||||
{{^disabled}}
|
||||
<a href="{{url}}" class="aabtn {{classes}}" {{#attributes}}{{name}}={{#quote}}{{value}}{{/quote}} {{/attributes}}{{#showtext}}aria-labelledby="actionmenuaction-{{instance}}"{{/showtext}}>{{#icon}}{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}{{/icon}}{{#showtext}}<span class="menu-action-text" id="actionmenuaction-{{instance}}">{{{text}}}</span>{{/showtext}}</a>
|
||||
<a href="{{url}}" class="{{$actionmenulinkclasses}}aabtn {{classes}}{{/actionmenulinkclasses}}" {{#attributes}}{{name}}={{#quote}}{{value}}{{/quote}} {{/attributes}}{{#showtext}}aria-labelledby="actionmenuaction-{{instance}}"{{/showtext}}>
|
||||
{{#icon}}
|
||||
{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}
|
||||
{{/icon}}
|
||||
{{#showtext}}
|
||||
<span class="menu-action-text" id="actionmenuaction-{{instance}}">{{{text}}}</span>
|
||||
{{/showtext}}
|
||||
</a>
|
||||
{{/disabled}}
|
||||
{{#disabled}}
|
||||
<span class="currentlink" role="menuitem">{{#icon}}{{#pix}}{{key}},{{component}},{{title}}{{/pix}}{{/icon}}{{{text}}}</span>
|
||||
|
@ -95,16 +95,9 @@
|
||||
<div class="dropdown-menu dropdown-menu-right {{classes}}"{{#attributes}} {{name}}="{{value}}"{{/attributes}}>
|
||||
{{#items}}
|
||||
{{#actionmenulink}}
|
||||
<a href="{{url}}" class="dropdown-item {{classes}}" {{#attributes}}{{name}}={{#quote}}{{value}}{{/quote}} {{/attributes}}{{#showtext}}aria-labelledby="actionmenuaction-{{instance}}"{{/showtext}}>
|
||||
{{#icon}}
|
||||
{{#pix}}{{key}},{{component}},{{title}}{{/pix}}
|
||||
{{/icon}}
|
||||
{{#showtext}}
|
||||
<span class="menu-action-text" id="actionmenuaction-{{instance}}">
|
||||
{{{text}}}
|
||||
</span>
|
||||
{{/showtext}}
|
||||
</a>
|
||||
{{< core/action_menu_link}}
|
||||
{{$actionmenulinkclasses}}dropdown-item {{classes}}{{/actionmenulinkclasses}}
|
||||
{{/ core/action_menu_link}}
|
||||
{{/actionmenulink}}
|
||||
{{#actionmenufiller}}
|
||||
<div class="dropdown-divider" role="presentation"><span class="filler"> </span></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user