{{define "manage.html"}}{{template "base" .}}{{end}}

{{define "content"}}
<section class="download-view" aria-labelledby="manage-title">
  <div class="card download-card">
    <div class="card-content">
      <div class="file-emblem" aria-hidden="true">
        <svg viewBox="0 0 24 24" role="img" focusable="false"><path d="M3 6h18" /><path d="M8 6V4h8v2" /><path d="M19 6l-1 14H6L5 6" /><path d="M10 11v5" /><path d="M14 11v5" /></svg>
      </div>
      <h1 id="manage-title">Manage upload</h1>
      <p class="download-subtitle">This private link can delete the entire box.</p>

      <dl class="manage-details">
        <div><dt>Box</dt><dd><code>{{.Data.Box.ID}}</code></dd></div>
        <div><dt>Files</dt><dd>{{.Data.FileCount}}</dd></div>
        <div><dt>Total size</dt><dd>{{.Data.TotalSize}}</dd></div>
        <div><dt>Expires</dt><dd>{{.Data.ExpiresLabel}}</dd></div>
        <div><dt>Downloads</dt><dd>{{.Data.DownloadCount}}{{if .Data.MaxDownloads}} / {{.Data.MaxDownloads}}{{end}}</dd></div>
        <div><dt>Protected</dt><dd>{{if .Data.Protected}}Yes{{else}}No{{end}}</dd></div>
      </dl>

      <form action="{{.Data.DeleteActionURL}}" method="post">
        <button class="button button-danger button-wide" type="submit">
          <svg viewBox="0 0 24 24" role="img" focusable="false" aria-hidden="true"><path d="M3 6h18" /><path d="M8 6V4h8v2" /><path d="M19 6l-1 14H6L5 6" /></svg>
          Delete upload
        </button>
      </form>
      <a class="button button-outline button-wide" href="/d/{{.Data.Box.ID}}">Back to box</a>
    </div>
  </div>
</section>
{{end}}
