Sha256: 4b2d85cee44228747faa1e0ae15742a5e3956a482eb87508f7a53fcb87d65ac1
Contents?: true
Size: 1.13 KB
Versions: 11
Compression:
Stored size: 1.13 KB
Contents
<% if Cms::CategoryType.count > 0 %> <% @block.category_type ||= (Cms::Category.includes(:category_type).last && Cms::Category.last.category_type) %> <%= f.association :category_type, collection: Cms::CategoryType.order("name"), :prompt => "Select a Type of Category", :label => "Type" %> <% categories = @block.category_type ? @block.category_type.category_list : [] %> <% unless categories.empty? %> <%= f.association :parent, collection: categories, :include_blank => true %> <% end %> <%= f.input :name %> <% else %> <% use_page_title "Please Create A Category Type" %> <%= content_for :html_head do %> <script type="text/javascript"> $(function(){ $('.form-actions, .top-buttons').remove(); }); </script> <% end %> <p>Before you can create a category, you must create at least one category type for that category. For example, if you plan to categorize your news releases, you might create a "News Release" category type.</p> <%= link_to "Add a New Category Type", new_category_type_path, class: 'btn btn-primary btn-small' %> <% end %>
Version data entries
11 entries across 11 versions & 2 rubygems