Revize a2e84e8c
Přidáno uživatelem Vojtěch Danišík před téměř 5 roky(ů)
src/main/java/vldc/aswi/domain/parameter/Parameter.java | ||
---|---|---|
41 | 41 |
@OneToMany(mappedBy = "parameter") |
42 | 42 |
private List<ParameterValue> parameterValues; |
43 | 43 |
|
44 |
/** Specific type of parameter, which represents type of entry. */ |
|
45 |
@ManyToOne(fetch=FetchType.LAZY) |
|
46 |
@JoinColumn(name = "parametr_typ_id") |
|
47 |
private ParameterType parameterType; |
|
48 |
|
|
44 | 49 |
/** |
45 | 50 |
* Creating new table with M:N relationship between Parameter and Location. |
46 | 51 |
* Specify which locations can be used for parameter. |
src/main/java/vldc/aswi/domain/parameter/ParameterInConfiguration.java | ||
---|---|---|
30 | 30 |
@Column(name = "hodnota_operatoru") |
31 | 31 |
private String operatorValue; |
32 | 32 |
|
33 |
/** Specific type of parameter, which represents type of entry. */ |
|
34 |
@ManyToOne(fetch=FetchType.LAZY) |
|
35 |
@JoinColumn(name = "parametr_typ_id") |
|
36 |
private ParameterType parameterType; |
|
37 |
|
|
38 | 33 |
/** Specific location in which this parameterConfiguration will be used. */ |
39 | 34 |
@ManyToOne(fetch=FetchType.LAZY) |
40 | 35 |
@JoinColumn(name = "umisteni_id") |
src/main/java/vldc/aswi/domain/parameter/ParameterType.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
/** List of parameterInConfigurations, which using this parameter type. */ |
27 | 27 |
@OneToMany(mappedBy = "parameterType") |
28 |
private List<ParameterInConfiguration> parametersInConfiguration;
|
|
28 |
private List<Parameter> parameters;
|
|
29 | 29 |
|
30 | 30 |
/** |
31 | 31 |
* Constructor. |
src/main/java/vldc/aswi/web/controller/AssemblyController.java | ||
---|---|---|
1 | 1 |
package vldc.aswi.web.controller; |
2 | 2 |
|
3 |
import oracle.jdbc.proxy.annotation.Post; |
|
3 | 4 |
import org.springframework.beans.factory.annotation.Autowired; |
4 | 5 |
import org.springframework.stereotype.Controller; |
5 | 6 |
import org.springframework.ui.ModelMap; |
... | ... | |
10 | 11 |
import org.springframework.web.servlet.ModelAndView; |
11 | 12 |
import org.springframework.web.servlet.mvc.support.RedirectAttributes; |
12 | 13 |
import vldc.aswi.domain.Assembly; |
13 |
import vldc.aswi.service.AssemblyManager; |
|
14 |
import vldc.aswi.service.SqlQueryManager; |
|
14 |
import vldc.aswi.domain.Role; |
|
15 |
import vldc.aswi.service.*; |
|
16 |
import vldc.aswi.service.parameter.ParameterTypeManager; |
|
15 | 17 |
|
16 | 18 |
import javax.validation.Valid; |
19 |
import java.util.ArrayList; |
|
20 |
import java.util.List; |
|
17 | 21 |
|
18 | 22 |
@Controller |
19 | 23 |
public class AssemblyController { |
... | ... | |
24 | 28 |
@Autowired |
25 | 29 |
private AssemblyManager assemblyManager; |
26 | 30 |
|
31 |
@Autowired |
|
32 |
private RoleManager roleManager; |
|
33 |
|
|
34 |
@Autowired |
|
35 |
private ParameterTypeManager parameterTypeManager; |
|
36 |
|
|
37 |
@Autowired |
|
38 |
private OperatorManager operatorManager; |
|
39 |
|
|
40 |
@Autowired |
|
41 |
private FunctionManager functionManager; |
|
42 |
|
|
43 |
@Autowired |
|
44 |
private LocationManager locationManager; |
|
45 |
|
|
27 | 46 |
@GetMapping("/assembly") |
28 | 47 |
public ModelAndView assemblyIndex(@Valid @ModelAttribute("assemblyID") String id) { |
29 | 48 |
ModelAndView modelAndView = new ModelAndView("assembly"); |
... | ... | |
46 | 65 |
ModelMap modelMap = modelAndView.getModelMap(); |
47 | 66 |
|
48 | 67 |
long assemblyID = assembly.getId(); |
49 |
System.out.println(assemblyID); |
|
50 |
Assembly assembly2 = assemblyManager.getAssemblyById(assemblyID); |
|
51 | 68 |
|
69 |
Assembly assembly2 = assemblyManager.getAssemblyById(assemblyID); |
|
52 | 70 |
|
53 | 71 |
modelMap.addAttribute("assemblies", assemblyManager.getAssemblies()); |
54 | 72 |
modelMap.addAttribute("assembly", assembly2); |
... | ... | |
59 | 77 |
|
60 | 78 |
@GetMapping("/assembly_edit") |
61 | 79 |
public ModelAndView assemblyEditIndex(@Valid @ModelAttribute("assemblyID") String id) { |
62 |
ModelAndView modelAndView = new ModelAndView("assembly_edit");
|
|
80 |
ModelAndView modelAndView = new ModelAndView("assembly_manage");
|
|
63 | 81 |
|
64 | 82 |
ModelMap modelMap = modelAndView.getModelMap(); |
65 | 83 |
|
66 | 84 |
Assembly assembly = assemblyManager.getAssemblyById(Long.parseLong(id)); |
67 | 85 |
|
68 |
modelMap.addAttribute("assemblies", assemblyManager.getAssemblies()); |
|
69 | 86 |
modelMap.addAttribute("assembly", assembly); |
87 |
modelMap.addAttribute("roles", roleManager.getRoles()); |
|
88 |
modelMap.addAttribute("rolesWithAccess", assembly.getRoles()); |
|
89 |
modelMap.addAttribute("parameters", assembly.getParameters()); |
|
90 |
modelMap.addAttribute("parameterTypes", parameterTypeManager.getParameterTypes()); |
|
91 |
modelMap.addAttribute("functions", functionManager.getFunctions()); |
|
92 |
modelMap.addAttribute("operators", operatorManager.getOperators()); |
|
93 |
modelMap.addAttribute("locations", locationManager.getLocations()); |
|
94 |
|
|
95 |
return modelAndView; |
|
96 |
} |
|
97 |
|
|
98 |
@GetMapping("/assembly_new") |
|
99 |
public ModelAndView assemblyNewIndex() { |
|
100 |
ModelAndView modelAndView = new ModelAndView("assembly_manage"); |
|
101 |
|
|
102 |
ModelMap modelMap = modelAndView.getModelMap(); |
|
103 |
|
|
104 |
modelMap.addAttribute("assembly", new Assembly()); |
|
105 |
modelMap.addAttribute("roles", roleManager.getRoles()); |
|
106 |
|
|
107 |
return modelAndView; |
|
108 |
} |
|
109 |
|
|
110 |
@PostMapping("/assembly_new") |
|
111 |
public ModelAndView assemblyNewIndexPost() { |
|
112 |
ModelAndView modelAndView = new ModelAndView("assembly_manage"); |
|
113 |
|
|
114 |
ModelMap modelMap = modelAndView.getModelMap(); |
|
115 |
|
|
116 |
modelMap.addAttribute("assembly", new Assembly()); |
|
117 |
modelMap.addAttribute("roles", roleManager.getRoles()); |
|
70 | 118 |
|
71 | 119 |
return modelAndView; |
72 | 120 |
} |
src/main/webapp/WEB-INF/templates/assembly.html | ||
---|---|---|
24 | 24 |
<main role="main"> |
25 | 25 |
|
26 | 26 |
<div class="container"> |
27 |
<input type=button onclick="history.back()" class="btn btn-success mb-2" value="Zpět"> |
|
27 | 28 |
<h1> |
28 | 29 |
Sestava - Studenti - studijní programy |
29 | 30 |
</h1> |
src/main/webapp/WEB-INF/templates/assembly_edit.html | ||
---|---|---|
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 src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> |
|
18 |
<script type="text/javascript" src="js/jquery.js"></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 |
</head> |
|
22 |
<body> |
|
23 |
<div id="test"></div> |
|
24 |
<main role="main"> |
|
25 |
|
|
26 |
<div class="container"> |
|
27 |
<h1> |
|
28 |
Editace - Studenti - studijní programy |
|
29 |
</h1> |
|
30 |
</div> |
|
31 |
|
|
32 |
<form> |
|
33 |
<div class="container box"> |
|
34 |
<div class="col-md-12"> |
|
35 |
<div class="form-group row"> |
|
36 |
<label for="name" class="col-sm-2 col-form-label">Název sestavy:</label> |
|
37 |
<div class="col-sm-10"> |
|
38 |
<input type="text" class="form-control" id="name" th:value="${assembly.name}"> |
|
39 |
</div> |
|
40 |
</div> |
|
41 |
<div class="form-group row"> |
|
42 |
<label for="sql_query" class="col-sm-2 col-form-label">SQL dotaz:</label> |
|
43 |
<div class="col-sm-10"> |
|
44 |
<textarea class="form-control" id="sql_query" rows="6" th:text="${assembly.SQLQuery}"></textarea> |
|
45 |
</div> |
|
46 |
</div> |
|
47 |
<div class="form-group row"> |
|
48 |
<label class="form-check-label col-sm-2" for="defaultCheck1">Veřejný:</label> |
|
49 |
<div class="col-sm-10"> |
|
50 |
<div class="form-check"> |
|
51 |
<input th:if="${assembly.isPublic == 0}" class="form-check-input" type="checkbox" value="" id="defaultCheck1"> |
|
52 |
<input th:unless="${assembly.isPublic == 0}" class="form-check-input" type="checkbox" value="" id="defaultCheck1" checked="true"> |
|
53 |
</div> |
|
54 |
</div> |
|
55 |
</div> |
|
56 |
</div> |
|
57 |
</div> |
|
58 |
</div> |
|
59 |
|
|
60 |
<div class="container box"> |
|
61 |
<div class="col-md-12"> |
|
62 |
<div class="box-header"> |
|
63 |
<h3 class="box-title">Parametry</h3> |
|
64 |
<button type="button" class="btn btn-success"><i class="fas fa-plus"></i> Přidat parametr</button> |
|
65 |
</div> |
|
66 |
|
|
67 |
<div class="panel-group" id="accordion"> |
|
68 |
<div class="panel panel-default"> |
|
69 |
|
|
70 |
<div class="panel-heading"> |
|
71 |
<a data-toggle="collapse" data-parent="#accordion" href="#collapse1"> |
|
72 |
<span class="panel-title"> |
|
73 |
<i class="fas fa-angle-right"></i> Akademický rok |
|
74 |
</span> |
|
75 |
</a> |
|
76 |
|
|
77 |
<span class="align-right collapse-actions"> |
|
78 |
<span class="action-padding input-action-margin-collapse sort-icon"> |
|
79 |
<i class="fas fa-sort"></i> |
|
80 |
</span> |
|
81 |
<span class="action-padding action-button input-action-margin-collapse"> |
|
82 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
83 |
</span> |
|
84 |
</span> |
|
85 |
|
|
86 |
</div> |
|
87 |
<div id="collapse1" class="panel-collapse collapse in"> |
|
88 |
<div class="panel-body"> |
|
89 |
<div class="form-group row"> |
|
90 |
<label for="name" class="col-sm-2 col-form-label">Název:</label> |
|
91 |
<div class="col-sm-10"> |
|
92 |
<input type="text" class="form-control" id="name"> |
|
93 |
</div> |
|
94 |
</div> |
|
95 |
<div class="form-group row"> |
|
96 |
<label for="name" class="col-md-2 col-form-label">V SQL:</label> |
|
97 |
<div class="col-sm-10"> |
|
98 |
<input type="text" class="form-control" id="name"> |
|
99 |
</div> |
|
100 |
</div> |
|
101 |
<div class="form-group row"> |
|
102 |
<label for="exampleFormControlSelect1" class="col-sm-2">Typ:</label> |
|
103 |
<div class="col-sm-10"> |
|
104 |
<select class="form-control" id="exampleFormControlSelect1"> |
|
105 |
<option>Text</option> |
|
106 |
<option>Datum</option> |
|
107 |
<option>Výčet</option> |
|
108 |
</select> |
|
109 |
</div> |
|
110 |
</div> |
|
111 |
<div class="form-group row"> |
|
112 |
<label for="exampleFormControlSelect1" class="col-sm-2">Sloupec:</label> |
|
113 |
<div class="col-sm-10"> |
|
114 |
<div class="form-check form-check-inline"> |
|
115 |
<input class="form-check-input" type="checkbox" id="inlineCheckbox1" value="option1"> |
|
116 |
<label class="form-check-label" for="inlineCheckbox1">Sloupec</label> |
|
117 |
</div> |
|
118 |
<div class="form-check form-check-inline"> |
|
119 |
<input class="form-check-input" type="checkbox" id="inlineCheckbox2" value="option2"> |
|
120 |
<label class="form-check-label" for="inlineCheckbox2">Řádek</label> |
|
121 |
</div> |
|
122 |
<div class="form-check form-check-inline"> |
|
123 |
<input class="form-check-input" type="checkbox" id="inlineCheckbox3" value="option3"> |
|
124 |
<label class="form-check-label" for="inlineCheckbox3">Hodnota</label> |
|
125 |
</div> |
|
126 |
</div> |
|
127 |
</div> |
|
128 |
<div class="form-group row"> |
|
129 |
<label for="exampleFormControlSelect1" class="col-sm-2">Funkce:</label> |
|
130 |
<div class="col-sm-10"> |
|
131 |
<select class="selectpicker" multiple data-live-search="true"> |
|
132 |
<option>SUM</option> |
|
133 |
<option>AVG</option> |
|
134 |
<option>MAX</option> |
|
135 |
<option>MIN</option> |
|
136 |
</select> |
|
137 |
</div> |
|
138 |
</div> |
|
139 |
<div class="form-group row"> |
|
140 |
<label for="exampleFormControlSelect1" class="col-sm-2">Operátory:</label> |
|
141 |
<div class="col-sm-10"> |
|
142 |
<select class="selectpicker" multiple data-live-search="true"> |
|
143 |
<option>LIKE</option> |
|
144 |
<option>BETWEEN</option> |
|
145 |
<option>EQUAL</option> |
|
146 |
<option>LESS</option> |
|
147 |
</select> |
|
148 |
</div> |
|
149 |
</div> |
|
150 |
</div> |
|
151 |
</div> |
|
152 |
</div> |
|
153 |
<div class="panel panel-default"> |
|
154 |
<div class="panel-heading"> |
|
155 |
<span class="panel-title"> |
|
156 |
<a data-toggle="collapse" data-parent="#accordion" href="#collapse2"> |
|
157 |
<i class="fas fa-angle-right"></i> Typ studia |
|
158 |
</a> |
|
159 |
|
|
160 |
<span class="align-right collapse-actions"> |
|
161 |
<span class="action-padding input-action-margin-collapse sort-icon"> |
|
162 |
<i class="fas fa-sort"></i> |
|
163 |
</span> |
|
164 |
<span class="action-padding action-button input-action-margin-collapse"> |
|
165 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
166 |
</span> |
|
167 |
</span> |
|
168 |
</span> |
|
169 |
</div> |
|
170 |
<div id="collapse2" class="panel-collapse collapse"> |
|
171 |
<div class="panel-body"> |
|
172 |
<div class="form-group row"> |
|
173 |
<label for="name" class="col-sm-2 col-form-label">Název:</label> |
|
174 |
<div class="col-sm-10"> |
|
175 |
<input type="text" class="form-control" id="name"> |
|
176 |
</div> |
|
177 |
</div> |
|
178 |
<div class="form-group row"> |
|
179 |
<label for="name" class="col-sm-2 col-form-label">V SQL:</label> |
|
180 |
<div class="col-sm-10"> |
|
181 |
<input type="text" class="form-control" id="name"> |
|
182 |
</div> |
|
183 |
</div> |
|
184 |
<div class="form-group row"> |
|
185 |
<label for="exampleFormControlSelect1" class="col-sm-2">Typ:</label> |
|
186 |
<div class="col-sm-10"> |
|
187 |
<select class="form-control" id="exampleFormControlSelect1"> |
|
188 |
<option>Text</option> |
|
189 |
<option>Datum</option> |
|
190 |
<option>Výčet</option> |
|
191 |
</select> |
|
192 |
</div> |
|
193 |
</div> |
|
194 |
<div class="form-group row"> |
|
195 |
<label for="exampleFormControlSelect1" class="col-sm-2">Sloupec:</label> |
|
196 |
<div class="col-sm-10"> |
|
197 |
<div class="form-check form-check-inline"> |
|
198 |
<input class="form-check-input" type="checkbox" id="inlineCheckbox1" value="option1"> |
|
199 |
<label class="form-check-label" for="inlineCheckbox1">Sloupec</label> |
|
200 |
</div> |
|
201 |
<div class="form-check form-check-inline"> |
|
202 |
<input class="form-check-input" type="checkbox" id="inlineCheckbox2" value="option2"> |
|
203 |
<label class="form-check-label" for="inlineCheckbox2">Řádek</label> |
|
204 |
</div> |
|
205 |
<div class="form-check form-check-inline"> |
|
206 |
<input class="form-check-input" type="checkbox" id="inlineCheckbox3" value="option3"> |
|
207 |
<label class="form-check-label" for="inlineCheckbox3">Hodnota</label> |
|
208 |
</div> |
|
209 |
</div> |
|
210 |
</div> |
|
211 |
<div class="form-group row"> |
|
212 |
<label for="exampleFormControlSelect1" class="col-sm-2">Funkce:</label> |
|
213 |
<div class="col-sm-10"> |
|
214 |
<select class="selectpicker" multiple data-live-search="true"> |
|
215 |
<option>SUM</option> |
|
216 |
<option>AVG</option> |
|
217 |
<option>MAX</option> |
|
218 |
<option>MIN</option> |
|
219 |
</select> |
|
220 |
</div> |
|
221 |
</div> |
|
222 |
<div class="form-group row"> |
|
223 |
<label for="exampleFormControlSelect1" class="col-sm-2">Operátory:</label> |
|
224 |
<div class="col-sm-10"> |
|
225 |
<select class="selectpicker" multiple data-live-search="true"> |
|
226 |
<option>LIKE</option> |
|
227 |
<option>BETWEEN</option> |
|
228 |
<option>EQUAL</option> |
|
229 |
<option>LESS</option> |
|
230 |
</select> |
|
231 |
</div> |
|
232 |
</div> |
|
233 |
</div> |
|
234 |
</div> |
|
235 |
</div> |
|
236 |
<div class="panel panel-default"> |
|
237 |
<div class="panel-heading"> |
|
238 |
<span class="panel-title"> |
|
239 |
<a data-toggle="collapse" data-parent="#accordion" href="#collapse3"> |
|
240 |
<i class="fas fa-angle-right"></i> Fakulta |
|
241 |
</a> |
|
242 |
<span class="align-right collapse-actions"> |
|
243 |
<span class="action-padding input-action-margin-collapse sort-icon"> |
|
244 |
<i class="fas fa-sort"></i> |
|
245 |
</span> |
|
246 |
<span class="action-padding action-button input-action-margin-collapse"> |
|
247 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
248 |
</span> |
|
249 |
</span> |
|
250 |
</span> |
|
251 |
</div> |
|
252 |
<div id="collapse3" class="panel-collapse collapse"> |
|
253 |
<div class="panel-body"> |
|
254 |
<div class="form-group row"> |
|
255 |
<label for="name" class="col-sm-2 col-form-label">Název:</label> |
|
256 |
<div class="col-sm-10"> |
|
257 |
<input type="text" class="form-control" id="name"> |
|
258 |
</div> |
|
259 |
</div> |
|
260 |
<div class="form-group row"> |
|
261 |
<label for="name" class="col-sm-2 col-form-label">V SQL:</label> |
|
262 |
<div class="col-sm-10"> |
|
263 |
<input type="text" class="form-control" id="name"> |
|
264 |
</div> |
|
265 |
</div> |
|
266 |
<div class="form-group row"> |
|
267 |
<label for="exampleFormControlSelect1" class="col-sm-2">Typ:</label> |
|
268 |
<div class="col-sm-10"> |
|
269 |
<select class="form-control" id="exampleFormControlSelect1"> |
|
270 |
<option>Text</option> |
|
271 |
<option>Datum</option> |
|
272 |
<option>Výčet</option> |
|
273 |
</select> |
|
274 |
</div> |
|
275 |
</div> |
|
276 |
|
|
277 |
<div class="enum_box"> |
|
278 |
Hodnoty: |
|
279 |
<div class="enum_values col-md-8"> |
|
280 |
<div class="input-action-box input-border-bottom"> |
|
281 |
<input type="text" readonly class="form-control-plaintext" id="staticEmail" value="Doktorský"> |
|
282 |
|
|
283 |
<span class="action-padding input-action-margin sort-icon"> |
|
284 |
<i class="fas fa-sort"></i> |
|
285 |
</span> |
|
286 |
<span class="action-padding action-button input-action-margin"> |
|
287 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
288 |
</span> |
|
289 |
</div> |
|
290 |
<div class="input-action-box input-border-bottom"> |
|
291 |
<input type="text" readonly class="form-control-plaintext" id="staticEmail" value="Navazující"> |
|
292 |
|
|
293 |
<span class="action-padding input-action-margin sort-icon"> |
|
294 |
<i class="fas fa-sort"></i> |
|
295 |
</span> |
|
296 |
<span class="action-padding action-button input-action-margin"> |
|
297 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
298 |
</span> |
|
299 |
|
|
300 |
</div> |
|
301 |
<div class="input-action-box input-border-bottom"> |
|
302 |
<input type="text" readonly class="form-control-plaintext" id="staticEmail" value="Bakalářský"> |
|
303 |
|
|
304 |
<span class="action-padding input-action-margin sort-icon"> |
|
305 |
<i class="fas fa-sort"></i> |
|
306 |
</span> |
|
307 |
<span class="action-padding action-button input-action-margin"> |
|
308 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
309 |
</span> |
|
310 |
</div> |
|
311 |
|
|
312 |
<div class="form-group row form-add-item"> |
|
313 |
<div class="col-md-9"> |
|
314 |
<input type="text" class="form-control" id="name"> |
|
315 |
</div> |
|
316 |
<button type="submit" class="btn btn-primary mb-2">Přidat</button> |
|
317 |
</div> |
|
318 |
|
|
319 |
|
|
320 |
|
|
321 |
|
|
322 |
</div> |
|
323 |
</div> |
|
324 |
|
|
325 |
<div class="form-group row"> |
|
326 |
<label for="exampleFormControlSelect1" class="col-sm-2">Sloupec:</label> |
|
327 |
<div class="col-sm-10"> |
|
328 |
<div class="form-check form-check-inline"> |
|
329 |
<input class="form-check-input" type="checkbox" id="inlineCheckbox1" value="option1"> |
|
330 |
<label class="form-check-label" for="inlineCheckbox1">Sloupec</label> |
|
331 |
</div> |
|
332 |
<div class="form-check form-check-inline"> |
|
333 |
<input class="form-check-input" type="checkbox" id="inlineCheckbox2" value="option2"> |
|
334 |
<label class="form-check-label" for="inlineCheckbox2">Řádek</label> |
|
335 |
</div> |
|
336 |
<div class="form-check form-check-inline"> |
|
337 |
<input class="form-check-input" type="checkbox" id="inlineCheckbox3" value="option3"> |
|
338 |
<label class="form-check-label" for="inlineCheckbox3">Hodnota</label> |
|
339 |
</div> |
|
340 |
</div> |
|
341 |
</div> |
|
342 |
<div class="form-group row"> |
|
343 |
<label for="exampleFormControlSelect1" class="col-sm-2">Funkce:</label> |
|
344 |
<div class="col-sm-10"> |
|
345 |
<select class="mbSelect selectpicker" multiple data-live-search="true"> |
|
346 |
<option>SUM</option> |
|
347 |
<option>AVG</option> |
|
348 |
<option>MAX</option> |
|
349 |
<option>MIN</option> |
|
350 |
</select> |
|
351 |
</div> |
|
352 |
</div> |
|
353 |
<div class="form-group row"> |
|
354 |
<label for="exampleFormControlSelect1" class="col-sm-2">Operátory:</label> |
|
355 |
<div class="col-sm-10"> |
|
356 |
<select class="mbSelect selectpicker" multiple data-live-search="true"> |
|
357 |
<option>LIKE</option> |
|
358 |
<option>BETWEEN</option> |
|
359 |
<option>EQUAL</option> |
|
360 |
<option>LESS</option> |
|
361 |
</select> |
|
362 |
</div> |
|
363 |
</div> |
|
364 |
</div> |
|
365 |
</div> |
|
366 |
</div> |
|
367 |
</div> |
|
368 |
</div> |
|
369 |
</div> |
|
370 |
|
|
371 |
<div class="container box"> |
|
372 |
<div class="col-md-4"> |
|
373 |
<div class="box-header"> |
|
374 |
<h3 class="box-title">Oprávnění</h3> |
|
375 |
</div> |
|
376 |
<div class="input-action-box input-border-bottom"> |
|
377 |
<input type="text" readonly class="form-control-plaintext" id="staticEmail" value="Rektor"> |
|
378 |
|
|
379 |
<span class="action-padding input-action-margin sort-icon"> |
|
380 |
<i class="fas fa-sort"></i> |
|
381 |
</span> |
|
382 |
<span class="action-padding action-button input-action-margin"> |
|
383 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
384 |
</span> |
|
385 |
</div> |
|
386 |
<div class="input-action-box input-border-bottom"> |
|
387 |
<input type="text" readonly class="form-control-plaintext" id="staticEmail" value="Referentka"> |
|
388 |
|
|
389 |
<span class="action-padding input-action-margin sort-icon"> |
|
390 |
<i class="fas fa-sort"></i> |
|
391 |
</span> |
|
392 |
<span class="action-padding action-button input-action-margin"> |
|
393 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
394 |
</span> |
|
395 |
</div> |
|
396 |
|
|
397 |
<div class="form-group row form-add-item"> |
|
398 |
<div class="col-md-9"> |
|
399 |
<select class="form-control " id="exampleFormControlSelect1"> |
|
400 |
<option>Rektor</option> |
|
401 |
<option>Studijní oddělení</option> |
|
402 |
<option>Strudenti</option> |
|
403 |
</select> |
|
404 |
</div> |
|
405 |
<button type="submit" class="btn btn-primary mb-2">Přidat</button> |
|
406 |
</div> |
|
407 |
</div> |
|
408 |
</div> |
|
409 |
<div class="submit_center_button"> |
|
410 |
<button type="submit" class="btn btn-success mb-2">Uložit</button> |
|
411 |
</div> |
|
412 |
|
|
413 |
</form> |
|
414 |
|
|
415 |
|
|
416 |
</main> |
|
417 |
|
|
418 |
<footer class="text-muted"> |
|
419 |
<div class="container"> |
|
420 |
|
|
421 |
</div> |
|
422 |
</footer> |
|
423 |
|
|
424 |
<script type="text/javascript" src="js/app.js"></script> |
|
425 |
</body> |
|
426 |
</html> |
|
427 |
<script type="text/javascript"> |
|
428 |
$("select").selectpicker(); |
|
429 |
</script> |
src/main/webapp/WEB-INF/templates/assembly_manage.html | ||
---|---|---|
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 src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> |
|
18 |
<script type="text/javascript" src="js/jquery.js"></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 |
</head> |
|
22 |
<body> |
|
23 |
<div id="test"></div> |
|
24 |
<main role="main"> |
|
25 |
|
|
26 |
<div class="container"> |
|
27 |
<input type=button onclick="history.back()" class="btn btn-success mb-2" value="Zpět"> |
|
28 |
<h1> |
|
29 |
Editace - Studenti - studijní programy |
|
30 |
</h1> |
|
31 |
</div> |
|
32 |
|
|
33 |
<form> |
|
34 |
<div class="container box"> |
|
35 |
<div class="col-md-12"> |
|
36 |
<div class="form-group row"> |
|
37 |
<label for="name" class="col-sm-2 col-form-label">Název sestavy:</label> |
|
38 |
<div class="col-sm-10"> |
|
39 |
<input type="text" class="form-control" id="name" th:value="${assembly.name}"> |
|
40 |
</div> |
|
41 |
</div> |
|
42 |
<div class="form-group row"> |
|
43 |
<label for="sql_query" class="col-sm-2 col-form-label">SQL dotaz:</label> |
|
44 |
<div class="col-sm-10"> |
|
45 |
<textarea class="form-control" id="sql_query" rows="6" th:text="${assembly.SQLQuery}"></textarea> |
|
46 |
</div> |
|
47 |
</div> |
|
48 |
<div class="form-group row"> |
|
49 |
<label class="form-check-label col-sm-2" for="checkboxPublic">Veřejný:</label> |
|
50 |
<div class="col-sm-10"> |
|
51 |
<div class="form-check"> |
|
52 |
<input class="form-check-input" type="checkbox" value="" th:checked="${assembly.isPublic} == 1" id="checkboxPublic"> |
|
53 |
</div> |
|
54 |
</div> |
|
55 |
</div> |
|
56 |
</div> |
|
57 |
</div> |
|
58 |
</div> |
|
59 |
|
|
60 |
<div class="container box"> |
|
61 |
<div class="col-md-12"> |
|
62 |
<div class="box-header"> |
|
63 |
<h3 class="box-title">Parametry</h3> |
|
64 |
<button type="button" class="btn btn-success"><i class="fas fa-plus"></i> Přidat parametr</button> |
|
65 |
</div> |
|
66 |
|
|
67 |
<div th:each="parameter : ${parameters}" class="panel-group" id="accordion"> |
|
68 |
<div class="panel panel-default"> |
|
69 |
<div class="panel-heading"> |
|
70 |
<span class="panel-title"> |
|
71 |
<a data-toggle="collapse" data-parent="#accordion" th:attr="href='#collapse' + ${parameter.id}"> |
|
72 |
<i class="fas fa-angle-right"></i> <span th:text="${parameter.name}"></span> |
|
73 |
</a> |
|
74 |
<span class="align-right collapse-actions"> |
|
75 |
<span class="action-padding input-action-margin-collapse sort-icon"> |
|
76 |
<i class="fas fa-sort"></i> |
|
77 |
</span> |
|
78 |
<span class="action-padding action-button input-action-margin-collapse"> |
|
79 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
80 |
</span> |
|
81 |
</span> |
|
82 |
</span> |
|
83 |
</div> |
|
84 |
<div th:id="'collapse' + ${parameter.id}" class="panel-collapse collapse"> |
|
85 |
<div class="panel-body"> |
|
86 |
<div class="form-group row"> |
|
87 |
<label for="name" class="col-sm-2 col-form-label">Název:</label> |
|
88 |
<div class="col-sm-10"> |
|
89 |
<input type="text" class="form-control" id="name" th:value="${parameter.name}"> |
|
90 |
</div> |
|
91 |
</div> |
|
92 |
<div class="form-group row"> |
|
93 |
<label for="name" class="col-sm-2 col-form-label">V SQL:</label> |
|
94 |
<div class="col-sm-10"> |
|
95 |
<input type="text" class="form-control" id="name" th:value="${parameter.nameOfSelect}"> |
|
96 |
</div> |
|
97 |
</div> |
|
98 |
<div class="form-group row"> |
|
99 |
<label for="exampleFormControlSelect1" class="col-sm-2">Typ:</label> |
|
100 |
<div class="col-sm-10"> |
|
101 |
<select class="form-control" id="exampleFormControlSelect1"> |
|
102 |
<option th:each="parameterType : ${parameterTypes}" th:value="newParameterType + ${parameterType.name}" th:text="${parameterType.name}"></option> |
|
103 |
</select> |
|
104 |
</div> |
|
105 |
</div> |
|
106 |
|
|
107 |
<div class="enum_box"> |
|
108 |
Hodnoty: |
|
109 |
<div class="enum_values col-md-8"> |
|
110 |
<div class="input-action-box input-border-bottom"> |
|
111 |
<input type="text" readonly class="form-control-plaintext" id="staticEmail" value="Doktorský"> |
|
112 |
|
|
113 |
<span class="action-padding input-action-margin sort-icon"> |
|
114 |
<i class="fas fa-sort"></i> |
|
115 |
</span> |
|
116 |
<span class="action-padding action-button input-action-margin"> |
|
117 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
118 |
</span> |
|
119 |
</div> |
|
120 |
<div class="input-action-box input-border-bottom"> |
|
121 |
<input type="text" readonly class="form-control-plaintext" id="staticEmail" value="Navazující"> |
|
122 |
|
|
123 |
<span class="action-padding input-action-margin sort-icon"> |
|
124 |
<i class="fas fa-sort"></i> |
|
125 |
</span> |
|
126 |
<span class="action-padding action-button input-action-margin"> |
|
127 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
128 |
</span> |
|
129 |
|
|
130 |
</div> |
|
131 |
<div class="input-action-box input-border-bottom"> |
|
132 |
<input type="text" readonly class="form-control-plaintext" id="staticEmail" value="Bakalářský"> |
|
133 |
|
|
134 |
<span class="action-padding input-action-margin sort-icon"> |
|
135 |
<i class="fas fa-sort"></i> |
|
136 |
</span> |
|
137 |
<span class="action-padding action-button input-action-margin"> |
|
138 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
139 |
</span> |
|
140 |
</div> |
|
141 |
|
|
142 |
<div class="form-group row form-add-item"> |
|
143 |
<div class="col-md-9"> |
|
144 |
<input type="text" class="form-control" id="name"> |
|
145 |
</div> |
|
146 |
<button type="submit" class="btn btn-primary mb-2">Přidat</button> |
|
147 |
</div> |
|
148 |
</div> |
|
149 |
</div> |
|
150 |
|
|
151 |
<div class="form-group row"> |
|
152 |
<label for="exampleFormControlSelect1" class="col-sm-2">Umístění:</label> |
|
153 |
<div class="col-sm-10"> |
|
154 |
<div th:each="location : ${locations}" class="form-check form-check-inline"> |
|
155 |
<input class="form-check-input" type="checkbox" th:id="'checkbox' + ${location.name}" th:value="${location.name}" th:checked="${parameter.locations.contains(location)}"> |
|
156 |
<label class="form-check-label" th:for="checkbox + ${location.name}" th:text="${location.name}"></label> |
|
157 |
</div> |
|
158 |
</div> |
|
159 |
</div> |
|
160 |
<div class="form-group row"> |
|
161 |
<label for="exampleFormControlSelect1" class="col-sm-2">Funkce:</label> |
|
162 |
<div class="col-sm-10"> |
|
163 |
<select class="mbSelect selectpicker" multiple data-live-search="true"> |
|
164 |
<option th:each="function : ${functions}" th:value="'selectedFunction' + ${function.name}" th:text="${function.name}" th:selected="${parameter.functions.contains(function)}"></option> |
|
165 |
</select> |
|
166 |
</div> |
|
167 |
</div> |
|
168 |
<div class="form-group row"> |
|
169 |
<label for="exampleFormControlSelect1" class="col-sm-2">Operátory:</label> |
|
170 |
<div class="col-sm-10"> |
|
171 |
<select class="mbSelect selectpicker" multiple data-live-search="true"> |
|
172 |
<option th:each="operator : ${operators}" th:value="'selectedOperator' + ${operator.name}" th:text="${operator.name}" th:selected="${parameter.operators.contains(operator)}"></option> |
|
173 |
</select> |
|
174 |
</div> |
|
175 |
</div> |
|
176 |
</div> |
|
177 |
</div> |
|
178 |
</div> |
|
179 |
</div> |
|
180 |
</div> |
|
181 |
</div> |
|
182 |
|
|
183 |
<div class="container box"> |
|
184 |
<div class="col-md-4"> |
|
185 |
<div class="box-header"> |
|
186 |
<h3 class="box-title">Oprávnění</h3> |
|
187 |
</div> |
|
188 |
|
|
189 |
<div th:each="roleWithAccess : ${rolesWithAccess}" class="input-action-box input-border-bottom"> |
|
190 |
<input type="text" readonly class="form-control-plaintext" th:id="selectedRole + ${roleWithAccess.name}" th:value="${roleWithAccess.name}"> |
|
191 |
|
|
192 |
<span class="action-padding input-action-margin sort-icon"> |
|
193 |
<i class="fas fa-sort"></i> |
|
194 |
</span> |
|
195 |
<span class="action-padding action-button input-action-margin"> |
|
196 |
<a href=# class="action-link far fa-trash-alt"></a> |
|
197 |
</span> |
|
198 |
</div> |
|
199 |
|
|
200 |
<div class="form-group row form-add-item"> |
|
201 |
<div class="col-md-9"> |
|
202 |
<select class="form-control " id="selectNewRole"> |
|
203 |
<option th:each="role : ${roles}" th:value="newRole + ${role.name}" th:text="${role.name}"></option> |
|
204 |
</select> |
|
205 |
</div> |
|
206 |
<button type="submit" class="btn btn-primary mb-2">Přidat</button> |
|
207 |
</div> |
|
208 |
</div> |
|
209 |
</div> |
|
210 |
<div class="submit_center_button"> |
|
211 |
<button type="submit" class="btn btn-success mb-2">Uložit</button> |
|
212 |
</div> |
|
213 |
|
|
214 |
</form> |
|
215 |
|
|
216 |
|
|
217 |
</main> |
|
218 |
|
|
219 |
<footer class="text-muted"> |
|
220 |
<div class="container"> |
|
221 |
|
|
222 |
</div> |
|
223 |
</footer> |
|
224 |
|
|
225 |
<script type="text/javascript" src="js/app.js"></script> |
|
226 |
</body> |
|
227 |
</html> |
|
228 |
<script type="text/javascript"> |
|
229 |
$("select").selectpicker(); |
|
230 |
</script> |
src/main/webapp/WEB-INF/templates/index.html | ||
---|---|---|
57 | 57 |
<h3 class="box-title">Seznam sestav</h3> |
58 | 58 |
</div> |
59 | 59 |
<div class="button-container"> |
60 |
<button type="button" class="btn btn-success"><i class="fas fa-plus"></i> Přidat novou sestavu</button> |
|
60 |
|
|
61 |
<a th:href="@{/assembly_new}" class="btn btn-success mb-2"><i class="fas fa-plus"></i> Přidat novou sestavu</a> |
|
61 | 62 |
<button type="button" class="btn btn-success align-right"><i class="fas fa-sort"></i> Upravit řazení</button> |
62 | 63 |
</div> |
63 | 64 |
|
Také k dispozici: Unified diff
re #7886 Creating + Editing assembly
Not working: Adding new role to access list, Loading values for parameter, Adding new values for parameter, disabling functions + operators if data type = enumeration, deleting role from Access list, Deleting parameter. Saving new assembly + checking all form elements.
Added new sql script file for creating test records.
re #7888 Added back button for Creating + Editing assembly page and page for Generating contingency table.