Added print.css and updated requirements, GA
This commit is contained in:
parent
586e2ca443
commit
47d46223aa
4 changed files with 36 additions and 18 deletions
15
app/static/css/print.css
Normal file
15
app/static/css/print.css
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
{% extends "bootstrap/base.html" %}
|
{% extends "bootstrap/base.html" %}
|
||||||
{% import "bootstrap/utils.html" as utils %}
|
{% import "bootstrap/utils.html" as utils %}
|
||||||
|
{% import "bootstrap/google.html" as google %}
|
||||||
|
|
||||||
{% set navbar = [
|
{% set navbar = [
|
||||||
('home', 'Home'),
|
('home', 'Home'),
|
||||||
|
@ -18,11 +19,13 @@
|
||||||
|
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}" media="screen">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/print.css') }}" media="print">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
|
{{ google.uanalytics('UA-25444917-9') }}
|
||||||
<script src="{{ url_for('static', filename='js/timer.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/timer.js') }}"></script>
|
||||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
|
|
||||||
{% block container %}
|
{% block container %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-push-1 col-md-10 darker"><!-- Shitty html-->
|
<div class="col-md-push-1 col-md-10 darker" id="info"><!-- Shitty html-->
|
||||||
<h3>Order {{ order.id }}
|
<h3 id="order-title">Order {{ order.id }}
|
||||||
{% if courier_or_admin -%}
|
{% if courier_or_admin -%}
|
||||||
<a class="btn btn-danger pull-right" href="{{ url_for('.close_order', id=order.id) }}">Close</a><br/>
|
<a class="btn btn-danger pull-right" href="{{ url_for('.close_order', id=order.id) }}">Close</a><br/>
|
||||||
<a class="btn btn-warning pull-right" href="{{ url_for('.order_edit', id=order.id) }}">Edit</a>
|
<a class="btn btn-warning pull-right" href="{{ url_for('.order_edit', id=order.id) }}">Edit</a>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
total price: {{ total_price|euro }} {% if courier_or_admin %}- remaining debts: {{ debts|euro }}{% endif %}
|
total price: {{ total_price|euro }} {% if courier_or_admin %}- remaining debts: {{ debts|euro }}{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if form -%}
|
{% if form -%}
|
||||||
<div class="col-md-push-1 col-md-10 darker">
|
<div class="col-md-push-1 col-md-10 darker" id="form">
|
||||||
<h4>Order:</h4>
|
<h4>Order:</h4>
|
||||||
<form method="post" action="{{ url_for('.order_item_create', id=order.id) }}">
|
<form method="post" action="{{ url_for('.order_item_create', id=order.id) }}">
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
|
@ -49,8 +49,8 @@
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row" id="items">
|
||||||
<div class="col-md-push-1 col-md-5 darker">
|
<div class="col-md-push-1 col-md-5 darker" id="items-list">
|
||||||
<h3>Items</h3>
|
<h3>Items</h3>
|
||||||
<table class="table table-hover table-condensed">
|
<table class="table table-hover table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-push-2 col-md-4 darker">
|
<div class="col-md-push-2 col-md-4 darker" id="items-ordered">
|
||||||
<h3>Ordered products:</h3>
|
<h3>Ordered products:</h3>
|
||||||
{% for key, value in order.group_by_product().items() -%}
|
{% for key, value in order.group_by_product().items() -%}
|
||||||
{{ key }} - {{ value }}<br/>
|
{{ key }} - {{ value }}<br/>
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-push-1 col-md-5 darker">
|
<div class="col-md-push-1 col-md-5 darker" id="debts">
|
||||||
<h3>Debts</h3>
|
<h3>Debts</h3>
|
||||||
<table class="table table-hover table-condensed">
|
<table class="table table-hover table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -102,6 +102,7 @@
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.2/css/select2.min.css" rel="stylesheet" />
|
<link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.2/css/select2.min.css" rel="stylesheet" />
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/select2-bootstrap.min.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/select2-bootstrap.min.css') }}">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/print.css') }}">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
certifi==14.5.14
|
|
||||||
Flask==0.10.1
|
Flask==0.10.1
|
||||||
Flask-Admin==1.0.9
|
Flask-Admin==1.1.0
|
||||||
Flask-Bootstrap==3.3.2.1
|
Flask-Bootstrap==3.3.4.1
|
||||||
Flask-Login==0.2.11
|
Flask-Login==0.2.11
|
||||||
Flask-OAuthlib==0.8.0
|
Flask-OAuthlib==0.9.1
|
||||||
Flask-SQLAlchemy==2.0
|
Flask-SQLAlchemy==2.0
|
||||||
Flask-WTF==0.10.3
|
Flask-WTF==0.11
|
||||||
Flask-Migrate==1.4.0
|
Flask-Migrate==1.4.0
|
||||||
itsdangerous==0.24
|
itsdangerous==0.24
|
||||||
Jinja2==2.7.2
|
Jinja2==2.7.3
|
||||||
MarkupSafe==0.23
|
MarkupSafe==0.23
|
||||||
oauthlib==0.7.2
|
oauthlib==0.7.2
|
||||||
PyMySQL==0.6.6
|
PyMySQL==0.6.6
|
||||||
requests==2.4.0
|
requests==2.7.0
|
||||||
SQLAlchemy==0.9.8
|
SQLAlchemy==1.0.4
|
||||||
Werkzeug==0.9.6
|
Werkzeug==0.10.4
|
||||||
WTForms==2.0
|
WTForms==2.0.2
|
||||||
|
|
Loading…
Reference in a new issue