diff options
Diffstat (limited to 'app/views/node/edit.rhtml')
-rw-r--r-- | app/views/node/edit.rhtml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/app/views/node/edit.rhtml b/app/views/node/edit.rhtml new file mode 100644 index 0000000..3686853 --- /dev/null +++ b/app/views/node/edit.rhtml @@ -0,0 +1,34 @@ +<%= render :partial => "person/nav" %> + +<h1>Node</h1> +<%= start_form_tag :action => 'update', :id => @node %> + <table> + <tr> + <td>Name</td><td><%= text_field 'node', 'name' %></td> + </tr> + <tr> + <td>Kommentar</td><td><%= text_area('node', 'comment', :cols => 40, :rows => 5) %></td> + </tr> + <tr> + <td>Administrator</td> + <td> + <select name="node[person_id]"> + <option value="0"> - </option + <% @persons.each do |person| %> + <option value="<%= person.id %>" + <%= ' selected' if @node.person != nil && @node.person.id == person.id %>> + <%= person.email %> + </option> + <% end %> + </select> + </td> + </tr> + <tr> + <td>Smokeping</td> + <td><%= check_box "node", "smokeping" %></td> + </tr> + </table> + <%= submit_tag 'Edit' %> +<%= end_form_tag %> +<hr /> +<%= link_to 'Back', { :controller => 'location', :action => 'show', :id => @node.location.id } %> |