diff options
| author | hukl <contact@smyck.org> | 2009-04-18 15:09:53 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-04-18 15:09:53 +0200 |
| commit | 3f28b7c924a628821025b6ebdf6672bf215ee7e0 (patch) | |
| tree | 86c4aba1e9f1cc0c9fe35a1a63f00a791d660f82 /app | |
| parent | c203980729523033d922769791550fd3bd5cad87 (diff) | |
links
Diffstat (limited to 'app')
| -rw-r--r-- | app/helpers/nodes_helper.rb | 4 | ||||
| -rw-r--r-- | app/views/events/edit.html.erb | 2 | ||||
| -rw-r--r-- | app/views/events/show.html.erb | 11 |
3 files changed, 10 insertions, 7 deletions
diff --git a/app/helpers/nodes_helper.rb b/app/helpers/nodes_helper.rb index 9bee8d8..615a0ee 100644 --- a/app/helpers/nodes_helper.rb +++ b/app/helpers/nodes_helper.rb | |||
| @@ -15,7 +15,9 @@ module NodesHelper | |||
| 15 | 15 | ||
| 16 | def event_information | 16 | def event_information |
| 17 | if @node.event | 17 | if @node.event |
| 18 | "#{@node.event.start_time} - #{@node.event.end_time} > #{link_to 'edit', edit_event_path(@node.event)}" | 18 | "#{@node.event.start_time} - #{@node.event.end_time} > " \ |
| 19 | "#{link_to 'show', event_path(@node.event)} " \ | ||
| 20 | "#{link_to 'edit', edit_event_path(@node.event)}" | ||
| 19 | else | 21 | else |
| 20 | "no event attached > #{link_to 'add', new_event_path(:event_node_id => @node.id)}" | 22 | "no event attached > #{link_to 'add', new_event_path(:event_node_id => @node.id)}" |
| 21 | end | 23 | end |
diff --git a/app/views/events/edit.html.erb b/app/views/events/edit.html.erb index 2bd08eb..524eae4 100644 --- a/app/views/events/edit.html.erb +++ b/app/views/events/edit.html.erb | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | <% content_for :subnavigation do %> | 1 | <% content_for :subnavigation do %> |
| 2 | <%= link_to 'back to node', edit_node_path(@event.node) %> | 2 | <%= link_to 'back', edit_node_path(@event.node) %> |
| 3 | <% end %> | 3 | <% end %> |
| 4 | 4 | ||
| 5 | 5 | ||
diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb index 699765d..0a77513 100644 --- a/app/views/events/show.html.erb +++ b/app/views/events/show.html.erb | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | <% content_for :subnavigation do %> | ||
| 2 | <%= link_to 'back', edit_node_path(@event.node) %> | ||
| 3 | <%= link_to 'edit', edit_event_path(@event) %> | ||
| 4 | <% end %> | ||
| 5 | |||
| 1 | <p> | 6 | <p> |
| 2 | <b>Start time:</b> | 7 | <b>Start time:</b> |
| 3 | <%=h @event.start_time %> | 8 | <%=h @event.start_time %> |
| @@ -41,8 +46,4 @@ | |||
| 41 | <p> | 46 | <p> |
| 42 | <b>Node:</b> | 47 | <b>Node:</b> |
| 43 | <%=h @event.node_id %> | 48 | <%=h @event.node_id %> |
| 44 | </p> | 49 | </p> \ No newline at end of file |
| 45 | |||
| 46 | |||
| 47 | <%= link_to 'Edit', edit_event_path(@event) %> | | ||
| 48 | <%= link_to 'Back', events_path %> \ No newline at end of file | ||
