private String buildBody(SourcePage page) { String itemText = page.getName(); if (hasOption("-g", Contents.REGRACE_TOC)) { //todo: DRY? see wikiwordbuilder itemText = GracefulNamer.regrace(itemText); } if (hasOption("-p", Contents.PROPERTY_TOC)) { String properties = getBooleanProperties(page); if (!properties.isEmpty()) itemText += " " + properties; } if (hasOption("-f", Contents.FILTER_TOC)) { String filters = page.getProperty(WikiPageProperty.SUITES); if (!filters.isEmpty()) itemText += " (" + filters + ")"; } return itemText; }
private String buildBody(SourcePage page) { String itemText = page.getName(); if (hasOption("-g", Contents.REGRACE_TOC)) { //todo: DRY? see wikiwordbuilder itemText = GracefulNamer.regrace(itemText); } if (hasOption("-p", Contents.PROPERTY_TOC)) { String properties = getBooleanProperties(page); if (!properties.isEmpty()) itemText += " " + properties; } if (hasOption("-f", Contents.FILTER_TOC)) { String filters = page.getProperty(WikiPageProperty.SUITES); if (!filters.isEmpty()) itemText += " (" + filters + ")"; } return itemText; }
public HtmlTag buildItem(SourcePage page) { HtmlTag listItem = new HtmlTag("li"); HtmlTag link = new HtmlTag("a", buildBody(page)); link.addAttribute("href", buildReference(page)); link.addAttribute("class", getBooleanPropertiesClasses(page)); listItem.add(link); String help = page.getProperty(WikiPageProperty.HELP); if (!help.isEmpty()) { if (hasOption("-h", Contents.HELP_TOC)) { listItem.add(HtmlUtil.makeSpanTag("pageHelp", ": " + help)); } else if (hasOption("-H", Contents.HELP_INSTEAD_OF_TITLE_TOC)) { link.use(help); } else { link.addAttribute("title", help); } } return listItem; }
public HtmlTag buildItem(SourcePage page) { HtmlTag listItem = new HtmlTag("li"); HtmlTag link = new HtmlTag("a", buildBody(page)); link.addAttribute("href", buildReference(page)); link.addAttribute("class", getBooleanPropertiesClasses(page)); listItem.add(link); String help = page.getProperty(WikiPageProperty.HELP); if (!help.isEmpty()) { if (hasOption("-h", Contents.HELP_TOC)) { listItem.add(HtmlUtil.makeSpanTag("pageHelp", ": " + help)); } else if (hasOption("-H", Contents.HELP_INSTEAD_OF_TITLE_TOC)) { link.use(help); } else { link.addAttribute("title", help); } } return listItem; }