pvollenweider 2004/10/26 17:16:04 CEST
Modified files:
src/view/jsp/include left_menu.inc main_menu.inc
Log:
Add resources for noPage or noTitle
Revision Changes Path
1.5 +102 -72 corporate_portal_templates/src/view/jsp/include/left_menu.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/left_menu.inc.diff?r1=1.4&r2=1.5&f=h
1.9 +6 -2 corporate_portal_templates/src/view/jsp/include/main_menu.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/main_menu.inc.diff?r1=1.8&r2=1.9&f=h
Index: left_menu.inc
===================================================================
RCS file:
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/left_menu.inc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- left_menu.inc 29 Sep 2004 09:34:44 -0000 1.4
+++ left_menu.inc 26 Oct 2004 15:16:03 -0000 1.5
@@ -22,52 +22,64 @@
JahiaContainer linksContainer = (JahiaContainer)
linksContainerEnum.nextElement();
JahiaPage link = (JahiaPage) linksContainer.getFieldObject( "link"
);
if (link != null) {
-
- // displays page info
- String state = "";
- if ( jData.gui().isPageInPath(link.getID()) ) {
- state = "on";
- }
- if ( link.getID() == rootPageID ) {
- state = "current";
- }
- out.println("<tr><td> </td>");
- out.println("<td class=\"left"+state+"\"");
-
- if (! jData.gui().isPageInPath(link.getID()) ){
- out.println(" onmouseover=\"leftOn(this)\"
onmouseout=\"leftOff(this)\"");
- }
- /*
- if (!editMode){
- out.println(" onclick=goTo('" + link.getUrl(jData.params())
+ "')");
- }
- */
- out.println(">");
-
int truncSize = editMode ? 30 - (currentLevel * 3) : 40 -
(currentLevel * 3);
- if (link.getID() == rootPageID) {
- out.println("<span class=\"leftlevel" + currentLevel);
-
out.println("\">"+jData.gui().glueTitle(link.getTitle(),truncSize)+"</span>");
+ String pageTitle =
jData.gui().glueTitle(link.getTitle(),truncSize);
+ boolean displayLine = false;
+ if (pageTitle.length() == 0) {
+ if (editMode) {
+ pageTitle = "<span style='color:#ff0000;'>" +
getResourceBundle("noTitle","No title",jData) + "</span>";
+ displayLine = true;
+ }
} else {
- out.println("<a class=\"leftlevel" + currentLevel);
- out.println("\" href=\"" + link.getUrl(jData.params()) +
"\">"+jData.gui().glueTitle(link.getTitle(),truncSize)+"</a>");
+ displayLine = true;
}
- // displays action buttons on container
- ContainerBean linksContainerBean = new
ContainerBean(linksContainer,jData.params());
- jData.gui().html().drawBeginActionMenu(linksContainerBean,
null, null, false, "", "jahiatemplates.Corporate_portal_templates", null, out);
- out.println("</td></tr>\n");
-
- // displays sub links
- if (jData.gui().isPageInPath(link.getID())) {
- Boolean theBoolean = new
Boolean(linksContainerEnum.hasMoreElements());
- Vector childImageArray = (Vector) imageArray.clone();
- childImageArray.addElement(theBoolean);
- getPageSubTree(jData , rootPageID, link.getID(),
childImageArray, theURL,currentLevel, pageContext);
+ if (displayLine) {
+ // displays page info
+ String state = "";
+ if ( jData.gui().isPageInPath(link.getID()) ) {
+ state = "on";
+ }
+ if ( link.getID() == rootPageID ) {
+ state = "current";
+ }
+ out.println("<tr><td> </td>");
+ out.println("<td class=\"left"+state+"\"");
+
+ if (! jData.gui().isPageInPath(link.getID()) ){
+ out.println(" onmouseover=\"leftOn(this)\"
onmouseout=\"leftOff(this)\"");
+ }
+ /*
+ if (!editMode){
+ out.println(" onclick=goTo('" +
link.getUrl(jData.params()) + "')");
+ }
+ */
+ out.println(">");
+
+ if (link.getID() == rootPageID) {
+ out.println("<span class=\"leftlevel" + currentLevel);
+ out.println("\">"+pageTitle+"</span>");
+ } else {
+ out.println("<a class=\"leftlevel" + currentLevel);
+ out.println("\" href=\"" + link.getUrl(jData.params())
+ "\">"+pageTitle+"</a>");
+ }
+ // displays action buttons on container
+ ContainerBean linksContainerBean = new
ContainerBean(linksContainer,jData.params());
+ jData.gui().html().drawBeginActionMenu(linksContainerBean,
null, null, false, "", "jahiatemplates.Corporate_portal_templates", null, out);
+ out.println("</td></tr>\n");
+
+ // displays sub links
+ if (jData.gui().isPageInPath(link.getID())) {
+ Boolean theBoolean = new
Boolean(linksContainerEnum.hasMoreElements());
+ Vector childImageArray = (Vector) imageArray.clone();
+ childImageArray.addElement(theBoolean);
+ getPageSubTree(jData , rootPageID, link.getID(),
childImageArray, theURL,currentLevel, pageContext);
+ }
}
} else {
if (editMode) {
out.println("<tr><td> </td>");
- out.println("<td class='left'><a href='#' class='leftlevel"
+ currentLevel + "' style='color:#ff0000;'>null</a>");
+ out.println("<td class='left'><a href='#' class='leftlevel"
+ currentLevel +
+ "' style='color:#ff0000;'>" +
getResourceBundle("noPage","No page",jData) + "</a>");
ContainerBean linksContainerBean = new
ContainerBean(linksContainer,jData.params());
jData.gui().html().drawBeginActionMenu(linksContainerBean,
null, null, false, "", "jahiatemplates.Corporate_portal_templates", null, out);
out.println("</td></tr>");
@@ -161,7 +173,9 @@
<tr>
<td class="leftpict"> </td>
<td class="left">
- <a href="#" class="leftlevel1"
style="color:#ff0000;">null</a>
+ <a href="#" class="leftlevel1"
style="color:#ff0000;"><span style="color:#ff0000;"><content:resourceBundle
+ resourceBundle="jahiatemplates.Corporate_portal_templates"
resourceName="noPage"
+ defaultValue="No page"/></span></a>
<jahiaHtml:actionMenu name="linkContainer"
namePostFix="" resourceBundle="jahiatemplates.Corporate_portal_templates"
useFieldSet="false">
</jahiaHtml:actionMenu>
</td>
@@ -178,41 +192,57 @@
<logic:equal name="link" property="currentPage" value="true">
<bean:define id="state" value="current"/>
</logic:equal>
- <%
- linkCount++;
- if (linkCount == 1) {
- %><table border="0" cellspacing="0" cellpadding="0"
width="100%"><%
- }
- %>
- <tr>
- <td class="leftpict<bean:write name="state"/>"> </td>
- <td class="left<bean:write name="state"/>"
- <logic:equal name="link" property="currentPage"
value="false">
- onmouseover="leftOn(this)" onmouseout="leftOff(this)"
- </logic:equal>
- <jahia:ifNotEditMode>
- onclick="goTo('<bean:write name='link'
property='url'/>')"
- </jahia:ifNotEditMode>
- >
- <a href="<bean:write name='link' property='url'/>"
class="leftlevel1"><bean:write name="link"
- property="title" filter="false"/><logic:notPresent
name="link"
- property="title">null</logic:notPresent></a>
- <jahiaHtml:actionMenu name="linkContainer" namePostFix=""
resourceBundle="jahiatemplates.Corporate_portal_templates" useFieldSet="false">
- </jahiaHtml:actionMenu>
- <%
- if ( jData.gui().getLevel() > startLevel + maxLevel + 1){
+ <logic:notEmpty name="link" property="title">
+ <%
+ linkCount++;
+ if (linkCount == 1) {
+ %><table border="0" cellspacing="0" cellpadding="0"
width="100%"><%
+ }
+ %>
+ <tr>
+ <td class="leftpict<bean:write name="state"/>"> </td>
+ <td class="left<bean:write name="state"/>"
+ <logic:equal name="link" property="currentPage"
value="false">
+ onmouseover="leftOn(this)"
onmouseout="leftOff(this)"
+ </logic:equal>
+ <jahia:ifNotEditMode>
+ onclick="goTo('<bean:write name='link'
property='url'/>')"
+ </jahia:ifNotEditMode>
+ >
+ <a href="<bean:write name='link' property='url'/>"
class="leftlevel1"><bean:write name="link"
+ property="title" filter="false"/></a>
+ <jahiaHtml:actionMenu name="linkContainer"
namePostFix="" resourceBundle="jahiatemplates.Corporate_portal_templates"
useFieldSet="false">
+ </jahiaHtml:actionMenu>
+ <%
+ if ( jData.gui().getLevel() > startLevel + maxLevel +
1){
+ %>
+ <logic:equal name="link"
property="inCurrentPagePath" value="true">
+ <br/><a
href="<%=jData.params().composePageUrl(getPageIDAtLevel(jData,startLevel + 1
,maxLevel))%>"><img src="<jahia:contextURL/>/images/up.gif" alt="[..]" border="0"
width="16" height="16"></a>
+ </logic:equal>
+ <%
+ }
%>
<logic:equal name="link" property="inCurrentPagePath"
value="true">
- <br/><a
href="<%=jData.params().composePageUrl(getPageIDAtLevel(jData,startLevel + 1
,maxLevel))%>"><img src="<jahia:contextURL/>/images/up.gif" alt="[..]" border="0"
width="16" height="16"></a>
+ <%getPageSubTree(jData, jData.page().getID(),
getPageIDAtLevel(jData,startLevel + 1 ,maxLevel), new Vector(), theURL,1,
pageContext);%>
</logic:equal>
- <%
- }
- %>
- <logic:equal name="link" property="inCurrentPagePath"
value="true">
- <%getPageSubTree(jData, jData.page().getID(),
getPageIDAtLevel(jData,startLevel + 1 ,maxLevel), new Vector(), theURL,1,
pageContext);%>
- </logic:equal>
- </td>
- </tr>
+ </td>
+ </tr>
+ </logic:notEmpty>
+ <logic:empty name="link" property="title">
+ <logic:equal name="currentRequest" property="editMode"
value="true">
+ <tr>
+ <td class="leftpict"> </td>
+ <td class="left">
+ <a href="#" class="leftlevel1"
style="color:#ff0000;"><span style="color:#ff0000;"><content:resourceBundle
+
resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="noTitle"
+ defaultValue="No tage"/></span></a>
+ <jahiaHtml:actionMenu name="linkContainer"
namePostFix="" resourceBundle="jahiatemplates.Corporate_portal_templates"
useFieldSet="false">
+ </jahiaHtml:actionMenu>
+ </td>
+ </tr>
+ </logic:equal>
+ </logic:empty>
+
</logic:notEmpty>
</content:container>
<%
Index: main_menu.inc
===================================================================
RCS file:
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/main_menu.inc,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- main_menu.inc 30 Sep 2004 13:51:24 -0000 1.8
+++ main_menu.inc 26 Oct 2004 15:16:03 -0000 1.9
@@ -62,7 +62,9 @@
<logic:empty name="topLink">
<logic:equal name="currentRequest" property="editMode" value="true">
<td id="menu<%=menuCount%>" class="topmenu<bean:write
name="myColorSet"/>">
- <a href="#" style="color:#ff0000;">null</a>
+ <span style="color:#ff0000;"><content:resourceBundle
+ resourceBundle="jahiatemplates.Corporate_portal_templates"
resourceName="noPage"
+ defaultValue="No page"/></span>
<jahiaHtml:actionMenu name="topMenuContainer"
namePostFix="" resourceBundle="jahiatemplates.Corporate_portal_templates"
useFieldSet="false">
</jahiaHtml:actionMenu>
</td>
@@ -99,7 +101,9 @@
%> onmouseout="<%=onmouseout%>"<%
}
%>><bean:write name="topLink" property="title" filter="false"/>
- <logic:notPresent name="topLink"
property="title">null</logic:notPresent>
+ <logic:empty name="topLink" property="title"><span
style="color:#ff0000;"><content:resourceBundle
+ resourceBundle="jahiatemplates.Corporate_portal_templates"
resourceName="noTitle"
+ defaultValue="No title"/></span></logic:empty>
</a>
<jahiaHtml:actionMenu name="topMenuContainer" namePostFix=""
resourceBundle="jahiatemplates.Corporate_portal_templates" useFieldSet="false">
</jahiaHtml:actionMenu>