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
browsercms-3.3.0 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.1.3 rails_generators/content_block/templates/_form.html.erb
browsercms-3.3.0.beta lib/generators/cms/content_block/templates/_form.html.erb
bf4-browsercms-3.1.0 rails_generators/content_block/templates/_form.html.erb
drujensen-browsercms-3.2.0 rails_generators/content_block/templates/_form.html.erb
browsercmsi-3.1.2 rails_generators/content_block/templates/_form.html.erb
browsercms-3.1.2 rails_generators/content_block/templates/_form.html.erb
browsercms-3.1.1 rails_generators/content_block/templates/_form.html.erb
browsercmsi-3.1.1 rails_generators/content_block/templates/_form.html.erb
browsercmsi-3.1.0 rails_generators/content_block/templates/_form.html.erb
browsercms-3.1.0 rails_generators/content_block/templates/_form.html.erb
we5-browsercms-3.1.0 rails_generators/content_block/templates/_form.html.erb
browsercms-3.0.6 rails_generators/content_block/templates/_form.html.erb
browsercms-3.0.5 rails_generators/content_block/templates/_form.html.erb
we5-browsercms-3.0.5.1 rails_generators/content_block/templates/_form.html.erb
we5-browsercms-3.0.5 rails_generators/content_block/templates/_form.html.erb
browsercms_s3-3.0.5 rails_generators/content_block/templates/_form.html.erb
browsercms-3.0.4 rails_generators/content_block/templates/_form.html.erb
browsercms-3.0.3 rails_generators/content_block/templates/_form.html.erb
browsercms_s3-3.0.4 rails_generators/content_block/templates/_form.html.erb