diff options
| author | hukl <contact@smyck.org> | 2009-04-18 14:35:50 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-04-18 14:35:50 +0200 |
| commit | c203980729523033d922769791550fd3bd5cad87 (patch) | |
| tree | 696d94ba2dc473fc429867618e6bccd1b1168b2b | |
| parent | 6a13bb8c60b43f5798b7646791c982789d08215d (diff) | |
added layout and proper links to events
| -rw-r--r-- | app/controllers/events_controller.rb | 3 | ||||
| -rw-r--r-- | app/views/events/edit.html.erb | 13 |
2 files changed, 10 insertions, 6 deletions
diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index 04e9908..00b98f1 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb | |||
| @@ -1,4 +1,7 @@ | |||
| 1 | class EventsController < ApplicationController | 1 | class EventsController < ApplicationController |
| 2 | |||
| 3 | layout 'admin' | ||
| 4 | |||
| 2 | # GET /events | 5 | # GET /events |
| 3 | # GET /events.xml | 6 | # GET /events.xml |
| 4 | def index | 7 | def index |
diff --git a/app/views/events/edit.html.erb b/app/views/events/edit.html.erb index e40ac55..2bd08eb 100644 --- a/app/views/events/edit.html.erb +++ b/app/views/events/edit.html.erb | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | <% content_for :subnavigation do %> | ||
| 2 | <%= link_to 'back to node', edit_node_path(@event.node) %> | ||
| 3 | <% end %> | ||
| 4 | |||
| 5 | |||
| 1 | <h1>Editing event</h1> | 6 | <h1>Editing event</h1> |
| 2 | 7 | ||
| 3 | <% form_for(@event) do |f| %> | 8 | <% form_for(@event) do |f| %> |
| @@ -36,13 +41,9 @@ | |||
| 36 | <%= f.text_field :longitude %> | 41 | <%= f.text_field :longitude %> |
| 37 | </p> | 42 | </p> |
| 38 | <p> | 43 | <p> |
| 39 | <%= f.label :node_id %><br /> | 44 | <%= f.hidden_field :node_id %> |
| 40 | <%= f.text_field :node_id %> | ||
| 41 | </p> | 45 | </p> |
| 42 | <p> | 46 | <p> |
| 43 | <%= f.submit 'Update' %> | 47 | <%= f.submit 'Update' %> |
| 44 | </p> | 48 | </p> |
| 45 | <% end %> | 49 | <% end %> \ No newline at end of file |
| 46 | |||
| 47 | <%= link_to 'Show', @event %> | | ||
| 48 | <%= link_to 'Back', events_path %> \ No newline at end of file | ||
