@RequestMapping( value = {HELP_EDIT_FI, HELP_EDIT_SV}, method = GET) public String helpEdit( @PathVariable("helpPage") String localizedPageName, Model model, Locale locale) { Urls urls = Urls.get(locale); model.addAttribute(ALT_URI_ATTR, urls.alt().help("")); model.addAttribute("helpPage", localizedPageName); model.addAttribute("categoryLinksMap", infoTextService.getOmSubjectList(locale)); model.addAttribute("content", infoTextService.getDraft(localizedPageName)); model.addAttribute("urls", urls); return HELP_EDIT_VIEW; }
@RequestMapping( value = {NEWS_FI, NEWS_SV}, method = GET) public String news(Model model, Locale locale) { Urls urls = Urls.get(locale); String pageUri = HelpPage.NEWS.getUri(locale.toLanguageTag()); model.addAttribute(ALT_URI_ATTR, urls.alt().news()); model.addAttribute("content", infoTextService.getPublished(pageUri)); model.addAttribute("pageUri", pageUri); model.addAttribute("omUser", userService.getCurrentUser().isOm()); addPiwicIdIfNotAuthenticated(model); return NEWS_VIEW; }
@RequestMapping( value = {HELP_FI, HELP_SV}, method = GET) public String help( @PathVariable("helpPage") String localizedPageName, Model model, Locale locale) { Urls urls = Urls.get(locale); model.addAttribute(ALT_URI_ATTR, urls.alt().help("")); model.addAttribute("helpPage", localizedPageName); model.addAttribute("categoryLinksMap", infoTextService.getPublicSubjectList(locale)); model.addAttribute("content", infoTextService.getPublished(localizedPageName)); model.addAttribute("urls", urls); model.addAttribute("omUser", userService.getCurrentUser().isOm()); addPiwicIdIfNotAuthenticated(model); return HELP_VIEW; }