8427 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace wpsgTicket;
|
|
|
4 |
|
|
|
5 |
?>
|
|
|
6 |
|
|
|
7 |
<div id="wpsg_ticket_modul_template">
|
|
|
8 |
|
|
|
9 |
<div class="head">
|
|
|
10 |
|
|
|
11 |
<a href="#" @click.prevent="addTemplate" title="<?php echo __('Neues Template anlegen', 'wpsg'); ?>">
|
|
|
12 |
<span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>
|
|
|
13 |
</a>
|
|
|
14 |
|
|
|
15 |
<div v-if="data.arTemplates.length > 0">
|
|
|
16 |
|
|
|
17 |
<select v-model="template">
|
|
|
18 |
<option :value="null"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
|
|
|
19 |
<option v-for="(template, index) in data.arTemplates" :value="template">
|
|
|
20 |
{{template.template_name}} ({{template.config.arField.length}} <?php echo __('Felder', 'wpsg'); ?><template v-if="template.defaulttemplate">, <?php echo __('Standard', 'wpsg'); ?></template>)
|
|
|
21 |
</option>
|
|
|
22 |
</select>
|
|
|
23 |
|
|
|
24 |
</div>
|
|
|
25 |
<div v-else>
|
|
|
26 |
|
|
|
27 |
<?php echo __('Keine Templates vorhanden', 'wpsg'); ?>
|
|
|
28 |
|
|
|
29 |
</div>
|
|
|
30 |
|
|
|
31 |
<a v-if="template" href="#" @click.prevent="removeTemplate" title="<?php echo __('Template löschen', 'wpsg'); ?>">
|
|
|
32 |
<span class="wpsg-glyphicon glyphicon glyphicon-trash"></span>
|
|
|
33 |
</a>
|
|
|
34 |
|
|
|
35 |
</div>
|
|
|
36 |
|
|
|
37 |
<div v-if="template" class="template">
|
|
|
38 |
|
|
|
39 |
<div class="form-group form-group-sm has-feedback">
|
|
|
40 |
<label class="col-sm-6 control-label label-copy" for="wpsg_mod_downloadplus_filename">
|
|
|
41 |
<a href="#" title="<?php echo __('Template kopieren', 'wpsg'); ?>" @click="copyTemplate()"><span class="wpsg-glyphicon glyphicon glyphicon-copy"></span></a>
|
|
|
42 |
<span><?php echo __('Name des Templates', 'wpsg'); ?></span>
|
|
|
43 |
</label>
|
|
|
44 |
<div class="col-sm-6">
|
|
|
45 |
<div class="wpsg_field_wrap wpsg_field_wrap_template_name">
|
|
|
46 |
<input type="text" v-model="template.template_name" />
|
|
|
47 |
<div>
|
|
|
48 |
<label class="control-label"><?php echo __('Standard: ', 'wpsg'); ?></label>
|
|
|
49 |
<input type="checkbox" :checked="template.defaulttemplate" @click="setDefaultTemplate" />
|
|
|
50 |
</div>
|
|
|
51 |
</div>
|
|
|
52 |
</div>
|
|
|
53 |
</div>
|
|
|
54 |
<div class="form-group form-group-sm has-feedback">
|
|
|
55 |
<label class="col-sm-6 control-label"><?php echo __('Template Größe (mm)', 'wpsg'); ?></label>
|
|
|
56 |
<div class="col-sm-6">
|
|
|
57 |
<div class="wpsg_field_wrap flex items-center justify-start gap-2">
|
|
|
58 |
<input type="text" class="form-control input-sm" autocomplete="off" v-model="template.config.width">
|
|
|
59 |
x
|
|
|
60 |
<input type="text" class="form-control input-sm" autocomplete="off" v-model="template.config.height">
|
|
|
61 |
</div>
|
|
|
62 |
</div>
|
|
|
63 |
</div>
|
|
|
64 |
<div class="form-group form-group-sm has-feedback">
|
|
|
65 |
<label class="col-sm-6 control-label"><?php echo __('Hintergrund (PDF/JPEG)', 'wpsg'); ?></label>
|
|
|
66 |
<div class="col-sm-6">
|
|
|
67 |
<div class="wpsg_field_wrap flex items-start justify-between gap-2">
|
|
|
68 |
<input type="file" @change.prevent="uploadBg" ref="file_upload" accept=".jpeg,.jpg,.pdf" />
|
|
|
69 |
<span class="flex items-center">
|
|
|
70 |
<a v-if="template.hasBackground" :href="template.url_bg_download" target="_blank"><?php echo __('Anzeigen', 'wpsg'); ?></a>
|
|
|
71 |
</span>
|
|
|
72 |
</div>
|
|
|
73 |
</div>
|
|
|
74 |
</div>
|
|
|
75 |
|
|
|
76 |
<br />
|
|
|
77 |
|
|
|
78 |
<table class="table table_qr table-body-striped wpsg_mod_downloadplus_fieldtable">
|
|
|
79 |
<thead>
|
|
|
80 |
<tr>
|
|
|
81 |
<th colspan="8"><?php echo __('QR - Code', 'wpsg'); ?></th>
|
|
|
82 |
</tr>
|
|
|
83 |
</thead>
|
|
|
84 |
<template v-for="(field, field_index) in template.config.arField">
|
|
|
85 |
<tbody v-if="field.text === '%qr%'">
|
|
|
86 |
<tr>
|
|
|
87 |
<td class="col_w0"></td>
|
|
|
88 |
<td class="col_w1">
|
|
|
89 |
<div class="text-right"><strong><?php echo __('X / Y', 'wpsg'); ?></strong></div>
|
|
|
90 |
</td>
|
|
|
91 |
<td class="col_w1">
|
|
|
92 |
<div clasS="flex items-center gap-2">
|
|
|
93 |
<input type="text" style="width:50px;" v-model="field.x" />
|
|
|
94 |
<span>/</span>
|
|
|
95 |
<input type="text" style="width:50px;" v-model="field.y" />
|
|
|
96 |
</div>
|
|
|
97 |
</td>
|
|
|
98 |
<td class="col_w1">
|
|
|
99 |
<div class="text-right"><strong><?php echo __('Breite', 'wpsg'); ?></strong></div>
|
|
|
100 |
</td>
|
|
|
101 |
<td class="col_w1">
|
|
|
102 |
<input type="text" style="width:50px;" v-model="field.w" />
|
|
|
103 |
</td>
|
|
|
104 |
<td class="col_w1">
|
|
|
105 |
<div class="text-right"><strong><?php echo __('Höhe', 'wpsg'); ?>:</strong></div>
|
|
|
106 |
</td>
|
|
|
107 |
<td class="col_w1">
|
|
|
108 |
<input type="text" style="width:50px;" v-model="field.h" />
|
|
|
109 |
</td>
|
|
|
110 |
<td class="col_w0"></td>
|
|
|
111 |
</tr>
|
|
|
112 |
</tbody>
|
|
|
113 |
</template>
|
|
|
114 |
</table>
|
|
|
115 |
|
|
|
116 |
<table class="table table-body-striped wpsg_mod_downloadplus_fieldtable">
|
|
|
117 |
<thead>
|
|
|
118 |
<tr>
|
|
|
119 |
<th colspan="8"><?php echo __('Weitere Felder mit Platzhaltern', 'wpsg'); ?></th>
|
|
|
120 |
</tr>
|
|
|
121 |
<tr>
|
|
|
122 |
<th class="col_w0">
|
|
|
123 |
<a href="#" @click.prevent="addField" title="<?php echo __('Neues Feld', 'wpsg'); ?>">
|
|
|
124 |
<span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>
|
|
|
125 |
</a>
|
|
|
126 |
</th>
|
|
|
127 |
<th class="col_w1"><?php echo __('X', 'wpsg'); ?></th>
|
|
|
128 |
<th class="col_w1"><?php echo __('Y', 'wpsg'); ?></th>
|
|
|
129 |
<th class="col_w1"><?php echo __('Ausrichtung', 'wpsg'); ?></th>
|
|
|
130 |
<th class="col_w1"><?php echo __('Farbe', 'wpsg'); ?></th>
|
|
|
131 |
<th class="col_w1"><?php echo __('Deckkraft', 'wpsg'); ?></th>
|
|
|
132 |
<th class="col_w1"><?php echo __('Winkel', 'wpsg'); ?></th>
|
|
|
133 |
<th class="col_action"></th>
|
|
|
134 |
</tr>
|
|
|
135 |
</thead>
|
|
|
136 |
<template v-for="(field, field_index) in template.config.arField">
|
|
|
137 |
<tbody v-if="field.text !== '%qr%'">
|
|
|
138 |
<tr>
|
|
|
139 |
<td class="col_w0">#{{field_index + 1}}</td>
|
|
|
140 |
<td class="col_w1">
|
|
|
141 |
<input type="text" style="width:50px;" v-model="field.x" />
|
|
|
142 |
</td>
|
|
|
143 |
<td class="col_w1">
|
|
|
144 |
<input type="text" style="width:50px;" v-model="field.y" />
|
|
|
145 |
</td>
|
|
|
146 |
<td class="col_w1">
|
|
|
147 |
<select v-model="field.align" v-if="field.text !== '%qr%'">
|
|
|
148 |
<option value="L">Links</option>
|
|
|
149 |
<option value="C">Zentriert</option>
|
|
|
150 |
<option value="R">Rechts</option>
|
|
|
151 |
</select>
|
|
|
152 |
<div v-else class="text-right"><strong><?php echo __('Breite', 'wpsg'); ?></strong></div>
|
|
|
153 |
</td>
|
|
|
154 |
<td class="col_w1">
|
|
|
155 |
<input class="wpsg_hideBarcode" v-if="field.text !== '%qr%'" type="text" style="width:75px;" v-model="field.color" />
|
|
|
156 |
<input v-else type="text" style="width:50px;" v-model="field.w" />
|
|
|
157 |
</td>
|
|
|
158 |
<td class="col_w1">
|
|
|
159 |
<input class="wpsg_hideBarcode" v-if="field.text !== '%qr%'" type="text" style="width:50px;" v-model="field.opaque" />
|
|
|
160 |
<div v-else class="text-right"><strong><?php echo __('Höhe', 'wpsg'); ?>:</strong></div>
|
|
|
161 |
</td>
|
|
|
162 |
<td class="col_w1">
|
|
|
163 |
<input class="wpsg_hideBarcode" v-if="field.text !== '%qr%'" type="text" style="width:50px;" v-model="field.angle" />
|
|
|
164 |
<input v-else type="text" style="width:50px;" v-model="field.h" />
|
|
|
165 |
</td>
|
|
|
166 |
<td class="col_w0"></td>
|
|
|
167 |
</tr>
|
|
|
168 |
<tr>
|
|
|
169 |
<td class="col_w0">
|
|
|
170 |
<a href="#" @click.prevent="addField(field_index)" title="<?php echo __('Neues Feld davor einfügen', 'wpsg'); ?>">
|
|
|
171 |
<span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>
|
|
|
172 |
</a>
|
|
|
173 |
</td>
|
|
|
174 |
<td class="col_freitext_label col_w1" colspan="1">
|
|
|
175 |
<span v-if="field.text !== '%qr%'"><?php echo __('Freitext', 'wpsg'); ?>:</span>
|
|
|
176 |
</td>
|
|
|
177 |
<td colspan="5" class="col_freitext">
|
|
|
178 |
<div class="flex items-center gap-2">
|
|
|
179 |
<input v-if="field.text !== '%qr%'" type="text" style="width:100%;" v-model="field.text" />
|
|
|
180 |
<span v-else>QR Code</span>
|
|
|
181 |
|
|
|
182 |
<template v-if="field.text !== '%qr%'">
|
|
|
183 |
<select class="fontselect" v-model="field.font" style="width:100%;">
|
|
|
184 |
<option v-for="(font, index_font) in data.arFonts" :value="font.code">{{font.label}}</option>
|
|
|
185 |
</select>
|
|
|
186 |
<select v-model="field.fontsize" style="width:100%;">
|
|
|
187 |
<option v-for="size in [4,5,6,7,8,9,10,11,12,13,14,16,18,20,22,24,26,28,30,32,34]" :value="size">{{size}}</option>
|
|
|
188 |
</select>
|
|
|
189 |
</template>
|
|
|
190 |
|
|
|
191 |
</div>
|
|
|
192 |
</td>
|
|
|
193 |
<td>
|
|
|
194 |
<a v-if="field.text !== '%qr%'" target="_blank" href="#" @click.prevent="removeField(field_index)" title="<?php echo __('Feld löschen', 'wpsg'); ?>">
|
|
|
195 |
<span class="wpsg-glyphicon glyphicon glyphicon-trash"></span>
|
|
|
196 |
</a>
|
|
|
197 |
</td>
|
|
|
198 |
</tr>
|
|
|
199 |
</tbody>
|
|
|
200 |
</template>
|
|
|
201 |
</table>
|
|
|
202 |
|
|
|
203 |
<a :href="template.url_preview" target="_blank" class="button button-primary"><?php echo __('Vorschau', 'wpsg'); ?></a>
|
|
|
204 |
|
|
|
205 |
</div>
|
|
|
206 |
|
|
|
207 |
<br />
|
|
|
208 |
|
|
|
209 |
</div>
|