use of amu.zhcet.data.department.Department in project zhcet-web by zhcet-amu.
the class CourseEditController method addCourse.
@GetMapping("/edit")
public String addCourse(Model model, @PathVariable Course course) {
ErrorUtils.requireNonNullCourse(course);
Department department = course.getDepartment();
model.addAttribute("page_description", "Edit course details and manage other settings");
model.addAttribute("department", department);
model.addAttribute("page_title", "Edit Course : " + department.getName() + " Department");
model.addAttribute("page_subtitle", "Course Management");
model.addAttribute("page_path", getPath(course));
model.addAttribute("course_types", CourseType.values());
if (!model.containsAttribute("course")) {
model.addAttribute("course", course);
}
model.addAttribute("floated", floatedCourseService.isFloated(course));
return "department/edit_course";
}
Aggregations