From 4aa801634f84f3c438d872d5ceb096b3d7cb69c6 Mon Sep 17 00:00:00 2001 From: Pierrick C Date: Sun, 1 Oct 2017 09:05:50 +0200 Subject: [PATCH] =?UTF-8?q?Renommage=20des=20templates=20Jinja=20pour=20pl?= =?UTF-8?q?us=20de=20claret=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/{base.html => base.html.j2} | 0 .../{config_page.html => config_page.html.j2} | 2 +- .../templates/data_graph.html.j2 | 46 ++++++++++ cameteo-interface/templates/data_viz.html | 85 ------------------- cameteo-interface/templates/data_viz.html.j2 | 37 ++++++++ .../templates/{index.html => index.html.j2} | 2 +- cameteo-interface/templates/index2.html | 14 --- cameteo-interface/templates/photos.html.j2 | 14 +++ 8 files changed, 99 insertions(+), 101 deletions(-) rename cameteo-interface/templates/{base.html => base.html.j2} (100%) rename cameteo-interface/templates/{config_page.html => config_page.html.j2} (71%) create mode 100644 cameteo-interface/templates/data_graph.html.j2 delete mode 100644 cameteo-interface/templates/data_viz.html create mode 100644 cameteo-interface/templates/data_viz.html.j2 rename cameteo-interface/templates/{index.html => index.html.j2} (91%) delete mode 100644 cameteo-interface/templates/index2.html create mode 100644 cameteo-interface/templates/photos.html.j2 diff --git a/cameteo-interface/templates/base.html b/cameteo-interface/templates/base.html.j2 similarity index 100% rename from cameteo-interface/templates/base.html rename to cameteo-interface/templates/base.html.j2 diff --git a/cameteo-interface/templates/config_page.html b/cameteo-interface/templates/config_page.html.j2 similarity index 71% rename from cameteo-interface/templates/config_page.html rename to cameteo-interface/templates/config_page.html.j2 index 2c80d38..cb64e99 100644 --- a/cameteo-interface/templates/config_page.html +++ b/cameteo-interface/templates/config_page.html.j2 @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base.tpl" %} {% block title %}Camétéo{% endblock %} {% block content %} diff --git a/cameteo-interface/templates/data_graph.html.j2 b/cameteo-interface/templates/data_graph.html.j2 new file mode 100644 index 0000000..6a4552a --- /dev/null +++ b/cameteo-interface/templates/data_graph.html.j2 @@ -0,0 +1,46 @@ +{% extends "base.tpl" %} +{% block title %}Camétéo{% endblock %} + +{% block styles %} + {{super()}} + {{ css_ressources }} + {{ js_ressources }} +{% endblock %} + +{% block content %} +{% from "bootstrap/pagination.html" import render_pagination %} +
+ {{ plot_div|safe }} +
+ {{ render_pagination(dat) }} +
+ + + + + + + + + + + {% for item in dat.items -%} + {% if item.value is number %} + + {% else %} + + {% endif %} + + + + + + {%- endfor %} + +
Date/HeureTypeValeurCapteur
{{ item.valdate }}{{ item.type_id }}{{ item.value }} {{ item.unit }}{{ item.sensor_id }}
+ {{ render_pagination(dat) }} +
+
+{{ plot_script|safe }} + +{% endblock %} \ No newline at end of file diff --git a/cameteo-interface/templates/data_viz.html b/cameteo-interface/templates/data_viz.html deleted file mode 100644 index 30a224c..0000000 --- a/cameteo-interface/templates/data_viz.html +++ /dev/null @@ -1,85 +0,0 @@ -{% extends "base.html" %} -{% block title %}Camétéo{% endblock %} - -{% block styles %} - {{super()}} - - -{% endblock %} - -{% block content %} -{% from "bootstrap/pagination.html" import render_pagination %} -
-
- {{ render_pagination(dat) }} -
- - - - - - - - - - {% for item in dat.items -%} - {% if item.value is number %} - - {% else %} - - {% endif %} - {%- endfor %} - -
Date/HeureValeurCapteur
{{ item.valdate }}{{ item.value }} {{ item.unit }}{{ item.sensor_id }}
{{ item.valdate }}{{ item.value }}{{ item.sensor_id }}
- {{ render_pagination(dat) }} -
-
- -{% endblock %} \ No newline at end of file diff --git a/cameteo-interface/templates/data_viz.html.j2 b/cameteo-interface/templates/data_viz.html.j2 new file mode 100644 index 0000000..dc70781 --- /dev/null +++ b/cameteo-interface/templates/data_viz.html.j2 @@ -0,0 +1,37 @@ +{% extends "base.tpl" %} +{% block title %}Camétéo{% endblock %} + +{% block content %} +{% from "bootstrap/pagination.html" import render_pagination %} +
+
+ {{ render_pagination(dat) }} +
+ + + + + + + + + + + {% for item in dat.items -%} + {% if item.value is number %} + + {% else %} + + {% endif %} + + + + + + {%- endfor %} + +
Date/HeureTypeValeurCapteur
{{ item.valdate }}{{ item.type_id }}{{ item.value }} {{ item.unit }}{{ item.sensor_id }}
+ {{ render_pagination(dat) }} +
+
+{% endblock %} \ No newline at end of file diff --git a/cameteo-interface/templates/index.html b/cameteo-interface/templates/index.html.j2 similarity index 91% rename from cameteo-interface/templates/index.html rename to cameteo-interface/templates/index.html.j2 index 2631881..55be6dd 100644 --- a/cameteo-interface/templates/index.html +++ b/cameteo-interface/templates/index.html.j2 @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base.tpl" %} {% block title %}Camétéo{% endblock %} {% block content %} diff --git a/cameteo-interface/templates/index2.html b/cameteo-interface/templates/index2.html deleted file mode 100644 index 2631881..0000000 --- a/cameteo-interface/templates/index2.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base.html" %} -{% block title %}Camétéo{% endblock %} - -{% block content %} - -
-
-

Bienvenue !

-

Camétéo est un projet de prise de mesures et de photos pour documenter - des activités d'extérieurs (randonnées, jardin...).

-

Voir les données...

-
-
-{% endblock %} \ No newline at end of file diff --git a/cameteo-interface/templates/photos.html.j2 b/cameteo-interface/templates/photos.html.j2 new file mode 100644 index 0000000..f7fa1cb --- /dev/null +++ b/cameteo-interface/templates/photos.html.j2 @@ -0,0 +1,14 @@ +{% extends "base.tpl" %} +{% block title %}Camétéo - Photos{% endblock %} + +{% block content %} + +
+
+

Photo précédente{% if numero > 0 %} | Photo suivante{% endif %}

+

Dernière photo prise

+

Télécharger la photo

+

+
+ +{% endblock %} \ No newline at end of file