#76 adding style to filters
This commit is contained in:
parent
8400c5d40d
commit
6876d09557
@ -41,6 +41,15 @@ public class TaskController {
|
||||
modelMap.put("filteredTasks", new TaskFilterDto(taskService.findAllDto(), null, null));
|
||||
}
|
||||
|
||||
@GetMapping("/task")
|
||||
public void getTask(ModelMap modelMap, @RequestParam(value = "id") Integer id) {
|
||||
if (id != null && id > 0) {
|
||||
modelMap.put("taskDto", taskService.findOneDto(id));
|
||||
} else {
|
||||
modelMap.put("taskDto", new TaskDto());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/tasks")
|
||||
public void filterTasks(@Valid TaskFilterDto taskFilterDto, ModelMap modelMap) {
|
||||
modelMap.put("filteredTasks", new TaskFilterDto(taskService.filter(taskFilterDto),
|
||||
|
@ -13,6 +13,17 @@
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.filter .bootstrap-select{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.filter-option-inner-inner{
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
font-weight: normal;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.input-tag-name {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
|
@ -27,7 +27,8 @@
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<div class="filter">
|
||||
<h5>Фильтр:</h5>
|
||||
<select class="form-control" th:field="${filteredTasks.status}" id="status"
|
||||
<select class="form-control selectpicker" size="auto" th:field="${filteredTasks.status}"
|
||||
id="status"
|
||||
onchange="this.form.submit();">
|
||||
<option value="">Все статусы</option>
|
||||
<option th:each="status: ${allStatuses}" th:value="${status}"
|
||||
@ -35,7 +36,8 @@
|
||||
status
|
||||
</option>
|
||||
</select>
|
||||
<select class="form-control" th:field="${filteredTasks.tag}" id="tags"
|
||||
<select class="form-control selectpicker" size="auto" data-live-search="true"
|
||||
th:field="${filteredTasks.tag}" id="tags"
|
||||
onchange="this.form.submit();">
|
||||
<option value="">Все теги</option>
|
||||
<option th:each="tag: ${allTags}" th:value="${tag.id}"
|
||||
|
Loading…
Reference in New Issue
Block a user