refacor: New routing
parent
44c0ca208f
commit
e67fdaa01e
1
pom.xml
1
pom.xml
|
@ -102,6 +102,7 @@
|
|||
<destDir>${project.build.directory}/docs</destDir>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -9,21 +9,21 @@ public class Page {
|
|||
|
||||
@GetMapping({ "/", "" })
|
||||
public String home(Model model) {
|
||||
return "redirect:/projects";
|
||||
return "pages/core/home";
|
||||
}
|
||||
|
||||
@GetMapping("/impressum")
|
||||
public String impressum() {
|
||||
return "core/impressum";
|
||||
return "pages/core/impressum";
|
||||
}
|
||||
|
||||
@GetMapping("/datenschutz")
|
||||
public String datenschutz() {
|
||||
return "core/datenschutz";
|
||||
return "pages/core/datenschutz";
|
||||
}
|
||||
|
||||
@GetMapping("/notes")
|
||||
public String notes() {
|
||||
return "notes/notes";
|
||||
return "pages/core/notes";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class ProjectPage {
|
|||
public String projects(Model model) {
|
||||
var projects = projectService.getAllProjects();
|
||||
model.addAttribute("projects", projects);
|
||||
return "projects/projects";
|
||||
return "/pages/projects/overview";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ public class ProjectPage {
|
|||
*/
|
||||
@GetMapping("/create")
|
||||
public String create(Model model) {
|
||||
model.addAttribute("project", new Project());
|
||||
return "projects/projects-create";
|
||||
model.addAttribute("projects", new Project());
|
||||
return "/pages/projects/create";
|
||||
}
|
||||
}
|
|
@ -55,7 +55,7 @@ public class SkillsPage {
|
|||
public String profile(Model model) {
|
||||
model.addAttribute("employee", employeeService.getEmployeeById(user).orElse(null));
|
||||
model.addAttribute("skills", skillService.getUserSkills(user));
|
||||
return "skills/skills";
|
||||
return "/pages/skills/overview";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -71,7 +71,7 @@ public class SkillsPage {
|
|||
@GetMapping("/create")
|
||||
public String createSkill(Model model) {
|
||||
model.addAttribute("secondarySkill", new SecondarySkill());
|
||||
return "skills/skills-create";
|
||||
return "/pages/skills/create";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -96,7 +96,7 @@ public class SkillsPage {
|
|||
// TODO: Make sure it returns the correct initail data for secondary skills
|
||||
model.addAttribute("primarySkills", primarySkillService.getAllPrimarySkills());
|
||||
model.addAttribute("skillProtoype", new SkillPrototype());
|
||||
return "skills/skills-add";
|
||||
return "/pages/skills/add";
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue