<%%= javascript_include_tag 'jquery.quicksearch.js' %> <%%= semantic_form_for [:admin, @<%= singular_table_name %>] do |f| %> <%% if @<%= singular_table_name %>.errors.any? %>

<%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:

<%% end %>
<%%= f.inputs do %> <%%= f.input :title, :label => "Menu Title", :hint => "This will be used in the <%= singular_table_name %> 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 <%= singular_table_name %> item, Example: /categories/canopies" %> <%%= f.input :show_in_<%= singular_table_name %>, :as => :boolean, :wrapper_html => { :class => "yes_no" }, :hint => "You can hide the <%= singular_table_name %> item by unchecking this box." %> <%% end %>
<%%= f.inputs do %> <%% 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 %> <%% end %>
<%%= f.inputs do %> <%%= f.input :cable_menuable_type, :as => :hidden %> <%%= f.input :cable_menuable_id, :as => :hidden %>
  • <%%= @<%= singular_table_name %>.cable_menuable_type %> » <%%= @<%= singular_table_name %>.resource.first_displayable_attribute unless @<%= singular_table_name %>.resource.nil? %>
  • Type Resources
      <%% @resource_types.each do |type| %>
    • <%%= type[1] %>
    • <%% end %>
    <%%= render(:partial => "admin/<%= singular_table_name %>s/resources", :locals => {:resources => @resources})%>
  • <%% end %>
    <%%= f.buttons %> <%% end %>