diff options
| author | hukl <contact@smyck.org> | 2009-04-18 14:23:02 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-04-18 14:23:02 +0200 |
| commit | 1a80d6cd79235694cc8babf8dc779be3155c9111 (patch) | |
| tree | 4bea63bf7db094de8ca6027e9af45e371e4d865c /app/helpers | |
| parent | 51797bf2b5f86d14139ba985e9c777fa0160af46 (diff) | |
adding event information to the metadata section allowing to add and edit events
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/nodes_helper.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/nodes_helper.rb b/app/helpers/nodes_helper.rb index 63db995..9bee8d8 100644 --- a/app/helpers/nodes_helper.rb +++ b/app/helpers/nodes_helper.rb | |||
| @@ -11,4 +11,13 @@ module NodesHelper | |||
| 11 | def custom_page_templates | 11 | def custom_page_templates |
| 12 | Page.custom_templates.map {|x| [x.gsub("_", " ").titlecase, x]} | 12 | Page.custom_templates.map {|x| [x.gsub("_", " ").titlecase, x]} |
| 13 | end | 13 | end |
| 14 | |||
| 15 | |||
| 16 | def event_information | ||
| 17 | if @node.event | ||
| 18 | "#{@node.event.start_time} - #{@node.event.end_time} > #{link_to 'edit', edit_event_path(@node.event)}" | ||
| 19 | else | ||
| 20 | "no event attached > #{link_to 'add', new_event_path(:event_node_id => @node.id)}" | ||
| 21 | end | ||
| 22 | end | ||
| 14 | end | 23 | end |
