<div id="c-reports">
  <div id="a-uploads">
    <h1>Upload Report</h1>

    <%= form_tag(reports_uploads_path, :method => :get, :class => "simple_form") do %>

      <div class="input">
        <label for="queries">Tags</label>
        <%= text_field_tag "queries", params[:queries], :placeholder => "Separate with commas" %>
      </div>

      <div class="input">
        <label for="min_date">Start Date</label>
        <%= text_field_tag "min_date", params[:min_date], :placeholder => "YYYY-MM-DD" %>
      </div>

      <div class="input">
        <label for="max_date">End Date</label>
        <%= text_field_tag "max_date", params[:max_date], :placeholder => "YYYY-MM-DD" %>
      </div>

      <%= submit_tag "Search" %>
    <% end %>

    <% if params[:queries] %>
      <%= content_tag("iframe", "Loading...", :src => "#{Danbooru.config.reportbooru_server}/reports/uploads?min=#{@report.min_date}&max=#{@report.max_date}&tags=#{u(@report.queries)}&sig=#{@report.generate_sig}", :height => "700", :width => "1200", :style => "border: none;") %>
    <% end %>
  </div>
</div>

<% content_for(:page_title) do %>
  Upload Report - <%= Danbooru.config.app_name %>
<% end %>
