2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-12-01 14:21:52 +00:00
troggle/templates/walletform.html

197 lines
7.7 KiB
HTML
Raw Normal View History

{% extends "base.html" %}
{% block title %}Simple Fileupload{% endblock %}
{% block content %}
2022-07-17 13:00:37 +01:00
{% if user.username %}
<h2>Wallet {{wallet}} - edit settings or upload a file</h2>
{% else %}
<h2>Wallet {{wallet}}</h2>
{% endif %}
2021-04-30 03:44:53 +01:00
<p style="font-family: monospace; font-weight: bold; font-size: 130%; text-align: center">
<a style="font-weight: normal;" href="/scanupload/{{prevy}}:01">{{prevy}}</a>
&nbsp;...&nbsp;
<a href="/scanupload/{{year}}:{{prev}}">{{year}}:{{prev}}</a>
&larr; {{wallet}} &rarr;
<a href="/scanupload/{{year}}:{{next}}">{{year}}:{{next}}</a>
&nbsp;...&nbsp;
<a style="font-weight: normal;" href="/scanupload/{{nexty}}:01">{{nexty}}</a>
</p>
2021-05-01 18:35:08 +01:00
<div style = "max-width:35%; margin-left:20%; text-align: center; " >
<form method ='post' enctype ="multipart/form-data">
{% csrf_token %}
<br>{% if user.username %}
2021-05-01 18:35:08 +01:00
<input class="fancybutton" type = "file" multiple="multiple"
2021-05-04 20:56:44 +01:00
name = "uploadfiles" id="uploadfiles" />
2021-05-01 18:35:08 +01:00
<br><br><br>
<button class="fancybutton" style="padding: 0.5em 25px; margin-left: 155px" type = "submit" value = "Upload" >
Upload
</button>
{% endif %}
</form>
2021-05-01 18:35:08 +01:00
</div>
<div style = "max-width:29%; margin-left:20%; text-align: left" >
2021-04-30 18:02:05 +01:00
{% if filesaved %}
2021-05-01 18:35:08 +01:00
<p>
<b>File(s) saved as <br>
2021-04-30 18:02:05 +01:00
{% for f in actual_saved %}
<em>{{f}}</em> <br></b>
2021-04-30 18:02:05 +01:00
{% endfor %}
</p>
{% endif %}
2021-04-30 03:44:53 +01:00
2021-05-01 18:35:08 +01:00
<p>
2021-04-30 03:44:53 +01:00
{% for f in files %}
<a href="/expofiles/surveyscans/{{year}}/{{wallet|urlencode}}/{{f}}">{{ f}}</a><br />
{% empty %}
2022-07-17 13:00:37 +01:00
<p>&lt;No files in this wallet.&gt;
2021-04-30 03:44:53 +01:00
{% endfor %}
</p>
{% if create %}
This online wallet does not yet exist.
2022-07-17 14:07:27 +01:00
{% if user.username %}
<br>It will be created and initialised automatically when you upload a file.
{% else %}
<br>It will be created and initialised automatically when you upload a file, but you need to log on first.
{% endif %}
{% endif %}
<p><em>
2022-08-01 15:32:35 +01:00
<a href="/wallets/year/{{year}}">Wallet index for this year</a>
2022-03-18 12:26:32 +00:00
<br />
2022-07-17 13:00:37 +01:00
<a href="/expedition/{{year}}">Logbook entries, people, Survex files for {{year}}</a>
</em>
2022-07-17 13:00:37 +01:00
</div>
2022-07-17 13:00:37 +01:00
{% if complaints %}
<h3 style="text-align: left; color: red">Complaints</h3>
<ul style="list-style-type: disc; color: red">
{% for cmp in complaints%}
<li>{{cmp}}
{% endfor %}
</ul>
{% if user.username %}
{% else %}
<p>You will need to log in to the website (top right menu bar) to be able to edit the settings on this wallet.
{% endif %}
{% endif %}
<hr />
2022-03-18 11:28:35 +00:00
{% if not create %}
<br>
<span style="font-family: monospace; font-size: 150%; ">
2022-07-17 13:00:37 +01:00
{% if cave %}<u>Cave ID</u>:
{% if caveobject %}<b>{{cave}}</b></a> which implies "<a href="/{{caveobject.url}}">{{caveobject}}</a>"<br>
{% else %}
<b>{{cave}}</b><br>
{% endif %}
{% endif %}
2022-03-18 11:28:35 +00:00
{% if psg %}<u>Survey area</u>: <b>{{psg}}</b><br>{% endif %}
{% if svxfiles %}<u>Survey files</u>:
{% for svx in svxfiles%}
<a href="/survexfile/{{svx}}">{{svx}}</a>
{% endfor %}
2022-03-17 00:41:29 +00:00
2022-03-18 11:28:35 +00:00
<br><br>
{% endif %}
</span>
<span style="font-family: monospace; font-size: 130%; ">
<!--
<table style="border: 1px; border-style: hidden;>
{% for d, value in waldata.items %}
<tr style="border-style: hidden;">
<td style="border-style: hidden; padding-right: 3em;">{{d}}</td>
2022-03-17 00:41:29 +00:00
2022-03-18 11:28:35 +00:00
<td> <b>{{value}}</b></td>
2022-03-17 00:41:29 +00:00
2022-03-18 11:28:35 +00:00
</tr>
{% empty %}
<p>&lt;No JSON data here&gt;
{% endfor %}
</table>
-->
</span>
<style>
input {font-family: monospace; font-weight: bold; font-size: 100%; padding: 0.5em; }
</style>
<div style = "max-width:100%; margin-left:15%; font-family: monospace; font-weight: bold; font-size: 150%; text-align: right; " >
<form method ='post'>
{% csrf_token %}
<label for="date">Date of the survey trip</label>
<input
label = "Date" name = "date" size="12"
title="Date of the trip in ISO format: 2020-08-17"
placeholder="{{date}}" value="{{date}}" required />
<br>
2022-07-31 17:33:14 +01:00
<label for="cave">Cave ID (only needed if no survex file yet)</label>
2022-03-18 11:28:35 +00:00
<input
label = "Cave" name = "cave" size="12"
title="Cave id e.g. 2017-DM-01 or 1623/256"
placeholder="{{cave}}" value="{{cave}}" />
<br>
<label for="psg">Survey area</label>
<input
label = "Survey area" name = "psg" size ="{{psgsize}}"
title="Survey area, e.g. White Elephant or Nieder Augst Eck"
placeholder="{{psg}}" value="{{psg}}" />
<br>
<label for="plannr">Plan not required ?</label>
<input type="checkbox" name="plannr" id="plannr" value=" True" {% if "plan not required" in checked %}checked{% endif %}>
<br>
<label for="elevnr">Elevation not required ?</label>
<input type="checkbox" name="elevnr" id="elevnr" value="True" {% if "elev not required" in checked %}checked{% endif %}>
<br>
2022-07-17 13:00:37 +01:00
<label for="survexnr">Survex file not required ?</label>
<input type="checkbox" name="survexnr" id="survexnr" value="True" {% if "survex not required" in checked %}checked{% endif %}>
2022-03-18 11:28:35 +00:00
<br>
<label for="pland">Plan drawn ?</label>
<input type="checkbox" name="pland" id="pland" value="True" {{chkpland}} {% if "plan drawn" in checked %}checked{% endif %}>
<br>
<label for="elevd">Elevation drawn ?</label>
<input type="checkbox" name="elevd" id="elevd" value="True" {% if "elev drawn" in checked %}checked{% endif %}>
<br>
2022-08-01 00:50:19 +01:00
<label for="descriptionw">Cave description written (or nothing recorded) ?</label>
2022-03-18 11:28:35 +00:00
<input type="checkbox" name="descriptionw" id="descriptionw" value="True" {% if "description written" in checked %}checked{% endif %}>
<br>
2022-08-01 00:50:19 +01:00
<label for="qmsw">QMs written (or none seen) ?</label>
2022-03-18 11:28:35 +00:00
<input type="checkbox" name="qmsw" id="qmsw" value="True" {% if "qms written" in checked %}checked{% endif %}>
<br>
<label for="websiteupt">Website updated ?</label>
<input type="checkbox" name="websiteupt" id="websiteupt" value="True" {% if "website updated" in checked %}checked{% endif %}>
<br>
<label for="electronic">Electronic survey ?</label>
<input type="checkbox" name="electronic" id="electronic" value="True" {% if "electronic survey" in checked %}checked{% endif %}>
<br>
<label for="people">List of people on the survey trip</label>
<input
label = "People" name = "people" size ="{{peoplesize}}"
title="List of people on the survey trip"
placeholder="{{people}}" value="{{people}}" />
<br>
2022-07-31 17:33:14 +01:00
<label for="url">URL of survey area (only needed if not a cave)</label>
2022-03-18 11:28:35 +00:00
<input
label = "URL" name = "url" size ="{{urlsize}}"
title="URL of cave description, e.g. /1623/264/264.html"
placeholder="{{url}}" value="{{url}}" />
<br>
<label for="survex">List of survex files</label>
<input
label = "survex" name = "survex" size ="{{survexsize}}"
title="List of survex files using this data"
placeholder="{{survex}}" value="{{survex}}" />
<br><br>{% if user.username %}
2022-03-18 11:28:35 +00:00
<button class="fancybutton" style="padding: 0.5em 25px; margin-left: 155px; font-size: 90%; "
type = "submit" value = "Edit" >
Submit changes
</button>{% endif %}
2022-03-18 11:28:35 +00:00
</form>
</div>
{% endif %} <!-- not create -->
{% endblock %}