public String editPost(Map<String, Object> model, @RequestParam Long id, Project project) { // List<BlogCategory> blogCategories = categoryService.getBlogCategories(project.getId()); model.put("blogCategories", blogCategories); // return "modules/admin/blog/post-edit"; }
@OnEvent(Event.MODIFIED) public void onProjectModified(EventContext taskContext) { log.info("event triggered!"); // Project project = taskContext.getParameter("project", Project.class); // ProjectHistory projectHistory = new ProjectHistory(); projectHistory.setCreateAt(new Date()); projectHistory.setContent("Project modified!"); projectHistory.setTargetId(project.getId()); projectHistory.setTargetType(Project.class.getName()); projectHistory.setProjectId(project.getId()); projectHistory.setCreateById(project.getModifyById()); // projectHistoryService.createProjectHistory(projectHistory); }
public String editCategory(Map<String, Object> model, Project project) { // List<BlogCategory> blogCategories = categoryService.getBlogCategories(project.getId()); model.put("blogCategories", blogCategories); // return "modules/admin/blog/category-edit"; }
@RequestMapping(value = "/member-list", method = GET) public String doList( @RequestParam(defaultValue = "0") Long roleId, @RequestParam(defaultValue = "1") Integer pageNo, @WidgetAttribute Project project, @WidgetPref(defaultValue = "12") Integer pageSize, Model model) { // List<ProjectRole> projectRoles = projectRoleService.listProjectRoles(project.getId()); model.addAttribute("projectRoles", projectRoles); // Page<TeamMember> teamMemberPage = new Page<TeamMember>(pageSize); teamMemberPage.setPageNo(pageNo); teamMemberPage = teamMemberService.fetchPage(teamMemberPage, project.getId(), roleId); model.addAttribute("teamMemberPage", teamMemberPage); // return "modules/team/member-list"; }
@RequestMapping(value = "/member-edit", method = GET) public String doEdit( @RequestParam(defaultValue = "users") String tab, @RequestParam(defaultValue = "1") Integer pageNo, @WidgetAttribute Project project, @WidgetPref(defaultValue = "12") Integer pageSize, Model model) { // if ("users".equals(tab)) { Page<TeamMember> teamMemberPage = new Page<TeamMember>(pageSize); teamMemberPage.setPageNo(pageNo); teamMemberPage = teamMemberService.fetchPagePotentially(teamMemberPage); model.addAttribute("teamMemberPage", teamMemberPage); } if ("link1".equals(tab)) { Page<ProjectLink> linkPage = new Page<ProjectLink>(pageSize); linkPage.setPageNo(pageNo); linkPage = projectLinkService.fetchPageByFromProjectId( linkPage, project.getId(), project.getCategory().getCode()); model.addAttribute("linkPage", linkPage); } if ("link2".equals(tab)) { Page<ProjectLink> reversedLinkPage = new Page<ProjectLink>(pageSize); reversedLinkPage.setPageNo(pageNo); reversedLinkPage = projectLinkService.fetchPageByToProjectId( reversedLinkPage, project.getId(), project.getCategory().getCode()); model.addAttribute("reversedLinkPage", reversedLinkPage); } // List<ProjectRole> projectRoles = projectRoleService.listProjectRoles(project.getId()); model.addAttribute("projectRoles", projectRoles); // return "modules/team/member-edit"; }