1
|
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml"><head>
|
2
|
<meta charset="utf-8">
|
3
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
4
|
<meta name="description" content="">
|
5
|
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
|
6
|
<meta name="generator" content="Jekyll v3.8.6">
|
7
|
<title>Album example · Bootstrap</title>
|
8
|
<link rel="canonical" href="https://getbootstrap.com/docs/4.4/examples/album/">
|
9
|
|
10
|
<!-- Bootstrap core CSS -->
|
11
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
12
|
|
13
|
<link href="css/bootstrap-select.min.css" rel="stylesheet">
|
14
|
<link href="css/fontawesome.min.css" rel="stylesheet">
|
15
|
<link href="css/style.css" rel="stylesheet">
|
16
|
|
17
|
<script type="text/javascript" src="js/jquery.js"></script>
|
18
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
19
|
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
20
|
<script type="text/javascript" src="js/bootstrap-select.min.js"></script>
|
21
|
|
22
|
|
23
|
<link href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css" rel="stylesheet">
|
24
|
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
|
25
|
</head>
|
26
|
<body>
|
27
|
|
28
|
<select class="hidden" id="allParametersHiddenSelect">
|
29
|
<option th:each="parameterType : ${allParameterTypes}" th:value="${parameterType.id}" th:text="${parameterType.name}"></option>
|
30
|
</select>
|
31
|
|
32
|
|
33
|
<select class="hidden" id="allFunctionsHiddenSelect">
|
34
|
<option th:each="function : ${allFunctions}" th:value="${{function.id}}" th:text="${function.name}"></option>
|
35
|
</select>
|
36
|
|
37
|
|
38
|
<select class="hidden" id="allOperatorsHiddenSelect">
|
39
|
<option th:each="operator : ${allOperators}" th:value="${{operator.id}}" th:text="${operator.name}"></option>
|
40
|
</select>
|
41
|
|
42
|
|
43
|
<div id="test"></div>
|
44
|
<main role="main">
|
45
|
|
46
|
<div class="container">
|
47
|
<h1 th:text="${title}"></h1>
|
48
|
<a href="/" class="btn btn-success mb-2">Zpět</a>
|
49
|
</div>
|
50
|
|
51
|
<p th:text="${errorText}"></p>
|
52
|
|
53
|
<form th:object="${assembly}" th:action="${assembly.id} != null ? @{/assembly_edit(assemblyID=${assembly.id})} : @{/assembly_new}" method="post">
|
54
|
<input type="hidden" th:field="*{id}" th:value="*{id}" />
|
55
|
<div class="container box">
|
56
|
<div class="col-md-12">
|
57
|
<div class="form-group row">
|
58
|
<label for="name" class="col-sm-2 col-form-label">Název sestavy:</label>
|
59
|
<div class="col-sm-10">
|
60
|
<input type="text" class="form-control" name="assemblyName" id="assemblyName" th:field="*{name}" th:value="*{name}" required>
|
61
|
</div>
|
62
|
</div>
|
63
|
<div class="form-group row">
|
64
|
<label for="assemblySQLQuery" class="col-sm-2 col-form-label">SQL dotaz:</label>
|
65
|
<div class="col-sm-10">
|
66
|
<textarea class="form-control" name="assemblySQLQuery" id="assemblySQLQuery" rows="6" th:field="*{SQLQuery}" th:text="*{SQLQuery}" required></textarea>
|
67
|
</div>
|
68
|
</div>
|
69
|
<div class="form-group row">
|
70
|
<label class="form-check-label col-sm-2" for="checkboxPublic">Veřejný:</label>
|
71
|
<div class="col-sm-10">
|
72
|
<div class="form-check">
|
73
|
<input class="form-check-input" type="checkbox" th:checked="*{isPublic} == 1" name="checkboxPublic" id="checkboxPublic">
|
74
|
</div>
|
75
|
</div>
|
76
|
</div>
|
77
|
</div>
|
78
|
</div>
|
79
|
</div>
|
80
|
|
81
|
<div class="container box">
|
82
|
<div class="col-md-12">
|
83
|
<div class="box-header">
|
84
|
<h3 class="box-title">Parametry</h3>
|
85
|
<span class="btn btn-success" id="add-param-button"><i class="fas fa-plus"></i> Přidat parametr</span>
|
86
|
</div>
|
87
|
|
88
|
<div id="accordion" class="panel-wrapper">
|
89
|
<div th:each="parameter, i : *{parameters}" class="panel-group parameter">
|
90
|
<input type="hidden" th:field="*{parameters[__${i.index}__]}" th:value="*{parameters[__${i.index}__].id}" />
|
91
|
<input type="hidden" class="parametr-order" th:field="*{parameters[__${i.index}__].parameterOrder}" th:value="*{parameters[__${i.index}__].parameterOrder}" />
|
92
|
<div class="panel panel-default">
|
93
|
<div class="panel-heading">
|
94
|
<span class="panel-title">
|
95
|
<a data-toggle="collapse" data-parent="#accordion" th:attr="href='#collapse' + ${i.index}">
|
96
|
<i class="fas fa-angle-right"></i> <span th:text="*{parameters[__${i.index}__].name}"></span>
|
97
|
</a>
|
98
|
<span class="align-right collapse-actions">
|
99
|
<span class="action-padding input-action-margin-collapse sort-icon">
|
100
|
<i class="fas fa-sort"></i>
|
101
|
</span>
|
102
|
<span class="action-padding action-button input-action-margin-collapse">
|
103
|
<span href=# class="action-link far fa-trash-alt" onclick="removePanel(this);"></span>
|
104
|
</span>
|
105
|
</span>
|
106
|
</span>
|
107
|
</div>
|
108
|
<div th:id="'collapse' + ${i.index}" class="panel-collapse collapse">
|
109
|
<div class="panel-body">
|
110
|
<div class="form-group row">
|
111
|
<label th:for="'parameterName' + ${i.index}" class="col-sm-2 col-form-label">Název:</label>
|
112
|
<div class="col-sm-10">
|
113
|
<input type="text" class="form-control" th:name="'parameterName' + ${i.index}" th:id="'parameterName' + ${i.index}" th:field="*{parameters[__${i.index}__].name}" th:value="*{parameters[__${i.index}__].name}" required>
|
114
|
</div>
|
115
|
</div>
|
116
|
<div class="form-group row">
|
117
|
<label th:for="'parameterSQLName' + ${i.index}" class="col-sm-2 col-form-label">V SQL:</label>
|
118
|
<div class="col-sm-10">
|
119
|
<input type="text" class="form-control" th:name="'parameterSQLName' + ${i.index}" th:id="'parameterSQLName' + ${i.index}" th:field="*{parameters[__${i.index}__].nameOfSelect}" th:value="*{parameters[__${i.index}__].nameOfSelect}" required>
|
120
|
</div>
|
121
|
</div>
|
122
|
<div class="form-group row">
|
123
|
<label for="exampleFormControlSelect1" class="col-sm-2">Typ:</label>
|
124
|
<div class="col-sm-10">
|
125
|
<select th:field="*{parameters[__${i.index}__].parameterType}" class="form-control type-select" id="exampleFormControlSelect1">
|
126
|
<option th:each="parameterType : ${allParameterTypes}" th:value="${parameterType.id}" th:text="${parameterType.name}"></option>
|
127
|
</select>
|
128
|
</div>
|
129
|
</div>
|
130
|
|
131
|
<div th:classappend="!(*{parameters[__${i.index}__].parameterType.name.equals('Výčet')}) ? hidden" class="enum_box">
|
132
|
Hodnoty:
|
133
|
<div class="enum_values col-md-8">
|
134
|
<div class="enum-wrapper">
|
135
|
<input type="hidden" class="enum-index" th:value="${i.index}">
|
136
|
<div th:each="parameterValue, j : *{parameters[__${i.index}__].parameterValues}" class="input-action-box input-border-bottom enum-row">
|
137
|
<input type="text" readonly class="form-control-plaintext" th:field="*{parameters[__${i.index}__].parameterValues[__${j.index}__].value}" th:value="*{parameters[__${i.index}__].parameterValues[__${j.index}__].value}">
|
138
|
|
139
|
<span class="action-padding input-action-margin sort-icon">
|
140
|
<i class="fas fa-sort"></i>
|
141
|
</span>
|
142
|
<span class="action-padding action-button input-action-margin">
|
143
|
<span class="action-link far fa-trash-alt" onclick="removeEnum(this)"></span>
|
144
|
</span>
|
145
|
</div>
|
146
|
</div>
|
147
|
|
148
|
<div class="form-group row form-add-item">
|
149
|
<div class="col-md-9">
|
150
|
<input type="text" class="form-control enum-add-input">
|
151
|
</div>
|
152
|
<span class="btn btn-primary mb-2 enum-add-button">Přidat</span>
|
153
|
</div>
|
154
|
</div>
|
155
|
</div>
|
156
|
|
157
|
<div th:name="'parameterLocations' + ${i.index}" class="form-group row">
|
158
|
<label for="exampleFormControlSelect1" class="col-sm-2">Umístění:</label>
|
159
|
<div class="col-sm-10">
|
160
|
<div th:each="location, j : ${allLocations}" class="form-check form-check-inline">
|
161
|
<input class="form-check-input" th:field="*{parameters[__${i.index}__].locations}" type="checkbox" th:value="${location.id}" >
|
162
|
<label class="form-check-label" th:for="${location.name}" th:text="${location.name}"></label>
|
163
|
</div>
|
164
|
</div>
|
165
|
</div>
|
166
|
<div class="form-group row">
|
167
|
<label for="exampleFormControlSelect1" class="col-sm-2">Funkce:</label>
|
168
|
<div class="col-sm-10">
|
169
|
<select th:field="*{parameters[__${i.index}__].functions}" class="mbSelect selectpicker" multiple data-live-search="true">
|
170
|
<option th:each="function : ${allFunctions}" th:value="${{function.id}}" th:text="${function.name}"></option>
|
171
|
</select>
|
172
|
</div>
|
173
|
</div>
|
174
|
<div class="form-group row">
|
175
|
<label for="exampleFormControlSelect1" class="col-sm-2">Operátory:</label>
|
176
|
<div class="col-sm-10">
|
177
|
<select th:field="*{parameters[__${i.index}__].operators}" class="mbSelect selectpicker" multiple data-live-search="true">
|
178
|
<option th:each="operator : ${allOperators}" th:value="${{operator.id}}" th:text="${operator.name}"></option>
|
179
|
</select>
|
180
|
</div>
|
181
|
</div>
|
182
|
</div>
|
183
|
</div>
|
184
|
</div>
|
185
|
</div>
|
186
|
</div>
|
187
|
</div>
|
188
|
</div>
|
189
|
|
190
|
<div class="container box">
|
191
|
<div class="col-md-4">
|
192
|
<div class="box-header">
|
193
|
<h3 class="box-title">Oprávnění</h3>
|
194
|
</div>
|
195
|
<div id ="permission-wrapper">
|
196
|
<div th:each="roleWithAccess, i : ${assembly.roles}" class="input-action-box input-border-bottom permission-row">
|
197
|
<input type="hidden" class="permission-role" th:field="${assembly.roles[__${i.index}__].id}" th:value="${roleWithAccess.id}">
|
198
|
<input type="text" readonly class="form-control-plaintext permission-title" th:field="${assembly.roles[__${i.index}__].name}" th:value="${roleWithAccess.name}">
|
199
|
|
200
|
|
201
|
<span class="action-padding action-button input-action-margin">
|
202
|
<span class="action-link far fa-trash-alt" onclick="removeRole(this);"></span>
|
203
|
</span>
|
204
|
</div>
|
205
|
</div>
|
206
|
|
207
|
<div class="form-group row form-add-item">
|
208
|
<div class="col-md-9">
|
209
|
<select class="form-control " id="permission-select" name="permission-select">
|
210
|
<option th:each="role : ${allRoles}" th:value="${role.id}" th:text="${role.name}"></option>
|
211
|
</select>
|
212
|
</div>
|
213
|
<span class="btn btn-primary mb-2" id="permission-button">Přidat</span>
|
214
|
</div>
|
215
|
</div>
|
216
|
</div>
|
217
|
<div class="submit_center_button">
|
218
|
<button type="submit" class="btn btn-success mb-2">Uložit</button>
|
219
|
</div>
|
220
|
|
221
|
</form>
|
222
|
|
223
|
|
224
|
</main>
|
225
|
|
226
|
<footer class="text-muted">
|
227
|
<div class="container">
|
228
|
|
229
|
</div>
|
230
|
</footer>
|
231
|
|
232
|
<script type="text/javascript" src="js/app.js"></script>
|
233
|
</body>
|
234
|
</html>
|
235
|
<script type="text/javascript">
|
236
|
//$("select").selectpicker();
|
237
|
|
238
|
</script>
|
239
|
|
240
|
<script type="text/javascript" src="js/assemblyManageScripts.js"></script>
|