Пример #1
0
 @RequestMapping(value = "/boards/{boardId}/manage", method = RequestMethod.GET)
 public String manageBoard(@PathVariable String boardId, Model model) throws Exception {
   log.info("Manage Board UI - " + boardId);
   model.addAttribute("boardId", boardId);
   Board board = boardsCache.getItem(boardId);
   model.addAttribute("board", board);
   Map<String, SimpleTemplate> values = board.getTemplates();
   if (values != null) {
     String templateId = values.values().iterator().next().getId();
     model.addAttribute("templateId", templateId);
     Template template = templateController.getTemplate(boardId, templateId);
     model.addAttribute("template", template);
   }
   return "manage";
 }
Пример #2
0
  @RequestMapping(value = "/boards/{boardId}/phases/{phaseId}/card", method = RequestMethod.GET)
  public String cardView(@PathVariable String boardId, @PathVariable String phaseId, Model model)
      throws Exception {
    log.info("Card UI - " + boardId);
    Board board = boardsCache.getItem(boardId);
    Map<String, SimpleTemplate> templates = board.getTemplates();
    Entry<String, SimpleTemplate> next = templates.entrySet().iterator().next();
    String templateId = next.getValue().getId();
    Template template = templateController.getTemplate(boardId, templateId);
    model.addAttribute("template", template);
    model.addAttribute("phaseId", phaseId);
    model.addAttribute("boardId", boardId);

    return "card";
  }