Author: xlawrence
Date: Fri Nov 16 13:04:11 2007
New Revision: 19187

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D19187&repname=
=3Djahia
Log:
Get rid of some scriptlet code in the topBar and create new tags to generat=
e links to Jahia engine or modules.

Added:
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/AdministrationLinkTag.java
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/LoginLinkTag.java
      - copied, changed from r19156, branches/JAHIA-INCLUDE-TAG-BRANCH/core=
/src/java/org/jahia/taglibs/html/links/LoginLink.java
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/LogoutLinkTag.java
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/MySettingsLinkTag.java
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/WorkflowLinkTag.java
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
session/loggedUserTag.java
Removed:
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/LoginLink.java
Modified:
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/Abstr=
actJahiaTag.java
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/etc/taglibs/j=
ahia-html.tld
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/advanced=
options.tagf
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/usertool=
s.tagf
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/workflow=
.tagf

Modified: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs=
/AbstractJahiaTag.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-INCLUD=
E-TAG-BRANCH/core/src/java/org/jahia/taglibs/AbstractJahiaTag.java&rev=3D19=
187&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/Abstr=
actJahiaTag.java (original)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/Abstr=
actJahiaTag.java Fri Nov 16 13:04:11 2007
@@ -46,6 +46,11 @@
      */
     protected String languageCode;
 =

+    /**
+     * The CSS class the surrounding div or span element will have
+     */
+    protected String cssClassName;
+
     public String getResourceBundle() {
         return resourceBundle;
     }
@@ -69,4 +74,12 @@
     public void setLanguageCode(String languageCode) {
         this.languageCode =3D languageCode;
     }
+
+    public String getCssClassName() {
+        return cssClassName;
+    }
+
+    public void setCssClassName(String cssClassName) {
+        this.cssClassName =3D cssClassName;
+    }
 }

Added: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/ht=
ml/links/AdministrationLinkTag.java
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/links/Administrati=
onLinkTag.java&rev=3D19187&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/AdministrationLinkTag.java (added)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/AdministrationLinkTag.java Fri Nov 16 13:04:11 2007
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2002-2006 Jahia Ltd
+ *
+ * Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (J=
CDDL),
+ * Version 1.0 (the "License"), or (at your option) any later version; you=
 may
+ * not use this file except in compliance with the License. You should have
+ * received a copy of the License along with this program; if not, you may=
 obtain
+ * a copy of the License at
+ *
+ *  http://www.jahia.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jahia.taglibs.html.links;
+
+import org.jahia.taglibs.AbstractJahiaTag;
+import org.jahia.data.JahiaData;
+import org.jahia.exceptions.JahiaException;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+
+/**
+ * Simple tags that generates a full link to the Jahia Administration pane=
ls.
+ *
+ * @author Xavier Lawrence
+ */
+public class AdministrationLinkTag extends AbstractJahiaTag {
+
+    private static final org.apache.log4j.Logger logger =3D
+            org.apache.log4j.Logger.getLogger(AdministrationLinkTag.class);
+
+    public int doStartTag() throws JspException {
+        try {
+            final HttpServletRequest request =3D (HttpServletRequest) page=
Context.getRequest();
+            final JahiaData jData =3D (JahiaData) request.getAttribute("or=
g.jahia.data.JahiaData");
+
+            final JspWriter out =3D pageContext.getOut();
+
+            out.print(jData.gui().html().drawAdministrationLauncher());
+
+        } catch (final IOException e) {
+            logger.error("IOException in doStartTag", e);
+
+        } catch (final JahiaException je) {
+            logger.error("JahiaException in doStartTag", je);
+        }
+
+
+        return SKIP_BODY;
+    }
+
+}
+

Copied: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/h=
tml/links/LoginLinkTag.java (from r19156, branches/JAHIA-INCLUDE-TAG-BRANCH=
/core/src/java/org/jahia/taglibs/html/links/LoginLink.java)
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-INCLUD=
E-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/links/LoginLinkTag.java&r=
ev=3D19187&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/LoginLink.java (original)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/LoginLinkTag.java Fri Nov 16 13:04:11 2007
@@ -1,3 +1,20 @@
+/*
+ * Copyright 2002-2006 Jahia Ltd
+ *
+ * Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (J=
CDDL),
+ * Version 1.0 (the "License"), or (at your option) any later version; you=
 may
+ * not use this file except in compliance with the License. You should have
+ * received a copy of the License along with this program; if not, you may=
 obtain
+ * a copy of the License at
+ *
+ *  http://www.jahia.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.jahia.taglibs.html.links;
 =

 import org.jahia.taglibs.AbstractJahiaTag;
@@ -14,10 +31,10 @@
  *
  * @author Xavier Lawrence
  */
-public class LoginLink extends AbstractJahiaTag {
+public class LoginLinkTag extends AbstractJahiaTag {
 =

     private static final org.apache.log4j.Logger logger =3D
-            org.apache.log4j.Logger.getLogger(LoginLink.class);
+            org.apache.log4j.Logger.getLogger(LoginLinkTag.class);
 =

     private int destinationPageID =3D -1;
     private boolean urlonly;

Added: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/ht=
ml/links/LogoutLinkTag.java
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/links/LogoutLinkTa=
g.java&rev=3D19187&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/LogoutLinkTag.java (added)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/LogoutLinkTag.java Fri Nov 16 13:04:11 2007
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2002-2006 Jahia Ltd
+ *
+ * Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (J=
CDDL),
+ * Version 1.0 (the "License"), or (at your option) any later version; you=
 may
+ * not use this file except in compliance with the License. You should have
+ * received a copy of the License along with this program; if not, you may=
 obtain
+ * a copy of the License at
+ *
+ *  http://www.jahia.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jahia.taglibs.html.links;
+
+import org.jahia.taglibs.AbstractJahiaTag;
+import org.jahia.data.JahiaData;
+import org.jahia.exceptions.JahiaException;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+
+/**
+ * Simple tags that generates a full link in order to logout the user.
+ *
+ * @author Xavier Lawrence
+ */
+public class LogoutLinkTag extends AbstractJahiaTag {
+
+    private static final org.apache.log4j.Logger logger =3D
+            org.apache.log4j.Logger.getLogger(LogoutLinkTag.class);
+    private int destinationPageID =3D -1;
+
+    public int doStartTag() throws JspException {
+        try {
+            final HttpServletRequest request =3D (HttpServletRequest) page=
Context.getRequest();
+            final JahiaData jData =3D (JahiaData) request.getAttribute("or=
g.jahia.data.JahiaData");
+
+            final JspWriter out =3D pageContext.getOut();
+            if (destinationPageID > 0) {
+                out.print(jData.gui().html().drawLogoutLauncher(destinatio=
nPageID));
+            } else {
+                out.print(jData.gui().html().drawLogoutLauncher());
+            }
+
+        } catch (final IOException e) {
+            logger.error("IOException in doStartTag", e);
+
+        } catch (final JahiaException je) {
+            logger.error("JahiaException in doStartTag", je);
+        }
+
+        return SKIP_BODY;
+    }
+
+    public int doEndTag() throws JspException {
+        destinationPageID =3D -1;
+        return EVAL_PAGE;
+    }
+
+    public int getDestinationPageID() {
+        return destinationPageID;
+    }
+
+    public void setDestinationPageID(int destinationPageID) {
+        this.destinationPageID =3D destinationPageID;
+    }
+}

Added: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/ht=
ml/links/MySettingsLinkTag.java
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/links/MySettingsLi=
nkTag.java&rev=3D19187&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/MySettingsLinkTag.java (added)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/MySettingsLinkTag.java Fri Nov 16 13:04:11 2007
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2002-2006 Jahia Ltd
+ *
+ * Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (J=
CDDL),
+ * Version 1.0 (the "License"), or (at your option) any later version; you=
 may
+ * not use this file except in compliance with the License. You should have
+ * received a copy of the License along with this program; if not, you may=
 obtain
+ * a copy of the License at
+ *
+ *  http://www.jahia.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jahia.taglibs.html.links;
+
+import org.jahia.taglibs.AbstractJahiaTag;
+import org.jahia.data.JahiaData;
+import org.jahia.exceptions.JahiaException;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+
+/**
+ * Simple tags that generates a full link in order to access the Jahia Sit=
e Map engine.
+ *
+ * @author Xavier Lawrence
+ */
+public class MySettingsLinkTag extends AbstractJahiaTag {
+
+    private static final org.apache.log4j.Logger logger =3D
+            org.apache.log4j.Logger.getLogger(MySettingsLinkTag.class);
+
+    public int doStartTag() throws JspException {
+        try {
+            final HttpServletRequest request =3D (HttpServletRequest) page=
Context.getRequest();
+            final JahiaData jData =3D (JahiaData) request.getAttribute("or=
g.jahia.data.JahiaData");
+
+            final JspWriter out =3D pageContext.getOut();
+
+            out.print(jData.gui().html().drawMySettingsLauncher());
+
+        } catch (final IOException e) {
+            logger.error("IOException in doStartTag", e);
+
+        } catch (final JahiaException je) {
+            logger.error("JahiaException in doStartTag", je);
+        }
+
+
+        return SKIP_BODY;
+    }
+}

Added: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/ht=
ml/links/WorkflowLinkTag.java
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/links/WorkflowLink=
Tag.java&rev=3D19187&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/WorkflowLinkTag.java (added)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/WorkflowLinkTag.java Fri Nov 16 13:04:11 2007
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2002-2006 Jahia Ltd
+ *
+ * Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (J=
CDDL),
+ * Version 1.0 (the "License"), or (at your option) any later version; you=
 may
+ * not use this file except in compliance with the License. You should have
+ * received a copy of the License along with this program; if not, you may=
 obtain
+ * a copy of the License at
+ *
+ *  http://www.jahia.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jahia.taglibs.html.links;
+
+import org.jahia.taglibs.AbstractJahiaTag;
+import org.jahia.data.JahiaData;
+import org.jahia.exceptions.JahiaException;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+
+/**
+ * Simple tags that generates a full link to the Jahia Workflow engine.
+ *
+ * @author Xavier Lawrence
+ */
+public class WorkflowLinkTag extends AbstractJahiaTag {
+
+    private static final org.apache.log4j.Logger logger =3D
+            org.apache.log4j.Logger.getLogger(WorkflowLinkTag.class);
+
+    private String objectKey;
+
+    public int doStartTag() throws JspException {
+        try {
+            final HttpServletRequest request =3D (HttpServletRequest) page=
Context.getRequest();
+            final JahiaData jData =3D (JahiaData) request.getAttribute("or=
g.jahia.data.JahiaData");
+
+            final JspWriter out =3D pageContext.getOut();
+
+            if (objectKey !=3D null && objectKey.length() > 0) {
+                out.print(jData.gui().html().drawWorkflowLauncher(objectKe=
y));
+            } else {
+                out.print(jData.gui().html().drawWorkflowLauncher());
+            }
+
+        } catch (final IOException e) {
+            logger.error("IOException in doStartTag", e);
+
+        } catch (final JahiaException je) {
+            logger.error("JahiaException in doStartTag", je);
+        }
+        return SKIP_BODY;
+    }
+
+    public int doEndTag() throws JspException {
+        objectKey =3D null;
+        return EVAL_PAGE;
+    }
+
+}

Added: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/ht=
ml/session/loggedUserTag.java
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/session/loggedUser=
Tag.java&rev=3D19187&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
session/loggedUserTag.java (added)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
session/loggedUserTag.java Fri Nov 16 13:04:11 2007
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2002-2006 Jahia Ltd
+ *
+ * Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (J=
CDDL),
+ * Version 1.0 (the "License"), or (at your option) any later version; you=
 may
+ * not use this file except in compliance with the License. You should have
+ * received a copy of the License along with this program; if not, you may=
 obtain
+ * a copy of the License at
+ *
+ *  http://www.jahia.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jahia.taglibs.html.session;
+
+import org.jahia.data.JahiaData;
+import org.jahia.taglibs.AbstractJahiaTag;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import java.io.IOException;
+
+/**
+ * Simple tags that prints out the user name of the currently logged user.
+ *
+ * @author Xavier Lawrence
+ */
+public class LoggedUserTag extends AbstractJahiaTag {
+
+    private static final org.apache.log4j.Logger logger =3D
+            org.apache.log4j.Logger.getLogger(LoggedUserTag.class);
+
+    public int doStartTag() throws JspException {
+        try {
+            final HttpServletRequest request =3D (HttpServletRequest) page=
Context.getRequest();
+            final JahiaData jData =3D (JahiaData) request.getAttribute("or=
g.jahia.data.JahiaData");
+            final StringBuffer buff =3D new StringBuffer();
+
+            buff.append("<div");
+
+            if (cssClassName !=3D null && cssClassName.length() > 0) {
+                buff.append(" class=3D\"");
+                buff.append(cssClassName);
+                buff.append("\"");
+            }
+            =

+            buff.append("><span>");
+            buff.append(jData.getProcessingContext().getUser().getUsername=
());
+            buff.append("</span></div>");
+
+            final JspWriter out =3D pageContext.getOut();
+            out.print(buff.toString());
+
+        } catch (final IOException e) {
+            logger.error("IOException in doStartTag", e);
+        }
+
+        return SKIP_BODY;
+    }
+
+    public int doEndTag() throws JspException {
+        cssClassName =3D null;
+        return EVAL_PAGE;
+    }
+
+
+}

Modified: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/etc/tag=
libs/jahia-html.tld
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-INCLUD=
E-TAG-BRANCH/core/src/webapp/WEB-INF/etc/taglibs/jahia-html.tld&rev=3D19187=
&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/etc/taglibs/j=
ahia-html.tld (original)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/etc/taglibs/j=
ahia-html.tld Fri Nov 16 13:04:11 2007
@@ -625,7 +625,7 @@
 =

     <tag>
         <name>loginLink</name>
-        <tagclass>org.jahia.taglibs.html.links.LoginLink</tagclass>
+        <tagclass>org.jahia.taglibs.html.links.LoginLinkTag</tagclass>
         <info>Generates a full link or just the url to the login engine or=
 popup</info>
         <attribute>
             <name>urlonly</name>
@@ -640,15 +640,61 @@
     </tag>
 =

     <tag>
-        <name>filemanagerlink</name>
+        <name>filemanagerLink</name>
         <tagclass>org.jahia.taglibs.html.links.FileManagerLinkTag</tagclas=
s>
         <info>Generates a full link to the Ajax filemanager</info>
     </tag>
 =

     <tag>
+        <name>mySettingsLink</name>
+        <tagclass>org.jahia.taglibs.html.links.MySettingsLinkTag</tagclass>
+        <info>Generates a full link to the user's personal settings</info>
+    </tag>
+
+    <tag>
+        <name>administrationLink</name>
+        <tagclass>org.jahia.taglibs.html.links.AdministrationLinkTag</tagc=
lass>
+        <info>Generates a full link to Jahia Administration panels</info>
+    </tag>
+
+    <tag>
+        <name>workflowLink</name>
+        <tagclass>org.jahia.taglibs.html.links.WorkflowLinkTag</tagclass>
+        <info>Generates a full link to Jahia's workflow engine</info>
+        <attribute>
+            <name>objectKey</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>logoutLink</name>
+        <tagclass>org.jahia.taglibs.html.links.LogoutLinkTag</tagclass>
+        <info>Generates a full link in order to logout the user</info>
+        <attribute>
+            <name>destinationPageID</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>currentUser</name>
+        <tagclass>org.jahia.taglibs.html.session.LoggedUserTag</tagclass>
+        <info>Generates a div element containing the name of the currently=
 logged user</info>
+        <attribute>
+            <name>cssClassName</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
         <name>include</name>
         <tagclass>org.jahia.taglibs.include.IncludeTag</tagclass>
-        <info>Custom jsp:include implementation that resolves the specifie=
d template path considering template set inheritance</info>
+        <info>Custom jsp:include implementation that resolves the specifie=
d template path considering template set
+            inheritance
+        </info>
         <attribute>
             <name>page</name>
             <required>true</required>
@@ -658,7 +704,8 @@
     <tag>
         <name>param</name>
         <tagclass>org.jahia.taglibs.include.ParamTag</tagclass>
-        <info>Custom jsp:param implementation that is used in conjunction =
with 'include' to pass additional parameters</info>
+        <info>Custom jsp:param implementation that is used in conjunction =
with 'include' to pass additional parameters
+        </info>
         <attribute>
             <name>name</name>
             <required>true</required>
@@ -670,4 +717,4 @@
             <rtexprvalue>true</rtexprvalue>
         </attribute>
     </tag>
-</taglib>
\ No newline at end of file
+</taglib>

Modified: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/ad=
vancedoptions.tagf
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-INCLUD=
E-TAG-BRANCH/core/src/webapp/WEB-INF/tags/advancedoptions.tagf&rev=3D19187&=
repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/advanced=
options.tagf (original)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/advanced=
options.tagf Fri Nov 16 13:04:11 2007
@@ -39,13 +39,13 @@
                 <a class=3D"filemanager"
                     title=3D'<content:resourceBundle resourceBundle=3D"jah=
iatemplates.common"
                         resourceName=3D"filemanager.name" defaultValue=3D"=
File manager"/>'
-                    href=3D"<jahiaHtml:filemanagerlink />"><span><content:=
resourceBundle
+                    href=3D"<jahiaHtml:filemanagerLink />"><span><content:=
resourceBundle
                     resourceBundle=3D"jahiatemplates.common" resourceName=
=3D"filemanager.name"
                     defaultValue=3D"File manager"/></span></a>
             </li>
             <%
             if ( org.jahia.registries.ServicesRegistry.getInstance().getJa=
hiaACLManagerService().getSiteActionPermission("admin.JahiaAdministration",=
 jData.params().getUser(), org.jahia.services.acl.JahiaBaseACL.READ_RIGHTS,=
 jData.params().getSiteID()) > 0 ) {
-                %><li><a href=3D"<%=3DjData.gui().html().drawAdministratio=
nLauncher()%>" class=3D"administration"
+                %><li><a href=3D"<jahiaHtml:administrationLink />" class=
=3D"administration"
                     title=3D'<content:resourceBundle
                     resourceBundle=3D"jahiatemplates.common" resourceName=
=3D"administration"
                     defaultValue=3D"Administration"/>'><span><content:reso=
urceBundle

Modified: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/us=
ertools.tagf
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-INCLUD=
E-TAG-BRANCH/core/src/webapp/WEB-INF/tags/usertools.tagf&rev=3D19187&repnam=
e=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/usertool=
s.tagf (original)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/usertool=
s.tagf Fri Nov 16 13:04:11 2007
@@ -16,26 +16,26 @@
 limitations under the License.
 --%>
 <ul class=3D"usertools">
-    <li><a href=3D"<%=3DjData.gui().html().drawLogoutLauncher()%>" class=
=3D"logout" title=3D'<content:resourceBundle
+    <li><a href=3D"<jahiaHtml:logoutLink />" class=3D"logout" title=3D'<co=
ntent:resourceBundle
                             resourceBundle=3D"jahiatemplates.common"
-                            resourceName=3D"logout" defaultValue=3D"Logout=
"/>'><span><content:resourceBundle
-                            resourceBundle=3D"jahiatemplates.common"
-                            resourceName=3D"logout" defaultValue=3D"Logout=
"/></span></a></li>
+                            resourceName=3D"logout" defaultValue=3D"Logout=
"/>'>
+        <span><content:resourceBundle resourceBundle=3D"jahiatemplates.com=
mon" resourceName=3D"logout"
+                                      defaultValue=3D"Logout"/></span></a>=
</li>
 =

-    <li><a href=3D"<%=3DjData.gui().html().drawMySettingsLauncher()%>" cla=
ss=3D"mysettings" title=3D'<content:resourceBundle
-                            resourceBundle=3D"jahiatemplates.common"
-                            resourceName=3D"mySettings" defaultValue=3D"My=
 settings"/>'><span><content:resourceBundle
+    <li><a href=3D"<jahiaHtml:mySettingsLink />" class=3D"mysettings" titl=
e=3D'<content:resourceBundle
                             resourceBundle=3D"jahiatemplates.common"
-                            resourceName=3D"mySettings" defaultValue=3D"My=
 settings"/></span></a></li>
+                            resourceName=3D"mySettings" defaultValue=3D"My=
 settings"/>'>
+        <span><content:resourceBundle resourceBundle=3D"jahiatemplates.com=
mon" resourceName=3D"mySettings"
+                                      defaultValue=3D"My settings"/></span=
></a></li>
 =

     <li><a href=3D"#" class=3D"chat" title=3D'<content:resourceBundle
                             resourceBundle=3D"jahiatemplates.common"
-                            resourceName=3D"chatModule" defaultValue=3D"Ch=
at"/>'><span><content:resourceBundle
-                            resourceBundle=3D"jahiatemplates.common"
-                            resourceName=3D"chatModule" defaultValue=3D"Ch=
at"/></span></a></li>
+                            resourceName=3D"chatModule" defaultValue=3D"Ch=
at"/>'>
+        <span><content:resourceBundle resourceBundle=3D"jahiatemplates.com=
mon" resourceName=3D"chatModule"
+                                      defaultValue=3D"Chat"/></span></a></=
li>
 =

     <li><content:resourceBundle resourceBundle=3D"jahiatemplates.common"
-                            resourceName=3D"user" defaultValue=3D"User"/>:=
 <strong><%=3DjParams.getUser().getUsername()%></strong></li>
+                                resourceName=3D"user" defaultValue=3D"User=
"/>: <jahiaHtml:currentUser/></li>
 =

 </ul>
 =


Modified: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/wo=
rkflow.tagf
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-INCLUD=
E-TAG-BRANCH/core/src/webapp/WEB-INF/tags/workflow.tagf&rev=3D19187&repname=
=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/workflow=
.tagf (original)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/webapp/WEB-INF/tags/workflow=
.tagf Fri Nov 16 13:04:11 2007
@@ -25,7 +25,7 @@
         if (languageSettings.size() > 0) {
             java.util.Locale toploc=3DjData.params().getLocale();
             %>
-            <a href=3D"javascript:<%=3DjData.gui().html().drawWorkflowLaun=
cher()%>" class=3D"workflow" title=3D'<content:resourceBundle
+            <a href=3D"<jahiaHtml:workflowLink />" class=3D"workflow" titl=
e=3D'<content:resourceBundle
                     resourceBundle=3D"jahiatemplates.common" resourceName=
=3D"workflow"
                     defaultValue=3D"Workflow"/>'><span><content:resourceBu=
ndle
                     resourceBundle=3D"jahiatemplates.common" resourceName=
=3D"workflow"

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to