diff options
author | luxagraf <sng@luxagraf.net> | 2021-08-15 14:22:06 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2021-08-15 14:22:06 -0400 |
commit | 72eb519132eb5437dfc3aafeb29446cff4df40d6 (patch) | |
tree | 0f2ea8fd4ed4962211310155af8b6e7734edbd55 | |
parent | 110c0517b808e9af77b3d105f1aefef7135b0b06 (diff) |
plan: added map for vizualizing
-rw-r--r-- | app/planner/templates/planner/list.html | 3 | ||||
-rw-r--r-- | app/planner/templates/planner/update_form.html | 42 |
2 files changed, 45 insertions, 0 deletions
diff --git a/app/planner/templates/planner/list.html b/app/planner/templates/planner/list.html index 7658352..8575d4a 100644 --- a/app/planner/templates/planner/list.html +++ b/app/planner/templates/planner/list.html @@ -16,4 +16,7 @@ {% if object.has_electric %}<li class="water">electric</li>{% endif %} </article>{% endfor %} </div> +<div class="map"> + <iframe src="https://www.google.com/maps" width="100%" height="90%" frameborder="0" style="border:0" allowfullscreen></iframe> +</div> {% endblock %} diff --git a/app/planner/templates/planner/update_form.html b/app/planner/templates/planner/update_form.html new file mode 100644 index 0000000..18a335c --- /dev/null +++ b/app/planner/templates/planner/update_form.html @@ -0,0 +1,42 @@ +{% extends 'planner/base.html' %} +{%block extrahead%}<link href="/media/mc-calendar.min.css" rel="stylesheet" />{%endblock%} +{% load typogrify_tags %} + {% block pagetitle %}Luxagraf - Add Camp{% endblock %} + {% block content %} + <form id="id_form" action="" method="post" class="big">{% csrf_token %} + {% for field in form %} + <fieldset> + {{ field.errors }} + {% if field.name == 'status'%} + <label class="hide" for="id_status">Status:</label>{{ field }} + {% else %} + {{ field.label_tag }} {{ field }} + {% endif %} + {% if field.help_text %} + <p class="help">{{ field.help_text|safe }}</p> + {% endif %} + </fieldset> +{% endfor %} + <div class="flex"> + <input type="submit" name="post" class="btn" value="update camp"/> + </div> + </form> + {% endblock %} + + {% block js %} + +<script src="/media/js/mc-calendar.min.js"></script> + <script> +arrive = MCDatepicker.create({ + el: '#id_date_arrive', + dateFormat: 'YYYY-MM-DD' +}); +depart = MCDatepicker.create({ + el: '#id_date_depart', + dateFormat: 'YYYY-MM-DD', +}); +arrive.onClose(() => depart.setYear(arrive.getYear())); +arrive.onClose(() => depart.setMonth(arrive.getMonth())); +arrive.onClose(() => depart.setDate(arrive.getDate())); +</script> +{% endblock %} |