commit
798e2fd0e7
7 changed files with 49 additions and 20 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;
|
||||
}
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
{% else %}
|
||||
<h4>No orders available.</h4>
|
||||
{% 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 <a href="{{ url_for("order_bp.orders") }}">here</a>.
|
||||
{% else %}
|
||||
Login to create an order, or ask someone else.
|
||||
{% endif %}
|
||||
|
|
|
@ -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 %}
|
||||
|
@ -51,7 +54,7 @@
|
|||
{% if current_user.is_anonymous() %}
|
||||
<li><a href="{{ url_for('login') }}">Login</a></li>
|
||||
{% else %}
|
||||
<li><a href="#">{{ current_user.username }}</a></li>
|
||||
<li><a href="{{ url_for('profile') }}">{{ current_user.username }}</a></li>
|
||||
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
|
@ -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() }}
|
||||
|
|
6
app/templates/profile.html
Normal file
6
app/templates/profile.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "layout.html" -%}
|
||||
{% set active_page = "profile" -%}
|
||||
|
||||
{% block container %}
|
||||
<h1>{{ current_user.username }}</h1>
|
||||
{% endblock %}
|
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue