From: <jbo...@li...> - 2005-08-18 18:35:23
|
Author: dam...@jb... Date: 2005-08-18 14:35:12 -0400 (Thu, 18 Aug 2005) New Revision: 898 Modified: trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp Log: Added the Edit and History buttons. Modified: trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp 2005-08-18 18:05:11 UTC (rev 897) +++ trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp 2005-08-18 18:35:12 UTC (rev 898) @@ -1,9 +1,3 @@ -<!-- - JBoss, the OpenSource J2EE webOS - Distributable under LGPL license. - See terms of license at gnu.org. - --> - <%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %> <%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="n" %> <%@ taglib uri="/WEB-INF/tld/forge.tld" prefix="forge" %> @@ -11,8 +5,8 @@ <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %> <%@ page isELIgnored ="false" %> <portlet:defineObjects/> - -<% + +<% String actionURL = (String)request.getAttribute("actionURL"); String wikiName = (String)request.getAttribute("wikiName"); String wikiContent = (String)request.getAttribute("wikiContent"); @@ -21,9 +15,26 @@ org.jboss.wiki.Credentials author = (org.jboss.wiki.Credentials)request.getAttribute("author"); %> -<h2><%=wikiName%>/ <%=wikiPage%></h2> +<h2><%=wikiName%>/<%=wikiPage%></h2> <div style="text-align: right;"> + +<% + + String logedIn = (String)request.getAttribute("logedIn"); + + + if (logedIn.equals("true")) { + out.print("<a href='"+actionURL+"&action=Edit&page="+wikiPage+"'><img src=\"/file-access/default/members/jbosswiki/images/editButton.png\"</img></a>"); + + } + else { + out.print("<i>Login to edit pages</i>"); + } + +%> + + <a href="<%=actionURL%>&action=History&page=<%=wikiPage%>"><img src="/file-access/default/members/jbosswiki/images/historyButton.png"</img></a> <form method="post" action="<%=actionURL%>"> <input type="text" name="page" /> <input type="submit" value="GO" /> @@ -32,23 +43,16 @@ <hr /> -<% - Integer showedVersion = (Integer)request.getAttribute("showedVersion"); - - if (showedVersion != null) { - out.println("<table style='border-style: dashed; border-color: red; text-align:center; margin-right: auto; margin-left: auto;'><tr><td>"+ - "You are watching <b>VERSION "+showedVersion+" </b> of page "+wikiPage+".<br />\n"+ - "You can go to <a href='"+actionURL+"&page="+wikiPage+"'>latest version of "+wikiPage+"</a>"+ - " or <a href='"+actionURL+"&action=Edit&page="+wikiPage+"&version="+showedVersion+"'> rollback to this version</a>"+ - "<td></table>\n<hr />"); - } -%> -<table style="width: 100%"> +<div class="wikiTrail">Your trail: <i>TODO</i></div> + +<hr /> + +<table> <tr> -<td class="wikiContent"> +<td class="wikiContent"> <%=wikiContent%> - + <td> </tr> <tr> @@ -56,24 +60,8 @@ <hr /> -<% - String logedIn = (String)request.getAttribute("logedIn"); - - - if (logedIn.equals("true")) { - out.print("<a href='"+actionURL+"&action=Edit&page="+wikiPage+"'>Edit page</a>"); - - } - else { - out.print("<i>Login to edit pages</i>"); - } - -%> - - - -<a href="<%=actionURL%>&action=Info&page=<%=wikiPage%>">More info...</a> <a href="<%=actionURL%>">Attach file...</a> +<a href="<%=actionURL%>&action=Info&page=<%=wikiPage%>">More info...</a> <a href="<%=actionURL%>">Attach file...</a> </td> </tr> </table> |