From 47d46223aae7485f72d2bf503a8def116b682034 Mon Sep 17 00:00:00 2001 From: Feliciaan De Palmenaer Date: Fri, 5 Jun 2015 11:29:14 +0200 Subject: [PATCH] Added print.css and updated requirements, GA --- app/static/css/print.css | 15 +++++++++++++++ app/templates/layout.html | 5 ++++- app/templates/order.html | 15 ++++++++------- requirements.txt | 19 +++++++++---------- 4 files changed, 36 insertions(+), 18 deletions(-) create mode 100644 app/static/css/print.css diff --git a/app/static/css/print.css b/app/static/css/print.css new file mode 100644 index 0000000..945bb21 --- /dev/null +++ b/app/static/css/print.css @@ -0,0 +1,15 @@ +@media print { + nav, form, footer, .btn, #form, #debts { + display: none; + } + #items { + display: flex; + } + #items-list { + order: 2; + } + #items-ordered { + order: 1; + margin-right: 50px; + } +} \ No newline at end of file diff --git a/app/templates/layout.html b/app/templates/layout.html index c30c12f..c35e6a5 100644 --- a/app/templates/layout.html +++ b/app/templates/layout.html @@ -1,5 +1,6 @@ {% extends "bootstrap/base.html" %} {% import "bootstrap/utils.html" as utils %} +{% import "bootstrap/google.html" as google %} {% set navbar = [ ('home', 'Home'), @@ -18,11 +19,13 @@ {% block styles %} {{ super() }} - + + {% endblock %} {% block scripts %} {{ super() }} + {{ google.uanalytics('UA-25444917-9') }} {% endblock %} diff --git a/app/templates/order.html b/app/templates/order.html index 0d9821c..3c98cfe 100644 --- a/app/templates/order.html +++ b/app/templates/order.html @@ -7,8 +7,8 @@ {% block container %}
-
-

Order {{ order.id }} +
+

Order {{ order.id }} {% if courier_or_admin -%} Close
Edit @@ -26,7 +26,7 @@ total price: {{ total_price|euro }} {% if courier_or_admin %}- remaining debts: {{ debts|euro }}{% endif %}

{% if form -%} -
+

Order:

{{ form.csrf_token }} @@ -49,8 +49,8 @@
{%- endif %}
-
-
+
+

Items

@@ -69,7 +69,7 @@
-
+

Ordered products:

{% for key, value in order.group_by_product().items() -%} {{ key }} - {{ value }}
@@ -77,7 +77,7 @@
-
+

Debts

@@ -102,6 +102,7 @@ {{ super() }} + {% endblock %} {% block scripts %} {{ super() }} diff --git a/requirements.txt b/requirements.txt index 060e0c7..29c7cb8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,17 @@ -certifi==14.5.14 Flask==0.10.1 -Flask-Admin==1.0.9 -Flask-Bootstrap==3.3.2.1 +Flask-Admin==1.1.0 +Flask-Bootstrap==3.3.4.1 Flask-Login==0.2.11 -Flask-OAuthlib==0.8.0 +Flask-OAuthlib==0.9.1 Flask-SQLAlchemy==2.0 -Flask-WTF==0.10.3 +Flask-WTF==0.11 Flask-Migrate==1.4.0 itsdangerous==0.24 -Jinja2==2.7.2 +Jinja2==2.7.3 MarkupSafe==0.23 oauthlib==0.7.2 PyMySQL==0.6.6 -requests==2.4.0 -SQLAlchemy==0.9.8 -Werkzeug==0.9.6 -WTForms==2.0 +requests==2.7.0 +SQLAlchemy==1.0.4 +Werkzeug==0.10.4 +WTForms==2.0.2