Package org.olat.modules.wiki.gui.components.wikiToHtml

Examples of org.olat.modules.wiki.gui.components.wikiToHtml.WikiMarkupComponent


    listenTo(searchCtrl);
    navigationContent.put("search_article", searchCtrl.getInitialComponent());

    // attach menu
    //FIXME:gs:a pass only ores to component to make shure they have the same wiki instance
    wikiMenuComp = new WikiMarkupComponent("wikiArticle", ores, 0);
    wikiMenuComp.addListener(this);
    // load the menu page and set the image mapper
    wikiMenuComp.setWikiContent(menuPage.getContent());
    wikiMenuComp.setImageMapperUri(ureq, wikiContainer);
    navigationContent.put("wikiMenu", wikiMenuComp);

    // attach index article
    wikiArticleComp = new WikiMarkupComponent("wikiArticle", ores, 300);
    wikiArticleComp.addListener(this);
    wikiArticleComp.setImageMapperUri(ureq, wikiContainer);
    navigationContent.put("wikiArticle", wikiArticleComp);

    /***************************************************************************
     * wiki component
     **************************************************************************/
    articleContent = createVelocityContainer("article");
    wikiArticleComp = new WikiMarkupComponent("wikiArticle", ores, 300);
    wikiArticleComp.addListener(this);
    wikiArticleComp.setImageMapperUri(ureq, wikiContainer);
    articleContent.put("wikiArticle", wikiArticleComp);
    tabs.addTab(translate("tab.article"), articleContent);

    /***************************************************************************
     * discussion container
     **************************************************************************/
    discussionContent = createVelocityContainer("discuss");
    tabs.addTab(translate("tab.discuss"), discussionContent);

    /***************************************************************************
     * edit container
     **************************************************************************/
    editContent = createVelocityContainer("edit");
    imageDisplay = createVelocityContainer("imagedisplay");
    closePreviewButton = LinkFactory.createButtonSmall(ACTION_CLOSE_PREVIEW, editContent, this);
    deletePageButton = LinkFactory.createButtonSmall(ACTION_DELETE_PAGE, editContent, this);
    manageMediaButton = LinkFactory.createButtonSmall(ACTION_MANAGE_MEDIA, editContent, this);
   
    editContent.contextPut("isGuest", Boolean.valueOf(ureq.getUserSession().getRoles().isGuestOnly()));
    wikiEditForm = new WikiEditArticleForm("wikieditform", getTranslator(), page);
    wikiEditForm.addListener(this);
    editContent.contextPut("editformid", "ofo_"+wikiEditForm.hashCode());

    editContent.put("editForm", wikiEditForm);
    JSAndCSSComponent js = new JSAndCSSComponent("js", this.getClass(), new String[] { "wiki-script.js" }, null, false);
    content.put("js", js);
    // FIXME:gs:a FileUploadCtr should accept vfsContainers instead of
    // OLATrootfolderimpl. Refactor it!!!!!!!
    fileUplCtr = new FileUploadController(getWindowControl(), WikiManager.getInstance().getMediaFolder(ores), ureq, (int)FolderConfig.getLimitULKB(), Quota.UNLIMITED, null, false);
    fileUplCtr.addControllerListener(this);
    editContent.put("fileUplCtr", fileUplCtr.getInitialComponent());
    editContent.contextPut("fileList", wiki.getMediaFileList());
    editContent.contextPut("linkList", wiki.getListOfAllPageNames());
    tabs.addTab(translate("tab.edit"), editContent);

    /***************************************************************************
     * version container
     **************************************************************************/
    versioningContent = createVelocityContainer("versions");
    wikiVersionDisplayComp = new WikiMarkupComponent("versionDisplay", ores, 300);
    wikiVersionDisplayComp.addListener(this);
    wikiVersionDisplayComp.setImageMapperUri(ureq, wikiContainer);
    tabs.addTab(translate("tab.versions"), versioningContent);
    if (this.securityCallback.mayEditAndCreateArticle()) revertVersionButton = LinkFactory.createButton("revert.old.version", versioningContent, this);
   
View Full Code Here

TOP

Related Classes of org.olat.modules.wiki.gui.components.wikiToHtml.WikiMarkupComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.