diff options
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/content_helper.rb | 4 | ||||
| -rw-r--r-- | app/helpers/nodes_helper.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index fba7737..a586142 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb | |||
| @@ -73,7 +73,7 @@ module ContentHelper | |||
| 73 | # partial | 73 | # partial |
| 74 | def select_partial partial | 74 | def select_partial partial |
| 75 | if partial && partial_exists?( partial ) | 75 | if partial && partial_exists?( partial ) |
| 76 | return "custom_templates/partials/#{partial}" | 76 | return "custom/partials/#{partial}" |
| 77 | else | 77 | else |
| 78 | return 'content/article' | 78 | return 'content/article' |
| 79 | end | 79 | end |
| @@ -83,7 +83,7 @@ module ContentHelper | |||
| 83 | def partial_exists? partial | 83 | def partial_exists? partial |
| 84 | File.exist?( | 84 | File.exist?( |
| 85 | File.join( | 85 | File.join( |
| 86 | RAILS_ROOT, 'app', 'views', 'custom_templates', 'partials', "_#{partial}.html.erb" | 86 | RAILS_ROOT, 'app', 'views', 'custom', 'partials', "_#{partial}.html.erb" |
| 87 | ) | 87 | ) |
| 88 | ) | 88 | ) |
| 89 | end | 89 | end |
diff --git a/app/helpers/nodes_helper.rb b/app/helpers/nodes_helper.rb index fc5b0a0..bd54d3d 100644 --- a/app/helpers/nodes_helper.rb +++ b/app/helpers/nodes_helper.rb | |||
| @@ -7,4 +7,8 @@ module NodesHelper | |||
| 7 | truncate(node.draft.title, :length => 50) | 7 | truncate(node.draft.title, :length => 50) |
| 8 | end | 8 | end |
| 9 | end | 9 | end |
| 10 | |||
| 11 | def custom_page_templates | ||
| 12 | Page.custom_templates.map {|x| [x.gsub("_", " ").titlecase, x]} | ||
| 13 | end | ||
| 10 | end | 14 | end |
