private HtmlTag buildListItem(SourcePage child) { HtmlTag listItem = buildItem(child); if (!child.getChildren().isEmpty()) { if (level < getRecursionLimit()) { listItem.add(new ContentsItemBuilder(contents, level + 1, child).buildLevel(child)); } else if (getRecursionLimit() > 0){ listItem.add(contents.getVariable(Contents.MORE_SUFFIX_TOC, Contents.MORE_SUFFIX_DEFAULT)); } } return listItem; }
private HtmlTag buildListItem(SourcePage child) { HtmlTag listItem = buildItem(child); if (!child.getChildren().isEmpty()) { if (level < getRecursionLimit()) { listItem.add(new ContentsItemBuilder(contents, level + 1, child).buildLevel(child)); } else if (getRecursionLimit() > 0){ listItem.add(contents.getVariable(Contents.MORE_SUFFIX_TOC, Contents.MORE_SUFFIX_DEFAULT)); } } return listItem; }
@Override public String toTarget(Translator translator, Symbol symbol) { ContentsItemBuilder itemBuilder = new ContentsItemBuilder(symbol, 1, translator.getPage()); HtmlTag contentsDiv = new HtmlTag("div"); contentsDiv.addAttribute("class", "contents"); contentsDiv.add(HtmlUtil.makeBold("Contents:")); contentsDiv.add(itemBuilder.buildLevel(translator.getPage())); return contentsDiv.html(); } }
@Override public String toTarget(Translator translator, Symbol symbol) { ContentsItemBuilder itemBuilder = new ContentsItemBuilder(symbol, 1, translator.getPage()); HtmlTag contentsDiv = new HtmlTag("div"); contentsDiv.addAttribute("class", "contents"); contentsDiv.add(HtmlUtil.makeBold("Contents:")); contentsDiv.add(itemBuilder.buildLevel(translator.getPage())); return contentsDiv.html(); } }