return "team/index";
}
@RequestMapping(value = "/{username}", method = { GET, HEAD })
public String showProfile(@PathVariable String username, Model model) {
MemberProfile profile = teamService.fetchMemberProfileUsername(username);
if (profile == MemberProfile.NOT_FOUND) {
throw new MemberNotFoundException(username);
}
if (profile.isHidden()) {
throw new MemberNotFoundException("Member profile for username '%s' is hidden", username);
}
model.addAttribute("profile", profile);
Page<Post> posts = blogService.getPublishedPostsForMember(profile, PageableFactory.forLists(1));
Page<PostView> postViewPage = PostView.pageOf(posts, dateFactory);
model.addAttribute("posts", postViewPage);
List<TeamLocation> teamLocations = new ArrayList<>();
if (profile.getTeamLocation() != null) {
teamLocations.add(profile.getTeamLocation());
}
model.addAttribute("teamLocations", teamLocations);
return "team/show";
}