Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SkuciSe
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tim 2 - 2022
SkuciSe
Commits
f52f760c
Commit
f52f760c
authored
Sep 20, 2022
by
Milovan Samardzic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
frontIzmenaResponzivnost
parent
baac01a4
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
114 additions
and
130 deletions
+114
-130
SkuciSe/src/main/java/com/example/SkuciSe/controller/OglasController.java
+1
-1
SkuciSe/src/main/java/com/example/SkuciSe/controller/ProfileController.java
+6
-1
SkuciSe/src/main/resources/static/css/oglasiStyle.css
+6
-2
SkuciSe/src/main/resources/static/js/main.js
+0
-5
SkuciSe/src/main/resources/templates/korisnik.html
+23
-21
SkuciSe/src/main/resources/templates/moji-zahtevi.html
+12
-25
SkuciSe/src/main/resources/templates/oglas.html
+66
-75
No files found.
SkuciSe/src/main/java/com/example/SkuciSe/controller/OglasController.java
View file @
f52f760c
...
...
@@ -156,7 +156,7 @@ public class OglasController
@PostMapping
(
"/obrisi-oglas/{oglasId}"
)
public
String
postObrisiOglas
(
@AuthenticationPrincipal
KorisnikDetails
loggedUser
,
@PathVariable
(
"oglasId"
)
int
oglasId
)
{
if
(
loggedUser
!=
null
&&
(
loggedUser
.
getKorisnik
().
getTipId
()==
1
||
oRepo
.
findById
(
oglasId
).
getKorisnikId
()==
loggedUser
.
getKorisnik
().
getKorisnikId
()))
{
if
(
loggedUser
!=
null
&&
(
loggedUser
.
getKorisnik
().
getTipId
()==
2
||
oRepo
.
findById
(
oglasId
).
getKorisnikId
()==
loggedUser
.
getKorisnik
().
getKorisnikId
()))
{
oRepo
.
deleteOglas
(
oglasId
);
}
return
"redirect:/lista-oglasa"
;
...
...
SkuciSe/src/main/java/com/example/SkuciSe/controller/ProfileController.java
View file @
f52f760c
...
...
@@ -14,13 +14,18 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Base64
;
import
java.util.List
;
@Controller
public
class
ProfileController
{
public
static
float
round
(
double
d
,
int
decimalPlace
)
{
return
BigDecimal
.
valueOf
(
d
).
setScale
(
decimalPlace
,
BigDecimal
.
ROUND_HALF_UP
).
floatValue
();
}
@Autowired
KorisnikRepository
kRepo
;
...
...
@@ -110,7 +115,7 @@ public class ProfileController
}
model
.
addAttribute
(
"komentari"
,
komentari
);
model
.
addAttribute
(
"korisniciKomentari"
,
korisniciKomentari
);
model
.
addAttribute
(
"avgOcena"
,
komRepo
.
averageOcenaByKorisnikId
(
korisnikId
));
model
.
addAttribute
(
"avgOcena"
,
round
(
komRepo
.
averageOcenaByKorisnikId
(
korisnikId
),
2
));
model
.
addAttribute
(
"countOglas"
,
oRepo
.
countOglasByKorisnikId
(
korisnikId
));
return
"korisnik"
;
}
...
...
SkuciSe/src/main/resources/static/css/oglasiStyle.css
View file @
f52f760c
...
...
@@ -354,4 +354,8 @@ h3{
{
color
:
#ffca08
;
}
/* Set yellow color when star checked */
.starrating
>
input
:hover
~
label
{
color
:
#ffca08
;
}
/* Set yellow color when star hover */
\ No newline at end of file
{
color
:
#ffca08
;
}
/* St yellow color when star hover */
.w-40
{
width
:
40%
;
}
\ No newline at end of file
SkuciSe/src/main/resources/static/js/main.js
View file @
f52f760c
...
...
@@ -114,13 +114,9 @@ $(document).ready(function() {
function
prikaziOglase
(){
document
.
getElementById
(
"div-oglasi"
).
style
.
display
=
"block"
;
document
.
getElementById
(
"div-ocene"
).
style
.
display
=
"none"
;
document
.
getElementById
(
"dugme-oglasi"
).
style
=
"text-decoration:none; border-bottom: 3px solid grey; width:100px; text-align:center;padding-bottom:5px;"
;
document
.
getElementById
(
"dugme-ocene"
).
style
=
""
;
}
function
prikaziOcene
(){
document
.
getElementById
(
"div-oglasi"
).
style
.
display
=
"none"
;
document
.
getElementById
(
"div-ocene"
).
style
.
display
=
"block"
;
document
.
getElementById
(
"dugme-ocene"
).
style
=
"text-decoration:none; border-bottom: 3px solid grey; width:100px; text-align:center;padding-bottom:5px;"
;
document
.
getElementById
(
"dugme-oglasi"
).
style
=
""
;
}
\ No newline at end of file
SkuciSe/src/main/resources/templates/korisnik.html
View file @
f52f760c
...
...
@@ -99,29 +99,27 @@
method=
"GET"
th:action=
"@{/lista-oglasa}"
id=
"filter"
>
<div
class=
"row w-100"
>
<div
class=
"col-3"
>
<div
class=
"card mt-2"
style=
"min-width: 130px"
th:object=
"${korisnik}"
>
<article
class=
"card-group-item"
>
<div
class=
"card mt-2 justify-content-center align-items-center d-flex mt-5"
style=
"min-width: 130px"
th:object=
"${korisnik}"
>
<div
class=
"profilepic"
>
<img
class=
"photo profilepic__image"
id=
"slikaProfil"
style=
"width: 10
0px;height:100px;border-radius:50%"
style=
"width: 12
0px;height:100px;border-radius:50%"
th:src=
"@{'data:image/png;charset=utf-8;base64,'+${korisnik.getSlika()}}"
alt=
"slika korisnika"
>
</div>
<div
class=
"filter-content"
>
<p
class=
"fw-bold h4 mt-3
"
><span
th:text=
"${korisnik.ime + ' ' + korisnik.prezime}"
></span></p>
<p
th:object=
"${avgOcena}"
th:text=
"${'Prosecna ocena korisnika: ' + avgOcena}"
></p>
<p
th:object=
"${countOglas}"
th:text=
"${'Broj aktivnih oglasa: ' + countOglas}"
></p>
<p
class=
"fw-bold h4 mt-3 text-center
"
><span
th:text=
"${korisnik.ime + ' ' + korisnik.prezime}"
></span></p>
<p
class=
"text-center"
th:object=
"${avgOcena}"
th:text=
"${'Prosecna ocena korisnika: ' + avgOcena}"
></p>
<p
class=
"text-center"
th:object=
"${countOglas}"
th:text=
"${'Broj aktivnih oglasa: ' + countOglas}"
></p>
</div>
</article>
</div>
</div>
<div
class=
"col-9"
th:object=
"${slikeOglasa}"
>
<div
class=
"row w-100 box "
style=
"/*! border: 1px solid red; */"
>
<div
class=
"row w-100 box "
>
<div
class=
"col d-flex justify-content-center"
>
<h4
id=
"dugme-oglasi"
class=
"link-secondary"
style=
"
text-decoration:none; border-bottom: 3px solid grey; width:100px; text-align:center;padding-bottom:5px
;"
onclick=
"prikaziOglase()"
>
Oglasi
</h4>
<h4
id=
"dugme-oglasi"
class=
"link-secondary"
style=
"
width:100px; text-align:center;padding-bottom:5px;cursor: pointer
;"
onclick=
"prikaziOglase()"
>
Oglasi
</h4>
</div>
<div
class=
"col d-flex justify-content-center"
>
<h4
id=
"dugme-ocene"
class=
"link-secondary"
style=
"
text-decoration: none
"
onclick=
"prikaziOcene()"
>
Ocene
</h4>
<h4
id=
"dugme-ocene"
class=
"link-secondary"
style=
"
cursor: pointer;
"
onclick=
"prikaziOcene()"
>
Ocene
</h4>
</div>
</div>
<div
id=
"div-oglasi"
>
...
...
@@ -237,17 +235,21 @@
<p
th:text=
"${komentar.komentar}"
></p>
<div
class=
"starrating risingstar d-flex justify-content-end flex-row-reverse"
>
<img
src
th:onload=
"postaviZvezdice([[${komentar.ocena}]])"
>
<input
type=
"radio"
id=
"star5"
name=
"ocenaRadio"
value=
"5"
th:checked=
"${komentar.ocena == 5}"
disabled
/><label
for=
"star5"
title=
"5 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
id=
"star4"
name=
"ocenaRadio"
value=
"4"
th:checked=
"${komentar.ocena == 4}"
disabled
/><label
for=
"star4"
title=
"4 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
id=
"star3"
name=
"ocenaRadio"
value=
"3"
th:checked=
"${komentar.ocena == 3}"
disabled
/><label
for=
"star3"
title=
"3 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
id=
"star2"
name=
"ocenaRadio"
value=
"2"
th:checked=
"${komentar.ocena == 2}"
disabled
/><label
for=
"star2"
title=
"2 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
id=
"star1"
name=
"ocenaRadio"
value=
"1"
th:checked=
"${komentar.ocena == 1}"
disabled
/><label
for=
"star1"
title=
"1 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
th:id=
"${'star' + komentar.komentarVlasnikId + '-5'}"
th:name=
"${'ocenaRadio' + komentar.komentarVlasnikId + '-5'}"
value=
"5"
th:checked=
"${komentar.ocena == 5}"
disabled
/><label
th:for=
"${'star' + komentar.komentarVlasnikId + '-5'}"
title=
"5 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
th:id=
"${'star' + komentar.komentarVlasnikId + '-4'}"
th:name=
"${'ocenaRadio' + komentar.komentarVlasnikId + '-5'}"
value=
"4"
th:checked=
"${komentar.ocena == 4}"
disabled
/><label
th:for=
"${'star' + komentar.komentarVlasnikId + '-4'}"
title=
"4 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
th:id=
"${'star' + komentar.komentarVlasnikId + '-3'}"
th:name=
"${'ocenaRadio' + komentar.komentarVlasnikId + '-5'}"
value=
"3"
th:checked=
"${komentar.ocena == 3}"
disabled
/><label
th:for=
"${'star' + komentar.komentarVlasnikId + '-3'}"
title=
"3 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
th:id=
"${'star' + komentar.komentarVlasnikId + '-2'}"
th:name=
"${'ocenaRadio' + komentar.komentarVlasnikId + '-5'}"
value=
"2"
th:checked=
"${komentar.ocena == 2}"
disabled
/><label
th:for=
"${'star' + komentar.komentarVlasnikId + '-2'}"
title=
"2 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
th:id=
"${'star' + komentar.komentarVlasnikId + '-1'}"
th:name=
"${'ocenaRadio' + komentar.komentarVlasnikId + '-5'}"
value=
"1"
th:checked=
"${komentar.ocena == 1}"
disabled
/><label
th:for=
"${'star' + komentar.komentarVlasnikId + '-1'}"
title=
"1 star"
style=
"pointer-events:none"
></label>
</div>
</div>
</div>
...
...
SkuciSe/src/main/resources/templates/moji-zahtevi.html
View file @
f52f760c
...
...
@@ -102,30 +102,17 @@
<h2
th:if=
"${oglasi.size() == 0}"
class=
"text-center"
>
Jos niste poslali nijedan zahtev!
</h2>
<div
class=
"card mb-3"
th:each=
"oglas: ${oglasi}"
style=
"background: transparent"
th:if=
"${!zahtevi[oglasStat.index].korisnikKom}"
>
<div
class=
"row"
>
<div
class=
"col-lg-2 col-md-
3 col-sm-2 col-xs-
2 d-flex justify-content-center align-items-center"
>
<div
class=
"col-lg-2 col-md-
12 col-sm-12 col-xs-1
2 d-flex justify-content-center align-items-center"
>
<img
th:if=
"${zahtevi[oglasStat.index].status.toString() == 'POTVRDJEN'}
"
th:src=
"@{'data:image/png;charset=utf-8;base64,'+${
slike[oglasStat.index].slikaCode
}}"
style=
"width: 120px;height: 120px;border-radius: 50%;object-fit: cover;
"
th:src=
"@{'data:image/png;charset=utf-8;base64,'+${
vlasnici[oglasStat.index].getSlika()
}}"
alt=
"slika korisnika"
style=
"width: 150px;height: 150px;border-radius: 50%;object-fit: cover; border: green 3px solid"
>
<img
th:if=
"${zahtevi[oglasStat.index].status.toString() == 'CEKANJE'}"
th:src=
"@{'data:image/png;charset=utf-8;base64,'+${slike[oglasStat.index].slikaCode}}"
alt=
"slika korisnika"
style=
"width: 150px;height: 150px;border-radius: 50%;object-fit: cover; border: yellow 3px solid"
>
<img
th:if=
"${zahtevi[oglasStat.index].status.toString() == 'ZAVRSEN'}"
th:src=
"@{'data:image/png;charset=utf-8;base64,'+${slike[oglasStat.index].slikaCode}}"
alt=
"slika korisnika"
style=
"width: 150px;height: 150px;border-radius: 50%;object-fit: cover; border: blue 3px solid"
class=
"w-sm-50"
>
<img
th:if=
"${zahtevi[oglasStat.index].status.toString() == 'ODBIJEN'}"
th:src=
"@{'data:image/png;charset=utf-8;base64,'+${slike[oglasStat.index].slikaCode}}"
alt=
"slika korisnika"
style=
"width: 150px;height: 150px;border-radius: 50%;object-fit: cover; border: red 3px solid"
>
th:styleappend=
"${zahtevi[oglasStat.index].status.toString() == 'POTVRDJEN' ? 'border: green 3px solid'
: zahtevi[oglasStat.index].status.toString() == 'CEKANJE' ? 'border: yellow 3px solid'
: zahtevi[oglasStat.index].status.toString() == 'ODBIJEN' ? 'border: red 3px solid'
: 'border: blue 3px solid'}"
>
</div>
<div
class=
"col-lg-3 col-md-
4 col-sm-2 col-xs-3
"
>
<div
class=
"col-lg-3 col-md-
12 col-sm-12 col-xs-12
"
>
<div
class=
"card-body"
>
<a
class=
"card-title"
th:href=
"@{/lista-oglasa/{oglasId}(oglasId=${oglas.oglasId})}"
...
...
@@ -159,7 +146,7 @@
</button>
</form>
</div>
<div
class=
"col-lg-7 col-md-
5 col-sm-7 col-xs-7
d-flex align-items-center flex-row justify-content-center"
th:if=
"${(zahtevi[oglasStat.index].status.toString() == 'ZAVRSEN')}"
>
<div
class=
"col-lg-7 col-md-
12 col-sm-12 col-xs-12
d-flex align-items-center flex-row justify-content-center"
th:if=
"${(zahtevi[oglasStat.index].status.toString() == 'ZAVRSEN')}"
>
<form
method=
"get"
class=
"row w-100 h-100 flex-wrap flex-row"
th:action=
"@{/profile/moji-zahtevi/sacuvaj-komentar}"
th:if=
"${zahtevi[oglasStat.index].status.toString() == 'ZAVRSEN'}"
>
...
...
@@ -186,14 +173,14 @@
th:for=
"${'star' + zahtevi[oglasStat.index].zahtevId + '-1'}"
title=
"1 star"
></label>
</div>
</div>
<div
class=
"col-lg-3 col-md-3 col-sm-3 col-xs-3 d-flex justify-content-center align-items-center"
>
<button
type=
"submit"
class=
"btn btn-secondary text-wrap w-100 h-md-50"
>
Komentarisi
</button>
<div
class=
"col-lg-3 col-md-12 col-sm-12 col-xs-12 d-flex justify-content-center align-items-center"
>
<button
type=
"submit"
class=
"btn btn-secondary text-wrap w-100"
>
Komentarisi
</button>
<button
type=
"button"
class=
"btn btn-secondary text-wrap w-100 ml-1"
>
Završi
</button>
</div>
</form>
<form
method=
"get"
th:action=
"@{/profile/moji-zahtevi/sacuvaj-bez-komentara}"
>
<input
type=
"text"
th:value=
"${zahtevi[oglasStat.index].zahtevId}"
name=
"zahtevId"
style=
"display: none"
>
<button
class=
"btn btn-primary"
type=
"submit"
>
Završi
</button>
</form>
</div>
</div>
...
...
SkuciSe/src/main/resources/templates/oglas.html
View file @
f52f760c
...
...
@@ -108,7 +108,7 @@
<button
type=
"button"
class=
"btn-close"
data-dismiss=
"alert"
></button>
</div>
<div
class=
"row mb-5 flex-row"
>
<div
class=
"col-lg-6 col-md-
6 col-sm-6
"
>
<div
class=
"col-lg-6 col-md-
11 col-sm-11
"
>
<div
id=
"custCarousel"
class=
"carousel slide"
data-ride=
"carousel"
align=
"center"
>
<!-- slides -->
<div
class=
"carousel-inner"
>
...
...
@@ -140,20 +140,27 @@
</ol>
</div>
</div>
<div
class=
"col-lg-5 col-md-
5 col-sm-5
"
>
<div
class=
"col-lg-5 col-md-
11 col-sm-11
"
>
<div
class=
"col d-flex flex-column justify-content-center align-items-center border-bottom-grey gradient-bg"
>
<div
class=
"row"
>
<h1
th:text=
"${oglas.naslov}"
class=
"oglas-naslov"
></h1>
</div>
<div
class=
"row w-100 border-bottom-grey my-3 flex-row
justify-content-end align-items-center
pb-3"
>
<div
class=
"col
d-flex justify-content-evenly
"
style=
"color: #777;"
>
<div
class=
"row w-100 border-bottom-grey my-3 flex-row pb-3"
>
<div
class=
"col
-4 d-flex justify-content-start align-items-center
"
style=
"color: #777;"
>
<p
th:object=
"${likesCount}"
>
<span
th:text=
"${likesCount}"
></span>
<a
th:if=
"${(loggedUser==null)}"
th:href=
"@{/login-zahtev/{oglasId}(oglasId=${oglas.oglasId})}"
style=
"text-decoration: none; color: grey;"
><i
class=
"fa-solid fa-heart"
></i></a>
<a
th:if=
"${(loggedUser!=null)&&(!liked)}"
th:href=
"@{/lajkuj-oglas/{oglasId}(oglasId=${oglas.oglasId})}"
style=
"text-decoration: none; color:grey"
><i
class=
"fa-solid fa-heart"
></i></a>
<a
th:if=
"${(loggedUser!=null)&&(liked)}"
th:href=
"@{/lajkuj-oglas/{oglasId}(oglasId=${oglas.oglasId})}"
style=
"text-decoration: none; color: red;"
><i
class=
"fa-solid fa-heart"
></i></a>
<a
th:if=
"${(loggedUser==null)}"
th:href=
"@{/login-zahtev/{oglasId}(oglasId=${oglas.oglasId})}"
style=
"text-decoration: none; color: grey;"
><i
class=
"fa-solid fa-heart"
></i></a>
<a
th:if=
"${(loggedUser!=null)&&(!liked)}"
th:href=
"@{/lajkuj-oglas/{oglasId}(oglasId=${oglas.oglasId})}"
style=
"text-decoration: none; color:grey"
><i
class=
"fa-solid fa-heart"
></i></a>
<a
th:if=
"${(loggedUser!=null)&&(liked)}"
th:href=
"@{/lajkuj-oglas/{oglasId}(oglasId=${oglas.oglasId})}"
style=
"text-decoration: none; color: red;"
><i
class=
"fa-solid fa-heart"
></i></a>
</p>
</div>
<div
class=
"col-8 justify-content-end align-items-center flex-row d-flex"
>
<a
th:href=
"@{/korisnik/{korisnikId}(korisnikId=${vlasnik.korisnikId})}"
th:text=
"${vlasnik.ime + ' '+ vlasnik.prezime}"
class=
"text-right w-50"
style=
"color:#495056;text-decoration: none"
></a>
...
...
@@ -163,6 +170,7 @@
alt=
"Image Description"
>
</div>
</div>
</div>
<div
class=
"col d-flex justify-content-evenly"
style=
"color: #777;"
>
<h4
th:text=
"${oglas.cena*oglas.kvadratura} + '$'"
></h4>
<h4
th:text=
"${oglas.lokacija} + ', '+${grad}"
></h4>
...
...
@@ -192,11 +200,16 @@
</div>
</div>
</div>
<div
class=
"row mt-3 pl-3 pr-3"
>
<div
class=
"row mt-3 pl-3 pr-3
border-bottom-grey
"
>
<div
class=
"col"
>
<p
class=
"text-wrap"
th:text=
"${'Opis: ' + oglas.opis}"
style=
"text-align: justify;"
></p>
</div>
</div>
<div
class=
"row w-100 justify-content-end align-items-center mt-2 mb-3"
th:if=
"${(oglas.korisnikId == loggedUser.getKorisnik().korisnikId) || (loggedUser.getKorisnik().tipId == 2)}"
>
<form
method=
"POST"
class=
"w-100 justify-content-end align-items-center d-flex"
th:action=
"@{/obrisi-oglas/{oglasId}(oglasId=${oglas.oglasId})}"
>
<button
type=
"submit"
class=
"btn btn-danger w-25"
>
Obrisi oglas
</button>
</form>
</div>
<div
class=
"row"
th:if=
"${(loggedUser !=null) && (oglas.korisnikId != loggedUser.getKorisnik().korisnikId)}"
>
<button
type=
"button"
class=
"btn btn-primary"
id=
"zahtevDugme"
>
Zakazite obilazak
</button>
...
...
@@ -232,8 +245,9 @@
<div
class=
"row"
>
<div
class=
"col-5"
>
<div
class=
"container"
>
<h1>
Komentari
</h1>
<div
class=
"row"
th:object=
"${korisniciKomentari}"
>
<div
class=
"col-
md-8
"
th:each=
"komentar:${komentari}"
>
<div
class=
"col-
12
"
th:each=
"komentar:${komentari}"
>
<div
class=
"media g-mb-30 media-comment"
>
<div
class=
"media-body u-shadow-v18 g-bg-secondary g-pa-30"
>
<div
class=
"row"
>
...
...
@@ -252,24 +266,22 @@
</div>
</div>
<p
class=
"pt-3"
th:text=
"${komentar.komentar}"
></p>
<div
class=
"starrating risingstar d-flex justify-content-end flex-row-reverse"
>
<img
src
th:onload=
"postaviZvezdice([[${komentar.ocena}]])"
>
<input
type=
"radio"
id=
"star5"
name=
"ocenaRadio"
value=
"5"
<input
type=
"radio"
th:id=
"${'star' + komentar.komentarId + '-5'}"
th:name=
"${'ocenaRadio' + komentar.komentarId + '-5'}"
value=
"5"
th:checked=
"${komentar.ocena == 5}"
disabled
/><label
for=
"star5
"
title=
"5 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
id=
"star4"
name=
"ocenaRadio
"
value=
"4"
th:for=
"${'star' + komentar.komentarId + '-5'}
"
title=
"5 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
th:id=
"${'star' + komentar.komentarId + '-4'}"
th:name=
"${'ocenaRadio' + komentar.komentarId + '-5'}
"
value=
"4"
th:checked=
"${komentar.ocena == 4}"
disabled
/><label
for=
"star4
"
title=
"4 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
id=
"star3"
name=
"ocenaRadio
"
value=
"3"
th:for=
"${'star' + komentar.komentarId + '-4'}
"
title=
"4 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
th:id=
"${'star' + komentar.komentarId + '-3'}"
th:name=
"${'ocenaRadio' + komentar.komentarId + '-5'}
"
value=
"3"
th:checked=
"${komentar.ocena == 3}"
disabled
/><label
for=
"star3
"
title=
"3 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
id=
"star2"
name=
"ocenaRadio
"
value=
"2"
th:for=
"${'star' + komentar.komentarId + '-3'}
"
title=
"3 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
th:id=
"${'star' + komentar.komentarId + '-2'}"
th:name=
"${'ocenaRadio' + komentar.komentarId + '-5'}
"
value=
"2"
th:checked=
"${komentar.ocena == 2}"
disabled
/><label
for=
"star2
"
title=
"2 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
id=
"star1"
name=
"ocenaRadio
"
value=
"1"
th:for=
"${'star' + komentar.komentarId + '-2'}
"
title=
"2 star"
style=
"pointer-events:none"
></label>
<input
type=
"radio"
th:id=
"${'star' + komentar.komentarId + '-1'}"
th:name=
"${'ocenaRadio' + komentar.komentarId + '-5'}
"
value=
"1"
th:checked=
"${komentar.ocena == 1}"
disabled
/><label
for=
"star1
"
title=
"1 star"
style=
"pointer-events:none"
></label>
th:for=
"${'star' + komentar.komentarId + '-1'}
"
title=
"1 star"
style=
"pointer-events:none"
></label>
</div>
</div>
</div>
...
...
@@ -277,43 +289,23 @@
</div>
</div>
</div>
<div
class=
"col-
5
"
>
<div
class=
"
container container-main
d-flex align-items-center justify-content-center flex-column"
<div
class=
"col-
7
"
>
<div
class=
"d-flex align-items-center justify-content-center flex-column"
th:object=
"${korisnici}"
th:if=
"${(loggedUser!=null)&&(loggedUser.korisnik.korisnikId == oglas.korisnikId)}"
>
<h1
th:if=
"${korisnici.size() > 0}"
>
Spisak zahteva za obilazak
</h1>
<div
class=
"row w-100 h-50"
style=
"margin-top:50px;"
>
<div
class=
"card mb-3"
th:each=
"korisnik: ${korisnici}"
style=
"background: transparent"
th:if=
"${!zahtevi[korisnikStat.index].vlasnikKom}"
>
<div
class=
"row"
>
<div
class=
"col-md-2 d-flex justify-content-center align-items-center"
>
<img
th:if=
"${zahtevi[korisnikStat.index].status.toString() == 'POTVRDJEN'}"
th:src=
"@{'data:image/png;charset=utf-8;base64,'+${korisnik.getSlika()}}"
alt=
"slika korisnika"
style=
"width: 150px;height: 150px;border-radius: 50%;object-fit: cover;
border: green 5px solid"
>
<img
th:if=
"${zahtevi[korisnikStat.index].status.toString() == 'CEKANJE'}"
th:src=
"@{'data:image/png;charset=utf-8;base64,'+${korisnik.getSlika()}}"
alt=
"slika korisnika"
style=
"width: 150px;height: 150px;border-radius: 50%;object-fit: cover;
border: yellow 5px solid"
>
<img
th:if=
"${zahtevi[korisnikStat.index].status.toString() == 'ZAVRSEN'}"
th:src=
"@{'data:image/png;charset=utf-8;base64,'+${korisnik.getSlika()}}"
alt=
"slika korisnika"
style=
"width: 150px;height: 150px;border-radius: 50%;object-fit: cover;
border: blue 5px solid"
>
<h1
th:if=
"${korisnici.size() > 0}"
class=
"mt-2 mb-5"
>
Spisak zahteva za obilazak
</h1>
<div
class=
"card mb-3"
th:each=
"korisnik: ${korisnici}"
style=
"background: transparent"
th:if=
"${!zahtevi[korisnikStat.index].vlasnikKom}"
>
<div
class=
"row flex-sm-wrap w-100"
>
<div
class=
"col-lg-2 col-md-12 col-sm-12 col-xs-12 d-flex justify-content-around align-items-center"
>
<img
th:if=
"${zahtevi[korisnikStat.index].status.toString() == 'ODBIJEN'}
"
style=
"width: 90px;height: 100px;border-radius: 50%;object-fit: cover;
"
th:src=
"@{'data:image/png;charset=utf-8;base64,'+${korisnik.getSlika()}}"
alt=
"slika korisnika"
style=
"width: 150px;height: 150px;border-radius: 50%;object-fit: cover;
border: red 5px solid"
>
th:styleappend=
"${zahtevi[korisnikStat.index].status.toString() == 'POTVRDJEN' ? 'border: green 3px solid'
: zahtevi[korisnikStat.index].status.toString() == 'CEKANJE' ? 'border: yellow 3px solid'
: 'border: blue 3px solid'}"
>
</div>
<div
class=
"col-md-4"
>
<div
class=
"card-body"
>
<div
class=
"col-lg-3 col-md-12 col-sm-12 col-xs-12 d-flex justify-content-center align-items-lg-start align-items-md-center align-items-sm-center align-items-xs-center flex-column"
>
<h5
class=
"card-title"
th:text=
"${korisnik.getIme() + ' ' + korisnik.getPrezime()}"
></h5>
<p
class=
"card-text"
...
...
@@ -321,20 +313,12 @@
Email:
<span
th:text=
"${korisnik.getEmail()}"
></span><br>
Telefon:
<span
th:text=
"${korisnik.getTelefon()}"
></span>
</p>
<button
class=
"btn btn-primary
"
<button
class=
"btn btn-dark
"
th:onclick=
"window.open('/chat?email='+[[${korisnik.getEmail()}]],'mywindow','menubar=1,width=650,height=900')"
>
Posaljite poruku
<i
class=
"fas fa-sms"
></i>
Chat
</button>
</div>
</div>
<div
class=
"col-md-3 d-flex flex-column justify-content-around align-items-center"
>
<div
class=
"card-body"
>
<p
class=
"card-text"
>
<span
th:text=
"${zahtevi[korisnikStat.index].datum + ' ' + zahtevi[korisnikStat.index].vreme}"
></span>
</p>
</div>
</div>
<div
class=
"col-md-3 d-flex flex-column justify-content-around align-items-center"
>
<div
class=
"col-lg-5 col-md-12 col-sm-12 col-xs-12 d-flex flex-column justify-content-around align-items-center p-2"
>
<form
method=
"get"
th:action=
"@{/oceni-korisnika}"
>
<input
type=
"text"
th:value=
"${oglas.oglasId}"
name=
"oglasId"
style=
"display: none"
/>
...
...
@@ -344,6 +328,9 @@
style=
"display: none"
>
<input
type=
"text"
th:value=
"${zahtevi[korisnikStat.index].zahtevId}"
name=
"zahtevId"
style=
"display: none"
>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"2"
name=
"komentar"
></textarea>
<div
class=
"starrating risingstar d-flex justify-content-center flex-row-reverse"
>
<input
type=
"radio"
th:id=
"${'star' + zahtevi[korisnikStat.index].zahtevId + '-5'}"
...
...
@@ -370,21 +357,28 @@
name=
"ocenaRadio"
value=
"1"
/><label
th:for=
"${'star' + zahtevi[korisnikStat.index].zahtevId + '-1'}"
title=
"1 star"
></label>
<textarea
class=
"form-control h-100"
id=
"exampleFormControlTextarea1"
rows=
"3"
name=
"komentar"
></textarea>
</div>
<button
class=
"btn btn-primary"
type=
"submit"
>
Oceni
</button>
<div
class=
"row flex-row justify-content-between align-items-center"
>
<button
class=
"btn btn-primary w-40"
type=
"submit"
>
Oceni
</button>
<button
class=
"btn btn-primary w-40"
type=
"button"
onclick=
"document.getElementById('formaZavrsi').submit(); return false;"
>
Zavrsi
</button>
</div>
</form>
<form
method=
"get"
th:action=
"@{/oceni-bez-komentara}
"
>
<form
method=
"get"
th:action=
"@{/oceni-bez-komentara}"
id=
"formaZavrsi
"
>
<input
type=
"text"
th:value=
"${zahtevi[korisnikStat.index].zahtevId}"
name=
"zahtevId"
style=
"display: none"
>
<input
type=
"text"
th:value=
"${oglas.oglasId}"
name=
"oglasId"
style=
"display: none"
>
<button
class=
"btn btn-primary"
type=
"submit"
>
Završi
</button>
</form>
</div>
<div
class=
"col-md-2 d-flex flex-column justify-content-around align-items-center"
<div
class=
"col-lg-2 col-md-12 col-sm-12 col-xs-12 d-flex flex-column justify-content-around align-items-center"
>
<p
class=
"card-text"
>
<span
th:text=
"${zahtevi[korisnikStat.index].datum + ' ' + zahtevi[korisnikStat.index].vreme}"
></span>
</p>
</div>
<div
class=
"col-lg-2 col-md-12 col-sm-12 col-xs-12 d-flex flex-column justify-content-around align-items-center"
th:if=
"${zahtevi[korisnikStat.index].status.toString() == 'CEKANJE'}"
>
<form
method=
"GET"
th:action=
"@{/oglas-edit/{oglasId}/prihvati-zahtev/{zahtevId}(oglasId=${zahtevi[korisnikStat.index].oglasId},zahtevId=${zahtevi[korisnikStat.index].zahtevId})}"
>
...
...
@@ -396,11 +390,9 @@
<button
type=
"submit"
class=
"btn btn-danger"
>
Odbij zahtev
</button>
</form>
</div>
<div
class=
"col-md-
2 d-flex flex-column justify-content-around align-items-center"
<div
class=
"col-lg-2 col-md-12 col-sm-12 col-xs-1
2 d-flex flex-column justify-content-around align-items-center"
th:if=
"${zahtevi[korisnikStat.index].status.toString() == 'ODBIJEN'}"
>
<form
method=
"GET"
>
<!--OBRISI ZAHTEV TH:ACTION="@{/oglas-edit/{oglasId}/obrisi-zahtev/}"-->
<form
method=
"GET"
>
<button
type=
"submit"
class=
"btn btn-danger"
>
Obrisi zahtev
</button>
</form>
</div>
...
...
@@ -409,7 +401,6 @@
</div>
</div>
</div>
</div>
</div>
<div
class=
"container-fluid pb-0 mb-0 justify-content-center text-light "
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment