Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
transporte
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Logistik
transporte
Commits
509b7f2e
Commit
509b7f2e
authored
5 years ago
by
psy
Browse files
Options
Downloads
Plain Diff
merge #11
parents
665d5f51
ff70199d
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
transporte/templates/transport_details.html
+4
-1
4 additions, 1 deletion
transporte/templates/transport_details.html
transporte/templates/transport_sticker.html
+62
-0
62 additions, 0 deletions
transporte/templates/transport_sticker.html
transporte/views.py
+7
-2
7 additions, 2 deletions
transporte/views.py
with
73 additions
and
3 deletions
transporte/templates/transport_details.html
+
4
−
1
View file @
509b7f2e
...
...
@@ -4,7 +4,10 @@
{% if transport %}
<h1
class=
"page-header"
>
Transport Details
</h1>
<p
class=
"small"
>
Ticket
<a
href=
"https://tickets.c3loc.de/#ticket/zoom/{{ transport.ticket_id }}"
target=
"_blank"
>
#{{ transport.ticket_id }}
</a>
</p>
<p
class=
"small"
>
Ticket
<a
href=
"https://tickets.c3loc.de/#ticket/zoom/{{ transport.ticket_id }}"
target=
"_blank"
>
#{{ transport.ticket_id }}
</a>
Print
<a
href=
"{{ url_for('show_transport', id=transport.id, format='sticker') }}"
target=
"_blank"
>
Transport Sticker
</a>
</p>
<div
class=
"row"
>
<div
class=
"col-xs-3 col-sm-2"
>
...
...
This diff is collapsed.
Click to expand it.
transporte/templates/transport_sticker.html
0 → 100644
+
62
−
0
View file @
509b7f2e
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<link
rel=
"shortcut icon"
href=
"/static/gfx/list.jpg"
>
<title>
{{ app_name }}
</title>
{% block meta %}{% endblock %}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ url_for('static', filename='css/fa-v5.5.0-all.css') }}"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ url_for('static', filename='css/bootstrap-4.1.1.min.css') }}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ url_for('static', filename='css/dataTables-1.10.18.bootstrap4.min.css') }}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ url_for('static', filename='css/main.css') }}"
/>
<script
type=
"text/javascript"
src=
"{{ url_for('static', filename='js/jquery-3.3.1.min.js') }}"
></script>
<script
type=
"text/javascript"
src=
"{{ url_for('static', filename='js/bootstrap-4.1.1.min.js') }}"
></script>
<script
type=
"text/javascript"
src=
"{{ url_for('static', filename='js/jquery.dataTables-1.10.18.min.js') }}"
></script>
<script
type=
"text/javascript"
src=
"{{ url_for('static', filename='js/dataTables-1.10.18.bootstrap4.min.js') }}"
></script>
<style>
body
{
width
:
21cm
;
height
:
29.7cm
;
margin
:
30mm
45mm
30mm
45mm
;
font-size
:
2rem
;
}
</style>
</head>
<body>
<div
class=
"container"
style=
"position:relative;height:100%;"
>
<h1>
Transport Sticker
</h1>
<p><strong>
Inhalt:
</strong><br/><div
style=
"height:3em;border-bottom:solid 1px;"
></div></p>
<p><strong>
Ziel:
</strong><br/><div
style=
"border-bottom:solid 1px;"
>
{{ transport.destination|nl2br }}
</div></p>
<p><strong>
Datum:
</strong><br/><div
style=
"border-bottom:solid 1px;"
>
{{ transport.date|datetime }}, {{ transport.time }}
</div></p>
<div
class=
"container"
style=
"position: absolute; bottom:1em;"
>
<div
class=
"row"
>
<div
class=
"col-sm"
>
<p>
Transport Tool Link
</p>
<img
src=
" {{ qrcode(url_for('show_transport', id=transport.id, _external=True)) }}"
/>
</div>
{% if transport.ticket_id %}
<div
class=
"col-sm"
>
<p>
Ticket Link
</p>
<img
src=
" {{ qrcode('https://tickets.c3loc.de/#ticket/zoom/{}'.format(transport.ticket_id)) }}"
/>
</div>
{% endif %}
</div>
</div>
</div>
</body>
</html>
This diff is collapsed.
Click to expand it.
transporte/views.py
+
7
−
2
View file @
509b7f2e
...
...
@@ -196,8 +196,9 @@ def list_transports():
@app.route
(
'
/transports/show/<int:id>
'
)
@app.route
(
'
/transports/show/<int:id>/<string:format>
'
)
@login_required
def
show_transport
(
id
=
None
):
def
show_transport
(
id
=
None
,
format
=
None
):
transport
=
Transport
.
query
.
get
(
id
)
if
transport
is
None
or
not
(
...
...
@@ -210,7 +211,11 @@ def show_transport(id=None):
elif
transport
.
cancelled
:
flash
(
'
Transport was cancelled!
'
,
'
danger
'
)
return
render_template
(
'
transport_details.html
'
,
transport
=
transport
)
if
format
==
'
sticker
'
:
template
=
'
transport_sticker.html
'
else
:
template
=
'
transport_details.html
'
return
render_template
(
template
,
transport
=
transport
)
@app.route
(
'
/transports/mark/<mark>/<int:id>
'
,
methods
=
[
'
GET
'
,
'
POST
'
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment