14 lines
No EOL
745 B
Text
14 lines
No EOL
745 B
Text
<%= form_for @item, url: user_item_url do |form| %>
|
|
<h3>Edit Item</h3>
|
|
<label for="category">Category</label>
|
|
<%= select "category", "item_category_id", ItemCategory.order("name ASC").all.collect {|p| [ p.name, p.id ] }, { :selected => @item.item_category.id } %>
|
|
<label for="item_name">Title</label>
|
|
<%= form.text_field :name %>
|
|
<label for="item_desc">Description</label>
|
|
<%= form.text_area :desc, class: "description", :rows => 5 %>
|
|
<label for="item_link">Link</label>
|
|
<%= form.text_field :link, class: "link" %>
|
|
<label for="item_permission">Permission</label>
|
|
<%= form.select :permission, options_for_select(['commons', 'public', 'private'], @item.permission) %>
|
|
<%= form.submit "Update", class: "update" %>
|
|
<% end %> |