<div class="list-title">
  <h1><%= link_to yield(:title), params.permit(:sort, :reverse), class: 'list-title-link' %></h1>

  <div class="flex">
    <%= render partial: 'material/search', locals: (params[:screen_id] ? {turbo_stream: true} : nil)  %>  
    
    <%= tag.form do %>
      <%= tag.label class: "dropzone dropzone--small",
                    data: {
                      controller: 'upload',
                      upload_url_value: rails_direct_uploads_url,
                      upload_create_url_value: url_for(controller: 'assets', action: 'upload'),
                      upload_target_value: 'assets',
                      action: "dragover->upload#dragover dragleave->upload#dragleave drop->upload#drop"
                    } do %>
        <span>arrow_upward</span>
        <input type="file" multiple data-action="change->upload#upload">                                  
      <% end %> 
    <% end %>  
    
  </div>
</div>

<div class="list-container">    

  <nav class="assets-sort">
    <%= render partial: 'sort' %>    

    <div id="entries_info">
      <%= entries_info @assets %>
    </div>
  </nav>

  

  <div class="list"> 
    <div class="assets__container">
      <div id="assets">
        <%= render @assets %>
      </div>            
      
      <%= tag.div nil,
        id: 'load-more',
        data: {
          controller: "load-more",
          load_more_list_id_value: "results",
          load_more_url_value: path_to_next_page(@assets)
        } unless @assets.blank? or @assets.last_page? %>
    </div>   
  </div>
</div>