forked from expo/troggle
Upload form for Photos
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
<a href="{% url "scanupload" '2021:01' %}">Upload Scans</a> |
|
||||
<a href="{% url "dwgallfiles" %}">Drawings</a> |
|
||||
<a href="{% url "dwgupload" %}">Upload Drawings</a> |
|
||||
<a href="{% url "photoupload" %}">Upload Photos</a> |
|
||||
<a href="/1623/290/290.html">290 (FGH)</a> |
|
||||
<a href="/1626/359/359.html">359 (Homecoming)</a> |
|
||||
<br>
|
||||
|
||||
93
templates/photouploadform.html
Normal file
93
templates/photouploadform.html
Normal file
@@ -0,0 +1,93 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Simple Fileupload (Photos){% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
{% if folder %}
|
||||
<h2>Upload photos into /photos/{{folder}}/</h2>
|
||||
{% else %}
|
||||
<h2>Upload photos into /photos/{{year}}/</h2>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div style = "max-width:35%; margin-left:20%; text-align: center; " >
|
||||
<form method ='post' enctype ="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<br>
|
||||
<input class="fancybutton2" type = "file" multiple="multiple"
|
||||
name = "uploadfiles" id="uploadfiles" />
|
||||
<br><br><br>
|
||||
<button class="fancybutton2" style="padding: 0.5em 25px; margin-left: 155px" type = "submit" value = "Upload" >
|
||||
Upload
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div style = "max-width:29%; margin-left:20%; text-align: left" >
|
||||
{% if filesaved %}
|
||||
<p>
|
||||
<b>File(s) saved as <br>
|
||||
{% for f in actual_saved %}
|
||||
<em>{{f}}</em> <br>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<strong style="font-size: 110%;">Files:</strong><br>
|
||||
{% for f in files %}
|
||||
<a href="{{urlfile|urlencode}}/{{f|urlencode}}">{{f}}</a><br />
|
||||
{% empty %}
|
||||
<p><No files here>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
<p><strong style="font-size: 110%;">Photographer Directories:</strong><br>
|
||||
{% if folder %}
|
||||
<a href="{{urldir}}/..">[up]</a><br />
|
||||
{% endif %}
|
||||
{% for f in dirs %}
|
||||
<a href="{{urldir}}/{{f}}">/{{f}}/</a><br />
|
||||
{% empty %}
|
||||
<p><No subdirectories>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if folder %}
|
||||
<p>You can upload your photographs here.
|
||||
<p>You cannot create sub-folders here.
|
||||
<p>Note that only photo image files are accepted: all other types of files are refused.
|
||||
{% else %}
|
||||
<p>You can upload your photographs to any of these folders, and you can create a new folder in your name for your photos.
|
||||
<p>Note that only photo image files are accepted: all other types of files are refused.
|
||||
<hr>
|
||||
<h2>Create new Photographer folder in /photos/{{year}}/</h2>
|
||||
|
||||
|
||||
|
||||
<div style = "max-width:35%; margin-left:20%; text-align: center; " >
|
||||
<form method ='post'>
|
||||
{% csrf_token %}
|
||||
<br>
|
||||
<input class="fancybutton2" style="padding: 0.5em 25px; margin-left: 125px"
|
||||
label = "Photographer" name = "photographer" id="photographer"
|
||||
pattern="[A-Za-z]+"
|
||||
placeholder="{{placeholder}}" required />
|
||||
<label
|
||||
style="padding: 0.5em 25px; margin-left: 110px"
|
||||
for="photographer">Photographer's name<br></label>
|
||||
<label
|
||||
style="padding: 0.5em 25px; margin-left: 110px"
|
||||
for="photographer">(no spaces, only letters)</label>
|
||||
<br><br><br>
|
||||
<button class="fancybutton2" style="padding: 0.5em 25px; margin-left: 155px" type = "submit" value = "Create" >
|
||||
Create folder
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<p>
|
||||
|
||||
{% endif %}
|
||||
<hr />
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user