Sha256: 9bb214e4c4713838f759fb5a2fd9b39d3a8d5e20f3ff698ffa1e1103fbfa41e7

Contents?: true

Size: 664 Bytes

Versions: 44

Compression:

Stored size: 664 Bytes

Contents

<% # This 'unless' can be removed if :name is no longer assumed to be a default attribute.
   unless attributes.find {|attr| attr.name == 'name'}
%><%%= f.cms_text_field :name %>
<% end %>
<% for attribute in attributes -%>
<%%= f.cms_<%= 
case attribute.type
when :attachment
  "file_field :#{attribute.name}_file, :label => \"File\""
when :category
  "drop_down :category_id, categories_for('#{class_name.titleize}').map{|c| [c.path, c.id]}"
when :date
  "date_picker :#{attribute.name}"
when :datetime
  "datetime_select :#{attribute.name}"
when :html
  "text_editor :#{attribute.name}"
else
  "#{attribute.field_type} :#{attribute.name}"
end 
-%> %>
<% end -%>

Version data entries

44 entries across 44 versions & 10 rubygems

Version Path
SFEley-browsercms-3.0.2 rails_generators/content_block/templates/_form.html.erb
buzzware-browsercms-3.0.2 rails_generators/content_block/templates/_form.html.erb
coredumplings-browsercms-3.0.0 rails_generators/content_block/templates/_form.html.erb
we5-browsercms-3.0.1.1 rails_generators/content_block/templates/_form.html.erb
webficient-browsercms-3.0.1 rails_generators/content_block/templates/_form.html.erb
webficient-browsercms-3.0.2 rails_generators/content_block/templates/_form.html.erb
webficient-browsercms-3.0.3 rails_generators/content_block/templates/_form.html.erb
webficient-browsercms-3.0.4 rails_generators/content_block/templates/_form.html.erb
browsercms-3.4.2 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.3.4 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.4.2.rc1 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.4.1 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.4.0 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.4.0.rc2 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.4.0.rc1 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.3.3 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.1.5 rails_generators/content_block/templates/_form.html.erb
browsercms-3.1.4 rails_generators/content_block/templates/_form.html.erb
browsercms-3.3.2 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.3.1 lib/generators/cms/content_block/templates/_form.html.erb