예제 #1
0
 private void makeImportUpdateForm(WikiImportProperty importProps) {
   if (importProps.isRoot()) {
     html.put("makeImportRootForm", true);
   } else {
     html.put("makeImportSubpageForm", true);
   }
   if (importProps.isAutoUpdate()) html.put("autoUpdate", true);
   html.put("sourceUrl", importProps.getSourceUrl());
 }
  private SimpleResponse makeResponse(
      SuiteOverviewTree treeview, WikiPagePath path, Request request) {
    SimpleResponse response = new SimpleResponse();

    HtmlPage page = context.pageFactory.newPage();
    page.setTitle("Suite Overview");
    page.setPageTitle(new PageTitle("Suite Overview", path));
    page.put("treeRoot", treeview.getTreeRoot());
    page.put("viewLocation", request.getResource());
    page.setMainTemplate("suiteOverview");
    response.setContent(page.html());
    return response;
  }
예제 #3
0
  private String makeHtml(FitNesseContext context, Request request) {
    html = context.pageFactory.newPage();
    html.setNavTemplate("viewNav");
    html.put("viewLocation", request.getResource());
    html.setTitle("Properties: " + resource);

    String tags = "";
    if (pageData != null) {
      tags = pageData.getAttribute(PageData.PropertySUITES);
    }

    html.setPageTitle(new PageTitle("Page Properties", path, tags));
    html.put("pageData", pageData);
    html.setMainTemplate("propertiesPage");
    makeLastModifiedTag();
    makeFormSections();

    return html.html();
  }
  private HtmlPage makeHtml() {
    PageCrawler pageCrawler = page.getPageCrawler();
    WikiPagePath fullPath = pageCrawler.getFullPath();
    String fullPathName = PathParser.render(fullPath);
    HtmlPage htmlPage = context.pageFactory.newPage();
    htmlPage.setTitle(getTitle() + ": " + fullPathName);
    htmlPage.setPageTitle(
        new PageTitle(getTitle(), fullPath, data.getAttribute(PageData.PropertySUITES)));
    htmlPage.setNavTemplate("testNav.vm");
    htmlPage.put("actions", new WikiPageActions(page));
    htmlPage.setMainTemplate(mainTemplate());
    htmlPage.put("testExecutor", new TestExecutor());
    htmlPage.setFooterTemplate("wikiFooter.vm");
    htmlPage.put("headerContent", new WikiPageHeaderRenderer());
    htmlPage.put("footerContent", new WikiPageFooterRenderer());
    htmlPage.setErrorNavTemplate("errorNavigator");
    htmlPage.put("multipleTestsRun", isMultipleTestsRun());
    WikiImportingResponder.handleImportProperties(htmlPage, page);

    return htmlPage;
  }
예제 #5
0
  private void makeSymbolicLinkSection() {
    WikiPageProperty symLinksProperty =
        pageData.getProperties().getProperty(SymbolicPage.PROPERTY_NAME);
    if (symLinksProperty == null) return;
    List<Symlink> symlinks = new ArrayList<Symlink>();
    Set<String> symbolicLinkNames = symLinksProperty.keySet();
    for (String name : symbolicLinkNames) {
      String link = symLinksProperty.get(name);

      String path = makePathForSymbolicLink(link);
      symlinks.add(new Symlink(name, Utils.escapeHTML(link), path));
    }
    html.put("symlinks", symlinks);
  }
예제 #6
0
 public void makeSecurityCheckboxesHtml(PageData pageData) {
   html.put("securityTypes", SECURITY_ATTRIBUTES);
 }
예제 #7
0
 public void makeNavigationCheckboxesHtml(PageData pageData) {
   html.put("navigationTypes", NAVIGATION_ATTRIBUTES);
 }
예제 #8
0
 public void makeTestActionCheckboxesHtml(PageData pageData) {
   html.put("actionTypes", ACTION_ATTRIBUTES);
 }
예제 #9
0
 private void makeImportForm() {
   html.put("makeImportForm", true);
   html.put("autoUpdate", true);
 }
예제 #10
0
 public void makePageTypeRadiosHtml(PageData pageData) {
   html.put("pageTypes", PAGE_TYPE_ATTRIBUTES);
   String pt = getCheckedAttribute(pageData, PAGE_TYPE_ATTRIBUTES);
   html.put("selectedPageType", getCheckedAttribute(pageData, PAGE_TYPE_ATTRIBUTES));
 }
예제 #11
0
 private void makeLastModifiedTag() {
   String username = pageData.getAttribute(LAST_MODIFYING_USER);
   if (username == null || "".equals(username))
     html.put("lastModified", "Last modified anonymously");
   else html.put("lastModified", "Last modified by " + username);
 }