@@ -112,7 +112,7 module Redmine | |||||
112 | html << render_single_menu_node(node, caption, url, selected) |
|
112 | html << render_single_menu_node(node, caption, url, selected) | |
113 |
|
113 | |||
114 | # Standard children |
|
114 | # Standard children | |
115 | standard_children_list = "".tap do |child_html| |
|
115 | standard_children_list = "".html_safe.tap do |child_html| | |
116 | node.children.each do |child| |
|
116 | node.children.each do |child| | |
117 | child_html << render_menu_node(child, project) |
|
117 | child_html << render_menu_node(child, project) | |
118 | end |
|
118 | end | |
@@ -126,14 +126,14 module Redmine | |||||
126 |
|
126 | |||
127 | html << '</li>' |
|
127 | html << '</li>' | |
128 | end |
|
128 | end | |
129 | return html.join("\n") |
|
129 | return html.join("\n").html_safe | |
130 | end |
|
130 | end | |
131 |
|
131 | |||
132 | # Returns a list of unattached children menu items |
|
132 | # Returns a list of unattached children menu items | |
133 | def render_unattached_children_menu(node, project) |
|
133 | def render_unattached_children_menu(node, project) | |
134 | return nil unless node.child_menus |
|
134 | return nil unless node.child_menus | |
135 |
|
135 | |||
136 | "".tap do |child_html| |
|
136 | "".html_safe.tap do |child_html| | |
137 | unattached_children = node.child_menus.call(project) |
|
137 | unattached_children = node.child_menus.call(project) | |
138 | # Tree nodes support #each so we need to do object detection |
|
138 | # Tree nodes support #each so we need to do object detection | |
139 | if unattached_children.is_a? Array |
|
139 | if unattached_children.is_a? Array |
General Comments 0
You need to be logged in to leave comments.
Login now