diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 5 | ||||
-rw-r--r-- | templates/gpxuploadform.html | 101 |
2 files changed, 104 insertions, 2 deletions
diff --git a/templates/base.html b/templates/base.html index 79312da..7e7cdf8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -37,8 +37,8 @@ <div class="toolbarlinks"> {% endif %} <a href="/logbookedit/">Logbook Entry</a> | - <a href="/1626/359/359.html">359 (HC)</a> | - <a id="cavesLink" href="/caves">caves</a> | + <!--<a href="/1626/359/359.html">359 (HC)</a> |--> + <a id="cavesLink" href="/caves">Caves</a> | <a id="qmsLink" href="{% url "caveQMs" "1623-290" %}">QMs</a> | <a href="/survexfile/">Survex</a> | <a href="{% url "survexcaveslist" %}">All Survex</a> | @@ -47,6 +47,7 @@ <a href="{% url "dwgallfiles" %}">Drawings</a> | <a href="{% url "dwgupload" %}">Upload Drawings</a> | <a href="{% url "photoupload" %}">Upload Photos</a> | + <a href="{% url "gpxupload" %}">Upload GPX</a> | <br> diff --git a/templates/gpxuploadform.html b/templates/gpxuploadform.html new file mode 100644 index 0000000..513f2f0 --- /dev/null +++ b/templates/gpxuploadform.html @@ -0,0 +1,101 @@ +{% extends "base.html" %} + +{% block title %}Simple Fileupload (GPX files){% endblock %} + +{% block content %} + + +{% if folder %} +<h2>Upload GPX files into /gpslogs/{{folder}}/</h2> +{% else %} +<h2>Upload GPX files into /gpslogs/{{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> + <input class="fancybutton2" style="padding: 0.5em 25px; margin-left: 125px" + label = "Rename to" name = "renameto" id="renameto" + pattern="[A-Za-z][A-Za-z0-9_-\.]*"/> + <br /> + <label + style="padding: 0.5em 25px; margin-left: 110px" + for="renameto">If uploading a single file, you can rename it<br></label> + <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%;">Prospector 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 GPX tracks here. +<p>You cannot create sub-folders here. +<p>Note that only GPX files are accepted: all other types of files are refused. +{% else %} +<p>You can upload your GPX tracks to any of these folders, and you can create a new folder in your name for your gpslogs. +<p>Note that only GPX files are accepted: all other types of files are refused. +<hr> +<h2>Create new prospector folder in /gpslogs/{{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 = "prospector" name = "prospector" id="prospector" + pattern="[A-Za-z]+" + placeholder="{{placeholder}}" required /> + <label + style="padding: 0.5em 25px; margin-left: 110px" + for="prospector">prospector's name<br></label> + <label + style="padding: 0.5em 25px; margin-left: 110px" + for="prospector">(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 %}
\ No newline at end of file |