Sha256: e739ebff610df43623d914ef22bec8ee30779e88b267e735e4138b8fd922ebe5

Contents?: true

Size: 1.82 KB

Versions: 1

Compression:

Stored size: 1.82 KB

Contents

<% criterion_id = criterion.position %>

<%= tag.div(class: 'refine-criterion-container', data: {
  controller: 'refine--update',
  refine__update_criterion_id_value: criterion_id,
  position: criterion.position}) do %>

  <!-- Select Condition -->
  <div class="refine-criterion-condition-container">
    <%= render partial: 'refine/blueprints/condition_select', locals: {
      selected_condition_id: criterion.condition_id } %>
  </div>

  <!-- Select Clause -->
  <div class="refine-criterion-clause-container">
    <%= render partial: 'refine/blueprints/clause_select', locals: {
        meta: criterion.meta, selected_clause: criterion.input[:clause]} %>
  </div>

  <!-- Render correct type of condition -->
  <%= render partial: "refine/blueprints/clauses/#{criterion.component}", locals: {
    criterion: criterion,
    condition: criterion.condition, input: criterion.input, criterion_id: criterion_id, meta: criterion.meta, meta_clause: criterion.selected_clause_meta, input_id: nil } %>

  <!-- Refinements -->
  <% criterion.refinements.each do |refinement|%>

    <div class="refine-criterion-refinement-container">
      <%= render partial: 'refine/blueprints/clause_select', locals: {
        meta: refinement[:meta], input_id: "input, #{refinement[:id]}", selected_clause: criterion.input.dig(refinement[:id].to_sym, :clause) || {} } %>
    </div>

    <%= render partial: "refine/blueprints/clauses/#{refinement[:component].underscore}", locals: {
      condition: refinement, input: criterion.input[refinement[:id].to_sym] || {}, criterion_id: criterion_id, meta: refinement[:meta], input_id: "input, #{refinement[:id]}", meta_clause: criterion.meta_for_refinement_clause(refinement), criterion: criterion} %>
  <% end %>
  <!-- End Refinements -->

<% end %>

<%= render 'refine/blueprints/delete_criterion', criterion_id: criterion_id %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
refine-rails-2.9.2 app/views/refine/blueprints/_criterion.html.erb