To make JSPWiki more accessible to seemingly "less technical" users; how easy is it to move the "Comment" tab from the "More..." tab to a tab of
it's own?

Not very difficult.  Here are the detailed steps to do it:

First, we'll create a custom template for you so that upgrades don't screw you:

1) Create $wikihome/templates/mytemplate

2) Copy $wikihome/templates/default/PageActionsTop.jsp to $wikihome/ templates/mytemplate

3) Set "jspwiki.templateDir = mytemplate" in jspwiki.properties.

JSPWiki will now use mytemplate/PageActionsTop.jsp whenever it can, and will default to whatever it can find in your default template for the rest.

4) Add the following lines in PageActionsTop.jsp, between the <ul> and </ul> tags.

    <wiki:CheckRequestContext context='view|info|diff|upload'>
    <wiki:Permission permission="comment">
    <li>
        <wiki:PageType type="page">
<a href="<wiki:Link context='comment' format='url' />" class="action edit" title="<fmt:message key='actions.comment.title'/>" ><fmt:message key='actions.comment'/></a>
        </wiki:PageType>
    </li>
    </wiki:Permission>
    </wiki:CheckRequestContext>

What this essentially means that "whenever user is viewing the page, or looking at the page info, or checking the difference between pages or is doing an upload (the CheckRequestContext); check whether the user may comment on this page (the Permission); then check if this is a WikiPage (as opposed to an attachment); then add a new tab with a comment link.

The tabs are actually list items <li>.

/Janne

Reply via email to