svn commit: r1102643 - in /ofbiz/trunk/applications/content: config/ servicedef/ webapp/content/WEB-INF/ webapp/content/WEB-INF/actions/content/ webapp/content/content/ widget/content/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1102643 - in /ofbiz/trunk/applications/content: config/ servicedef/ webapp/content/WEB-INF/ webapp/content/WEB-INF/actions/content/ webapp/content/content/ widget/content/

hansbak-2
Author: hansbak
Date: Fri May 13 09:55:48 2011
New Revision: 1102643

URL: http://svn.apache.org/viewvc?rev=1102643&view=rev
Log:
add search screens using the new content search following the wokreffort pattern

Added:
    ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchOptions.groovy   (with props)
    ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchResults.groovy   (with props)
    ofbiz/trunk/applications/content/webapp/content/content/ContentSearchOptions.ftl   (with props)
    ofbiz/trunk/applications/content/webapp/content/content/ContentSearchResults.ftl   (with props)
Modified:
    ofbiz/trunk/applications/content/config/ContentUiLabels.xml
    ofbiz/trunk/applications/content/servicedef/services.xml
    ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml
    ofbiz/trunk/applications/content/widget/content/ContentForms.xml
    ofbiz/trunk/applications/content/widget/content/ContentMenus.xml
    ofbiz/trunk/applications/content/widget/content/ContentScreens.xml

Modified: ofbiz/trunk/applications/content/config/ContentUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/config/ContentUiLabels.xml?rev=1102643&r1=1102642&r2=1102643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/config/ContentUiLabels.xml (original)
+++ ofbiz/trunk/applications/content/config/ContentUiLabels.xml Fri May 13 09:55:48 2011
@@ -55,6 +55,9 @@
         <value xml:lang="zh">回答</value>
         <value xml:lang="zh_TW">回答</value>
     </property>
+    <property key="ContentAnyAssocType">
+        <value xml:lang="en">Any Assoc Type</value>
+    </property>
     <property key="ContentAssoc">
         <value xml:lang="ar">ارتباط المحتوى</value>
         <value xml:lang="da">Associeret indhold</value>
@@ -1253,6 +1256,9 @@
         <value xml:lang="zh">图像</value>
         <value xml:lang="zh_TW">圖像</value>
     </property>
+    <property key="ContentIncludeAllSubContents">
+        <value xml:lang="en">Include all Sub-Contents</value>
+    </property>
     <property key="ContentIndex">
         <value xml:lang="ar">الدليل</value>
         <value xml:lang="da">Indeks</value>
@@ -1301,10 +1307,78 @@
         <value xml:lang="fr">JPG</value>
         <value xml:lang="it">JPEG</value>
     </property>
+    <property key="ContentKeyword">
+        <value xml:lang="de">Schlüsselwörter</value>
+        <value xml:lang="en">Keyword</value>
+        <value xml:lang="fr">Mot-clé</value>
+        <value xml:lang="it">Chiave</value>
+        <value xml:lang="th">คีย์เวิร์ด</value>
+        <value xml:lang="zh">关键字</value>
+        <value xml:lang="zh_TW">關鍵字</value>
+    </property>
+    <property key="ContentKeywordAnyWordMatches">
+        <value xml:lang="de">Beliebiges Wort muss übereinstimmen</value>
+        <value xml:lang="en">any word matches</value>
+        <value xml:lang="es">cualquier palabra coincide</value>
+        <value xml:lang="fr">Au moins un des mots égal</value>
+        <value xml:lang="it">qualsiasi parola uguale</value>
+        <value xml:lang="ro">orice cuvant egal</value>
+        <value xml:lang="ru">соответствие любому слову</value>
+        <value xml:lang="th">บางคำที่ตรงกัน</value>
+        <value xml:lang="zh">任一字匹配</value>
+        <value xml:lang="zh_TW">任一字匹配</value>
+    </property>
+    <property key="ContentKeywordRelevancy">
+        <value xml:lang="cs">Shoda klíčového slova</value>
+        <value xml:lang="de">Stichwortrelevanz</value>
+        <value xml:lang="en">Keyword Relevancy</value>
+        <value xml:lang="es">Relevancia de palabra clave</value>
+        <value xml:lang="fr">Pertinence du mot-clé</value>
+        <value xml:lang="it">Rilevanza chiave</value>
+        <value xml:lang="ja">Keyword Relevancy</value>
+        <value xml:lang="nl">Sleutelwoord relevantie</value>
+        <value xml:lang="ro">Relevare Cheie</value>
+        <value xml:lang="ru">Keyword Relevancy</value>
+        <value xml:lang="th">คำหลักทั้งหมด</value>
+        <value xml:lang="zh">关键字关联</value>
+        <value xml:lang="zh_TW">關鍵字關聯</value>
+    </property>
+    <property key="ContentKeywordWhere">
+        <value xml:lang="de">wo</value>
+        <value xml:lang="en">where</value>
+        <value xml:lang="es">donde</value>
+        <value xml:lang="fr">où</value>
+        <value xml:lang="it">dove</value>
+        <value xml:lang="ro">Unde</value>
+        <value xml:lang="ru">где</value>
+        <value xml:lang="th">ซึ่ง</value>
+        <value xml:lang="zh">哪里</value>
+        <value xml:lang="zh_TW">哪里</value>
+    </property>
+    <property key="ContentKeywords">
+        <value xml:lang="cs">Klíčová slova</value>
+        <value xml:lang="de">Stichwörter</value>
+        <value xml:lang="en">Keywords</value>
+        <value xml:lang="es">Palabras clave</value>
+        <value xml:lang="fr">Mots-clés</value>
+        <value xml:lang="hi_IN">मुख्य शब्द</value>
+        <value xml:lang="it">Chiavi</value>
+        <value xml:lang="ja">Keywords</value>
+        <value xml:lang="nl">Sleutelwoorden</value>
+        <value xml:lang="pt_PT">Palavras-Chave</value>
+        <value xml:lang="ro">Chei</value>
+        <value xml:lang="ru">Ключевые слова</value>
+        <value xml:lang="th">คำหลัก</value>
+        <value xml:lang="zh">关键字</value>
+        <value xml:lang="zh_TW">關鍵字</value>
+    </property>
     <property key="ContentLastModifiedDateInvalidFormat">
         <value xml:lang="en">Last Modified Date is not a valid Timestamp input format.</value>
         <value xml:lang="it">Data modifica non è nel formato valido.</value>
     </property>
+    <property key="ContentLastUpdatedDateFilter">
+        <value xml:lang="en">Last Updated Date Filter</value>
+    </property>
     <property key="ContentLatest">
         <value xml:lang="da">Senest</value>
         <value xml:lang="en">Latest</value>
@@ -1737,6 +1811,9 @@
         <value xml:lang="zh">æ ¹</value>
         <value xml:lang="zh_TW">æ ¹</value>
     </property>
+    <property key="ContentSearchContents">
+        <value xml:lang="en">Search Contents</value>
+    </property>
     <property key="ContentSecurityCreatePermission">
         <value xml:lang="en">Security Error: to run ${resourceDescription} you must have the CONTENTMGR_CREATE or CONTENTMGR_ADMIN permission</value>
         <value xml:lang="it">Errore di sicurezza: per eseguire ${resourceDescription} devi avere il permesso CONTENTMGR_CREATE o CONTENTMGR_ADMIN</value>
@@ -4366,6 +4443,9 @@
         <value xml:lang="zh">新建内容</value>
         <value xml:lang="zh_TW">新建內容</value>
     </property>
+    <property key="PageTitleAddContentKeyword">
+        <value xml:lang="en">Add Content Keyword</value>
+    </property>
     <property key="PageTitleAddDataResource">
         <value xml:lang="ar">إضافة مورد معلومات</value>
         <value xml:lang="da">Tilføj dataressource</value>
@@ -4689,6 +4769,9 @@
         <value xml:lang="zh">编辑内容属性</value>
         <value xml:lang="zh_TW">編輯內容屬性</value>
     </property>
+    <property key="PageTitleEditContentKeywords">
+        <value xml:lang="en">Edit Content Keywords</value>
+    </property>
     <property key="PageTitleEditContentMetadata">
         <value xml:lang="ar">تعرير ميتا معلومات محتوى</value>
         <value xml:lang="da">Ret indhold metadata</value>

Modified: ofbiz/trunk/applications/content/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services.xml?rev=1102643&r1=1102642&r2=1102643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services.xml Fri May 13 09:55:48 2011
@@ -1157,7 +1157,7 @@
     <service name="createContentKeyword" default-entity-name="ContentKeyword" engine="simple"
             location="component://content/script/org/ofbiz/content/content/ContentServices.xml" invoke="createContentKeyword" auth="true">
         <description>Create a ContentKeyword</description>
-        <permission-service service-name="contentGenericPermission" main-action="CREATE"/>
+        <permission-service service-name="genericContentPermission" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
@@ -1165,7 +1165,7 @@
     <service name="updateContentKeyword" default-entity-name="ContentKeyword" engine="simple"
             location="component://content/script/org/ofbiz/content/content/ContentServices.xml" invoke="updateContentKeyword" auth="true">
         <description>Update a ContentKeyword</description>
-        <permission-service service-name="contentGenericPermission" main-action="UPDATE"/>
+        <permission-service service-name="genericContentPermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
@@ -1173,14 +1173,14 @@
     <service name="deleteContentKeyword" default-entity-name="ContentKeyword" engine="simple"
             location="component://content/script/org/ofbiz/content/content/ContentServices.xml" invoke="deleteContentKeyword" auth="true">
         <description>Delete a ContentKeyword</description>
-        <permission-service service-name="contentGenericPermission" main-action="DELETE"/>
+        <permission-service service-name="genericContentPermission" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
     <service name="deleteContentKeywords" engine="simple"
             location="component://content/script/org/ofbiz/content/content/ContentServices.xml" invoke="deleteContentKeywords" auth="true">
         <description>Delete all the keywords of a content</description>
-        <permission-service service-name="contentGenericPermission" main-action="DELETE"/>
+        <permission-service service-name="genericContentPermission" main-action="DELETE"/>
         <attribute name="contentId" type="String" mode="IN" optional="false"/>
     </service>
 
@@ -1194,7 +1194,7 @@
     <service name="forceIndexContentKeywords" engine="simple"
             location="component://content/script/org/ofbiz/content/content/ContentServices.xml" invoke="forceIndexContentKeywords" auth="true">
         <description>Induce all the keywords of a content, ignoring the flag in the Content.</description>
-        <permission-service service-name="contentGenericPermission" main-action="CREATE"/>
+        <permission-service service-name="genericContentPermission" main-action="CREATE"/>
         <attribute name="contentId" type="String" mode="IN" optional="false"/>
     </service>
 </services>

Added: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchOptions.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchOptions.groovy?rev=1102643&view=auto
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchOptions.groovy (added)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchOptions.groovy Fri May 13 09:55:48 2011
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import org.ofbiz.base.util.*;
+import java.sql.Timestamp;
+import org.ofbiz.content.content.*;
+
+searchOperator = parameters.get("SEARCH_OPERATOR");
+if (!"AND".equals(searchOperator) && !"OR".equals(searchOperator)) {
+  searchOperator = "OR";
+}
+
+//create the fromDate for calendar
+fromCal = Calendar.getInstance();
+fromCal.setTime(new java.util.Date());
+//fromCal.set(Calendar.DAY_OF_WEEK, fromCal.getActualMinimum(Calendar.DAY_OF_WEEK));
+fromCal.set(Calendar.HOUR_OF_DAY, fromCal.getActualMinimum(Calendar.HOUR_OF_DAY));
+fromCal.set(Calendar.MINUTE, fromCal.getActualMinimum(Calendar.MINUTE));
+fromCal.set(Calendar.SECOND, fromCal.getActualMinimum(Calendar.SECOND));
+fromCal.set(Calendar.MILLISECOND, fromCal.getActualMinimum(Calendar.MILLISECOND));
+fromTs = new Timestamp(fromCal.getTimeInMillis());
+fromStr = fromTs.toString();
+fromStr = fromStr.substring(0, fromStr.indexOf('.'));
+context.put("fromDateStr", fromStr);
+
+// create the thruDate for calendar
+toCal = Calendar.getInstance();
+toCal.setTime(new java.util.Date());
+//toCal.set(Calendar.DAY_OF_WEEK, toCal.getActualMaximum(Calendar.DAY_OF_WEEK));
+toCal.set(Calendar.HOUR_OF_DAY, toCal.getActualMaximum(Calendar.HOUR_OF_DAY));
+toCal.set(Calendar.MINUTE, toCal.getActualMaximum(Calendar.MINUTE));
+toCal.set(Calendar.SECOND, toCal.getActualMaximum(Calendar.SECOND));
+toCal.set(Calendar.MILLISECOND, toCal.getActualMaximum(Calendar.MILLISECOND));
+toTs = new Timestamp(toCal.getTimeInMillis());
+toStr = toTs.toString();
+context.put("thruDateStr", toStr);
+
+searchConstraintStrings = ContentSearchSession.searchGetConstraintStrings(false, session, delegator);
+searchSortOrderString = ContentSearchSession.searchGetSortOrderString(false, request);
+contentAssocTypes=delegator.findList("ContentAssocType", null, null, null, null, false);
+roleTypes=delegator.findList("RoleType", null, null, null, null, false);
+
+context.put("searchOperator", searchOperator);
+context.put("searchConstraintStrings", searchConstraintStrings);
+context.put("searchSortOrderString", searchSortOrderString);
+context.put("contentAssocTypes", contentAssocTypes);
+context.put("roleTypes", roleTypes);

Propchange: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchOptions.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchOptions.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchOptions.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchResults.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchResults.groovy?rev=1102643&view=auto
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchResults.groovy (added)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchResults.groovy Fri May 13 09:55:48 2011
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import org.ofbiz.base.util.*;
+import org.ofbiz.content.content.*;
+
+// note: this can be run multiple times in the same request without causing problems, will check to see on its own if it has run again
+ContentSearchSession.processSearchParameters(parameters, request);
+Map result = ContentSearchEvents.getContentSearchResult(request, delegator);
+
+context.put("contentIds", result.get("contentIds"));
+context.put("viewIndex", result.get("viewIndex"));
+context.put("viewSize", result.get("viewSize"));
+context.put("listSize", result.get("listSize"));
+context.put("lowIndex", result.get("lowIndex"));
+context.put("highIndex", result.get("highIndex"));
+context.put("searchConstraintStrings", result.get("searchConstraintStrings"));
+context.put("searchSortOrderString", result.get("searchSortOrderString"));

Propchange: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchResults.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchResults.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/ContentSearchResults.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml?rev=1102643&r1=1102642&r2=1102643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Fri May 13 09:55:48 2011
@@ -1824,6 +1824,46 @@ under the License.
         <response name="success" type="view" value="showContentPdf"/>
     </request-map>
     
+    <!-- ================ Content keyword Search Requests ================= -->
+    <request-map uri="ContentSearchOptions">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ContentSearchOptions"/>
+    </request-map>
+    <request-map uri="ContentSearchResults">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ContentSearchResults"/>
+    </request-map>
+    
+    <!-- Content Keyword -->
+    <request-map uri="EditContentKeywords">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditContentKeywords"/>
+    </request-map>
+    <request-map uri="createContentKeyword">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createContentKeyword"/>
+        <response name="success" type="view" value="EditContentKeywords"/>
+        <response name="error" type="view" value="EditContentKeywords"/>
+    </request-map>
+    <request-map uri="deleteContentKeyword">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteContentKeyword"/>
+        <response name="success" type="view" value="EditContentKeywords"/>
+        <response name="error" type="view" value="EditContentKeywords"/>
+    </request-map>
+    <request-map uri="createContentKeywords">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createContentKeywords"/>
+        <response name="success" type="view" value="EditContentKeywords"/>
+        <response name="error" type="view" value="EditContentKeywords"/>
+    </request-map>
+    <request-map uri="deleteContentKeywords">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteContentKeywords"/>
+        <response name="success" type="view" value="EditContentKeywords"/>
+        <response name="error" type="view" value="EditContentKeywords"/>
+    </request-map>
+    
     <!-- View Mappings -->
     <view-map name="main" type="screen" page="component://content/widget/CommonScreens.xml#main"/>
     <view-map name="fonts.fo" type="screenfop" page="component://content/widget/CommonScreens.xml#fonts.fo" content-type="application/pdf" encoding="none"/>
@@ -1880,6 +1920,7 @@ under the License.
     <view-map name="EditContentOperation" page="component://content/widget/contentsetup/ContentSetupScreens.xml#EditContentOperation" type="screen"/>
     <view-map name="EditContentPurposeOperation"  page="component://content/widget/contentsetup/ContentSetupScreens.xml#EditContentPurposeOperation" type="screen"/>
     <view-map name="EditContentWorkEfforts" page="component://content/widget/content/ContentScreens.xml#EditContentWorkEfforts" type="screen"/>
+    <view-map name="EditContentKeywords" type="screen" page="component://content/widget/content/ContentScreens.xml#EditContentKeywords"/>
 
     <view-map name="FindDataResource"  page="component://content/widget/content/DataResourceScreens.xml#FindDataResource" type="screen"/>
     <view-map name="findDataResourceSearchResults"  page="component://content/widget/content/DataResourceScreens.xml#findDataResourceSearchResults" type="screen"/>
@@ -1997,5 +2038,9 @@ under the License.
     <view-map name="showContent" type="screen" page="component://content/widget/content/ContentScreens.xml#ShowContent"/>
     <view-map name="showContentPdf" type="screen" page="component://content/widget/content/ContentScreens.xml#ShowContent"  content-type="application/pdf" encoding="none"/>
     
-        <!-- end of view mappings -->
+    <!-- content keyword search view -->
+    <view-map name="ContentSearchOptions" type="screen" page="component://content/widget/content/ContentScreens.xml#ContentSearchOptions"/>
+    <view-map name="ContentSearchResults" type="screen" page="component://content/widget/content/ContentScreens.xml#ContentSearchResults"/>
+    
+    <!-- end of view mappings -->
 </site-conf>

Added: ofbiz/trunk/applications/content/webapp/content/content/ContentSearchOptions.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/content/ContentSearchOptions.ftl?rev=1102643&view=auto
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/content/ContentSearchOptions.ftl (added)
+++ ofbiz/trunk/applications/content/webapp/content/content/ContentSearchOptions.ftl Fri May 13 09:55:48 2011
@@ -0,0 +1,140 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+<div class="screenlet">
+  <div class="screenlet-title-bar">
+    <h3>${uiLabelMap.CommonAdvancedSearch}</h3>
+  </div>
+  <div class="screenlet-body">
+    <form name="advToKeyWordSearchForm" method="post" action="<@ofbizUrl>ContentSearchResults</@ofbizUrl>" style="margin: 0;">
+      <input type="hidden" name="VIEW_SIZE" value="25"/>
+      <table class="basic-table" cellspacing="0">
+        <tr>
+          <td align="right" valign="middle" class="label">${uiLabelMap.ContentKeywords}</td>
+          <td valign="middle">
+            <div>
+              <input type="text" name="SEARCH_STRING" size="40" value="${requestParameters.SEARCH_STRING?if_exists}"/>&nbsp;
+              ${uiLabelMap.CommonAny}<input type="radio" name="SEARCH_OPERATOR" value="OR" <#if searchOperator == "OR">checked="checked"</#if>/>
+              ${uiLabelMap.CommonAll}<input type="radio" name="SEARCH_OPERATOR" value="AND" <#if searchOperator == "AND">checked="checked"</#if>/>
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td align="right" valign="middle" class="label">${uiLabelMap.FormFieldTitle_contentId}</td>
+          <td valign="middle">
+            <div>
+              <@htmlTemplate.lookupField value="${requestParameters.SEARCH_CONTENT_ID?if_exists}" formName="advToKeyWordSearchForm" name="SEARCH_CONTENT_ID" id="SEARCH_CONTENT_ID" fieldFormName="LookupContent"/>
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td align="right" valign="middle" nowrap="nowrap" class="label">${uiLabelMap.FormFieldTitle_contentAssocTypeId}</td>
+          <td valign="middle" nowrap="nowrap">
+            <div>
+              <select name="contentAssocTypeId">
+                <option value="">- ${uiLabelMap.ContentAnyAssocType} -</option>
+                  <#list contentAssocTypes as contentAssocType>
+                      <option value="${contentAssocType.contentAssocTypeId}">${contentAssocType.description}</option>
+                  </#list>
+                  </select>
+                  ${uiLabelMap.ContentIncludeAllSubContents}?
+                  ${uiLabelMap.CommonYes}<input type="radio" name="SEARCH_SUB_CONTENTS" value="Y" checked="checked"/>
+                  ${uiLabelMap.CommonNo}<input type="radio" name="SEARCH_SUB_CONTENTS" value="N"/>
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td align="right" valign="middle" class="label">${uiLabelMap.PartyPartyId}</td>
+          <td valign="middle">
+            <div>
+              <@htmlTemplate.lookupField value="${requestParameters.partyId?if_exists}" formName="advToKeyWordSearchForm" name="partyId" id="partyId" fieldFormName="LookupPartyName"/>
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td align="right" valign="middle" class="label">${uiLabelMap.PartyRoleTypeId}</td>
+          <td valign="middle">
+            <div>
+              <select name="partyRoleTypeId">
+                <option value="">- ${uiLabelMap.CommonAnyRoleType} -</option>
+                <#list roleTypes as roleType>
+                   <option value="${roleType.roleTypeId}">${roleType.description}</option>
+                 </#list>
+              </select>
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td width='25%' align='right' class='label'>${uiLabelMap.ContentLastUpdatedDateFilter}</td>
+          <td>
+            <table class="basic-table" cellspacing="0">
+               <tr>
+                  <td nowrap="nowrap">
+                    <@htmlTemplate.renderDateTimeField name="fromDate" event="" action="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${requestParameters.fromDate?if_exists}" size="25" maxlength="30" id="fromDate1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
+                    <span>${uiLabelMap.CommonFrom}</span>
+                  </td>
+               </tr>
+               <tr>
+                  <td nowrap="nowrap">
+                    <@htmlTemplate.renderDateTimeField name="thruDate" event="" action="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${requestParameters.thruDate?if_exists}" size="25" maxlength="30" id="thruDate1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
+                    <span>${uiLabelMap.CommonThru}</span>
+                  </td>
+               </tr>
+            </table>
+          </td>
+          </tr>
+        <tr>
+          <td align="right" valign="middle" class="label">${uiLabelMap.CommonSortedBy}</td>
+          <td valign="middle">
+            <div>
+              <select name="sortOrder">
+                <option value="SortKeywordRelevancy">${uiLabelMap.ProductKeywordRelevancy}</option>
+                <option value="SortContentField:contentName">${uiLabelMap.FormFieldTitle_contentName}</option>
+              </select>
+              ${uiLabelMap.ProductLowToHigh}<input type="radio" name="sortAscending" value="Y" checked="checked"/>
+              ${uiLabelMap.ProductHighToLow}<input type="radio" name="sortAscending" value="N"/>
+            </div>
+          </td>
+        </tr>
+        <#if searchConstraintStrings?has_content>
+          <tr>
+            <td align="right" valign="top" class="label">${uiLabelMap.ProductLastSearch}</td>
+            <td valign="top">
+                <#list searchConstraintStrings as searchConstraintString>
+                    <div>&nbsp;-&nbsp;${searchConstraintString}</div>
+                </#list>
+                <div class="label">${uiLabelMap.CommonSortedBy} ${searchSortOrderString}</div>
+                <div>
+                  ${uiLabelMap.ProductNewSearch}<input type="radio" name="clearSearch" value="Y" checked="checked"/>
+                  ${uiLabelMap.CommonRefineSearch}<input type="radio" name="clearSearch" value="N"/>
+                </div>
+            </td>
+          </tr>
+        </#if>
+        <tr>
+          <td colspan="2" align="center">
+            <div>
+              <a href="javascript:document.advToKeyWordSearchForm.submit()" class="buttontext">${uiLabelMap.CommonFind}</a>
+            </div>
+          </td>
+        </tr>
+      </table>
+        <input type="image" src="<@ofbizContentUrl>/images/spacer.gif</@ofbizContentUrl>" onclick="javascript:document.advToKeyWordSearchForm.submit();"/>
+    </form>
+  </div>
+</div>

Propchange: ofbiz/trunk/applications/content/webapp/content/content/ContentSearchOptions.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/webapp/content/content/ContentSearchOptions.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/content/webapp/content/content/ContentSearchOptions.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/content/webapp/content/content/ContentSearchResults.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/content/ContentSearchResults.ftl?rev=1102643&view=auto
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/content/ContentSearchResults.ftl (added)
+++ ofbiz/trunk/applications/content/webapp/content/content/ContentSearchResults.ftl Fri May 13 09:55:48 2011
@@ -0,0 +1,87 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+<div class="screenlet">
+  <div class="screenlet-title-bar">
+    <h3>${uiLabelMap.ContentSearchContents}, ${uiLabelMap.ProductSearchFor}:</h3>
+  </div>
+  <div class="screenlet-body">
+    <#list searchConstraintStrings as searchConstraintString>
+        <div>&nbsp;<a href="<@ofbizUrl>ContentSearchResults?removeConstraint=${searchConstraintString_index}&amp;clearSearch=N</@ofbizUrl>" class="buttontext">X</a>&nbsp;${searchConstraintString}</div>
+    </#list>
+    <div><span class="label">${uiLabelMap.CommonSortedBy}</span> ${searchSortOrderString}</div>
+    <div><a href="<@ofbizUrl>ContentSearchOptions</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonRefineSearch}</a></div>
+
+    <#if !contentIds?has_content>
+      <br /><h2>&nbsp;${uiLabelMap.ProductNoResultsFound}.</h2>
+    </#if>
+
+    <#if contentIds?has_content>
+    <table class="basic-table" cellspacing="0">
+        <tr>
+          <td align="right" class="label">
+            <#if 0 < viewIndex?int>
+              <a href="<@ofbizUrl>ContentSearchResults/~VIEW_INDEX=${viewIndex-1}/~VIEW_SIZE=${viewSize}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a>
+            </#if>
+            <#if 0 < listSize?int>
+              ${lowIndex+1} - ${highIndex} ${uiLabelMap.CommonOf} ${listSize}
+            </#if>
+            <#if highIndex?int < listSize?int>
+              | <a href="<@ofbizUrl>ContentSearchResults/~VIEW_INDEX=${viewIndex+1}/~VIEW_SIZE=${viewSize}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonNext}</a>
+            </#if>
+          </td>
+        </tr>
+    </table>
+    </#if>
+
+    <#if contentIds?has_content>
+
+    <center>
+      <table width="100%" cellpadding="0" cellspacing="0">
+        <#assign listIndex = lowIndex>
+        <#list contentIds as contentId><#-- note that there is no boundary range because that is being done before the list is put in the content -->
+          <#assign content = delegator.findByPrimaryKey("Content", Static["org.ofbiz.base.util.UtilMisc"].toMap("contentId", contentId))>
+          <tr>
+            <td>
+              <a href="<@ofbizUrl>editContent?contentId=${contentId}</@ofbizUrl>" class="buttontext">${contentId} ${(content.contentName)?if_exists}</a>
+            </td>
+          </tr>
+        </#list>
+      </table>
+    </center>
+    </#if>
+
+    <#if contentIds?has_content>
+    <table class="basic-table" cellspacing="0">
+        <tr>
+          <td align="right" class="label">
+            <#if 0 < viewIndex?int>
+              <a href="<@ofbizUrl>ContentSearchResults/~VIEW_INDEX=${viewIndex-1}/~VIEW_SIZE=${viewSize}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a> |
+            </#if>
+            <#if 0 < listSize?int>
+              ${lowIndex+1} - ${highIndex} ${uiLabelMap.CommonOf} ${listSize}
+            </#if>
+            <#if highIndex?int < listSize?int>
+              | <a href="<@ofbizUrl>ContentSearchResults/~VIEW_INDEX=${viewIndex+1}/~VIEW_SIZE=${viewSize}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonNext}</a>
+            </#if>
+          </td>
+        </tr>
+    </table>
+    </#if>
+  </div>
+</div>

Propchange: ofbiz/trunk/applications/content/webapp/content/content/ContentSearchResults.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/webapp/content/content/ContentSearchResults.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/content/webapp/content/content/ContentSearchResults.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/content/widget/content/ContentForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentForms.xml?rev=1102643&r1=1102642&r2=1102643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/content/ContentForms.xml (original)
+++ ofbiz/trunk/applications/content/widget/content/ContentForms.xml Fri May 13 09:55:48 2011
@@ -659,4 +659,24 @@ under the License.
         </field>
         <field name="saveButton"><submit/></field>
     </form>
+    
+    <!-- Content Keyword Forms -->
+    <form name="AddContentKeyword" target="createContentKeyword" title="" type="single"
+        header-row-style="header-row" default-table-style="basic-table">
+        <auto-fields-service service-name="createContentKeyword"/>
+        <field name="contentId"><hidden value="${parameters.contentId}"/></field>
+        <field name="keyword" title="${uiLabelMap.ContentKeyword}*"><text size="10"/></field>
+        <field name="relevancyWeight" title="${uiLabelMap.ProductWeight}"><text size="5"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    <form name="ListContentKeywords" type="list" target="deleteContentKeyword" odd-row-style="alternate-row" default-table-style="basic-table">
+        <actions>
+            <entity-and entity-name="ContentKeyword" use-cache="true">
+                <field-map from-field="contentId" field-name="contentId"/>
+            </entity-and>
+        </actions>
+        <auto-fields-entity entity-name="ContentKeyword" default-field-type="display"/>
+        <field name="contentId"><hidden/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonDelete}"><submit button-type="button"/></field>
+    </form>
 </forms>

Modified: ofbiz/trunk/applications/content/widget/content/ContentMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentMenus.xml?rev=1102643&r1=1102642&r2=1102643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/content/ContentMenus.xml (original)
+++ ofbiz/trunk/applications/content/widget/content/ContentMenus.xml Fri May 13 09:55:48 2011
@@ -110,8 +110,17 @@ under the License.
                 <parameter param-name="contentId" from-field="parameters.contentId"/>
             </link>
         </menu-item>
-
+        
+        <menu-item name="keywords" title="${uiLabelMap.ContentKeywords}" >
+            <condition>
+                <not><if-empty field="currentValue.contentId"/></not>
+            </condition>
+            <link target="EditContentKeywords">
+                <parameter param-name="contentId" from-field="parameters.contentId"/>
+            </link>
+        </menu-item>
     </menu>
+    
     <menu name="contentSub" menu-container-style="button-bar button-style-2" default-menu-item-name="content" default-permission-operation="HAS_AUTHOR_ROLE|CONTENT_ADMIN"
         default-permission-entity-action="_ADMIN" default-associated-content-id="${userLogin.userLoginId}" selected-menuitem-context-field-name="currentMenuItemName"
         title="" type="simple">

Modified: ofbiz/trunk/applications/content/widget/content/ContentScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentScreens.xml?rev=1102643&r1=1102642&r2=1102643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/content/ContentScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/content/ContentScreens.xml Fri May 13 09:55:48 2011
@@ -42,7 +42,10 @@ under the License.
                             <widgets>
                                 <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
                                     <decorator-section name="menu-bar">
-                                        <container style="button-bar"><link target="EditContent" text="${uiLabelMap.CommonCreateNew}" style="buttontext create"/></container>
+                                        <container style="button-bar">
+                                            <link target="EditContent" text="${uiLabelMap.CommonCreateNew}" style="buttontext create"/>
+                                            <link  text="${uiLabelMap.CommonAdvancedSearch}" target="ContentSearchOptions" style="buttontext"/>
+                                        </container>
                                     </decorator-section>
                                     <decorator-section name="search-options">
                                         <include-form name="FindContent" location="component://content/widget/content/ContentForms.xml"/>
@@ -594,4 +597,66 @@ under the License.
             </widgets>
         </section>
     </screen>
+    
+    <screen name="ContentSearchOptions">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleSearchResults"/>
+                <script location="component://content/webapp/content/WEB-INF/actions/content/ContentSearchOptions.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="contentDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                         <platform-specific>
+                              <html><html-template location="component://content/webapp/content/content/ContentSearchOptions.ftl"/></html>
+                         </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="ContentSearchResults">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleSearchResults"/>
+                <script location="component://content/webapp/content/WEB-INF/actions/content/ContentSearchResults.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="contentDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                         <platform-specific>
+                              <html><html-template location="component://content/webapp/content/content/ContentSearchResults.ftl"/></html>
+                         </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="EditContentKeywords">
+        <section>
+            <actions>
+                <script location="component://content/widget/GetMenuContext.groovy"/>
+                <set field="titleProperty" value="PageTitleEditContentKeywords"/>
+                <set field="tabButtonItem" value="keywords"/>
+                <set field="contentId" from-field="parameters.contentId"/>
+                <entity-one entity-name="Content" value-field="currentValue">
+                    <field-map field-name="contentId" from-field="parameters.contentId"/>
+                </entity-one>
+            </actions>
+            <widgets>
+                <decorator-screen name="commonContentDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet id="AddContentKeywordsPanel" title="${uiLabelMap.PageTitleAddContentKeyword}" collapsible="true">
+                            <include-form name="AddContentKeyword" location="component://content/widget/content/ContentForms.xml"/>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.PageTitleEditContentKeywords}">
+                            <include-form name="ListContentKeywords" location="component://content/widget/content/ContentForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>