Added print.css and updated requirements, GA

This commit is contained in:
Feliciaan De Palmenaer 2015-06-05 11:29:14 +02:00
parent 586e2ca443
commit 47d46223aa
4 changed files with 36 additions and 18 deletions

15
app/static/css/print.css Normal file
View 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;
}
}

View file

@ -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() }}
<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 %}
{% block scripts %}
{{ super() }}
{{ google.uanalytics('UA-25444917-9') }}
<script src="{{ url_for('static', filename='js/timer.js') }}"></script>
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
{% endblock %}

View file

@ -7,8 +7,8 @@
{% block container %}
<div class="row">
<div class="col-md-push-1 col-md-10 darker"><!-- Shitty html-->
<h3>Order {{ order.id }}
<div class="col-md-push-1 col-md-10 darker" id="info"><!-- Shitty html-->
<h3 id="order-title">Order {{ order.id }}
{% 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-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 %}
</div>
{% 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>
<form method="post" action="{{ url_for('.order_item_create', id=order.id) }}">
{{ form.csrf_token }}
@ -49,8 +49,8 @@
</div>
{%- endif %}
</div>
<div class="row">
<div class="col-md-push-1 col-md-5 darker">
<div class="row" id="items">
<div class="col-md-push-1 col-md-5 darker" id="items-list">
<h3>Items</h3>
<table class="table table-hover table-condensed">
<thead>
@ -69,7 +69,7 @@
</tbody>
</table>
</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>
{% for key, value in order.group_by_product().items() -%}
{{ key }} - {{ value }}<br/>
@ -77,7 +77,7 @@
</div>
</div>
<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>
<table class="table table-hover table-condensed">
<thead>
@ -102,6 +102,7 @@
{{ super() }}
<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/print.css') }}">
{% endblock %}
{% block scripts %}
{{ super() }}

View file

@ -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