2013-01-11 23:49:59 +00:00
|
|
|
<%#
|
|
|
|
# @file
|
|
|
|
# This code renders the edit form. It is not used anymore; we use
|
|
|
|
# best_in_place instead.
|
|
|
|
#%>
|
|
|
|
|
2013-01-01 22:45:35 +00:00
|
|
|
<%= form_for @topic, url: topic_url do |form| %>
|
|
|
|
<h3>Edit Topic</h3>
|
|
|
|
<label for="category">Category</label>
|
|
|
|
<%= select "category", "metacode_id", Metacode.order("name ASC").all.collect {|p| [ p.name, p.id ] }, { :selected => @topic.metacode.id } %>
|
|
|
|
<label for="topic_name">Title</label>
|
|
|
|
<%= form.text_field :name %>
|
|
|
|
<label for="topic_desc">Description</label>
|
|
|
|
<%= form.text_area :desc, class: "description", :rows => 5 %>
|
|
|
|
<label for="topic_link">Link</label>
|
|
|
|
<%= form.text_field :link, class: "link" %>
|
2013-01-23 18:43:01 +00:00
|
|
|
<% if @topic.user == user %>
|
|
|
|
<label for="topic_permission">Permission</label>
|
|
|
|
<%= form.select :permission, options_for_select(['commons', 'public', 'private'], @topic.permission) %>
|
|
|
|
<% end %>
|
2013-01-01 22:45:35 +00:00
|
|
|
<%= form.submit "Update", class: "update" %>
|
2013-01-11 23:49:59 +00:00
|
|
|
<% end %>
|