Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
awesomelands
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
Vuk Lazovic
awesomelands
Commits
a75f7959
Commit
a75f7959
authored
Sep 18, 2022
by
Vuk Lazovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PRIKAZIVANJE OGLASA
parent
4f9e193d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
30 deletions
+45
-30
.idea/workspace.xml
+16
-10
src/main/java/app/usluga/web/MainKontroler.java
+16
-0
src/main/java/app/usluga/web/OglasController.java
+2
-7
src/main/resources/templates/oglasi.html
+11
-13
src/main/resources/templates/property.html
+0
-0
No files found.
.idea/workspace.xml
View file @
a75f7959
...
...
@@ -4,14 +4,12 @@
<option
name=
"autoReloadType"
value=
"ALL"
/>
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"6e82c7f1-3949-40e2-bc26-7eb50b36f993"
name=
"Default Changelist"
comment=
"dodata ulogovana verzija"
>
<change
afterPath=
"$PROJECT_DIR$/src/main/java/app/model/Oglas.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/src/main/java/app/rep/OglasRep.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/src/main/java/app/usluga/OglasUsluga.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/src/main/java/app/usluga/web/OglasController.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/src/main/resources/templates/oglasi.html"
afterDir=
"false"
/>
<list
default=
"true"
id=
"6e82c7f1-3949-40e2-bc26-7eb50b36f993"
name=
"Default Changelist"
comment=
"DODATA FUNKCIONALNOST ZA CITANJE IZ BAZEe"
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/main/java/app/usluga/web/MainKontroler.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/main/java/app/usluga/web/MainKontroler.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/main/java/app/usluga/web/OglasController.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/main/java/app/usluga/web/OglasController.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/main/resources/templates/oglasi.html"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/main/resources/templates/oglasi.html"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/main/resources/templates/property.html"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/main/resources/templates/property.html"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -49,7 +47,7 @@
<map>
<entry
key=
"com.haulmont.jpb.jpaInspector"
value=
"true"
/>
<entry
key=
"com.haulmont.jpb.jpaPalette"
value=
"true"
/>
<entry
key=
"com.haulmont.jpb.jpaStructure"
value=
"
tru
e"
/>
<entry
key=
"com.haulmont.jpb.jpaStructure"
value=
"
fals
e"
/>
</map>
</option>
</component>
...
...
@@ -195,7 +193,7 @@
<updated>
1663427032475
</updated>
<workItem
from=
"1663427050863"
duration=
"1923000"
/>
<workItem
from=
"1663500169914"
duration=
"6177000"
/>
<workItem
from=
"1663512751550"
duration=
"
480
7000"
/>
<workItem
from=
"1663512751550"
duration=
"
1059
7000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"dodata ulogovana verzija"
>
<created>
1663501497955
</created>
...
...
@@ -204,7 +202,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1663501497955
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"2"
/>
<task
id=
"LOCAL-00002"
summary=
"DODATA FUNKCIONALNOST ZA CITANJE IZ BAZEe"
>
<created>
1663517623868
</created>
<option
name=
"number"
value=
"00002"
/>
<option
name=
"presentableId"
value=
"LOCAL-00002"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1663517623868
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"3"
/>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
...
...
@@ -265,7 +270,8 @@
<component
name=
"VcsManagerConfiguration"
>
<option
name=
"ADD_EXTERNAL_FILES_SILENTLY"
value=
"true"
/>
<MESSAGE
value=
"dodata ulogovana verzija"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"dodata ulogovana verzija"
/>
<MESSAGE
value=
"DODATA FUNKCIONALNOST ZA CITANJE IZ BAZEe"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"DODATA FUNKCIONALNOST ZA CITANJE IZ BAZEe"
/>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/app/model/Korisnik.java"
>
...
...
src/main/java/app/usluga/web/MainKontroler.java
View file @
a75f7959
package
app
.
usluga
.
web
;
import
app.model.Oglas
;
import
app.usluga.OglasUsluga
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.ui.Model
;
...
...
@@ -33,5 +35,19 @@ public class MainKontroler {
return
"dodaj"
;
}
@Autowired
private
OglasUsluga
oglasUsluga
;
@GetMapping
(
"/oglasi"
)
public
String
prikazOglasa
(
Model
model
)
{
List
<
Oglas
>
oglasi
=
oglasUsluga
.
getAll
();
model
.
addAttribute
(
"oglasi"
,
oglasi
);
return
"property"
;
}
}
src/main/java/app/usluga/web/OglasController.java
View file @
a75f7959
...
...
@@ -24,14 +24,9 @@ public class OglasController
{
List
<
Oglas
>
oglasi
=
oglasUsluga
.
getAll
();
model
.
addAttribute
(
"SIZE"
,
"3"
);
int
i
=
0
;
for
(
Oglas
O
:
oglasi
)
{
i
++;
model
.
addAttribute
(
"A"
+
String
.
valueOf
(
i
),
O
.
getIme
());
model
.
addAttribute
(
"oglasi"
,
oglasi
);
}
...
...
src/main/resources/templates/oglasi.html
View file @
a75f7959
...
...
@@ -6,24 +6,22 @@
</head>
<body>
<div
id=
"div"
>
saas
</div>
<script
th:inline=
"javascript"
>
/*<![CDATA[*/
let
oglasi
=
/*[[${oglasi}]]*/
[]
let
x
=
document
.
getElementById
(
"div"
);
s
=
''
for
(
let
i
=
0
;
i
<
10
;
i
++
)
s
+=
"<h1> CEVU NAJJACA GLAVA </h1>"
x
.
innerHTML
=
s
;
</script>
let
size
=
/*[[${SIZE}]]*/
''
;
console
.
log
(
size
)
for
(
let
i
=
0
;
i
<
size
;
i
++
)
{
let
name
=
[[
$
{
A1
}]]
console
.
log
(
name
);
}
/*]]>*/
</script>
<h3
th:text=
"${A1}"
>
</h3>
<h3
th:text=
"${A2}"
>
</h3>
<h3
th:text=
"${A3}"
>
</h3>
</body>
...
...
src/main/resources/templates/property.html
View file @
a75f7959
This diff is collapsed.
Click to expand it.
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