[jboss-svn-commits] JBL Code SVN: r10275 - in labs/jbosslabs/trunk/portal-extensions/jbosswiki: forge-wiki/src/web/views and 2 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Mar 16 12:52:58 EDT 2007


Author: szimano
Date: 2007-03-16 12:52:58 -0400 (Fri, 16 Mar 2007)
New Revision: 10275

Modified:
   labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/Messages.properties
   labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/views/wiki_template.xhtml
   labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/views/wiki_view.xhtml
   labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/images/wikiStyle.css
   labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/TrailPlugin.java
Log:
wiki view new theme

Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/Messages.properties
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/Messages.properties	2007-03-16 16:52:42 UTC (rev 10274)
+++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/Messages.properties	2007-03-16 16:52:58 UTC (rev 10275)
@@ -1,45 +1,55 @@
-edit_instruction = Here's a short reminder on what elements you have at your disposal:\n\n\n----             Horizontal ruler\n\\\\               Forced line break\n\\\\\\\\             Page break (printing)\n[link]           Create hyperlink to "link", where "link" can be either an internal \n                 WikiName or an external link (http://)\n[text|link]      Create a hyperlink where the link text is different from the actual \n                 hyperlink link.\n[text|wiki:link] Create a hyperlink where the link text is different from the \n                 actual hyperlink link, and the hyperlink points to a named Wiki. \n                 This supports interWiki linking.\n\n*                Make a bulleted list (must be in first column). Use more (**) \n                 for deeper indentations.\n#                Make a numbered list (must be in first column). Use more (##, ###) \n                 for deeper indentations.\n\n!, !!, !!!       Start a line with an excla!
 mation mark (!) to make a heading. \n                 More exclamation marks mean bigger headings.\n\n__text__         Makes text bold.\n''text''         Makes text in italics (notice that these are single quotes ('))\n{{text}}         Makes text in monospaced font.\n;term:def        Defines 'term' with 'def'.  Use this with empty 'term' to make short comments.\n\n|text|more text| Makes a table. Double bars for a table heading.\n\nDon't try to use HTML, since it just won't work.\n\nTo embed images just put them available on the web using one of the approved formats, and they will get inlined automatically.\nTo make a code block, use triple {'s to open, and triple }'s to close.
-edit_cancel = Cancel
-edit_save = Save
-edit_spellcheck = Check Spelling
-permaLinkButton = permaLinkButton.png
+edit_instruction=Here's a short reminder on what elements you have at your disposal\:\n\n\n----             Horizontal ruler\n\\\\               Forced line break\n\\\\\\\\             Page break (printing)\n[link]           Create hyperlink to "link", where "link" can be either an internal \n                 WikiName or an external link (http\://)\n[text|link]      Create a hyperlink where the link text is different from the actual \n                 hyperlink link.\n[text|wiki\:link] Create a hyperlink where the link text is different from the \n                 actual hyperlink link, and the hyperlink points to a named Wiki. \n                 This supports interWiki linking.\n\n*                Make a bulleted list (must be in first column). Use more (**) \n                 for deeper indentations.\n\#                Make a numbered list (must be in first column). Use more (\#\#, \#\#\#) \n                 for deeper indentations.\n\n\!, \!\!, \!\!\!       Start a line !
 with an exclamation mark (\!) to make a heading. \n                 More exclamation marks mean bigger headings.\n\n__text__         Makes text bold.\n''text''         Makes text in italics (notice that these are single quotes ('))\n{{text}}         Makes text in monospaced font.\n;term\:def        Defines 'term' with 'def'.  Use this with empty 'term' to make short comments.\n\n|text|more text| Makes a table. Double bars for a table heading.\n\nDon't try to use HTML, since it just won't work.\n\nTo embed images just put them available on the web using one of the approved formats, and they will get inlined automatically.\nTo make a code block, use triple {'s to open, and triple }'s to close.
+edit_cancel=Cancel
+edit_save=Save
+edit_spellcheck=Check Spelling
+permaLinkButton=permaLinkButton.png
 
-editButton = editButton.png
-recentButton = recentChanges.gif
-historyButton = historyButton.png
-attachButton = attachButton.png
+editButton=editButton.png
+recentButton=recentChanges.gif
+historyButton=historyButton.png
+attachButton=attachButton.png
 
-rssButton = RSSButton.gif
-rdfButton = RDFButton.gif
-atomButton = ATOMButton.gif
+rssButton=RSSButton.gif
+rdfButton=RDFButton.gif
+atomButton=ATOMButton.gif
 
-pageLastChanged = The page last changed on
-by = by
+pageLastChanged=The page last changed on
+by=by
 
-historytitle = History of page :
-version = Version
-date = Date
-author = Author
-size = Size
-changesFromPrev = Changes from previous
-goback = Go back
-thisIsVer = This is version
-ofPage = of page
-changesBetween = Changes between versions
-andChng = and
+historytitle=History of page \:
+version=Version
+date=Date
+author=Author
+size=Size
+changesFromPrev=Changes from previous
+goback=Go back
+thisIsVer=This is version
+ofPage=of page
+changesBetween=Changes between versions
+andChng=and
 
-addFile = Add file
-upload_error = File couldn't have been uploaded
-search = Search
+addFile=Add file
+upload_error=File couldn't have been uploaded
+search=Search
 
-new_att = /Add new attachment/
+new_att=/Add new attachment/
 
-print = Print
+print=Print
 
-save = Save
-prefsSaved = Preferences saved
+save=Save
+prefsSaved=Preferences saved
 
-page_edited_by = I'm sorry, but this page is currently edited by: 
-lock_started = Lock started: 
-edit_session_invalidated = It will be invalidated on: 
-stop_you_edit = I won't stop you from editing this page but consider that your changes might be lost
\ No newline at end of file
+page_edited_by=I'm sorry, but this page is currently edited by\: 
+lock_started=Lock started\: 
+edit_session_invalidated=It will be invalidated on\: 
+stop_you_edit=I won't stop you from editing this page but consider that your changes might be lost
+
+wikiHome=Wiki Home
+permalink=Permalink
+recentChanges=Recent Changes
+attach=Attach
+edit=Edit
+history=History
+rss=RSS Feed
+rdf=RDF Feed
+atom=Atom Feed

Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/views/wiki_template.xhtml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/views/wiki_template.xhtml	2007-03-16 16:52:42 UTC (rev 10274)
+++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/views/wiki_template.xhtml	2007-03-16 16:52:58 UTC (rev 10275)
@@ -20,17 +20,19 @@
 	</c:if>
 </head>
 <body class="wiki-body">
+	 <f:loadBundle basename="Messages" var="msg"/>
+	 
+	 <h:panelGroup rendered="#{wikiCommon.userLoggedIn}" id="tagMeWiki" />
+	 
 	<h:panelGrid>
-		<h:panelGroup>
+		<h:panelGroup styleClass="wikiNavHeader" >
 			<h:outputLink value="#{wikiView.wikiMainPageURL}">  
-				<h:graphicImage value="#{wikiView.wikiImagesURL}JBossWikiLogoMedium.png" width="100" />
+				<h:outputText value="#{msg.wikiHome}" />
 			</h:outputLink> 
 			<h:outputText value=": #{wikiCommon.pageName} [#{wikiCommon.langCode}]" />
 		</h:panelGroup>
 	</h:panelGrid>
 	
-    <f:loadBundle basename="Messages" var="msg"/>
-	
 	<h:messages />
 	
     <ui:insert name="content" />

Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/views/wiki_view.xhtml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/views/wiki_view.xhtml	2007-03-16 16:52:42 UTC (rev 10274)
+++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/web/views/wiki_view.xhtml	2007-03-16 16:52:58 UTC (rev 10275)
@@ -6,60 +6,54 @@
 <ui:composition template="wiki_template.xhtml">
 	
     <ui:define name="content">
-    
-    	<h:panelGroup rendered="#{wikiCommon.userLoggedIn}" id="tagMeWiki">
     		
-		</h:panelGroup>
-		
-    	<h:panelGrid columns="2">
-	    	<h:panelGroup>
+    	<h:panelGrid columns="8">
 			    <h:outputLink value="#{wikiView.wikiFriendlyURL}">  
-					<h:graphicImage value="#{wikiView.wikiImagesURL}#{msg.permaLinkButton}"/>
+					<h:outputText value="#{msg.permalink}" />
 				</h:outputLink>
-				
-				<h:outputLink value="#{wikiView.wikiFriendlyURL}">
-					<h:outputText value=" #{wikiView.wikiFriendlyURL}"/> 
-				</h:outputLink>
-			</h:panelGroup>
-			<h:panelGroup>
-				<h:outputLink value="#{wikiView.rssURL}">  
-					<h:graphicImage value="#{wikiView.wikiImagesURL}#{msg.rssButton}"/>
-				</h:outputLink>
-				<h:outputLink value="#{wikiView.rdfURL}">  
-					<h:graphicImage value="#{wikiView.wikiImagesURL}#{msg.rdfButton}"/>
-				</h:outputLink>
-				<h:outputLink value="#{wikiView.atomURL}">  
-					<h:graphicImage value="#{wikiView.wikiImagesURL}#{msg.atomButton}"/>
-				</h:outputLink>
-				<h:outputLink value="http://false.link.print.to" onclick="#{wikiView.printURL}">  
-					<h:outputText value="#{msg.print}"/>
-				</h:outputLink>
 				<h:form>
 					<h:commandLink action="recentChanges">
 						<f:param name="type" value="recentChanges" />
-						<h:graphicImage value="#{wikiView.wikiImagesURL}#{msg.recentButton}"/>
+						<h:outputText value="#{msg.recentChanges}"/>
 					</h:commandLink>
 				</h:form>
+				
 				<h:form rendered="#{wikiCommon.userLoggedIn}">
-					<h:commandLink action="attach">
-						<h:graphicImage value="#{wikiView.wikiImagesURL}#{msg.attachButton}"/>	
-					</h:commandLink>
 					<h:commandLink action="edit">
-						<h:graphicImage value="#{wikiView.wikiImagesURL}#{msg.editButton}"/>	
+						<h:outputText value="#{msg.edit}" />
 					</h:commandLink>
+					<h:outputText value=" " />
+					<h:commandLink action="attach">
+						<h:outputText value="#{msg.attach}" />
+					</h:commandLink>
+					<h:outputText value=" " />
 					<h:commandLink action="history">
-						<h:graphicImage value="#{wikiView.wikiImagesURL}#{msg.historyButton}" />	
+						<h:outputText value="#{msg.history}" />	
 					</h:commandLink>
 				</h:form>
-			</h:panelGroup>
-			<h:panelGroup>
-				<h:form>
-					<h:inputText value="#{wikiView.searchQuery}" required="true" />
-					<h:commandButton value="#{msg.search}" action="#{wikiView.search}" />
-				</h:form>
-			</h:panelGroup>
+				
+				<h:outputLink value="#{wikiView.rssURL}">  
+					<h:outputText value="#{msg.rss}" />	
+				</h:outputLink>
+				<h:outputLink value="#{wikiView.rdfURL}">  
+					<h:outputText value="#{msg.rdf}" />	
+				</h:outputLink>
+				<h:outputLink value="#{wikiView.atomURL}">  
+					<h:outputText value="#{msg.atom}" />	
+				</h:outputLink>
+				
+				<h:outputLink value="http://false.link.print.to" onclick="#{wikiView.printURL}">  
+					<h:outputText value="#{msg.print}"/>
+				</h:outputLink>
 		</h:panelGrid>
 		
+		<h:panelGroup>
+			<h:form>
+				<h:inputText value="#{wikiView.searchQuery}" required="true" />
+				<h:commandButton value="#{msg.search}" action="#{wikiView.search}" />
+			</h:form>
+		</h:panelGroup>
+		
 		<h:panelGroup styleClass="otherVersionBox" rendered="#{wikiView.otherVersion}" >
 			<h:outputText value="#{msg.thisIsVer} #{wikiCommon.pageVersion} #{msg.ofPage} " />
 			<h:outputLink value="#{wikiView.wikiFriendlyURL}">  

Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/images/wikiStyle.css
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/images/wikiStyle.css	2007-03-16 16:52:42 UTC (rev 10274)
+++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/images/wikiStyle.css	2007-03-16 16:52:58 UTC (rev 10275)
@@ -59,6 +59,11 @@
 	color: red;
 }
 
+.wikiNavHeader {
+	font-size: 12pt;
+	font-weight: bold;	
+}
+
 /*
 
 //OLD STYLES

Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/TrailPlugin.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/TrailPlugin.java	2007-03-16 16:52:42 UTC (rev 10274)
+++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/TrailPlugin.java	2007-03-16 16:52:58 UTC (rev 10275)
@@ -29,8 +29,8 @@
 
 	@Override
 	public WikiPage process(WikiPage wikiPage, WikiSession wikiSession) {
-		String trailAttrName = wikiPage.getLangCode()+":TRAIL";
-		
+		String trailAttrName = wikiPage.getLangCode() + ":TRAIL";
+
 		WikiPage newPage = null;
 		try {
 			newPage = (WikiPage) wikiPage.clone();
@@ -38,26 +38,35 @@
 			System.err.println(e);
 		}
 
-		String trail = "["+wikiEngine.getUid(newPage.getName(), newPage.getLangCode())+"] ";
-		
+		StringBuffer trail = new StringBuffer("<li>").append(
+				HTMLTranslatorParts.pagePartRegexStart).append("[").append(
+				wikiEngine.getUid(newPage.getName(), newPage.getLangCode()))
+				.append("] ").append(HTMLTranslatorParts.pagePartRegexEnd)
+				.append("</li>");
+
 		log.debug("Show trail: " + trail);
-		
+
 		if (wikiSession.getAttribute(trailAttrName) != null) {
-			String oldTrail = (String)wikiSession.getAttribute(trailAttrName);
-			
-			if (oldTrail.endsWith(trail)) {
+			String oldTrail = (String) wikiSession.getAttribute(trailAttrName);
+
+			if (oldTrail.endsWith(trail.toString())) {
 				// do not add trail if page reloads
-				trail = oldTrail;
+				trail = new StringBuffer(oldTrail);
+			} else {
+				trail.insert(0, oldTrail);
 			}
-			else {
-				trail = oldTrail + trail;
-			}
 		}
-		
-		wikiSession.setAttribute(trailAttrName, trail);
-		
-		newPage.setContent(HTMLTranslatorParts.pagePartRegexStart+"Your trail: "+trail+"\n----\n"+newPage.getContent()+HTMLTranslatorParts.pagePartRegexEnd);
-		
+
+		wikiSession.setAttribute(trailAttrName, trail.toString());
+
+		trail.insert(0, "Your trail: <ul>").insert(0,
+				"<div class=\"wikiYourTrail\">").append("</ul></div>\n<br />\n")
+				.append(HTMLTranslatorParts.pagePartRegexStart).append(
+						newPage.getContent()).append(
+						HTMLTranslatorParts.pagePartRegexEnd);
+
+		newPage.setContent(trail.toString());
+
 		return newPage;
 	}
 




More information about the jboss-svn-commits mailing list