summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-02-01 21:31:07 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2023-02-01 21:31:07 +0000
commit5798e8dcd507bc30c12bca7efa92185772bf0eee (patch)
tree9979281d3ca19151c0b5229d67b7d0e5a8ccfb47 /templates
parent5ae37eef8251fd9aa709f50658dc5ed26c19e1aa (diff)
downloadtroggle-5798e8dcd507bc30c12bca7efa92185772bf0eee.tar.gz
troggle-5798e8dcd507bc30c12bca7efa92185772bf0eee.tar.bz2
troggle-5798e8dcd507bc30c12bca7efa92185772bf0eee.zip
make nav cope with missing wallets
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html2
-rw-r--r--templates/wallet_new.html2
-rw-r--r--templates/walletform.html37
3 files changed, 25 insertions, 16 deletions
diff --git a/templates/base.html b/templates/base.html
index 377fa24..96c68fb 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -32,7 +32,7 @@
<a href="/survexfile/">Survex</a> |
<a href="{% url "survexcaveslist" %}">All Survex</a> |
<a href="{% url "allscans" %}">Scans</a> |
- <a href="{% url "walletedit" '0000:01' %}">Upload Scans</a> |
+ <a href="{% url "walletedit" '/' %}">Upload Scans</a> |
<a href="{% url "dwgallfiles" %}">Drawings</a> |
<a href="{% url "dwgupload" %}">Upload Drawings</a> |
<a href="{% url "photoupload" %}">Upload Photos</a> |
diff --git a/templates/wallet_new.html b/templates/wallet_new.html
index 4b41e56..619e025 100644
--- a/templates/wallet_new.html
+++ b/templates/wallet_new.html
@@ -6,7 +6,7 @@ Upload the survexfile using e.g.
(for a survex file for cave 1623-290). You will cut and paste the survex file data into the window on the form.
-<p>While still logged-in, go to this page <a href="/walletedit/0000:00">Create Wallet</a> which will take you to the next unused wallet number page, and click the 'Create' button. This will not actually complete
+<p>While still logged-in, go to this page <a href="/walletedit/">Create Wallet</a> which will take you to the next unused wallet number page, and click the 'Create' button. This will not actually complete
the creation of the wallet until you have also set the date for the wallet in the wallet edit form (which will appear when you press 'Create').
<p>
While editing the wallet you should enter in the form the url of the survexfile which you have just created at e.g. <a href="/survexfile/caves-1623/290/mynewsurvex.svx">/survexfile/caves-1623/290/mynewsurvex.svx</a> (see above).
diff --git a/templates/walletform.html b/templates/walletform.html
index 871a895..fb0ecdd 100644
--- a/templates/walletform.html
+++ b/templates/walletform.html
@@ -5,7 +5,13 @@
{% block content %}
{% if user.username %}
-<h2>Wallet {{wallet}} - edit settings or upload a file</h2>
+ {% if not create %}
+ <h2>Wallet {{wallet}} - edit settings or upload a file</h2>
+ {% else %}
+ <h2>Wallet {{wallet}} - Create a new Wallet</h2>
+ {% endif %}
+</button>
+
{% else %}
<h2>Wallet {{wallet}}</h2>
{% endif %}
@@ -63,24 +69,27 @@
</p>
{% endif %}
-<p>
-{% for f in files %}
-<a href="/expofiles/surveyscans/{{year}}/{{wallet|urlencode}}/{{f}}">{{ f}}</a><br />
- {% empty %}
- <p>&lt;No files in this wallet. &gt;
-
-{% endfor %}
-<ul>
-{% for d in dirs %}
- <a href="/expofiles/surveyscans/{{year}}/{{wallet|urlencode}}/{{d}}"><em>{{d}}</em></a><br />
-{% endfor %}
-</ul>
+{% if not create %}
+ <p>
+ {% for f in files %}
+ <a href="/expofiles/surveyscans/{{year}}/{{wallet|urlencode}}/{{f}}">{{ f}}</a><br />
+ {% empty %}
+ <p>&lt;No files in this wallet. &gt;
+
+ {% endfor %}
+ <ul>
+ {% for d in dirs %}
+ <a href="/expofiles/surveyscans/{{year}}/{{wallet|urlencode}}/{{d}}"><em>{{d}}</em></a><br />
+ {% endfor %}
+ </ul>
+{% endif %}
+
</div>
</p>
{% if create %}
This online wallet does not yet exist.
{% if user.username %}
- <br><br>It will be created when you click the Create button, <em>and then edit the date in the form below and save it</em>.
+ <br><br>It will be created when you click the Create button, <em>and then edit the date in the form and save it</em>.
{% else %}
<br><br>To create a wallet, you need to <a href=/accounts/login/>Log In </a> first and then return to this page.
{% endif %}