Sha256: 1d8ab78e9597c2a97489a114e50615f12e1f1d0e8ac207473850362e5d6622d2

Contents?: true

Size: 1.06 KB

Versions: 6

Compression:

Stored size: 1.06 KB

Contents

<%= form_for([:admin, @odania_menu, @odania_menu_item]) do |f| %>
	<% if @odania_menu_item.errors.any? %>
		<div id="error_explanation">
			<h2><%= pluralize(@odania_menu_item.errors.count, "error") %> prohibited this odania_menu_item from being
				saved:</h2>

			<ul>
				<% @odania_menu_item.errors.full_messages.each do |msg| %>
					<li><%= msg %></li>
				<% end %>
			</ul>
		</div>
	<% end %>

	<div class="field">
		<%= f.label :title %>
		<br>
		<%= f.text_field :title %>
	</div>
	<div class="field">
		<%= f.label :published %>
		<br>
		<%= f.check_box :published %>
	</div>
	<div class="field">
		<%= f.label :target_type %>
		<br>
		<%= f.select :target_type, Odania::TargetType.targets.keys %>
	</div>

	<%= render partial: Odania::TargetType.targets[@odania_menu_item.target_type][:selector], locals: {menu_item: @odania_menu_item} %>

	<div class="field">
		<%= f.label :parent_id %>
		<br>
		<%= f.collection_select :parent_id, Odania::MenuItem.order('title ASC'), :id, :title, {include_blank: true} %>
	</div>
	<div class="actions">
		<%= f.submit %>
	</div>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
odania_core-0.0.6 app/views/admin/odania/menu_items/_form.html.erb
odania_core-0.0.5 app/views/admin/odania/menu_items/_form.html.erb
odania_core-0.0.4 app/views/admin/odania/menu_items/_form.html.erb
odania_core-0.0.3 app/views/admin/odania/menu_items/_form.html.erb
odania_core-0.0.2 app/views/admin/odania/menu_items/_form.html.erb
odania_core-0.0.1 app/views/admin/odania/menu_items/_form.html.erb