Sha256: f8c6b78052121cc585b4834ab7d3023c9a82483a7884aa3216bc4df24aa8ed28
Contents?: true
Size: 1012 Bytes
Versions: 5
Compression:
Stored size: 1012 Bytes
Contents
<%% content_for :scripts do %> <script> $(function(){ $("#menu_cable_menuable_type").change(function(){ $.ajax({ url: "<%%= resources_admin_menus_path %>/"+$(this).val()}); }); }); </script> <%% end %> <%%= semantic_form_for [:admin, @<%= singular_table_name %>] do |f| %> <%%= f.inputs :name => "Add a resource to this menu" do %> <%%= f.input :cable_menuable_type, :label => "Content Model", :as => :select, :collection => ['Page'] %> <%%= f.input :cable_menuable_id, :label => "Resource", :as => :select, :collection => @resources.collect{|r| ["#{r.site.name} - #{r.title}",r.id]} %> <%% end %> <%% f.buttons do %> <%% unless @<%= singular_table_name %>.resource.nil? %> <%%= f.commit_button "Update Resource" %> <li class="commit"><%%= link_to "Remove this Resource", remove_resource_admin_menus_path(@<%= singular_table_name %>), :class => "button" %></li> <%% else %> <%%= f.commit_button "Add Resource" %> <%% end %> <%% end %> <%% end %>
Version data entries
5 entries across 5 versions & 1 rubygems