Added basic label generation dialog.

This commit is contained in:
Jan Böhmer 2020-04-16 19:56:30 +02:00
parent ea0d72bfbb
commit a4e1a17b4a
12 changed files with 230 additions and 5 deletions

View file

@ -47,6 +47,7 @@
{% endblock %}
{% block label_options_widget %}
{{ form_row(form.supported_element) }}
<div class="form-group row">
{{ form_label(form.width) }}
<div class="input-group col-9">

View file

@ -0,0 +1,28 @@
{% extends 'main_card.html.twig' %}
{% block card_title %}<i class="fas fa-qrcode fa-fw"></i> {% trans %}label_generator.title{% endtrans %}{% endblock %}
{% block card_content %}
{{ form_start(form) }}
{{ form_row(form.target_id) }}
{{ form_widget(form.options) }}
{{ form_end(form) }}
{% if pdf_data %}
<div class="row">
<div class="col-sm-9 offset-sm-3">
<a data-no-ajax class="btn btn-secondary" href="#" onclick="this.href = document.getElementById('pdf_preview').data" download="{{ filename ?? '' }}">
{% trans %}label_generator.download{% endtrans %}
</a>
</div>
</div>
{% endif %}
{% endblock %}
{% block additional_content %}
{% if pdf_data %}
<div class="card mt-2 p-1 border-secondary" style="resize: vertical; overflow: scroll; height: 250px">
<object id="pdf_preview" data="{{ inlineData(pdf_data, 'application/pdf') | escape('html_attr') }}"style="height: inherit">
</object>
</div>
{% endif %}
{% endblock %}

View file

@ -7,7 +7,7 @@
<meta name="description" content="Label for {{ meta_title }}">
<meta name="keywords" content="Part-DB, Label, Barcode">
<style>
{% include("labels/label_style.css.twig") %}
{% include("LabelSystem/labels/label_style.css.twig") %}
</style>
</head>
<body>