[pal-cvs 2735] [467] added folder metadata editor

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2007年 8月 24日 (金) 13:02:18 JST


Revision: 467
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=467
Author:   shinsuke
Date:     2007-08-24 13:02:18 +0900 (Fri, 24 Aug 2007)

Log Message:
-----------
added folder metadata editor

Modified Paths:
--------------
    pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java
    pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/SiteEditorService.java
    pal-admin/trunk/src/main/resources/appMessages.properties
    pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label.properties
    pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label_ja.properties
    pal-admin/trunk/src/main/webapp/view/site/folderAddFolderAndPageEditor.html
    pal-admin/trunk/src/main/webapp/view/site/folderInfoEditor.html
    pal-admin/trunk/src/main/webapp/view/site/folderOrderEditor.html
    pal-admin/trunk/src/main/webapp/view/site/folderSecurityEditor.html

Added Paths:
-----------
    pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/FolderMetadataEditorPage.java
    pal-admin/trunk/src/main/webapp/view/site/folderMetadataEditor.html


-------------- next part --------------
Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java
===================================================================
--- pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java	2007-08-24 01:45:45 UTC (rev 466)
+++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java	2007-08-24 04:02:18 UTC (rev 467)
@@ -20,6 +20,7 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import javax.faces.context.FacesContext;
@@ -39,6 +40,8 @@
 import org.apache.jetspeed.container.window.PortletWindowAccessor;
 import org.apache.jetspeed.decoration.DecorationFactory;
 import org.apache.jetspeed.decoration.LayoutInfo;
+import org.apache.jetspeed.om.common.GenericMetadata;
+import org.apache.jetspeed.om.common.LocalizedField;
 import org.apache.jetspeed.om.common.SecurityConstraint;
 import org.apache.jetspeed.om.common.SecurityConstraints;
 import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
@@ -648,6 +651,35 @@
         return list;
     }
 
+    public List<Map<String, Object>> createMetadataList(String path)
+            throws CommonException {
+        Folder folder = getFolder(getFolderOrPagePath(path));
+
+        GenericMetadata metadata = folder.getMetadata();
+        if (metadata == null) {
+            throw new CommonException("could.not.find.metadata",
+                    "Could not find a metadata: " + path);
+        }
+
+        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
+        if (metadata.getFields() != null) {
+            for (Iterator<LocalizedField> itr = folder.getMetadata()
+                    .getFields().iterator(); itr.hasNext();) {
+                Map<String, Object> map = new HashMap<String, Object>();
+                LocalizedField field = itr.next();
+                if (field.getLocale() != null) {
+                    map.put("metadataLocale", field.getLocale().toString());
+                    map.put("metadataName", field.getName());
+                    map.put("metadataValue", field.getValue());
+                    // id is null.
+                    //                map.put("metadataId", field.getId());
+                    list.add(map);
+                }
+            }
+        }
+        return list;
+    }
+
     public List<Map<String, String>> createPermissionsList()
             throws CommonException {
         List<Map<String, String>> list = new ArrayList<Map<String, String>>();
@@ -1136,6 +1168,99 @@
         }
     }
 
+    public void addMetadataToFolder(String path, Locale locale, String name,
+            String value) throws CommonException {
+        Folder folder = getFolder(getFolderOrPagePath(path));
+        if (folder == null) {
+            throw new CommonException("could.not.find.folder",
+                    "Could not find a folder: " + path);
+        }
+        GenericMetadata metadata = folder.getMetadata();
+        if (metadata == null) {
+            throw new CommonException("could.not.find.metadata",
+                    "Could not find a metadata: " + path);
+        }
+
+        if (metadata.getFields(name) == null) {
+            metadata.addField(locale, name, value);
+        } else {
+
+            for (Iterator<LocalizedField> itr = metadata.getFields(name)
+                    .iterator(); itr.hasNext();) {
+                LocalizedField field = itr.next();
+                if (field.getLocale() != null
+                        && field.getLocale().equals(locale)) {
+                    if (!metadata.getFields().remove(field)) {
+                        throw new CommonException("could.not.find.metadata",
+                                "Could not find a metadata: " + path);
+
+                    }
+                }
+            }
+
+            metadata.addField(locale, name, value);
+        }
+
+        try {
+            getPageManager().updateFolder(folder);
+            getPageManager().reset();
+        } catch (PageNotUpdatedException e) {
+            throw new CommonException("could.not.add.metadata",
+                    "Could not update a folder: " + path, e);
+        } catch (NodeException e) {
+            throw new CommonException("could.not.add.metadata",
+                    "Could not update a folder: " + path, e);
+        }
+    }
+
+    public void deleteMetadataFromFolder(String path, Locale locale, String name)
+            throws CommonException {
+        Folder folder = getFolder(getFolderOrPagePath(path));
+        if (folder == null) {
+            throw new CommonException("could.not.find.folder",
+                    "Could not find a folder: " + path);
+        }
+        GenericMetadata metadata = folder.getMetadata();
+        if (metadata == null) {
+            throw new CommonException("could.not.find.metadata",
+                    "Could not find a metadata: " + path);
+        }
+        if (metadata.getFields(name) == null) {
+            throw new CommonException("could.not.find.field",
+                    "Could not find a metadata: " + path);
+        }
+
+        boolean delete = false;
+        for (Iterator<LocalizedField> itr = metadata.getFields(name).iterator(); itr
+                .hasNext();) {
+            LocalizedField field = itr.next();
+            if (field.getLocale() != null && field.getLocale().equals(locale)) {
+                if (metadata.getFields().remove(field)) {
+                    delete = true;
+                } else {
+                    throw new CommonException("could.not.find.metadata",
+                            "Could not find a metadata: " + path);
+                }
+            }
+        }
+
+        if (!delete) {
+            throw new CommonException("could.not.find.metadata",
+                    "Could not find a metadata: " + path);
+        }
+
+        try {
+            getPageManager().updateFolder(folder);
+            getPageManager().reset();
+        } catch (PageNotUpdatedException e) {
+            throw new CommonException("could.not.delete.metadata",
+                    "Could not update a folder: " + path, e);
+        } catch (NodeException e) {
+            throw new CommonException("could.not.delete.metadata",
+                    "Could not update a folder: " + path, e);
+        }
+    }
+
     public void addFolder(String path, String folderName, String folderTitle,
             String folderShortTitle, String layoutName, String pageDecorator,
             String portletDecorator, String desktopTheme, boolean folderHidden)

Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/SiteEditorService.java
===================================================================
--- pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/SiteEditorService.java	2007-08-24 01:45:45 UTC (rev 466)
+++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/SiteEditorService.java	2007-08-24 04:02:18 UTC (rev 467)
@@ -14,6 +14,7 @@
 import jp.sf.pal.admin.web.site.AbstractSiteSecurityEditorPage;
 import jp.sf.pal.admin.web.site.FolderAddFolderAndPageEditorPage;
 import jp.sf.pal.admin.web.site.FolderInfoEditorPage;
+import jp.sf.pal.admin.web.site.FolderMetadataEditorPage;
 import jp.sf.pal.admin.web.site.FolderOrderEditorPage;
 import jp.sf.pal.admin.web.site.FolderSecurityEditorPage;
 import jp.sf.pal.admin.web.site.LayoutAddPortletEditorPage;
@@ -22,6 +23,7 @@
 import jp.sf.pal.admin.web.site.PageSecurityEditorPage;
 import jp.sf.pal.admin.web.site.PortletInfoEditorPage;
 import jp.sf.pal.common.CommonException;
+import jp.sf.pal.common.util.LocaleUtil;
 
 public class SiteEditorService implements Serializable {
     /**
@@ -151,6 +153,19 @@
 
     }
 
+    public void loadPage(FolderMetadataEditorPage page) throws CommonException {
+        if (!getSiteEditorLogic().checkFolderOrPageViewAccess(page.getPath())) {
+            throw new CommonException("could.not.access.path",
+                    "Could not access a path: " + page.getPath());
+        }
+
+        loadTree(page);
+
+        page.setMetadataItems(getSiteEditorLogic().createMetadataList(
+                page.getPath()));
+
+    }
+
     public void loadPage(FolderSecurityEditorPage page) throws CommonException {
         if (!getSiteEditorLogic().checkFolderOrPageViewAccess(page.getPath())) {
             throw new CommonException("could.not.access.path",
@@ -279,6 +294,20 @@
                 page.getDocumentName());
     }
 
+    public void addMetadata(FolderMetadataEditorPage page)
+            throws CommonException {
+        getSiteEditorLogic().addMetadataToFolder(page.getPath(),
+                LocaleUtil.convert(page.getNewMetadataLocale()),
+                page.getNewMetadataName(), page.getNewMetadataValue());
+    }
+
+    public void deleteMetadata(FolderMetadataEditorPage page)
+            throws CommonException {
+        getSiteEditorLogic().deleteMetadataFromFolder(page.getPath(),
+                LocaleUtil.convert(page.getMetadataLocale()),
+                page.getMetadataName());
+    }
+
     public void deleteDocumentOrder(FolderOrderEditorPage page)
             throws CommonException {
         getSiteEditorLogic().deleteDocumentOrder(page.getPath(),

Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/FolderMetadataEditorPage.java
===================================================================
--- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/FolderMetadataEditorPage.java	2007-08-24 01:45:45 UTC (rev 466)
+++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/FolderMetadataEditorPage.java	2007-08-24 04:02:18 UTC (rev 467)
@@ -0,0 +1,293 @@
+/*
+ * Copyright 2005-2007 Portal Application Laboratory and the Others.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 jp.sf.pal.admin.web.site;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+import jp.sf.pal.admin.PALAdminConstants;
+import jp.sf.pal.admin.entity.NodeInfo;
+import jp.sf.pal.common.CommonException;
+import jp.sf.pal.common.util.FacesMessageUtil;
+
+import org.seasar.framework.log.Logger;
+import org.seasar.teeda.extension.annotation.takeover.TakeOver;
+import org.seasar.teeda.extension.annotation.takeover.TakeOverType;
+import org.seasar.teeda.extension.annotation.validator.Required;
+
+public class FolderMetadataEditorPage extends AbstractSiteEditorPage implements
+        Serializable {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 7467441597149052725L;
+
+    /**
+     * Logger for this class
+     */
+    private static final Logger logger = Logger
+            .getLogger(FolderMetadataEditorPage.class);
+
+    private int metadataIndex;
+
+    private List<Map<String, Object>> metadataItems;
+
+    private String metadataId;
+
+    private String metadataLocale;
+
+    private String metadataName;
+
+    private String metadataValue;
+
+    @Required
+    private String newMetadataLocale;
+
+    @Required
+    private String newMetadataName;
+
+    private String newMetadataValue;
+
+    private String action;
+
+    /**
+     * @return the action
+     */
+    public String getAction() {
+        return action;
+    }
+
+    /**
+     * @param action the action to set
+     */
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+    /**
+     * @return the metadataIndex
+     */
+    public int getMetadataIndex() {
+        return metadataIndex;
+    }
+
+    /**
+     * @param metadataIndex the metadataIndex to set
+     */
+    public void setMetadataIndex(int metadataIndex) {
+        this.metadataIndex = metadataIndex;
+    }
+
+    /**
+     * @return the metadataItems
+     */
+    public List<Map<String, Object>> getMetadataItems() {
+        return metadataItems;
+    }
+
+    /**
+     * @param metadataItems the metadataItems to set
+     */
+    public void setMetadataItems(List<Map<String, Object>> metadataItems) {
+        this.metadataItems = metadataItems;
+    }
+
+    /**
+     * @return the metadataId
+     */
+    public String getMetadataId() {
+        return metadataId;
+    }
+
+    /**
+     * @param metadataId the metadataId to set
+     */
+    public void setMetadataId(String metadataId) {
+        this.metadataId = metadataId;
+    }
+
+    /**
+     * @return the metadataLocale
+     */
+    public String getMetadataLocale() {
+        return metadataLocale;
+    }
+
+    /**
+     * @param metadataLocale the metadataLocale to set
+     */
+    public void setMetadataLocale(String metadataLocale) {
+        this.metadataLocale = metadataLocale;
+    }
+
+    /**
+     * @return the metadataName
+     */
+    public String getMetadataName() {
+        return metadataName;
+    }
+
+    /**
+     * @param metadataName the metadataName to set
+     */
+    public void setMetadataName(String metadataName) {
+        this.metadataName = metadataName;
+    }
+
+    /**
+     * @return the metadataValue
+     */
+    public String getMetadataValue() {
+        return metadataValue;
+    }
+
+    /**
+     * @param metadataValue the metadataValue to set
+     */
+    public void setMetadataValue(String metadataValue) {
+        this.metadataValue = metadataValue;
+    }
+
+    /**
+     * @return the newMetadataLocale
+     */
+    public String getNewMetadataLocale() {
+        return newMetadataLocale;
+    }
+
+    /**
+     * @param newMetadataLocale the newMetadataLocale to set
+     */
+    public void setNewMetadataLocale(String newMetadataLocale) {
+        this.newMetadataLocale = newMetadataLocale;
+    }
+
+    /**
+     * @return the newMetadataName
+     */
+    public String getNewMetadataName() {
+        return newMetadataName;
+    }
+
+    /**
+     * @param newMetadataName the newMetadataName to set
+     */
+    public void setNewMetadataName(String newMetadataName) {
+        this.newMetadataName = newMetadataName;
+    }
+
+    /**
+     * @return the newMetadataValue
+     */
+    public String getNewMetadataValue() {
+        return newMetadataValue;
+    }
+
+    /**
+     * @param newMetadataValue the newMetadataValue to set
+     */
+    public void setNewMetadataValue(String newMetadataValue) {
+        this.newMetadataValue = newMetadataValue;
+    }
+
+    public Class<?> initialize() {
+        return null;
+    }
+
+    public Class<?> prerender() {
+        // parse request parameters
+        parseRequestParameters();
+
+        if (getPath() == null) {
+            setPath("/");
+        }
+
+        if (getReturnPath() == null) {
+            setReturnPath("/");
+        }
+
+        // check node
+        int type = getSiteEditorService().getNodeInfoType(getPath());
+        if (type == NodeInfo.PAGE) {
+            return PageInfoEditorPage.class;
+        } else if (type == NodeInfo.LAYOUT) {
+            return LayoutInfoEditorPage.class;
+        }
+
+        if ("delete".equals(getAction())) {
+            // delete
+            if (getMetadataLocale() != null && getMetadataName() != null) {
+                doDelete();
+            } else {
+                FacesMessageUtil.addWarnMessage("could.not.find.metadata");
+            }
+
+            setMetadataLocale(null);
+            setMetadataName(null);
+            setMetadataValue(null);
+        }
+
+        try {
+            getSiteEditorService().loadPage(this);
+        } catch (CommonException e) {
+            FacesMessageUtil.addErrorMessage(e.getMessageId());
+            logger.log("EPA0006", new Object[] { this.toString() }, e);
+        }
+
+        // render FacesMessages
+        FacesMessageUtil.renderMessages();
+        return null;
+    }
+
+    @TakeOver(type = TakeOverType.INCLUDE, properties = "mode,path,returnPath")
+    public Class<?> doAdd() {
+        try {
+            getSiteEditorService().addMetadata(this);
+            FacesMessageUtil.addInfoMessage("added.metadata");
+            return FolderMetadataEditorPage.class;
+        } catch (CommonException e) {
+            FacesMessageUtil.addErrorMessage(e.getMessageId());
+            logger.log("EPA0005", new Object[] { this.toString() }, e);
+        } catch (Exception e) {
+            FacesMessageUtil.addErrorMessage("could.not.add.metadata");
+            logger.log("EPA0007", new Object[] { this.toString() }, e);
+        }
+        return null;
+    }
+
+    @TakeOver(type = TakeOverType.INCLUDE, properties = "mode,path,returnPath")
+    public Class<?> doDelete() {
+        try {
+            getSiteEditorService().deleteMetadata(this);
+            FacesMessageUtil.addInfoMessage("deleted.metadata");
+            return FolderMetadataEditorPage.class;
+        } catch (CommonException e) {
+            FacesMessageUtil.addErrorMessage(e.getMessageId());
+            logger.log("EPA0005", new Object[] { this.toString() }, e);
+        } catch (Exception e) {
+            FacesMessageUtil.addErrorMessage("could.not.delete.metadata");
+            logger.log("EPA0007", new Object[] { this.toString() }, e);
+        }
+        return null;
+    }
+
+    public String getDoAddValue() {
+        return getLabelHelper().getLabelValue("add");
+    }
+
+}


Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/FolderMetadataEditorPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: pal-admin/trunk/src/main/resources/appMessages.properties
===================================================================
--- pal-admin/trunk/src/main/resources/appMessages.properties	2007-08-24 01:45:45 UTC (rev 466)
+++ pal-admin/trunk/src/main/resources/appMessages.properties	2007-08-24 04:02:18 UTC (rev 467)
@@ -178,4 +178,12 @@
 deleted.document.order=Deleted the document order.
 could.not.delete.document.order=Could not delete the document order. If you see this error message again, please contact a site administrator.
 document.already.exists=The document already exists.
-document.does.not.exist=The document does not exist.
\ No newline at end of file
+document.does.not.exist=The document does not exist.
+
+could.not.find.metadata=Could not find the metadata. If you see this error message again, please contact a site administrator.
+added.metadata=Added the metadata
+could.not.add.metadata=Could not add the metadata. If you see this error message again, please contact a site administrator.
+deleted.metadata=Deleted the metadata.
+could.not.delete.metadata=Could not delete the metadata. If you see this error message again, please contact a site administrator.
+could.not.find.field=Could not find the field data. If you see this error message again, please contact a site administrator.
+

Modified: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label.properties
===================================================================
--- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label.properties	2007-08-24 01:45:45 UTC (rev 466)
+++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label.properties	2007-08-24 04:02:18 UTC (rev 467)
@@ -88,3 +88,13 @@
 folderOrderEditor.add=Add
 folderOrderEditor.delete=Delete
 folderOrderEditor.documentName=Document Name:
+
+folderMetadataEditor.name=Name
+folderMetadataEditor.locale=Locale
+folderMetadataEditor.value=Value
+folderMetadataEditor.action=Action
+folderMetadataEditor.delete=Delete
+folderMetadataEditor.newMetadataLocale=Locale:
+folderMetadataEditor.newMetadataName=Name:
+folderMetadataEditor.newMetadataValue=Value:
+folderMetadataEditor.add=Add

Modified: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label_ja.properties
===================================================================
--- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label_ja.properties	2007-08-24 01:45:45 UTC (rev 466)
+++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label_ja.properties	2007-08-24 04:02:18 UTC (rev 467)
@@ -91,3 +91,12 @@
 folderOrderEditor.delete=\u524a\u9664
 folderOrderEditor.documentName=\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u540d:
 
+folderMetadataEditor.name=\u540d\u524d
+folderMetadataEditor.locale=\u30ed\u30b1\u30fc\u30eb
+folderMetadataEditor.value=\u5024
+folderMetadataEditor.action=\u30a2\u30af\u30b7\u30e7\u30f3
+folderMetadataEditor.delete=\u524a\u9664
+folderMetadataEditor.newMetadataLocale=\u30ed\u30b1\u30fc\u30eb:
+folderMetadataEditor.newMetadataName=\u540d\u524d:
+folderMetadataEditor.newMetadataValue=\u5024:
+folderMetadataEditor.add=\u8ffd\u52a0

Modified: pal-admin/trunk/src/main/webapp/view/site/folderAddFolderAndPageEditor.html
===================================================================
--- pal-admin/trunk/src/main/webapp/view/site/folderAddFolderAndPageEditor.html	2007-08-24 01:45:45 UTC (rev 466)
+++ pal-admin/trunk/src/main/webapp/view/site/folderAddFolderAndPageEditor.html	2007-08-24 04:02:18 UTC (rev 467)
@@ -46,17 +46,12 @@
           <a id="jumpFolderOrderEditor-tab" href="folderOrderEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
             <span id="orderTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Order</span>
           </a>
+          <a id="jumpFolderMetadataEditor-tab" href="folderMetadataEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
+            <span id="metadataTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Metadata</span>
+          </a>
           <a id="jumpFolderSecurityEditor-tab" href="folderSecurityEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
             <span id="securityTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Security</span>
           </a>
-<!-- 
-          <a id="jumpPageSecurityEditor-tab" href="folderSecurityEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
-            <span id="securityTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Security</span>
-          </a>
-          <a id="jumpPageMetadataEditor-tab" href="folderMetadataEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
-            <span id="metadataTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Metadata</span>
-          </a>
- -->
         </div>
         <div>
           <span id="allMessages" fatalClass="portlet-msg-error" errorClass="portlet-msg-error" warnClass="portlet-msg-alert" infoClass="portlet-msg-info"></span>

Modified: pal-admin/trunk/src/main/webapp/view/site/folderInfoEditor.html
===================================================================
--- pal-admin/trunk/src/main/webapp/view/site/folderInfoEditor.html	2007-08-24 01:45:45 UTC (rev 466)
+++ pal-admin/trunk/src/main/webapp/view/site/folderInfoEditor.html	2007-08-24 04:02:18 UTC (rev 467)
@@ -46,17 +46,12 @@
           <a id="jumpFolderOrderEditor-tab" href="folderOrderEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
             <span id="orderTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Order</span>
           </a>
+          <a id="jumpFolderMetadataEditor-tab" href="folderMetadataEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
+            <span id="metadataTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Metadata</span>
+          </a>
           <a id="jumpFolderSecurityEditor-tab" href="folderSecurityEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
             <span id="securityTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Security</span>
           </a>
-<!-- 
-          <a id="jumpPageSecurityEditor-tab" href="folderSecurityEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
-            <span id="securityTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Security</span>
-          </a>
-          <a id="jumpPageMetadataEditor-tab" href="folderMetadataEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
-            <span id="metadataTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Metadata</span>
-          </a>
- -->
         </div>
         <div>
           <span id="allMessages" fatalClass="portlet-msg-error" errorClass="portlet-msg-error" warnClass="portlet-msg-alert" infoClass="portlet-msg-info"></span>

Added: pal-admin/trunk/src/main/webapp/view/site/folderMetadataEditor.html
===================================================================
--- pal-admin/trunk/src/main/webapp/view/site/folderMetadataEditor.html	2007-08-24 01:45:45 UTC (rev 466)
+++ pal-admin/trunk/src/main/webapp/view/site/folderMetadataEditor.html	2007-08-24 04:02:18 UTC (rev 467)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:te="http://www.seasar.org/teeda/extension">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <link rel="stylesheet" type="text/css" href="../../css/global.css" />
+  </head>
+  <body>
+    <form id="folderEditorForTreeForm">
+      <input id="path" type="hidden"/>
+      <input id="returnPath" type="hidden"/>
+<!-- tree: BEGIN -->
+      <div style="width: 28%;height: 400px;float: left;border: 1px solid #666666;overflow: auto;">
+        <div id="nodeItems">
+          <div id="isFolder" style="white-space: nowrap;">
+            <a id="jumpFolderInfoEditor" href="folderInfoEditor.html?mode=c&path=a&returnPath=b" style="">
+              <img id="folderIcon" src="" border="0" style="vertical-align:middle;" />
+              <span id="name-folder">Name</span>
+            </a>
+          </div>
+          <div id="isPage" style="white-space: nowrap;">
+            <a id="jumpPageInfoEditor" href="pageInfoEditor.html?mode=c&path=a&returnPath=b" style="">
+              <img id="pageIcon" src="" border="0" style="vertical-align:middle;" />
+              <span id="name-page">Name</span>
+            </a>
+          </div>
+        </div>
+      </div>
+<!-- tree: END -->
+<!-- content: BEGIN -->
+      <dir style="width: 70%;float: left;padding: 5px;margin: 0px;">
+        <div style="height: 20px;margin-bottom: 5px;padding: 2px;border: 1px dotted black;">
+          <div style="float: left;">
+            <label id="pathLabel">Path:</label>
+            <span id="currentPath">/path/path</span>
+          </div>
+          <div style="float: right;width:50px;text-align: right;">
+            <a id="returnPathLink" href="" style="text-decoration: none;"><span id="finishLabel">Finish</span></a>
+          </div>
+        </div>
+        <div style="clear: both;padding: 0px 0px 3px 10px; margin:10px 0px 5px 0px;border-bottom:1px solid #000000;">
+          <a id="jumpFolderInfoEditor-tab" href="folderInfoEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
+            <span id="infoTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Info</span>
+          </a>
+          <a id="jumpFolderAddFolderAndPageEditor-tab" href="folderAddFolderAndPageEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
+            <span id="addTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Add</span>
+          </a>
+          <a id="jumpFolderOrderEditor-tab" href="folderOrderEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
+            <span id="orderTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Order</span>
+          </a>
+          <label id="metadataTabLabel" style="border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #ffffff;border-left:1px solid #000000;padding: 3px 5px 3px 5px; margin: 0px 0px;">Metadata</label>
+          <a id="jumpFolderSecurityEditor-tab" href="folderSecurityEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
+            <span id="securityTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Security</span>
+          </a>
+        </div>
+        <div>
+          <span id="allMessages" fatalClass="portlet-msg-error" errorClass="portlet-msg-error" warnClass="portlet-msg-alert" infoClass="portlet-msg-info"></span>
+        </div>
+        <div>
+          <table>
+            <thead>
+              <tr>
+                <td style="width: 80px;"><label id="localeLabel"></label></td>
+                <td style="width: 80px;"><label id="nameLabel"></label></td>
+                <td style="width: 300px;"><label id="valueLabel"></label></td>
+                <td style="width: 60px;"><label id="actionLabel"></label></td>
+              </tr>
+            </thead>
+            <tbody id="metadataItems">
+              <tr>
+                <td><span id="metadataLocale">L</span></td>
+                <td><span id="metadataName">N</span></td>
+                <td><span id="metadataValue">V</span></td>
+                <td>
+                <div id="isEditable-delete">
+                  <a id="goFolderMetadataEditor-delete" href="folderMetadataEditor.html?mode=c&path=a&returnPath=b&metadataName=c&metadataLocale=d&fixed_action=delete">
+                    <span id="deleteLabel">Delete</span>
+                  </a>
+                </div>
+                </td>
+              </tr>
+            </tbody>
+          </table>
+          
+          <br/>
+          
+          <div style="clear:both;">
+            <div style="width:120px;float: left;"><label id="newMetadataLocaleLabel" for="newMetadataLocale">Locale:</label></div>
+            <input id="newMetadataLocale" type="text" size="30"/>
+          </div>
+          <div style="clear:both;">
+            <div style="width:120px;float: left;"><label id="newMetadataNameLabel" for="newMetadataName">Name:</label></div>
+            <input id="newMetadataName" type="text" size="30"/>
+          </div>
+          <div style="clear:both;">
+            <div style="width:120px;float: left;"><label id="newMetadataValueLabel" for="newMetadataValue">Value:</label></div>
+            <input id="newMetadataValue" type="text" size="30"/>
+          </div>
+          <div id="isEditable-update" style="margin-top: 20px;text-align: center;">
+            <input id="doAdd" type="button" value="Add"/>
+          </div>
+        </div>
+      </dir>
+      <br style="clear: both;" />
+<!-- content: END -->
+    </form>
+  </body>
+</html>


Property changes on: pal-admin/trunk/src/main/webapp/view/site/folderMetadataEditor.html
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: pal-admin/trunk/src/main/webapp/view/site/folderOrderEditor.html
===================================================================
--- pal-admin/trunk/src/main/webapp/view/site/folderOrderEditor.html	2007-08-24 01:45:45 UTC (rev 466)
+++ pal-admin/trunk/src/main/webapp/view/site/folderOrderEditor.html	2007-08-24 04:02:18 UTC (rev 467)
@@ -50,14 +50,12 @@
             <span id="addTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Add</span>
           </a>
           <label id="orderTabLabel" style="border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #ffffff;border-left:1px solid #000000;padding: 3px 5px 3px 5px; margin: 0px 0px;">Order</label>
+          <a id="jumpFolderMetadataEditor-tab" href="folderMetadataEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
+            <span id="metadataTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Metadata</span>
+          </a>
           <a id="jumpFolderSecurityEditor-tab" href="folderSecurityEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
             <span id="securityTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Security</span>
           </a>
-<!-- 
-          <a id="jumpPageMetadataEditor-tab" href="folderMetadataEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
-            <span id="metadataTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Metadata</span>
-          </a>
- -->
         </div>
         <div>
           <span id="allMessages" fatalClass="portlet-msg-error" errorClass="portlet-msg-error" warnClass="portlet-msg-alert" infoClass="portlet-msg-info"></span>

Modified: pal-admin/trunk/src/main/webapp/view/site/folderSecurityEditor.html
===================================================================
--- pal-admin/trunk/src/main/webapp/view/site/folderSecurityEditor.html	2007-08-24 01:45:45 UTC (rev 466)
+++ pal-admin/trunk/src/main/webapp/view/site/folderSecurityEditor.html	2007-08-24 04:02:18 UTC (rev 467)
@@ -48,12 +48,10 @@
           <a id="jumpFolderOrderEditor-tab" href="folderOrderEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
             <span id="orderTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Order</span>
           </a>
-          <label id="securityTabLabel" style="border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #ffffff;border-left:1px solid #000000;padding: 3px 5px 3px 5px; margin: 0px 0px;">Security</label>
-<!-- 
-          <a id="jumpPageMetadataEditor-tab" href="pageMetadataEditor.html" style="text-decoration: none;">
+          <a id="jumpFolderMetadataEditor-tab" href="folderMetadataEditor.html?mode=c&path=a&returnPath=b" style="text-decoration: none;">
             <span id="metadataTabLabel" style="font-weight: bold;color:#ffffff;background-color:#999999;border:1px solid #000000; padding: 3px 5px 3px 5px; margin: 0px 0px;">Metadata</span>
           </a>
- -->
+          <label id="securityTabLabel" style="border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #ffffff;border-left:1px solid #000000;padding: 3px 5px 3px 5px; margin: 0px 0px;">Security</label>
         </div>
         <div>
           <span id="allMessages" fatalClass="portlet-msg-error" errorClass="portlet-msg-error" warnClass="portlet-msg-alert" infoClass="portlet-msg-info"></span>


pal-cvs メーリングリストの案内
Zurück zum Archiv-Index