Author: xlawrence
Date: Thu Nov 15 17:46:33 2007
New Revision: 19162

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D19162&repname=
=3Djahia
Log:
Added new tag to generate a link towards the file manager =


Added:
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/FileManagerLinkTag.java
Modified:
    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

Added: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/ht=
ml/links/FileManagerLinkTag.java
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/links/FileManagerL=
inkTag.java&rev=3D19162&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/FileManagerLinkTag.java (added)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/html/=
links/FileManagerLinkTag.java Thu Nov 15 17:46:33 2007
@@ -0,0 +1,59 @@
+/*
+ * 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 Fil=
e Manager.
+ *
+ * @author Xavier Lawrence
+ */
+public class FileManagerLinkTag extends AbstractJahiaTag {
+
+    private static final org.apache.log4j.Logger logger =3D
+            org.apache.log4j.Logger.getLogger(SiteMapLinkTag.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().drawAjaxFileManagerLauncher());
+            =

+        } catch (final IOException e) {
+            logger.error("IOException in doStartTag", e);
+
+        } catch (final JahiaException je) {
+            logger.error("JahiaException in doStartTag", je);
+        }
+
+
+        return SKIP_BODY;
+    }
+
+}

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=3D19162=
&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 Thu Nov 15 17:46:33 2007
@@ -638,4 +638,10 @@
             <rtexprvalue>true</rtexprvalue>
         </attribute>
     </tag>
+
+    <tag>
+        <name>filemanagerlink</name>
+        <tagclass>org.jahia.taglibs.html.links.FileManagerLinkTag</tagclas=
s>
+        <info>Generates a full link to the Ajax filemanager</info>
+    </tag>
 </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=3D19162&=
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 Thu Nov 15 17:46:33 2007
@@ -39,7 +39,7 @@
                 <a class=3D"filemanager"
                     title=3D'<content:resourceBundle resourceBundle=3D"jah=
iatemplates.common"
                         resourceName=3D"filemanager.name" defaultValue=3D"=
File manager"/>'
-                    href=3D"<%=3DjData.gui().html().drawAjaxFileManagerLau=
ncher()%>"><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>

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

Reply via email to