Author: xlawrence
Date: Wed Nov 28 15:57:13 2007
New Revision: 19307

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D19307&repname=
=3Djahia
Log:
resolve issue http://www.jahia.net/jira/browse/JAHIA-2114: =

- allow the user to click on the ACL diff icon and open the engine directly=
 in the manage rights screen.

I will not put the ACL information directly in the tooltip text as it is no=
t possible to format it correctly

Modified:
    trunk/core/src/java/org/jahia/engines/pages/PageProperties_Engine.java
    trunk/core/src/java/org/jahia/engines/updatecontainer/UpdateContainer_E=
ngine.java
    trunk/core/src/java/org/jahia/engines/updatefield/UpdateField_Engine.ja=
va
    trunk/core/src/java/org/jahia/gui/HTMLToolBox.java
    trunk/core/src/webapp/jsp/jahia/engines/pages/pageproperties.jsp

Modified: trunk/core/src/java/org/jahia/engines/pages/PageProperties_Engine=
.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/java/o=
rg/jahia/engines/pages/PageProperties_Engine.java&rev=3D19307&repname=3Djah=
ia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/java/org/jahia/engines/pages/PageProperties_Engine.java =
(original)
+++ trunk/core/src/java/org/jahia/engines/pages/PageProperties_Engine.java =
Wed Nov 28 15:57:13 2007
@@ -804,7 +804,12 @@
 =

         } else {
             JahiaPage thePage =3D jParams.getPage();
-            theScreen =3D "edit";
+            final String gotoscreen =3D jParams.getParameter("gotoscreen");
+            if (gotoscreen !=3D null && gotoscreen.length() > 0) {
+                theScreen =3D gotoscreen;
+            } else {
+                theScreen =3D "edit";
+            }
 =

             // init engine map
             engineMap =3D new HashMap();
@@ -899,8 +904,7 @@
 =

         // sets engineMap for JSPs
         jParams.setAttribute("engineTitle", "Page properties");
-        jParams.setAttribute("org.jahia.engines.EngineHashMap",
-                engineMap);
+        jParams.setAttribute("org.jahia.engines.EngineHashMap", engineMap);
 =

         return engineMap;
     }

Modified: trunk/core/src/java/org/jahia/engines/updatecontainer/UpdateConta=
iner_Engine.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/java/o=
rg/jahia/engines/updatecontainer/UpdateContainer_Engine.java&rev=3D19307&re=
pname=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
--- trunk/core/src/java/org/jahia/engines/updatecontainer/UpdateContainer_E=
ngine.java (original)
+++ trunk/core/src/java/org/jahia/engines/updatecontainer/UpdateContainer_E=
ngine.java Wed Nov 28 15:57:13 2007
@@ -1077,8 +1077,14 @@
         }
 =

         if (theScreen =3D=3D null || theScreen.equals(EMPTY_STRING)) {
-            theScreen =3D "edit";
+            final String gotoscreen =3D jParams.getParameter("gotoscreen");
+            if (gotoscreen !=3D null && gotoscreen.length() > 0) {
+                theScreen =3D gotoscreen;
+            } else {
+                theScreen =3D "edit";
+            }
         }
+
         if (container.getPickedObject() !=3D null && "edit".equals(theScre=
en)) {
             theScreen =3D "rightsMgmt";
         }

Modified: trunk/core/src/java/org/jahia/engines/updatefield/UpdateField_Eng=
ine.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/java/o=
rg/jahia/engines/updatefield/UpdateField_Engine.java&rev=3D19307&repname=3D=
jahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/java/org/jahia/engines/updatefield/UpdateField_Engine.ja=
va (original)
+++ trunk/core/src/java/org/jahia/engines/updatefield/UpdateField_Engine.ja=
va Wed Nov 28 15:57:13 2007
@@ -689,7 +689,14 @@
         } else {
             engineMap =3D new HashMap();
 =

-            int fieldID =3D jParams.getFieldID ();
+            final String gotoscreen =3D jParams.getParameter("gotoscreen");
+            if (gotoscreen !=3D null && gotoscreen.length() > 0) {
+                theScreen =3D gotoscreen;
+            } else {
+                theScreen =3D "edit";
+            }
+
+            int fieldID =3D jParams.getFieldID();
             Page_Field.resetPageBeanSession (jParams);
             ArrayList localeList =3D new ArrayList ();
             Vector siteLanguageSettings =3D jParams.getSite ().getLanguage=
Settings ();
@@ -715,8 +722,6 @@
 =

             engineMap.put ("jahiaContentFieldFacade", jahiaContentFieldFac=
ade);
 =

-            theScreen =3D "edit";
-
             // init session
             engineMap.put (ENGINE_NAME + ".isSelectedField", Boolean.TRUE);
 =


Modified: trunk/core/src/java/org/jahia/gui/HTMLToolBox.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/java/o=
rg/jahia/gui/HTMLToolBox.java&rev=3D19307&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
--- trunk/core/src/java/org/jahia/gui/HTMLToolBox.java (original)
+++ trunk/core/src/java/org/jahia/gui/HTMLToolBox.java Wed Nov 28 15:57:13 =
2007
@@ -287,6 +287,26 @@
     }
 =

     /**
+     * returns the URL of the field update window
+     *
+     * @param contentField
+     * @return
+     * @throws JahiaException
+     */
+    public String drawUpdateFieldLauncher(final ContentField contentField,=
 final String screen) throws JahiaException {
+        final StringBuffer name =3D new StringBuffer("updateField_");
+        if (contentField !=3D null) {
+            name.append(contentField.getID());
+        }
+        name.append(cleanSessionID(jParams.getSessionID()));
+        final StringBuffer buffer =3D new StringBuffer();
+        buffer.append(gui.drawUpdateFieldUrl(contentField));
+        buffer.append("&gotoscreen=3D");
+        buffer.append(screen);
+        return drawLauncher(buffer.toString(), name.toString());
+    }
+
+    /**
      * @param theField
      * @return
      * @throws JahiaException
@@ -383,20 +403,33 @@
      */
     public String drawUpdateContainerLauncher(final ContentContainer conte=
ntContainer) throws JahiaException {
         return drawUpdateContainerLauncher(contentContainer, JS_WINDOW_WID=
TH,
-                JS_WINDOW_HEIGHT, false, 0);
+                JS_WINDOW_HEIGHT, false, 0, null);
     }
 =

     /**
      * returns the URL of the container update window
      *
      * @param contentContainer
-     * @param focusedFieldId the id of the field to focus on
+     * @return
+     * @throws JahiaException
+     */
+    public String drawUpdateContainerLauncher(final ContentContainer conte=
ntContainer, final String screen)
+            throws JahiaException {
+        return drawUpdateContainerLauncher(contentContainer, JS_WINDOW_WID=
TH,
+                JS_WINDOW_HEIGHT, false, 0, screen);
+    }
+
+    /**
+     * returns the URL of the container update window
+     *
+     * @param contentContainer
+     * @param focusedFieldId   the id of the field to focus on
      * @return the URL of the container update window
      * @throws JahiaException
      */
     public String drawUpdateContainerLauncher(final ContentContainer conte=
ntContainer, int focusedFieldId) throws JahiaException {
         return drawUpdateContainerLauncher(contentContainer, JS_WINDOW_WID=
TH,
-                JS_WINDOW_HEIGHT, false, focusedFieldId);
+                JS_WINDOW_HEIGHT, false, focusedFieldId, null);
     }
 =

     /**
@@ -410,7 +443,7 @@
                                               final int width,
                                               final int height)
             throws JahiaException {
-        return drawUpdateContainerLauncher(contentContainer, width, height=
, false, 0);
+        return drawUpdateContainerLauncher(contentContainer, width, height=
, false, 0, null);
     }
 =

     /**
@@ -425,7 +458,7 @@
                     getContentContainer();
             return drawUpdateContainerLauncher(contentContainer,
                     JS_WINDOW_WIDTH,
-                    JS_WINDOW_HEIGHT, false, 0);
+                    JS_WINDOW_HEIGHT, false, 0, null);
         } else {
             return "";
         }
@@ -444,7 +477,7 @@
                                               final int height)
             throws JahiaException {
         final ContentContainer contentContainer =3D theContainer.getConten=
tContainer();
-        return drawUpdateContainerLauncher(contentContainer, width, height=
, false, 0);
+        return drawUpdateContainerLauncher(contentContainer, width, height=
, false, 0, null);
     }
 =

     /**
@@ -466,7 +499,8 @@
                                                final int width,
                                                final int height,
                                                final boolean checkLock,
-                                               int focusedFieldId)
+                                               final int focusedFieldId,
+                                               final String screen)
             throws JahiaException {
 =

         if (contentContainer =3D=3D null) return "";
@@ -477,12 +511,15 @@
         name.append(containerID);
         name.append(cleanSessionID(jParams.getSessionID()));
         String updateContainerURL =3D gui.drawUpdateContainerUrl(contentCo=
ntainer);
-        if (updateContainerURL.length() > 0 && focusedFieldId > 0) {
-            // also add focused field ID
-            updateContainerURL =3D new StringBuffer(
-                    updateContainerURL.length() + 16)
-                    .append(updateContainerURL).append("&fid=3D").append(
-                            focusedFieldId).toString(); =

+        if (updateContainerURL.length() > 0) {
+            if (focusedFieldId > 0) {
+                // also add focused field ID
+                updateContainerURL =3D new StringBuffer(updateContainerURL=
.length() + 16).
+                        append(updateContainerURL).append("&fid=3D").appen=
d(focusedFieldId).toString();
+            } else if (screen !=3D null && screen.length() > 0) {
+                updateContainerURL =3D new StringBuffer(updateContainerURL=
.length() + 25).
+                        append(updateContainerURL).append("&gotoscreen=3D"=
).append(screen).toString();
+            }
         }
         final StringBuffer buff =3D new StringBuffer();
         final String out =3D updateContainerURL.length() =3D=3D 0 ? "" :
@@ -741,7 +778,7 @@
      * @throws JahiaException
      */
     public String drawPagePropertiesLauncher() throws JahiaException {
-        return drawPagePropertiesLauncher(false, jParams.getPageID());
+        return drawPagePropertiesLauncher(false, jParams.getPageID(), null=
);
     }
 =

     /**
@@ -751,7 +788,7 @@
      * @throws JahiaException
      */
     public String drawPagePropertiesLauncher(final int pageID) throws Jahi=
aException {
-        return drawPagePropertiesLauncher(false, pageID);
+        return drawPagePropertiesLauncher(false, pageID, null);
     }
 =

     /**
@@ -761,14 +798,15 @@
      * @throws JahiaException
      */
     public String drawPagePropertiesLauncher(final ContentPage page) throw=
s JahiaException {
-        return drawPagePropertiesLauncher(false, page.getID());
+        return drawPagePropertiesLauncher(false, page.getID(), null);
     }
 =

     /**
      *
      */
     private String drawPagePropertiesLauncher(final boolean checkLock,
-                                              final int pageId) throws Jah=
iaException {
+                                              final int pageId,
+                                              final String screen) throws =
JahiaException {
         final StringBuffer buff =3D new StringBuffer();
         final StringBuffer name =3D new StringBuffer();
         name.append("pageProperties_");
@@ -776,7 +814,10 @@
             name.append(pageId);
         }
         name.append(cleanSessionID(jParams.getSessionID()));
-        final String url =3D gui.drawPagePropertiesUrl(pageId);
+        String url =3D gui.drawPagePropertiesUrl(pageId);
+        if (url !=3D null && url.length() > 0 && screen !=3D null && scree=
n.length() > 0) {
+            url =3D new StringBuffer(url.length() + 25).append(url).append=
("&gotoscreen=3D").append(screen).toString();
+        }
         final String out =3D url.equals("") ? "" :
                 buff.append("OpenJahiaScrollableWindow('").append(url).
                         append("','").append(name.toString()).append("',")=
.append(JS_WINDOW_WIDTH).
@@ -985,14 +1026,14 @@
         } else if (objectClass =3D=3D ContentContainer.class) {
             if (LockKey.UPDATE_CONTAINER_TYPE.equals(lockKey.getType())) {
                 launcher =3D drawUpdateContainerLauncher((ContentContainer)
-                        contentObject, JS_WINDOW_WIDTH, JS_WINDOW_HEIGHT, =
false, 0);
+                        contentObject, JS_WINDOW_WIDTH, JS_WINDOW_HEIGHT, =
false, 0, null);
             } else if (LockKey.DELETE_CONTAINER_TYPE.equals(lockKey.getTyp=
e())) {
                 launcher =3D drawDeleteContainerLauncher((ContentContainer)
                         contentObject, false);
             }
         } else if (objectClass =3D=3D ContentPage.class) {
             if (LockKey.UPDATE_PAGE_TYPE.equals(lockKey.getType())) {
-                launcher =3D drawPagePropertiesLauncher(false, jParams.get=
PageID());
+                launcher =3D drawPagePropertiesLauncher(false, jParams.get=
PageID(), null);
             }
         }
         final LockService lockRegistry =3D ServicesRegistry.getInstance().
@@ -1177,7 +1218,7 @@
                                     final JspWriter out)
             throws IOException {
 =

-        if (! drawingChecks(contentObject)) {
+        if (!drawingChecks(contentObject)) {
             return;
         }
 =

@@ -1260,7 +1301,7 @@
 =

         try {
             if (contentObject.getID() > 0 &&
-                    ! contentObject.getACL().getPermission(jParams.getUser=
(),
+                    !contentObject.getACL().getPermission(jParams.getUser(=
),
                             JahiaBaseACL.WRITE_RIGHTS)) {
                 // if the user doesn't have Write access on the object, do=
n't display the GUI
                 return false;
@@ -1275,14 +1316,14 @@
     }
 =

     protected Boolean getUserInitialSettingForDevMode(HttpServletRequest t=
herequest,
-                                                      String settingName){
+                                                      String settingName) {
         final boolean isDevMode =3D Jahia.getSettings().isDevelopmentMode(=
);
-        String settingValue =3D (String)therequest.getSession().getAttribu=
te(settingName);
+        String settingValue =3D (String) therequest.getSession().getAttrib=
ute(settingName);
         Boolean result =3D new Boolean(isDevMode);
-        if ( settingValue !=3D null ){
+        if (settingValue !=3D null) {
             result =3D Boolean.valueOf(settingValue);
-        } else if ( isDevMode ) {
-            therequest.getSession().setAttribute(settingName,result.toStri=
ng());
+        } else if (isDevMode) {
+            therequest.getSession().setAttribute(settingName, result.toStr=
ing());
         }
         return result;
     }
@@ -1316,8 +1357,8 @@
 =

         if (logger.isDebugEnabled()) {
             logger.debug("beginAjaxMenu: " + contentObject + ", " + action=
Icon +
-                ", " + useFieldSet + ", " + resourceBundle + ", " +
-                labelKey);
+                    ", " + useFieldSet + ", " + resourceBundle + ", " +
+                    labelKey);
         }
 =

         final int objectID =3D contentObject.getID();
@@ -1332,9 +1373,9 @@
         // to get flags to enable workflow and tbpublishing visu and checks
         // if dev mode is actived so all modules and semaphores are actived
         final boolean isDevMode =3D Jahia.getSettings().isDevelopmentMode(=
);
-        Boolean displayWorkflowStates =3D getUserInitialSettingForDevMode(=
therequest,userSettings.WF_VISU_ENABLED);
-        Boolean displayTimeBasedPublishing =3D getUserInitialSettingForDev=
Mode(therequest,userSettings.TBP_VISU_ENABLED);
-        Boolean aclDifferenceParam =3D getUserInitialSettingForDevMode(the=
request,userSettings.ACL_VISU_ENABLED);
+        Boolean displayWorkflowStates =3D getUserInitialSettingForDevMode(=
therequest, userSettings.WF_VISU_ENABLED);
+        Boolean displayTimeBasedPublishing =3D getUserInitialSettingForDev=
Mode(therequest, userSettings.TBP_VISU_ENABLED);
+        Boolean aclDifferenceParam =3D getUserInitialSettingForDevMode(the=
request, userSettings.ACL_VISU_ENABLED);
         if (!isDevMode) {
             try {
                 displayWorkflowStates =3D Boolean.valueOf((String) therequ=
est.getSession().getAttribute(userSettings.WF_VISU_ENABLED));
@@ -1382,7 +1423,7 @@
         String objectKey =3D objectType + "_" + objectID;
         String realObjectKey =3D objectKey;
         boolean tbpCheckForPageLink =3D false;
-        if (showWorkflow && (! PageBean.TYPE.equals(objectType))) {
+        if (showWorkflow && (!PageBean.TYPE.equals(objectType))) {
             //logger.debug("displaying workflow state");
 =

             if (ContainerBean.TYPE.equals(objectType)) {
@@ -1417,16 +1458,16 @@
             }
 =

             try {
-              out.print("<a href=3D\"javascript:");
-              out.print(drawWorkflowLauncher(buff.toString()));
-              out.print("\"");
-              out.print("\"><img class=3D\"wfState\"");
-              out.print(" title=3D\"");
-              out.print(objectKey);
-              out.print("\" src=3D\"");
-              out.print(contextPath);
-              out.print("/jsp/jahia/engines/images/wfWait.gif\" width=3D\"=
12\" height=3D\"12\"/>");
-              out.print("</a>");
+                out.print("<a href=3D\"javascript:");
+                out.print(drawWorkflowLauncher(buff.toString()));
+                out.print("\"");
+                out.print("\"><img class=3D\"wfState\"");
+                out.print(" title=3D\"");
+                out.print(objectKey);
+                out.print("\" src=3D\"");
+                out.print(contextPath);
+                out.print("/jsp/jahia/engines/images/wfWait.gif\" width=3D=
\"12\" height=3D\"12\"/>");
+                out.print("</a>");
             } catch (JahiaException je) {
                 logger.error(je.getMessage(), je);
             }
@@ -1436,7 +1477,7 @@
         String tbpObjectKey =3D objectKey;
         if (displayTimeBasedPublishing.booleanValue() &&
                 (ContainerBean.TYPE.equals(objectType) || PageBean.TYPE.eq=
uals(objectType))) {
-            if (!tbpCheckForPageLink){
+            if (!tbpCheckForPageLink) {
                 try {
                     ObjectKey objKey =3D ObjectKey.getInstance(tbpObjectKe=
y);
                     if (ContainerBean.TYPE.equals(objectType)) {
@@ -1446,8 +1487,8 @@
                                         .getContext().getBean(JahiaObjectM=
anager.class.getName());
                         JahiaObjectDelegate jahiaObjectDelegate =3D jahiaO=
bjectManager
                                 .getJahiaObjectDelegate(objKey);
-                        if ( jahiaObjectDelegate.getRule() =3D=3D null
-                                || jahiaObjectDelegate.getRule().getInheri=
ted().booleanValue() ){
+                        if (jahiaObjectDelegate.getRule() =3D=3D null
+                                || jahiaObjectDelegate.getRule().getInheri=
ted().booleanValue()) {
                             int jahiaPageID =3D -1;
                             final Enumeration en =3D cont.getJahiaContaine=
r(jParams, jParams.getEntryLoadRequest()).getFields();
                             while (en.hasMoreElements()) {
@@ -1468,35 +1509,35 @@
                             }
                         }
                     }
-                } catch (Throwable t){
-                    logger.debug("Error handling time based publishing for=
 page link, use local rule",t);
+                } catch (Throwable t) {
+                    logger.debug("Error handling time based publishing for=
 page link, use local rule", t);
                 }
 =

                 try {
                     ObjectKey objKey =3D ObjectKey.getInstance(tbpObjectKe=
y);
-                    if (PageBean.TYPE.equals(objKey.getType())){
+                    if (PageBean.TYPE.equals(objKey.getType())) {
                         ContentPage contentPage =3D (ContentPage)
-                            ContentPage.getContentObjectInstance(objKey);
-                        if ( contentPage.getPageType(jParams.getEntryLoadR=
equest())=3D=3DJahiaPage.TYPE_LINK ){
+                                ContentPage.getContentObjectInstance(objKe=
y);
+                        if (contentPage.getPageType(jParams.getEntryLoadRe=
quest()) =3D=3D JahiaPage.TYPE_LINK) {
                             int pageLinkId =3D contentPage.getPageLinkID(j=
Params);
-                            if ( pageLinkId > 0 ){
+                            if (pageLinkId > 0) {
                                 ContentPage pageLink =3D ContentPage.getPa=
ge(pageLinkId);
-                                if (pageLink !=3D null){
+                                if (pageLink !=3D null) {
                                     final JahiaObjectManager jahiaObjectMa=
nager =3D
                                             (JahiaObjectManager) SpringCon=
textSingleton.getInstance()
                                                     .getContext().getBean(=
JahiaObjectManager.class.getName());
                                     JahiaObjectDelegate jahiaObjectDelegat=
e =3D jahiaObjectManager
                                             .getJahiaObjectDelegate(objKey=
);
-                                    if ( jahiaObjectDelegate.getRule() =3D=
=3D null
-                                            || jahiaObjectDelegate.getRule=
().getInherited().booleanValue() ){
+                                    if (jahiaObjectDelegate.getRule() =3D=
=3D null
+                                            || jahiaObjectDelegate.getRule=
().getInherited().booleanValue()) {
                                         tbpObjectKey =3D pageLink.getObjec=
tKey().toString();
                                     }
                                 }
                             }
                         }
                     }
-                } catch (Throwable t){
-                    logger.debug("Error handling time based publishing for=
 page link, use local rule",t);
+                } catch (Throwable t) {
+                    logger.debug("Error handling time based publishing for=
 page link, use local rule", t);
                 }
             }
             //logger.debug("displaying TBP state");
@@ -1524,14 +1565,41 @@
         final ContentObject obj =3D contentObject.getContentObject();
         if (aclDifferenceParam.booleanValue() && !
                 obj.getObjectKey().toString().equals("ContentPage_" + jPar=
ams.getSite().getHomePageID()) &&
-                ! obj.isAclSameAsParent()) {
+                !obj.isAclSameAsParent()) {
             String title =3D getResource(resourceBundle, "differentACLTitl=
e");
             if (title =3D=3D null || title.length() =3D=3D 0) {
                 title =3D "This object and its parent have different ACLs";
             }
-            out.print("<span title=3D\"");
-            out.print(title);
-            out.print("\" class=3D\"differentACL\">&nbsp;</span>");
+            final StringBuffer spanBuffer =3D new StringBuffer();
+            spanBuffer.append("<span title=3D\"");
+            spanBuffer.append(title);
+            spanBuffer.append("\" class=3D\"differentACL\">&nbsp;");
+
+            try {
+                final Class theClass =3D obj.getClass();
+                final String launcher;
+                if (theClass =3D=3D ContentContainer.class) {
+                    launcher =3D drawUpdateContainerLauncher((ContentConta=
iner) obj, "rightsMgmt");
+                } else if (theClass =3D=3D ContentPage.class) {
+                    launcher =3D drawPagePropertiesLauncher(false, obj.get=
ID(), "rightsMgmt");
+                } else if (obj instanceof ContentField) {
+                    launcher =3D drawUpdateFieldLauncher((ContentField) ob=
j, "rightsMgmt");
+                } else {
+                    launcher =3D "";
+                }
+                if (launcher.length() > 0) {
+                    out.print("<a href=3D\"javascript:");
+                    out.print(launcher);
+                    out.print("\">");
+                    out.print(spanBuffer.toString());
+                    out.print("</span></a>");
+                } else {
+                    out.print(spanBuffer.toString());
+                    out.print("</span>");
+                }
+            } catch (final JahiaException je) {
+                logger.error(je, je);
+            }
         }
 =

         final String ajaxFunction =3D buildAjaxCall(objectType, objectID, =
definitionID, parentID, pageID, uniqueID,
@@ -1834,7 +1902,7 @@
         name.append(cleanSessionID(jParams.getSessionID()));
         return drawLauncher(gui.drawUpdateAppplicationUrl(applicationBean)=
, name.toString());
     }
-    =

+
     /**
      *
      */

Modified: trunk/core/src/webapp/jsp/jahia/engines/pages/pageproperties.jsp
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/webapp=
/jsp/jahia/engines/pages/pageproperties.jsp&rev=3D19307&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
--- trunk/core/src/webapp/jsp/jahia/engines/pages/pageproperties.jsp (origi=
nal)
+++ trunk/core/src/webapp/jsp/jahia/engines/pages/pageproperties.jsp Wed No=
v 28 15:57:13 2007
@@ -46,8 +46,6 @@
     final String logForm =3D (String) engineMap.get("logForm");
     final String theScreen =3D (String) engineMap.get("screen");
 =

-    final Vector templateList =3D (Vector) engineMap.get("templateList");
-    final Enumeration templateListEnum =3D templateList.elements();
     final boolean showEditMenu =3D (theScreen.equals("edit") || theScreen.=
equals("metadata") ||
             theScreen.equals("rightsMgmt") || theScreen.equals("timeBasedP=
ublishing") ||
             theScreen.equals("ctneditview_rights"));
@@ -73,6 +71,10 @@
 <!-- End Menubar -->
 =

 <% if (theScreen.equals("edit")) { %>
+<%
+final Vector templateList =3D (Vector) engineMap.get("templateList");
+final Enumeration templateListEnum =3D templateList.elements();
+%>
 =

 <div class=3D"menuwrapper">
     <%@ include file=3D"../menu.inc" %>

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

Reply via email to