diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-02-01 21:31:07 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-02-01 21:31:07 +0000 |
commit | 5798e8dcd507bc30c12bca7efa92185772bf0eee (patch) | |
tree | 9979281d3ca19151c0b5229d67b7d0e5a8ccfb47 /templates/walletform.html | |
parent | 5ae37eef8251fd9aa709f50658dc5ed26c19e1aa (diff) | |
download | troggle-5798e8dcd507bc30c12bca7efa92185772bf0eee.tar.gz troggle-5798e8dcd507bc30c12bca7efa92185772bf0eee.tar.bz2 troggle-5798e8dcd507bc30c12bca7efa92185772bf0eee.zip |
make nav cope with missing wallets
Diffstat (limited to 'templates/walletform.html')
-rw-r--r-- | templates/walletform.html | 37 |
1 files changed, 23 insertions, 14 deletions
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><No files in this wallet. > - -{% 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><No files in this wallet. > + + {% 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 %} |