Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-theme_boost_campus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-theme_boost_campus
Commits
749f60f2
Commit
749f60f2
authored
7 years ago
by
Kathrin Osswald
Browse files
Options
Downloads
Patches
Plain Diff
Removed build_action_menu_from_navigation in core_renderer as MDL-58174 is integrated.
parent
8b1bf721
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES.md
+4
-0
4 additions, 0 deletions
CHANGES.md
classes/output/core_renderer.php
+0
-56
0 additions, 56 deletions
classes/output/core_renderer.php
with
4 additions
and
56 deletions
CHANGES.md
+
4
−
0
View file @
749f60f2
...
...
@@ -4,6 +4,10 @@ moodle-theme_boost_campus
Changes
-------
### Unreleased
*
2018-04-25 - Removed build_action_menu_from_navigation in core_renderer as MDL-58174 is integrated.
### Release v3.4-r4
*
2018-03-02 - Removed introduced get_extra_scss callbak again due to doubled CSS code.
...
...
This diff is collapsed.
Click to expand it.
classes/output/core_renderer.php
+
0
−
56
View file @
749f60f2
...
...
@@ -435,60 +435,4 @@ class core_renderer extends \theme_boost\output\core_renderer {
return $this->render_from_template('core/loginform', $context);
ORIGINAL END. */
}
// TODO Remove the copied function build_action_menu_from_navigation in version 3.4 of the theme.
// This will be the first Moodle major version having MDL-58174 integrated from version x.0 on.
/**
* Take a node in the nav tree and make an action menu out of it.
* The links are injected in the action menu.
*
* @param action_menu $menu
* @param navigation_node $node
* @param boolean $indent
* @param boolean $onlytopleafnodes
* @return boolean nodesskipped - True if nodes were skipped in building the menu
*/
protected
function
build_action_menu_from_navigation
(
action_menu
$menu
,
navigation_node
$node
,
$indent
=
false
,
$onlytopleafnodes
=
false
)
{
$skipped
=
false
;
// Build an action menu based on the visible nodes from this navigation tree.
foreach
(
$node
->
children
as
$menuitem
)
{
if
(
$menuitem
->
display
)
{
if
(
$onlytopleafnodes
&&
$menuitem
->
children
->
count
())
{
$skipped
=
true
;
continue
;
}
if
(
$menuitem
->
action
)
{
if
(
$menuitem
->
action
instanceof
action_link
)
{
$link
=
$menuitem
->
action
;
// Give preference to setting icon over action icon.
if
(
!
empty
(
$menuitem
->
icon
))
{
$link
->
icon
=
$menuitem
->
icon
;
}
}
else
{
$link
=
new
action_link
(
$menuitem
->
action
,
$menuitem
->
text
,
null
,
null
,
$menuitem
->
icon
);
}
}
else
{
if
(
$onlytopleafnodes
)
{
$skipped
=
true
;
continue
;
}
$link
=
new
action_link
(
new
moodle_url
(
'#'
),
$menuitem
->
text
,
null
,
[
'disabled'
=>
true
],
$menuitem
->
icon
);
}
if
(
$indent
)
{
$link
->
add_class
(
'm-l-1'
);
}
if
(
!
empty
(
$menuitem
->
classes
))
{
$link
->
add_class
(
implode
(
" "
,
$menuitem
->
classes
));
}
$menu
->
add_secondary_action
(
$link
);
$skipped
=
$skipped
||
$this
->
build_action_menu_from_navigation
(
$menu
,
$menuitem
,
true
);
}
}
return
$skipped
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment