Sha256: 2519e99fd81110e3558fd9b749b41527ba6a37bdff0590905f63f3ccc9ea0ee8
Contents?: true
Size: 1.97 KB
Versions: 5
Compression:
Stored size: 1.97 KB
Contents
<%= simple_form_for ([@site, @section, @content]) do |f| %> <% if display_field?(:category) %> <p> <%= f.input :category_id, label: "Categoria:", collection: @categories.map { |c| [c.name, c.id] }, input_html: { class: 'js-select2' } %> </p> <% end %> <% if display_field?(:title) %> <p> <%= f.input :title, required: true, as: :string, label: 'TÃtulo:' %> </p> <% end %> <% if display_field?(:summary) %> <p> <%= f.input :summary, as: :text, label: 'Resumo' %> </p> <% end %> <% if display_field?(:location) %> <p> <%= f.input :location, as: :string, label: 'Local:' %> </p> <% end %> <% if display_field?(:date) %> <% field = field_properties(:date) %> <p> <%= f.input :date, as: (field.format.map(&:to_s).include?("hour") ? :datetime : :date), label: 'Data:', order: field.format, default: @default_date %> </p> <% end %> <% if display_field?(:tags) %> <% autocomplete = ActsAsTaggableOn::Tag.all.map { |t| {value: t.name, text: t.name} } %> <%= f.input :tag_list, as: :string, required: false, label: "Tags", input_html: { value: f.object.tag_list.join(", "), class: "js-tags", data: { autocomplete: autocomplete.to_json } } %> <% end %> <% if display_field?(:url) %> <p> <%= f.input :url, label: 'URL:' %> </p> <% end %> <% if display_field?(:text) %> <p> <%= f.input :text, as: :text, label: 'Texto', input_html: { class: 'editor' } %> </p> <% end %> <% if display_field?(:embedded) %> <p> <%= f.input :embedded, label: 'URL:' %> </p> <% end %> <% if display_field?(:attachments) %> <%= render 'form_attachments', f: f %> <% end %> <% if display_field?(:images) %> <%= render 'form_images', f: f %> <% end %> <div class="actions"> <%= f.submit "Salvar", id: 'submit' %> </div> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems