Sha256: 398055fc55caac6aee8fde4a4e64862783b337d8eef618f1f2001536822217b0

Contents?: true

Size: 878 Bytes

Versions: 11

Compression:

Stored size: 878 Bytes

Contents

<% first_attachments = true

   # 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 -%>
<%=

    field_type = case attribute.type
when :attachment
  "file_field :#{attribute.name}, :label => \"#{attribute.name.titleize}\""
when :attachments
  if first_attachments
    first_attachments = false
    "attachment_manager"
  end
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
    if field_type
        "<%= f.cms_#{field_type} %%>"
    end
-%>
<% end -%>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
browsercms-3.5.7 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.5.6 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.5.5 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.5.4 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.5.3 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.5.2 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.5.1 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.5.0 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.5.0.rc3 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.5.0.rc2 lib/generators/cms/content_block/templates/_form.html.erb
browsercms-3.5.0.rc1 lib/generators/cms/content_block/templates/_form.html.erb