Sha256: c03b13956c23461425c0f8ded789b957405f0b628c6c959317cc18c5ab7dd20b
Contents?: true
Size: 1.98 KB
Versions: 5
Compression:
Stored size: 1.98 KB
Contents
<%%= semantic_form_for [:admin, @<%= singular_table_name %>] do |f| %> <%% if @<%= singular_table_name %>.errors.any? %> <div id="error_explanation"> <h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this menu from being saved:</h2> <ul> <%% @<%= singular_table_name %>.errors.full_messages.each do |msg| %> <li><%%= msg %></li> <%% end %> </ul> </div> <%% end %> <%%= f.inputs do %> <%%= f.input :title, :label => "Menu Title", :hint => "This will be used in the menu itself" %> <%%= f.input :meta_description, :label => "Meta Description", :hint => "Meta Description rendered in the head of the document" %> <%%= f.input :meta_keywords, :label => "Meta Keywords", :hint => "Enter Keywords with a comma separating each key" %> <%%= f.input :url, :label => "URL", :as => :string, :hint => "URL for this menu item, Example: /categories/canopies" %> <%%= f.input :parent_id, :as => :select, :collection => nested_set_options(<%= singular_table_name.classify %>) {|i| "#{'-' * i.level} #{i.title}" unless i.level > 1 }.to_a.reject{|i| i[0].nil?}, :hint => "You can move this later" %> <%%= f.input :show_in_menu, :as => :boolean, :wrapper_html => { :class => "yes_no" }, :hint => "You can hide the menu item by unchecking this box." %> <%% unless Cable.special_actions.empty? %> <%%= f.input :special_action, :label => "Special Action", :as => :select, :collection => Cable.special_actions, :hint => "(Optional)" %> <%% end %> <%% unless Cable.templates.empty? %> <%%= f.input :template, :as => :select, :collection => Cable.templates, :selected => f.object.template || "default", :hint => "Which page template should be used?"%> <%% end %> <%% unless @resources.nil? %> <%%= f.input :cable_menuable_id, :label => "Resource", :as => :select, :include_blank => true, :collection => @resources %> <%% end %> <%% end %> <%%= f.buttons %> <%% end %>
Version data entries
5 entries across 5 versions & 1 rubygems