Sha256: 6f547e8f40c37ba615922a0238738393344e83885ada6baef289c9f4efb39edf

Contents?: true

Size: 1.26 KB

Versions: 46

Compression:

Stored size: 1.26 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: {class: 'alchemy_selectbox'} %>
    <% 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: {class: 'alchemy_selectbox'} %>
    <% else %>
      <%= f.input attribute[:name], resource_attribute_field_options(attribute) %>
    <% end %>
  <% end %>
  <% if f.object.respond_to?(:tag_list) %>
    <div class="input string autocomplete_tag_list">
      <%= f.label :tag_list %>
      <%= render 'alchemy/admin/partials/autocomplete_tag_list', f: f %>
    </div>
  <% end %>
  <%= f.submit Alchemy.t(:save) %>
<% end %>

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
alchemy_cms-7.0.15 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-6.1.10 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.14 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.13 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.12 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.11 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.10 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.9 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.8 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.7 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.6 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.5 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.4 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.3 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-6.1.9 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.2 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-6.1.8 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-6.1.7 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.1 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-7.0.0 app/views/alchemy/admin/resources/_form.html.erb