Browse Source

remove single file upload from dashboard and storage HTML templates.

From an end-user perspective, I don't think Nic will care about the
difference. She'll want the easiest option and uploading a single file
via the multi-upload form -- with no file name input -- is the easiest
way to go about this. I say this without actually speaking to her
about this so I might be wrong on this and need to go back in and
change things.
stable
Craig Oates 2 years ago
parent
commit
bb35111dc9
  1. 13
      templates/user/dashboard.html
  2. 30
      templates/user/storage.html

13
templates/user/dashboard.html

@ -15,19 +15,6 @@
<div>
<h2>File Upload</h2>
<form action="/storage/upload"
method="POST"
enctype="multipart/form-data">
<input required type="hidden"
name="AUTHENTICITY-TOKEN"
value="{{token}}">
<label>Name</label>
<input required type="text" name="FILE-NAME">
<input required type="file" name="STORAGE-FILE">
<input type="submit" value="Upload File"/>
</form>
<h2>Multi-File Upload</h2>
<form action="/storage/multi-upload" method="POST"
enctype="multipart/form-data">
<input required type="hidden"

30
templates/user/storage.html

@ -1,32 +1,24 @@
{% extends "layouts/default.html" %}
{% block title %}Manage you archive.{% endblock %}
{% block content %}
<h1>Storage Files</h1>
<div>
<h2>File Upload</h2>
<form action="/storage/upload" method="POST" enctype="multipart/form-data">
<input required type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}">
<label>Name</label>
<input required type="text" name="FILE-NAME">
<label>Single File Upload</label>
<input required type="file" name="STORAGE-FILE">
<input type="submit" value="Upload File"/>
</form>
<form action="/storage/multi-upload" method="POST" enctype="multipart/form-data">
<input required type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}">
<label>Multi-File Upload</label>
<p>Warning: This will overwrite any files stored on the server with the same name.</p>
<input required type="file" name="STORAGE-FILES" multiple>
<input type="submit" value="Upload Files"/>
</form>
<h2>File Upload</h2>
<p><em>
Warning: This will overwrite any files stored on the server with the same name.
</em></p>
<form action="/storage/multi-upload" method="POST" enctype="multipart/form-data">
<input required type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}">
<input required type="file" name="STORAGE-FILES" multiple>
<input type="submit" value="Upload Files"/>
</form>
</div>
<h1>Storage Files</h1>
{% for item in files %}
<div>
<p>
<a href="/storage/view/{{item.slug}}">
<a href="/storage/view/media/{{item.slug}}">
<img src="{{ item | build-thumbnail-path }}" alt="{{item.name}}">
</a>
{% if roles.administrator %}

Loading…
Cancel
Save