Style search bar
This commit is contained in:
parent
aa91345523
commit
c9ce59d04f
|
@ -43,10 +43,14 @@ body, html {
|
|||
a {
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
color: $primary-color;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
&:active {
|
||||
color: $primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
|
@ -149,10 +153,33 @@ a {
|
|||
|
||||
.table-layout-search {
|
||||
float: left;
|
||||
padding-bottom: 0.5rem !important;
|
||||
|
||||
.btn-search {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: calc(2.5rem + 2px);
|
||||
line-height: 2.5rem;
|
||||
right: -3rem;
|
||||
border-bottom-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
|
||||
margin-top: 1px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
input:focus ~ .btn-search {
|
||||
border-color: $primary-color;
|
||||
border-width: 2px;
|
||||
margin-top: 0;
|
||||
height: calc(2.5rem + 4px);
|
||||
margin-right: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-layout-action {
|
||||
float: right;
|
||||
line-height: 2.5rem;
|
||||
}
|
||||
|
||||
.table-layout-table {
|
||||
|
@ -160,7 +187,6 @@ a {
|
|||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
clear: both;
|
||||
margin-top: 4rem;
|
||||
|
||||
th {
|
||||
text-align: start;
|
||||
|
|
|
@ -34,7 +34,7 @@ fun Route.account() {
|
|||
+"You have the following rights: ${user.permissions}"
|
||||
br {}
|
||||
a("/logout") {
|
||||
button {
|
||||
button(classes="form-btn") {
|
||||
+"Logout"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,8 +72,8 @@ fun Route.login() {
|
|||
) {
|
||||
value = call.parameters[LocationLogin::next.name] ?: "/"
|
||||
}
|
||||
button(type = ButtonType.submit, classes = "btn btn-primary") {
|
||||
+"LocationLogin"
|
||||
button(type = ButtonType.submit, classes = "form-btn btn-primary") {
|
||||
+"Login"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,9 @@ fun Route.person() {
|
|||
|
||||
action {
|
||||
a("/person/new") {
|
||||
+"Add person"
|
||||
button(classes="form-btn btn-primary") {
|
||||
+"Add person"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,9 @@ fun Route.room() {
|
|||
|
||||
action {
|
||||
a("/room/new") {
|
||||
+"Add room"
|
||||
button(classes="form-btn btn-primary") {
|
||||
+"Add room"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,10 +139,6 @@ fun Route.room() {
|
|||
|
||||
div("form-switch-group") {
|
||||
div("form-group form-switch") {
|
||||
label {
|
||||
htmlFor = "projector"
|
||||
+"Projector"
|
||||
}
|
||||
input(
|
||||
name = "projector",
|
||||
classes = "form-control",
|
||||
|
@ -149,6 +147,10 @@ fun Route.room() {
|
|||
id = "projector"
|
||||
checked = editRoom.projector
|
||||
}
|
||||
label {
|
||||
htmlFor = "projector"
|
||||
+"Projector"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,10 +243,6 @@ fun Route.room() {
|
|||
|
||||
div("form-switch-group") {
|
||||
div("form-group form-switch") {
|
||||
label {
|
||||
htmlFor = "projector"
|
||||
+"Projector"
|
||||
}
|
||||
input(
|
||||
name = "projector",
|
||||
classes = "form-control",
|
||||
|
@ -253,6 +251,10 @@ fun Route.room() {
|
|||
id = "projector"
|
||||
checked = false
|
||||
}
|
||||
label {
|
||||
htmlFor = "projector"
|
||||
+"Projector"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,9 @@ fun Route.user() {
|
|||
|
||||
action {
|
||||
a("/user/new") {
|
||||
+"Add user"
|
||||
button(classes="form-btn btn-primary") {
|
||||
+"Add user"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,10 +117,6 @@ fun Route.user() {
|
|||
for (permission in Permission.values()) {
|
||||
val name = permission.toString().toLowerCase()
|
||||
div("form-group form-switch") {
|
||||
label {
|
||||
htmlFor = "permission-$name"
|
||||
+name.capitalize()
|
||||
}
|
||||
input(
|
||||
name = "permission-$name",
|
||||
classes = "form-control",
|
||||
|
@ -131,6 +129,10 @@ fun Route.user() {
|
|||
readonly = true
|
||||
}
|
||||
}
|
||||
label {
|
||||
htmlFor = "permission-$name"
|
||||
+name.capitalize()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -231,10 +233,6 @@ fun Route.user() {
|
|||
for (permission in Permission.values()) {
|
||||
val name = permission.toString().toLowerCase()
|
||||
div("form-group form-switch") {
|
||||
label {
|
||||
htmlFor = "permission-$name"
|
||||
+name.capitalize()
|
||||
}
|
||||
input(
|
||||
name = "permission-$name",
|
||||
classes = "form-control",
|
||||
|
@ -247,6 +245,10 @@ fun Route.user() {
|
|||
readonly = true
|
||||
}
|
||||
}
|
||||
label {
|
||||
htmlFor = "permission-$name"
|
||||
+name.capitalize()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,9 @@ fun Route.workGroup() {
|
|||
|
||||
action {
|
||||
a("/workgroup/new") {
|
||||
+"Add work group"
|
||||
button(classes = "form-btn btn-primary") {
|
||||
+"Add work group"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,7 +96,7 @@ fun Route.workGroup() {
|
|||
}
|
||||
td(classes = "action") {
|
||||
a("/workgroup/${u.id}") {
|
||||
i("material-icons") { +"edit" }
|
||||
i("material-icons") { +"edit" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -248,12 +250,12 @@ fun Route.workGroup() {
|
|||
}
|
||||
val editWorkGroup = WorkGroup.get(workGroupId.id) ?: return@post
|
||||
|
||||
params["name"]?.let { editWorkGroup.name = it}
|
||||
params["interested"]?.toIntOrNull()?.let { editWorkGroup.interested = it}
|
||||
params["track"]?.toIntOrNull()?.let { editWorkGroup.trackId = it}
|
||||
params["projector"]?.toBoolean()?.let { editWorkGroup.projector = it}
|
||||
params["resolution"]?.toBoolean()?.let { editWorkGroup.resolution = it}
|
||||
params["length"]?.toIntOrNull()?.let { editWorkGroup.length = it}
|
||||
params["name"]?.let { editWorkGroup.name = it }
|
||||
params["interested"]?.toIntOrNull()?.let { editWorkGroup.interested = it }
|
||||
params["track"]?.toIntOrNull()?.let { editWorkGroup.trackId = it }
|
||||
params["projector"]?.let { editWorkGroup.projector = it == "on" }
|
||||
params["resolution"]?.let { editWorkGroup.resolution = it == "on" }
|
||||
params["length"]?.toIntOrNull()?.let { editWorkGroup.length = it }
|
||||
|
||||
editWorkGroup.save()
|
||||
|
||||
|
|
|
@ -14,12 +14,12 @@ class TableTemplate() : Template<FlowContent> {
|
|||
|
||||
override fun FlowContent.apply() {
|
||||
div("table-layout") {
|
||||
form(classes = "table-layout-search") {
|
||||
input(InputType.search, name = "search") {
|
||||
form(classes = "form-group table-layout-search") {
|
||||
input(InputType.search, name = "search", classes = "form-control") {
|
||||
placeholder = "Search"
|
||||
value = searchValue
|
||||
}
|
||||
button(type = ButtonType.submit) {
|
||||
button(type = ButtonType.submit, classes = "form-btn btn-search") {
|
||||
i("material-icons") { +"search" }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue