Sha256: 7aa22165412c8de6056b29cdb654f1be4a09bdbd65183a3946b4e46be7b6b5f7

Contents?: true

Size: 1.2 KB

Versions: 6

Compression:

Stored size: 1.2 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,
        label_method: relation[:attr_method],
        include_blank: Alchemy.t(:blank, scope: 'resources.relation_select'),
        input_html: {class: 'alchemy_selectbox'} %>
    <% elsif attribute[:type] == :datetime || attribute[:type] == :time %>
      <div class="input <%= attribute[:type] %>">
        <label class="control-label">
          <%= f.object.class.human_attribute_name(attribute[:name]) %>
        </label>
        <%= alchemy_datepicker resource_instance_variable, attribute[:name],
          type: attribute[:type] %>
      </div>
    <% 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

6 entries across 6 versions & 1 rubygems

Version Path
alchemy_cms-4.1.2 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-4.1.1 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-4.2.0.rc1 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-4.1.0 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-4.1.0.rc1 app/views/alchemy/admin/resources/_form.html.erb
alchemy_cms-4.1.0.beta app/views/alchemy/admin/resources/_form.html.erb