Skip to content

Commit 12c6a35

Browse files
committed
CSS edit and add edit button
1 parent a514f16 commit 12c6a35

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

src/main/java/com/example/cvapp/controller/ExpController.java

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,9 @@ public RedirectView postAddNewTask(ExpModel exp) {
3333
return new RedirectView("/experience");
3434
}
3535

36-
// @GetMapping
37-
// public String getExperience() {
38-
// return "experience/experience";
39-
// }
40-
41-
42-
//
43-
//
44-
// @GetMapping
45-
// public List<ExpModel> getAllExperience() {
46-
// return expService.getAllExperience();
47-
// }
48-
//
49-
// @PostMapping
50-
// public ExpModel addExperience(@RequestBody ExpModel expModel) {
51-
// return expService.addExperience(expModel);
52-
// }
36+
37+
@PostMapping
38+
public ExpModel addExperience(@RequestBody ExpModel expModel) {
39+
return expService.addExperience(expModel);
40+
}
5341
}

src/main/java/com/example/cvapp/service/ExpService.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ public void addExp(ExpModel exp) {
2424
expRepository.save(exp);
2525
}
2626

27-
// public ExpModel addExperience(ExpModel expModel) {
28-
// return expRepository.save(expModel);
29-
//
30-
// }
27+
public ExpModel addExperience(ExpModel expModel) {
28+
return expRepository.save(expModel);
29+
}
3130
}

src/main/webapp/WEB-INF/views/experience/experience.jsp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<p>Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.</p>
2323
</div>
2424
<div class="flex-shrink-0"><span class="text-primary">March 2013 - Present</span></div>
25+
<!-- Dodaj przycisk edycji -->
26+
<a class="btn btn-success-small" href="<c:url value='/edit-experience/${title.id}'/>">Edytuj</a>
2527
</div>
2628
</c:forEach>
2729

src/main/webapp/resources/css/styles.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3089,6 +3089,16 @@ textarea.form-control-lg {
30893089
background-color: #6c757d;
30903090
border-color: #6c757d;
30913091
}
3092+
.btn-success-small {
3093+
display: block;
3094+
width: 100px; /* Dostosuj szerokość przycisku według potrzeb */
3095+
color: #fff;
3096+
background-color: #198754;
3097+
border-color: #198754;
3098+
margin: 10px auto; /* Dostosuj marginesy, aby umieścić przycisk na dole */
3099+
text-align: center;
3100+
border-radius: 5px;
3101+
}
30923102

30933103
.btn-success {
30943104
color: #fff;

0 commit comments

Comments
 (0)