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
7bf9e5e4
Commit
7bf9e5e4
authored
Sep 15, 2022
by
Milovan Samardzic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
indexSlikaIZahtevAlert
parent
d23f1a44
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
8 deletions
+22
-8
SkuciSe/src/main/java/com/example/SkuciSe/controller/ZahtevController.java
+3
-1
SkuciSe/src/main/resources/static/css/style.css
+9
-1
SkuciSe/src/main/resources/templates/index.html
+3
-3
SkuciSe/src/main/resources/templates/lista-korisnika.html
+2
-2
SkuciSe/src/main/resources/templates/oglas.html
+5
-1
No files found.
SkuciSe/src/main/java/com/example/SkuciSe/controller/ZahtevController.java
View file @
7bf9e5e4
...
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.servlet.mvc.support.RedirectAttributes
;
import
java.util.Date
;
...
...
@@ -30,9 +31,10 @@ public class ZahtevController {
}
@PostMapping
(
"/obradi-zahtev/{id}"
)
public
String
postObradizahtev
(
Model
model
,
@AuthenticationPrincipal
KorisnikDetails
loggedUser
,
@ModelAttribute
Zahtev
noviZahtev
,
@ModelAttribute
(
"datumIVreme"
)
String
datumIVreme
,
@PathVariable
(
"id"
)
int
oglasId
)
public
String
postObradizahtev
(
Model
model
,
@AuthenticationPrincipal
KorisnikDetails
loggedUser
,
@ModelAttribute
Zahtev
noviZahtev
,
@ModelAttribute
(
"datumIVreme"
)
String
datumIVreme
,
@PathVariable
(
"id"
)
int
oglasId
,
RedirectAttributes
redirectAttributes
)
{
zRepo
.
insert
(
loggedUser
.
getKorisnik
().
getKorisnikId
(),
oglasId
,
noviZahtev
,
datumIVreme
);
redirectAttributes
.
addFlashAttribute
(
"zakazan"
,
true
);
return
"redirect:/lista-oglasa/"
+
oglasId
;
}
...
...
SkuciSe/src/main/resources/static/css/style.css
View file @
7bf9e5e4
...
...
@@ -326,6 +326,12 @@ p {
border-radius
:
50%
;
object-fit
:
cover
;
}
#slikaProfil1
{
width
:
150px
;
height
:
150px
;
border-radius
:
50%
;
object-fit
:
cover
;
}
.fab.fa-twitter
{
color
:
#8ab7f1
;
...
...
@@ -513,6 +519,7 @@ p {
height
:
100%
;
}
.pozadinaSlika
{
/*background-image:*/
background-image
:
url("https://wallpaperaccess.com/full/1895610.jpg")
;
background-repeat
:
no-repeat
;
background-size
:
cover
;
}
\ No newline at end of file
SkuciSe/src/main/resources/templates/index.html
View file @
7bf9e5e4
...
...
@@ -97,7 +97,7 @@
<div
class=
"row justify-content-center w-100"
>
<div
class=
"col d-flex justify-content-center align-items-center"
>
<div
class=
"text-center text-white w-100"
>
<h1
class=
"mb-5"
style=
"color:
black
"
>
Pretrazite oglase
</h1>
<h1
class=
"mb-5"
style=
"color:
white
"
>
Pretrazite oglase
</h1>
<form
class=
"form-subscribe"
method=
"GET"
th:action=
"@{/lista-oglasa}"
>
<div
class=
"row"
>
<div
class=
"col-3"
>
...
...
@@ -109,11 +109,11 @@
</div>
<div
class=
"col-3"
>
<input
type=
"radio"
name=
"vrstaOglasaId"
id=
"radiodugme1"
value=
"1"
>
<label
for=
"radiodugme1"
style=
"color:
black
"
>
Prodaja
</label>
<label
for=
"radiodugme1"
style=
"color:
white
"
>
Prodaja
</label>
</div>
<div
class=
"col-3"
>
<input
type=
"radio"
name=
"vrstaOglasaId"
id=
"radiodugme2"
value=
"2"
>
<label
for=
"radiodugme2"
style=
"color:
black
"
>
Iznajmljivanje
</label>
<label
for=
"radiodugme2"
style=
"color:
white
"
>
Iznajmljivanje
</label>
</div>
<div
class=
"col-3"
>
<button
class=
"btn btn-secondary btn-lg"
id=
"submitButton"
type=
"submit"
>
Pretrazi
...
...
SkuciSe/src/main/resources/templates/lista-korisnika.html
View file @
7bf9e5e4
...
...
@@ -104,9 +104,9 @@
<div
class=
"card mb-3"
th:each=
"korisnik: ${korisnici}"
>
<div
class=
"row no-gutters"
>
<div
class=
"col-md-4 d-flex justify-content-center align-items-center"
>
<img
style=
"width: 150px;height: 150px"
<img
th:src=
"@{'data:image/png;charset=utf-8;base64,'+${korisnik.getSlika()}}"
alt=
"slika korisnika"
>
alt=
"slika korisnika"
id=
"slikaProfil1"
>
</div>
<div
class=
"col-md-6"
>
<div
class=
"card-body"
>
...
...
SkuciSe/src/main/resources/templates/oglas.html
View file @
7bf9e5e4
...
...
@@ -88,6 +88,10 @@
</nav>
<div
class=
"mt-5 ml-5 mr-0 w-100"
th:object=
"${oglasId}"
>
<div
class=
"alert alert-success d-flex justify-content-between align-items-center"
th:object=
"${zakazan}"
th:if=
"${zakazan == true}"
style=
"width: 96%"
>
<div><strong>
Uspesno!
</strong>
Uspesno ste poslali zahtev za obilazak!
</div>
<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
id=
"custCarousel"
class=
"carousel slide"
data-ride=
"carousel"
align=
"center"
>
...
...
@@ -166,7 +170,7 @@
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
th:if=
"${(loggedUser !=null) && (oglas.korisnikId != loggedUser.getKorisnik().korisnikId)}"
>
<button
type=
"button"
class=
"btn btn-primary"
id=
"zahtevDugme"
>
Zakazite obilazak
</button>
<div
class=
"row mt-3"
id =
"izlazDiv"
style=
"display: none;"
>
<form
class=
"d-flex justify-content-center flex-column align-items-end"
th:if=
"${loggedUser != null}"
th:action=
"@{/obradi-zahtev/{id}(id=${oglasId})}"
method=
"POST"
th:object=
"${noviZahtev}"
>
...
...
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