summaryrefslogtreecommitdiffstats
path: root/templates/controlPanel.html
blob: 41c9409afa0206b6678c171ec7b0943cbc0e9c8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
{% extends "base.html" %}
{% block content %}

{% if jobs_completed %}
    <div class="noticeBox">
            Just finished running:
                <ul>
                {% for job in jobs_completed %}
                    <li>{{ job }}</li>
                {% endfor %}
                </ul>
            {% if settings.LOGFILE %}See the logfile at {{settings.LOGFILE}} for more information.{% endif %}
            <a href="#" class="closeDiv">dismiss this message</a>
    </div>
{% endif %}

{% if error %}
    <div class="noticeBox">
			{{ error }}
            <a href="#" class="closeDiv">dismiss this message</a>
    </div>
{% endif %}


<form name="reset" method="post" action="">
    <h3>Wipe:</h3>
    <table>
        <tr>
            <td>Wipe entire database and recreate tables: </td>
            <td><input type="checkbox" name="reload_db" /></td>
            <td>
                <input type="submit" id="Import" value="I really want to delete all information in troggle, and accept all responsibility.">
            </td>
        </tr>
    </table>
</form>
<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>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>
    </table>
    <p>
      <input type="submit" id="Import" value="Import">
      
      <input type="submit" name="check_all_import" id="check_all_import" value="Check all" disabled >
    </p>
</form>


<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
    </td>
  	<td>
        <form name="export" method="post" action="">
        	<p>Overwrite the existing CAVETAB2.CSV file with one generated by Troggle.</p>
            <input name="export_cavetab" type="submit" value="Update {{settings.EXPOWEB}}noinfo/CAVETAB2.CSV" />
        </form>
    </td>
    <td>
        <form name="export" method="get" action="{% url "downloadcavetab" %}">
        	<p>Download a CAVETAB2.CSV file which is dynamically generated by Troggle.</p>
            <input name="download_cavetab" type="submit" value="Download CAVETAB2.CSV" />
        </form>
	</td>        
</tr>

<tr>
  	<td>
    	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" />
        </form>
    </td>
    <td>
        <form name="export" method="get" action={% url "downloadsurveys" %}>
        	<p>Download a Surveys.csv file which is dynamically generated by Troggle.</p>
            <input disabled name="download_surveys" type="submit" value="Download Surveys.csv" />
        </form>
	</td>        
</tr>
  
<tr>
  <td>qms to qms.csv</td><td>
  	<form name="export_qms" method="get" action="downloadqms">
		
<!--This is for choosing caves by area (drilldown).

        <select id="qmcaveareachooser" class="searchable" >
        </select>
        
        -->

		Choose a cave.
        <select name="cave_id" id="qmcavechooser">
        
            {% for cave in caves %}
            <option value="{{cave.kataster_number}}">{{cave}}
            </option>    	
            {% endfor %}
    
        </select>

        <input type="submit" value="Download"/>
    </form>
  </td></tr>  
</table>
</form>

{% endblock %}