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
6c91fd87
Commit
6c91fd87
authored
Sep 21, 2022
by
Milovan Samardzic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
izmenaIndexAgreemnt
parent
b799deb5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
SkuciSe/src/main/java/com/example/SkuciSe/controller/OglasController.java
+5
-2
SkuciSe/src/main/resources/templates/index.html
+3
-3
No files found.
SkuciSe/src/main/java/com/example/SkuciSe/controller/OglasController.java
View file @
6c91fd87
...
@@ -14,6 +14,7 @@ import org.springframework.ui.Model;
...
@@ -14,6 +14,7 @@ import org.springframework.ui.Model;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.math.BigDecimal
;
import
java.nio.DoubleBuffer
;
import
java.nio.DoubleBuffer
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -41,7 +42,9 @@ public class OglasController
...
@@ -41,7 +42,9 @@ public class OglasController
@Autowired
@Autowired
LajkRepository
lajkRepo
;
LajkRepository
lajkRepo
;
public
static
float
round
(
double
d
,
int
decimalPlace
)
{
return
BigDecimal
.
valueOf
(
d
).
setScale
(
decimalPlace
,
BigDecimal
.
ROUND_HALF_UP
).
floatValue
();
}
@GetMapping
(
"/novi-oglas"
)
@GetMapping
(
"/novi-oglas"
)
public
String
getNoviOglas
(
Model
model
,
@AuthenticationPrincipal
KorisnikDetails
loggedUser
)
public
String
getNoviOglas
(
Model
model
,
@AuthenticationPrincipal
KorisnikDetails
loggedUser
)
{
{
...
@@ -119,7 +122,7 @@ public class OglasController
...
@@ -119,7 +122,7 @@ public class OglasController
List
<
String
>
list
=
new
ArrayList
<
String
>();
List
<
String
>
list
=
new
ArrayList
<
String
>();
for
(
Oglas
o:
listaOglasa
)
{
for
(
Oglas
o:
listaOglasa
)
{
list
.
add
(
kRepo
.
findCity
(
o
.
getLokacijaId
()));
list
.
add
(
kRepo
.
findCity
(
o
.
getLokacijaId
()));
prosecnaOcenaList
.
add
(
oRepo
.
averageOcenaByOglasId
(
o
.
getOglasId
()
));
prosecnaOcenaList
.
add
(
round
(
oRepo
.
averageOcenaByOglasId
(
o
.
getOglasId
()),
2
));
}
}
model
.
addAttribute
(
"gradovi"
,
list
);
model
.
addAttribute
(
"gradovi"
,
list
);
model
.
addAttribute
(
"lokacije"
,
lRepo
.
findAll
());
model
.
addAttribute
(
"lokacije"
,
lRepo
.
findAll
());
...
...
SkuciSe/src/main/resources/templates/index.html
View file @
6c91fd87
...
@@ -154,9 +154,9 @@
...
@@ -154,9 +154,9 @@
<div
class=
"col-lg-4"
>
<div
class=
"col-lg-4"
>
<div
class=
"features-icons-item mx-auto mb-0 mb-lg-3"
>
<div
class=
"features-icons-item mx-auto mb-0 mb-lg-3"
>
<div
class=
"features-icons-icon d-flex"
><i
class=
"bi-terminal m-auto text-primary"
></i></div>
<div
class=
"features-icons-icon d-flex"
><i
class=
"bi-terminal m-auto text-primary"
></i></div>
<img
src=
"https://
d2dlxvmcs24r4u.cloudfront.net/modules/portals/template1/images/box-3
.png"
height=
"60"
>
<img
src=
"https://
entreprenistapodcast.com/wp-content/uploads/2022/03/how-do-i-get-a-partnership-agreement
.png"
height=
"60"
>
<h3>
Nekretnine na mapi
</h3>
<h3>
Lako zakazivanje obilaska
</h3>
<p
class=
"lead mb-0"
>
Pogledajte rezultate pretrage na mapi i otkrijte dostupne nekretnine na osnovu njihove tačne lokacije
.
</p>
<p
class=
"lead mb-0"
>
Uz nasu aplikaciju mozete lako i brzo zakazati obilazak odabrane nekretnine i cetovati sa vlasnikom
.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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