summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-04-27 16:29:32 +0200
committerhukl <contact@smyck.org>2009-04-27 16:29:32 +0200
commitd3a9b46ba5c863a0ff377dcffae9a494fe476e02 (patch)
tree50b8143660d057143628a2f4cae8849fe6445b0d /app/helpers
parente9418758513fea6a83f63d31ecac316fdb6fc151 (diff)
truncated titles with title attribute in recent changes view
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/nodes_helper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/nodes_helper.rb b/app/helpers/nodes_helper.rb
index 12ce392..cc8dc18 100644
--- a/app/helpers/nodes_helper.rb
+++ b/app/helpers/nodes_helper.rb
@@ -8,6 +8,15 @@ module NodesHelper
8 end 8 end
9 end 9 end
10 10
11
12 def truncated_title_for_node node
13 if (title = title_for_node node) && title.size > 20
14 "<span title='#{title}'>#{truncate(title, 40)}</span>"
15 else
16 title
17 end
18 end
19
11 def custom_page_templates 20 def custom_page_templates
12 Page.custom_templates.map {|x| [x.gsub("_", " ").titlecase, x]} 21 Page.custom_templates.map {|x| [x.gsub("_", " ").titlecase, x]}
13 end 22 end