<commit_before><% param_name = "#{association_name}_page" %>

<%= render :partial => 'admin/templates/modals/has_many' %>

<div class="box_relationships" id="<%= association_name %>">

  <h2>
    <%= @resource.human_attribute_name(association_name) %>
    <%= " (#{@data.count})" if @resource.typus_options_for(:counters) %>
    <small><%= add_new %></small>
  </h2>

  <% if @items.any? -%>
    <%= table %>
    <%= admin_paginate(@items, Typus.pagination.merge(:anchor => association_name, :param_name => param_name)) %>
  <% else %>
    <p><%= Typus::I18n.t("No entries found.") %></p>
  <% end %>
  
  <% if @resource.read_model_config['multiple_image_upload'] && @resource.read_model_config['multiple_image_upload'].split(", ").include?(association_name) %>
    <%= form_for(@item, :url => params.dup.cleanup.merge!(:action => 'update'), :html => { :multipart => true, :class => "multi-image", :id => "edit_#{@resource.model_name.singular}_#{@item.id}_multi_image" }) do |f| %>
      <h3>
        Add Multiple Images
      </h3>
      <div class="form-actions">
        <%= file_field_tag("#{@resource.model_name.singular}_#{association_name}_image", multiple: true, required: true, name: "#{@resource.model_name.singular}[#{association_name}_attributes][][image]", title: "Choose Files") %>
        <%= submit_tag("Submit", :name => "_continue", :data => { :disable_with => "Uploading..." }, :class => "btn multi-submit") %>
      </div>
    <% end %>
  <% end %>

</div><commit_msg>Primary btn style for multi-upload submit<commit_after><% param_name = "#{association_name}_page" %>

<%= render :partial => 'admin/templates/modals/has_many' %>

<div class="box_relationships" id="<%= association_name %>">

  <h2>
    <%= @resource.human_attribute_name(association_name) %>
    <%= " (#{@data.count})" if @resource.typus_options_for(:counters) %>
    <small><%= add_new %></small>
  </h2>

  <% if @items.any? -%>
    <%= table %>
    <%= admin_paginate(@items, Typus.pagination.merge(:anchor => association_name, :param_name => param_name)) %>
  <% else %>
    <p><%= Typus::I18n.t("No entries found.") %></p>
  <% end %>
  
  <% if @resource.read_model_config['multiple_image_upload'] && @resource.read_model_config['multiple_image_upload'].split(", ").include?(association_name) %>
    <%= form_for(@item, :url => params.dup.cleanup.merge!(:action => 'update'), :html => { :multipart => true, :class => "multi-image", :id => "edit_#{@resource.model_name.singular}_#{@item.id}_multi_image" }) do |f| %>
      <h3>
        Add Multiple Images
      </h3>
      <div class="form-actions">
        <%= file_field_tag("#{@resource.model_name.singular}_#{association_name}_image", multiple: true, required: true, name: "#{@resource.model_name.singular}[#{association_name}_attributes][][image]", title: "Choose Files") %>
        <%= submit_tag("Submit", :name => "_continue", :data => { :disable_with => "Uploading..." }, :class => "btn btn-primary multi-submit") %>
      </div>
    <% end %>
  <% end %>

</div>
{'fraction_non_alphanumeric': 0.22133863485752153, 'fraction_numerical': 0.003976143141153081, 'mean_word_length': 4.499089253187614, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5030240', 'n_tokens_mistral': 1098, 'n_tokens_neox': 1027, 'n_words': 167}