Sha256: 029a412d5d783adf120b7b98018562898a4f2e6f74ccd3adf868ae34e981dcc8

Contents?: true

Size: 1.24 KB

Versions: 19

Compression:

Stored size: 1.24 KB

Contents

<%= alchemy_form_for resource_instance_variable, url: resource_path(resource_instance_variable, search_filter_params) do |f| %>
  <% resource_handler.editable_attributes.each do |attribute| %>
    <% if relation = attribute[:relation] %>
      <%= f.association relation[:name].to_sym,
        collection: relation[:collection],
        label_method: relation[:attr_method],
        include_blank: Alchemy.t(:blank, scope: 'resources.relation_select'),
        input_html: {is: 'alchemy-select'} %>
    <% elsif attribute[:type].in? %i[date time datetime] %>
      <%= f.datepicker attribute[:name], resource_attribute_field_options(attribute) %>
    <% elsif attribute[:enum].present? %>
      <%= f.input attribute[:name],
        collection: attribute[:enum],
        include_blank: Alchemy.t(:blank, scope: 'resources.relation_select'),
        input_html: {is: 'alchemy-select'} %>
    <% else %>
      <%= f.input attribute[:name], resource_attribute_field_options(attribute) %>
    <% end %>
  <% end %>
  <% if f.object.respond_to?(:tag_list) %>
    <%= render Alchemy::Admin::TagsAutocomplete.new do %>
      <%= f.input :tag_list, input_html: { value: f.object.tag_list.join(",") } %>
    <% end %>
  <% end %>
  <%= f.submit Alchemy.t(:save) %>
<% end %>

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
alchemy_cms-7.4.2 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.3.6 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.2.9 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.4.1 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.4.0 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.3.5 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.2.8 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.3.4 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.3.3 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.3.2 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.2.7 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.3.1 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.3.0 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.2.6 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.2.5 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.2.4 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.2.3 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.2.2 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.2.1 app/views/alchemy/admin/resources/_form.html.erb