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