Projekt

Obecné

Profil

Stáhnout (17.4 KB) Statistiky
| Větev: | Revize:
1
<html xmlns:th="http://www.thymeleaf.org"
2
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
3
      layout:decorator="~{/layouts/layout}">
4

    
5
    <head>
6
        <title>Konfigurace</title>
7
    </head>
8

    
9
    <div layout:fragment="content">
10

    
11
        <meta th:name="${_csrf.parameterName}" th:content="${_csrf.token}"/>
12

    
13
        <div class="container">
14
            <h1>
15
                Sestava -
16
                <span th:if="${configuration.name}" th:text="${configuration.name}"></span>
17
                <span th:unless="${configuration.name}" th:text="${configuration.assembly.name}"></span>
18
            </h1>
19
            <a href="/" class="btn btn-success mb-2">Zpět</a>
20
        </div>
21

    
22
        <form th:object="${configuration}" method="post" th:action="@{${formAction}}" id="assembly-form">
23
            <input type="hidden" th:field="*{assembly.id}" th:value="${configuration.assembly?.getId()}"/>
24
            <input type="hidden" name="isNotRemoveEmpty"/>
25
            <div class="container box">
26
                <div class="col-md-12">
27
                    <div class="col-md-12 form-group row">
28
                        <label th:for="${tableName}" class="name-input-label">Titulek tabulky:</label>
29
                        <input type="text" class="form-control name-input" th:field="*{tableName}"
30
                               th:value="${configuration?.tableName}">
31
                    </div>
32
                    <span>Parametry:</span>
33
                    <div class="col-md-9">
34
                        <table class="table">
35
                            <thead>
36
                            <tr>
37
                                <th class="col-1">Parametr</th>
38
                                <th class="col-2">Umístění</th>
39
                                <th class="col-3">Filtry</th>
40
                            </tr>
41
                            </thead>
42
                            <tbody>
43
                            <tr th:each="parameterInConfiguration, itemStat : ${configuration.parametersInConfiguration}" class="parameter-row">
44
                                <input type="hidden" class="parameterIndex" th:value="${itemStat.index}">
45
                                <input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].parameter.id}"/>
46
                                <td>
47
                                    <span class="select-text-padding parameter-name"
48
                                          th:text="${parameterInConfiguration.parameter.name}"></span>
49
                                </td>
50
                                <td class="select-action-buttons">
51
                                    <optional th:each="location : ${parameterInConfiguration.parameter.locations}">
52
                                        <span th:if="${location.name?.equals('Řádek')}"
53
                                          th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.name}"
54
                                          class="select-action-padding select-action-button select-input-action-margin-collapse unselectable row-button"
55
                                          th:classappend="(${configuration.parametersInConfiguration[__${itemStat.index}__].location.name?.equals('Řádek')}) ? select-action-headlight"  >
56
                                            <i class="fas fa-align-justify"></i>
57
                                        </span>
58
                                        <span th:if="${location.name?.equals('Sloupec')}"
59
                                              th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.name}"
60
                                              class="select-action-padding select-action-button select-input-action-margin-collapse unselectable column-button"
61
                                              th:classappend="(${configuration.parametersInConfiguration[__${itemStat.index}__].location.name?.equals('Sloupec')}) ? select-action-headlight">
62
                                            <i class="fas fa-align-justify transform"></i>
63
                                        </span>
64
                                        <span th:if="${location.name?.equals('Hodnota')}"
65
                                              th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.name}"
66
                                              class="select-action-padding select-action-button select-input-action-margin-collapse unselectable value-button"
67
                                              th:classappend="(${configuration.parametersInConfiguration[__${itemStat.index}__].location.name?.equals('Hodnota')}) ? select-action-headlight">
68
                                            <i class="fas fa-heading"></i>
69
                                        </span>
70
                                    </optional>
71
                                </td>
72
                                <td class="s">
73
                                    <div th:unless="${configuration.parametersInConfiguration[__${itemStat.index}__].parameter.parameterType.name.equals('Výčet')}" class="col select-filter">
74
                                        <select class="form-control"
75
                                                th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].operator.name}">
76
                                            <option th:value="zadny" selected value> -- Operátor --</option>
77
                                            <option th:each="operator : ${parameterInConfiguration.parameter.operators}"
78
                                                    th:text="${operator.name}" th:value="${operator.name}"></option>
79
                                        </select>
80
                                        <input type="text" class="form-control select-filter-input"
81
                                               th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].operatorValue}">
82

    
83
                                        <a class="filter-tooltip" href="#" data-toggle="tooltip" data-placement="right" title="Jako oddělovač hodnot použijte &quot;;&quot;">
84
                                            <i class="fas fa-info-circle"></i>
85
                                        </a>
86

    
87
                                    </div>
88
                                    <div th:if="${configuration.parametersInConfiguration[__${itemStat.index}__].parameter.parameterType.name.equals('Výčet')}" class="col select-filter">
89
                                        <select class="mbSelect selectpicker assembly-enum-picker" multiple data-live-search="true" title="Nic nevybráno" >
90
                                            <option th:each="parameterValue : ${configuration.parametersInConfiguration[__${itemStat.index}__].parameter.parameterValues}" th:value="${parameterValue.id}" th:text="${parameterValue.value}">Hodnota 1</option>
91
                                        </select>
92
                                    </div>
93
                                </td>
94

    
95
                                <select class="form-control hidden" th:id="'function-select-' + ${itemStat.index}"
96
                                        th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].functions}"
97
                                        multiple>
98
                                    <option th:each="function : ${parameterInConfiguration.parameter.functions}"
99
                                            th:text="${function.name}" th:value="${{function.id}}"></option>
100
                                </select>
101
                            </tr>
102
                            </tbody>
103
                        </table>
104
                    </div>
105

    
106
                    <div class="selected-input-container">
107
                        <div class="selected-input-box">
108
                            <div class="selected-input-box-icon">
109
                                <i class="fas fa-align-justify transform"></i>
110
                            </div>
111
                            <table class="table table-parameter">
112
                                <thead>
113
                                <tr>
114
                                    <th class="col-1-p"></th>
115
                                    <th class="col-2-p">Vlastní název</th>
116
                                    <th class="col-3-p"></th>
117
                                </tr>
118
                                </thead>
119
                                <tbody id="column-wrapper" class="sortable">
120
                                <tr th:each="parameterInConfiguration, itemStat : ${configuration.parametersInConfiguration}" th:if="${parameterInConfiguration.location.name?.equals('Sloupec')}" class="column-parameter parameter">
121
                                    <input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.id}" value="1">
122
                                    <input type="hidden" class="parametr-order" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}" th:value="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}">
123
                                    <td>
124
                                        <span class="parameter-name" th:text="${parameterInConfiguration.parameter.name}"></span>
125
                                    </td>
126
                                    <td>
127
                                        <input th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].columnName}"
128
                                               type="text" class="form-control select-filter-input">
129
                                    </td>
130
                                    <td>
131
                                        <span><i class="fas fa-sort"></i></span>
132
                                    </td>
133
                                </tr>
134
                                </tbody>
135
                            </table>
136
                        </div>
137

    
138
                        <div class="selected-input-box">
139
                            <div class="selected-input-box-icon">
140
                                <i class="fas fa-align-justify"></i>
141
                            </div>
142
                            <table class="table table-parameter">
143
                                <thead>
144
                                <tr>
145
                                    <th class="col-1-p"></th>
146
                                    <th class="col-2-p">Vlastní název</th>
147
                                    <th class="col-3-p"></th>
148
                                </tr>
149
                                </thead>
150
                                <tbody id="row-wrapper" class="sortable">
151
                                <tr th:each="parameterInConfiguration, itemStat : ${configuration.parametersInConfiguration}" th:if="${parameterInConfiguration.location.name?.equals('Řádek')}" class="row-parameter parameter">
152
                                    <input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.id}" value="2">
153
                                    <input type="hidden" class="parametr-order" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}" th:value="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}">
154
                                    <td>
155
                                        <span class="parameter-name" th:text="${parameterInConfiguration.parameter.name}"></span>
156
                                    </td>
157
                                    <td>
158
                                        <input th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].columnName}"
159
                                               type="text" class="form-control select-filter-input">
160
                                    </td>
161
                                    <td>
162
                                        <span><i class="fas fa-sort"></i></span>
163
                                    </td>
164
                                </tr>
165
                                </tbody>
166
                            </table>
167
                        </div>
168

    
169
                        <div class="selected-input-box">
170
                            <div class="selected-input-box-icon">
171
                                <i class="fas fa-heading"></i>
172
                            </div>
173
                            <table class="table table-parameter">
174
                                <thead>
175
                                <tr>
176
                                    <th class="col-1-p"></th>
177
                                    <th class="col-2-p">Funkce</th>
178
                                </tr>
179
                                </thead>
180
                                <tbody id="value-wrapper">
181
                                <tr th:each="parameterInConfiguration, itemStat : ${configuration.parametersInConfiguration}" th:if="${parameterInConfiguration.location.name?.equals('Hodnota')}" class="value-parameter parameter">
182
                                    <input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.id}" value="3">
183
                                    <input type="hidden" class="parametr-order" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}" th:value="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}">
184
                                    <td>
185
                                        <span class="parameter-name" th:text="${parameterInConfiguration.parameter.name}"></span>
186
                                    </td>
187
                                    <td>
188
                                        <select class="form-control"
189
                                                th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].functions}"
190
                                                multiple>
191
                                            <option th:each="function : ${parameterInConfiguration.parameter.functions}"
192
                                                    th:text="${function.name}" th:value="${function.id}"></option>
193
                                        </select>
194
                                    </td>
195
                                </tr>
196
                                </tbody>
197
                            </table>
198
                        </div>
199
                    </div>
200

    
201

    
202
                    <div class="col-md-12 form-group row template-input">
203
                        <label th:for="${configuration.name}" class="template-input-label">Vlastní název šablony:</label>
204
                        <div class="">
205
                            <input type="text" class="form-control select-filter-input" id="configurationName" th:field="${configuration.name}">
206
                        </div>
207

    
208
                        <button type="submit" class="btn btn-success mb-2 template-input-submit" name="saveConfiguration" onclick="checkIfConfigurationNameIsNull()">Uložit šablonu</button>
209
                    </div>
210

    
211
                    <div class="custom-control custom-switch form-group">
212
                        <input type="checkbox" class="custom-control-input" id="customSwitch1" th:checked="${isNotRemoveEmpty}" name="isNotRemoveEmpty">
213
                        <label class="custom-control-label" for="customSwitch1">Zobrazovat prázdné řádky</label>
214
                    </div>
215

    
216
                    <div class="buttons-wrap">
217
                        <button type="submit" class="btn btn-primary mb-2 show-spinner" name="generateTable">Vygenerovat tabulku</button>
218
                        <button type="submit" class="btn btn-primary mb-2 show-spinner" name="exportXlsx">Export do XLSX</button>
219
                        <button type="submit" class="btn btn-primary mb-2 show-spinner" name="exportPdf">Export do PDF</button>
220
                    </div>
221
                </div>
222
            </div>
223
        </form>
224

    
225

    
226
        <div th:if="${contingencyTableRows}" class="container box exported-table">
227
            <div class="col-md-12">
228
                <table class="tg table table-striped">
229
                    <tr th:each="contingencyTableRow : ${contingencyTableRows}">
230
                        <div class="tg-align" th:if="${contingencyTableRow.isHeader()}">
231
                            <th class="tg-align-center" th:each="contingencyTableRowCell : ${contingencyTableRow.getCells()}" th:colspan="${contingencyTableRowCell.getColSpan()}">
232
                                <span th:text="${contingencyTableRowCell.getValue()}"></span>
233
                            </th>
234
                        </div>
235
                        <div th:unless="${contingencyTableRow.isHeader()}">
236
                            <optional th:each="contingencyTableRowCell, iterStat : ${contingencyTableRow.getCells()}">
237
                                <td th:if="${iterStat.index == 0}" class="tg-align-left">
238
                                    <span class="tg-left-span" th:text="${contingencyTableRowCell?.getValue()}"></span>
239
                                </td>
240
                                <td th:unless="${iterStat.index == 0}" class="tg-align-center">
241
                                    <span th:text="${contingencyTableRowCell?.getValue()}"></span>
242
                                </td>
243
                            </optional>
244
                        </div>
245
                    </tr>
246
                </table>
247
            </div>
248
        </div>
249
    </div>
250

    
251
    <div layout:fragment="scripts">
252
        <script type="text/javascript" src="js/assemblyScripts.js"></script>
253
    </div>
254

    
255
</html>
256

    
(1-1/4)