diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/csrffaker.py | 9 | ||||
-rw-r--r-- | templates/dataformat/flatfile.html | 10 | ||||
-rw-r--r-- | templates/editfile.html | 96 | ||||
-rw-r--r-- | templates/editflatpage.html | 12 | ||||
-rw-r--r-- | templates/flatpage.html | 9 | ||||
-rw-r--r-- | templates/options.html | 3 |
6 files changed, 130 insertions, 9 deletions
diff --git a/templates/csrffaker.py b/templates/csrffaker.py deleted file mode 100644 index 86b1318..0000000 --- a/templates/csrffaker.py +++ /dev/null @@ -1,9 +0,0 @@ -import django -if django.VERSION[0] >=1 and django.VERSION[1] > 1: - pass -else: - from django import template - - register = template.Library() - @register.tag - def csrf_token(parser, token): return "" diff --git a/templates/dataformat/flatfile.html b/templates/dataformat/flatfile.html new file mode 100644 index 0000000..1ddb7a5 --- /dev/null +++ b/templates/dataformat/flatfile.html @@ -0,0 +1,10 @@ +{% autoescape off %} +<html> +<head> +{{ head }} +</head> +<body> +{{ form.html }} +</body> +</html> +{% endautoescape %} diff --git a/templates/editfile.html b/templates/editfile.html new file mode 100644 index 0000000..d3a29ec --- /dev/null +++ b/templates/editfile.html @@ -0,0 +1,96 @@ +{% extends "base.html" %}
+{% load csrffaker %}
+{% block title %}File{% endblock %}
+{% block head %}
+<script>
+ $(function() {
+ $("#id_date").datepicker({dateFormat: "yy-mm-dd"});
+ $("#id_cave").change(function() {
+ $('#id_entrance').load('{% url get_entrances caveslug="" %}' + this.value);
+ });
+ $("#id_cave").change(function() {
+ $('#id_qm').load('{% url get_qms caveslug="" %}' + this.value);
+ });
+ $("#id_expedition").change(function() {
+ $('#id_logbookentry').load('{% url get_logbook_entries expeditionslug="" %}' + this.value);
+ });
+ $("#id_expedition").change(function() {
+ $('#id_person').load('{% url get_people expeditionslug="" %}' + this.value);
+ });
+ });
+
+</script>
+<link rel="stylesheet" href="{{ settings.MEDIA_URL }}css/ui-lightness/jquery-ui-1.8.12.custom.css" type="text/css" media="all" />
+<script src="{{ settings.MEDIA_URL }}js/jquery-ui-1.8.12.custom.min.js" type="text/javascript"></script>
+<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
+<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
+{{ fileForm.media }}
+{% endblock %}
+{% block content %}
+
+<form action="" method="post">{% csrf_token %}
+ {{ fileForm.non_field_errors }}
+ <div class="fieldWrapper">
+ {{ fileForm.title.errors }}
+ <label for="id_title">Title:</label>
+ {{ fileForm.title }}
+ </div>
+ <div class="fieldWrapper">
+ {{ fileForm.slug.errors }}
+ <label for="id_slug">Slug:</label>
+ {{ fileForm.slug }}
+ </div>
+ <div class="fieldWrapper">
+ {{ fileForm.date.errors }}
+ <label for="id_date">Date:</label>
+ {{ fileForm.date }}
+ </div>
+ <div class="fieldWrapper" id="lon_utm">
+ {{ fileForm.lon_utm.errors }}
+ <label for="id_lon_utm">Longitude:</label>
+ {{ fileForm.lon_utm }}
+ </div>
+ <div class="fieldWrapper" id="lat_utm">
+ {{ fileForm.lat_utm.errors }}
+ <label for="id_lat_utm">Latitude:</label>
+ {{ fileForm.lat_utm }}
+ </div>
+ <div class="fieldWrapper" id="cave">
+ {{ fileForm.cave.errors }}
+ <label for="id_cave">Cave:</label>
+ {{ fileForm.cave }}
+ </div>
+ <div class="fieldWrapper" id="entrance">
+ {{ fileForm.entrance.errors }}
+ <label for="id_entrance">Entrance:</label>
+ {{ fileForm.entrance }}
+ </div>
+ <div class="fieldWrapper" id="qm">
+ {{ fileForm.qm.errors }}
+ <label for="id_cavem">QM:</label>
+ {{ fileForm.qm }}
+ </div>
+ <div class="fieldWrapper" id="expedition">
+ {{ fileForm.expedition.errors }}
+ <label for="id_expediton">Expedition:</label>
+ {{ fileForm.expedition }}
+ </div>
+ <div class="fieldWrapper" id="logbookentry">
+ {{ fileForm.logbookentry.errors }}
+ <label for="id_logbookentry">Logbook Entry:</label>
+ {{ fileForm.logbookentry }}
+ </div>
+ <div class="fieldWrapper" id="person">
+ {{ fileForm.person.errors }}
+ <label for="id_expediton">Person:</label>
+ {{ fileForm.person }}
+ </div>
+ <div class="fieldWrapper">
+ {{ fileForm.html.errors }}
+ <label for="id_date">Content:</label>
+ {{ fileForm.html }}
+ </div>
+ <p><input type="submit" value="Sumbit Trip Report" /></p>
+</form>
+
+{% endblock %}
diff --git a/templates/editflatpage.html b/templates/editflatpage.html new file mode 100644 index 0000000..85a5bcc --- /dev/null +++ b/templates/editflatpage.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% block title %}Edit {{ path }}{% endblock %} +{% block head %} +{% load csrffaker %} +<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script> +{% endblock %} +{% block content %} +<form action="" method="post">{% csrf_token %} +{{form}} +<p><input type="submit" value="Submit" /></p> +</form> +{% endblock %} diff --git a/templates/flatpage.html b/templates/flatpage.html new file mode 100644 index 0000000..ef8c4ab --- /dev/null +++ b/templates/flatpage.html @@ -0,0 +1,9 @@ +<html> +<head> +{{ head|safe }} +</head> +<body> +{{ body|safe }} +{% if editable %}<a href="{% url editflatpage path %}">Edit</a>{% endif %} +</body> +</html> diff --git a/templates/options.html b/templates/options.html new file mode 100644 index 0000000..b1d3d97 --- /dev/null +++ b/templates/options.html @@ -0,0 +1,3 @@ +{% for value, text in items %} +<option value="{{value}}">{{text}}</option> +{% endfor %} |