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/home.html b/app/templates/home.html
index 1e035bd..d5826a8 100644
--- a/app/templates/home.html
+++ b/app/templates/home.html
@@ -20,7 +20,7 @@
{% else %}
No orders available.
{% if not current_user.is_anonymous() %}
- To create an order, fill in the form on the right.
+ To create an order, fill in the form here .
{% else %}
Login to create an order, or ask someone else.
{% endif %}
diff --git a/app/templates/layout.html b/app/templates/layout.html
index c30c12f..3baedf4 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 %}
@@ -51,7 +54,7 @@
{% if current_user.is_anonymous() %}
Login
{% else %}
- {{ current_user.username }}
+ {{ current_user.username }}
Logout
{% endif %}
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 -%}
-
-
-
+
+
-
+
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/app/templates/profile.html b/app/templates/profile.html
new file mode 100644
index 0000000..09a5891
--- /dev/null
+++ b/app/templates/profile.html
@@ -0,0 +1,6 @@
+{% extends "layout.html" -%}
+{% set active_page = "profile" -%}
+
+{% block container %}
+ {{ current_user.username }}
+{% endblock %}
diff --git a/app/views/__init__.py b/app/views/__init__.py
index 0a668fd..911b392 100644
--- a/app/views/__init__.py
+++ b/app/views/__init__.py
@@ -26,6 +26,11 @@ def about():
def stats():
return render_template('stats.html')
+@app.route('/profile/')
+@login_required
+def profile():
+ return render_template('profile.html')
+
if app.debug: # add route information
@app.route('/routes')
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