summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/controlPanel.html43
-rw-r--r--templates/logbook2005style.html26
-rw-r--r--templates/logbook2008style.txt6
3 files changed, 73 insertions, 2 deletions
diff --git a/templates/controlPanel.html b/templates/controlPanel.html
index 49725e1..efaee62 100644
--- a/templates/controlPanel.html
+++ b/templates/controlPanel.html
@@ -32,9 +32,9 @@
<h3>Import (non-destructive):</h3>
<form name="import" method="post" action="">
<table>
+<tr><td>people from folk.csv using parsers\people.py</td><td><input type="checkbox" name="import_people"/></td></tr>
<tr><td>caves from cavetab2.csv using parsers\cavetab.py</td><td> <input type="checkbox" class="parser" name="import_cavetab"/></td></tr>
<tr><td>logbook entries using parsers\logbooks.py</td><td><input type="checkbox" name="import_logbooks"/></td></tr>
-<tr><td>people from folk.csv using parsers\people.py</td><td><input type="checkbox" name="import_people"/></td></tr>
<tr><td>QMs using parsers\QMs.py</td><td><input type="checkbox" name="import_QMs" /></td></tr>
<tr><td>survey scans using parsers\surveys.py</td><td><input type="checkbox" name="import_surveys" /></td></tr>
<tr><td>survex data using parsers\survex.py</td><td><input type="checkbox" name="import_survex" /></td></tr>
@@ -50,8 +50,13 @@
</form>
-<h3>Export to csv:</h3>
+<h3>Export to legacy formats:</h3>
<table>
+
+<th>
+ <td>Export onto server</td>
+ <td>Export and Download</td>
+</th>
<tr>
<td>
caves to cavetab2.csv
@@ -75,6 +80,40 @@
surveys to Surveys.csv
</td>
<td>
+
+ </td>
+ <td>
+ <form name="export" method="get" action={% url downloadlogbook %}>
+ <p>Download a logbook file which is dynamically generated by Troggle.</p>
+
+ <p>
+ Expedition year:
+ <select name="year">
+ {% for expedition in expeditions %}
+ <option value="{{expedition}}"> {{expedition}} </option>
+ {% endfor %}
+ </select>
+ </p>
+
+ <p>
+ Output style:
+ <select name="extension">
+ <option value="txt">.txt file with MediaWiki markup - 2008 style</option>
+ <option value="html">.html file - 2005 style</option>
+ </select>
+ </p>
+ <p>
+ <input name="download_logbook" type="submit" value="Download logbook" />
+ </p>
+ </form>
+ </td>
+</tr>
+
+<tr>
+ <td>
+ surveys to Surveys.csv
+ </td>
+ <td>
<form name="export" method="post" action="">
<p>Overwrite the existing Surveys.csv file with one generated by Troggle.</p>
<input disabled name="export_surveys" type="submit" value="Update {{settings.SURVEYS}}noinfo/Surveys.csv" />
diff --git a/templates/logbook2005style.html b/templates/logbook2005style.html
new file mode 100644
index 0000000..39205f1
--- /dev/null
+++ b/templates/logbook2005style.html
@@ -0,0 +1,26 @@
+<html>
+<head><title>{{logbook_entries.0.expedition}} Expo Logbook</title></head>
+<link rel="stylesheet" type="text/css" href="../../css/main2.css" />
+<style type="text/css">
+.tripdate { float: left;}
+.trippeople { float: right;}
+.triptitle { font-size: 120%; text-align: center; font-weight: bold; clear: both }
+.timeug { text-align: right; font-weight: bold }
+p { clear: both }
+</style>
+<body>
+
+<h1>Expo {{logbook_entries.0.expedition}}</h1>
+
+{%for logbook_entry in logbook_entries%}
+<hr />
+
+<div class="tripdate" id="t{{logbook_entry.date}}A">{{logbook_entry.date}}</div>
+<div class="trippeople"><u>{{logbook_entry.author.person}}</u>
+{% for persontrip in logbook_entry.persontrip_set.all %}{{ persontrip.person_expedition.person }} {{ persontrip.person_expedition.time_underground }}, {% endfor %}
+</div>
+
+<div class="triptitle">{{logbook_entry.place}} - {{logbook_entry.title}}</div>
+
+{{logbook_entry.text|safe}}
+{% endfor %}
diff --git a/templates/logbook2008style.txt b/templates/logbook2008style.txt
new file mode 100644
index 0000000..a7fbea7
--- /dev/null
+++ b/templates/logbook2008style.txt
@@ -0,0 +1,6 @@
+=Expo {{logbook_entries.0.expedition}} logbook ==
+{%for logbook_entry in logbook_entries%}
+==={{logbook_entry.date}} | {{logbook_entry.place}} - {{logbook_entry.title}} | {% for persontrip in logbook_entry.persontrip_set.all %}{{ persontrip.person_expedition.person }} {{ persontrip.person_expedition.time_underground }}, {% endfor %}===
+
+{{logbook_entry.text|safe}}
+{% endfor %} \ No newline at end of file