summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/nodes_helper.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/helpers/nodes_helper.rb b/app/helpers/nodes_helper.rb
index a89f879..1268b63 100644
--- a/app/helpers/nodes_helper.rb
+++ b/app/helpers/nodes_helper.rb
@@ -12,7 +12,6 @@ module NodesHelper
12 end 12 end
13 end 13 end
14 14
15
16 def truncated_title_for_node node 15 def truncated_title_for_node node
17 if (title = title_for_node node) && title.size > 20 16 if (title = title_for_node node) && title.size > 20
18 "<span title='#{title}'>#{truncate(title, 40)}</span>" 17 "<span title='#{title}'>#{truncate(title, 40)}</span>"
@@ -63,4 +62,8 @@ module NodesHelper
63 path = node.unique_path 62 path = node.unique_path
64 CccConventions::NODE_KINDS.select { |_, config| config[:parent_match]&.call(path) } 63 CccConventions::NODE_KINDS.select { |_, config| config[:parent_match]&.call(path) }
65 end 64 end
65
66 def sitemap_node_open?(node)
67 !CccConventions::SITEMAP_COLLAPSED_PATHS.include?(node.unique_name)
68 end
66end 69end