Sha256: 3c7e6674eca08323c0f1319eb44ab7c1cda08f9e575dd42fc06b64a3016ff148

Contents?: true

Size: 1.95 KB

Versions: 1

Compression:

Stored size: 1.95 KB

Contents


  <% if request.env["PATH_INFO"] == "/admin/quotations/new" ||  "/admin/quotations"  %>
    <div class="nested-fields <%= field.attribute %>">
      <div class="<%= field.attribute.to_s.singularize %>_container <%= field.attribute %>">
        <% field.nested_fields_for_builder(f).each do |attribute| -%>
          <% if attribute.html_class.to_s !=  "boolean"%>
            <div class="field-unit field-unit--<%= attribute.html_class %>">
              <%= render_field attribute, f: f %>
            </div>
          <% else %>
            <%= render_field attribute, f: f %>
          <% end -%>
        <% end -%>

      </div>
      <div class="lineItem_button_action">
        <div class="sophieTolouba_<%= field.attribute.to_s %>">
          <% if field.attribute.to_s == "line_items"%>
          <div class="button remove-field__option_buton executer-button" >
            <span>Ajouter des options</span>
          </div>
          <% end %>
          <div class="btn-warning button remove-field remove_field_<%= field.attribute %>" id= "button_remove_associated_<%=field.associated_class_name%>">
            <% if field.attribute.to_s ==  "working_zones"%>
                <%= link_to_remove_association ('remove''<i class="ml-3 tim-icons icon-settings"></i>').html_safe, f %>
            <% end %>
            <% if field.attribute.to_s ==  "line_items"%>
                <%= link_to_remove_association ('remove''<i class="ml-3 tim-icons icon-app"></i>').html_safe, f %>
            <% end %>

          </div>

        </div>
      </div>
    </div>
  <% else %>
    <div class="nested-fields">
      <% field.nested_fields_for_builder(f).each do |attribute| -%>
        <div class="field-unit field-unit--<%= attribute.html_class %>">
        <%= render_field attribute, f: f %>
        </div>
      <% end -%>

      <%= link_to_remove_association I18n.t("administrate.fields.nested_has_many.remove", resource: field.associated_class_name.titleize), f %>
    </div>
  <% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
worker-field-nested_has_many-0.6.0 app/views/fields/nested_has_many/_fields.html.erb