svn commit: r736948 - in /ofbiz/trunk/applications/content: config/ script/org/ofbiz/content/blog/ servicedef/ webapp/content/WEB-INF/ widget/content/ widget/forum/

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

svn commit: r736948 - in /ofbiz/trunk/applications/content: config/ script/org/ofbiz/content/blog/ servicedef/ webapp/content/WEB-INF/ widget/content/ widget/forum/

hansbak-2
Author: hansbak
Date: Thu Jan 22 21:56:46 2009
New Revision: 736948

URL: http://svn.apache.org/viewvc?rev=736948&view=rev
Log:
some small adjustements to the blog maintenance screens

Modified:
    ofbiz/trunk/applications/content/config/ContentUiLabels.xml
    ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml
    ofbiz/trunk/applications/content/servicedef/services.xml
    ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml
    ofbiz/trunk/applications/content/widget/content/ContentMenus.xml
    ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml

Modified: ofbiz/trunk/applications/content/config/ContentUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/config/ContentUiLabels.xml?rev=736948&r1=736947&r2=736948&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/config/ContentUiLabels.xml (original)
+++ ofbiz/trunk/applications/content/config/ContentUiLabels.xml Thu Jan 22 21:56:46 2009
@@ -281,6 +281,12 @@
         <value xml:lang="fr">Elément de contenu associé à cette ressource</value>
         <value xml:lang="it">Voci contenuto associate a questa risorsa dati</value>
     </property>
+    <property key="ContentCreateNewBlog">
+        <value xml:lang="en">Create New Blog</value>        
+    </property>
+    <property key="ContentCreateNewBlogAricle">
+        <value xml:lang="en">Create New Art.</value>        
+    </property>
     <property key="ContentCreateFile">
         <value xml:lang="de">Datei erstellen</value>
         <value xml:lang="en">Create File</value>

Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml?rev=736948&r1=736947&r2=736948&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml Thu Jan 22 21:56:46 2009
@@ -255,6 +255,9 @@
     </simple-method>
 
     <simple-method method-name="getBlogEntry" short-description="Get all the info for a blog article">
+        <if-empty field="parameters.contentId">
+            <return/>
+        </if-empty>
         <entity-one entity-name="Content" value-field="content"/>
         <get-related value-field="content" relation-name="FromContentAssoc" list="rawAssocs"/>
         <filter-list-by-date list="rawAssocs" to-list="assocs"/>

Modified: ofbiz/trunk/applications/content/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services.xml?rev=736948&r1=736947&r2=736948&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services.xml Thu Jan 22 21:56:46 2009
@@ -1088,7 +1088,7 @@
         location="org/ofbiz/content/blog/BlogServices.xml" invoke="getBlogEntry">
         <description>Retrieves content records for a blog entry</description>
         <attribute name="blogContentId" type="String" mode="INOUT" optional="false"/>
-        <attribute name="contentId" type="String" mode="INOUT" optional="false"/>
+        <attribute name="contentId" type="String" mode="INOUT" optional="true"/><!-- also used for new entries, will return with no error with empty contentId -->
         <attribute name="contentName" type="String" mode="OUT" optional="true"/>
         <attribute name="statusId" type="String" mode="OUT" optional="true"/>
         <attribute name="description" type="String" mode="OUT" optional="true"/>

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=736948&r1=736947&r2=736948&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Thu Jan 22 21:56:46 2009
@@ -88,10 +88,6 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="blogContent"/>
     </request-map>
-    <request-map uri="NewBlogArticle">
-        <security https="true" auth="true"/>
-        <response name="success" type="view" value="NewBlogArticle"/>
-    </request-map>
     <request-map uri="createBlogArticle">
         <security https="true" auth="true"/>
         <event type="service" invoke="createBlogEntry"/>
@@ -1787,7 +1783,6 @@
     <view-map name="blogContent" page="component://content/widget/forum/BlogScreens.xml#BlogContent" type="screen"/>
     <view-map name="ViewBlogArticle" page="component://content/widget/forum/BlogScreens.xml#ViewArticle" type="screen"/>
     <view-map name="EditBlog" type="screen" page="component://content/widget/forum/BlogScreens.xml#EditBlog"/>
-    <view-map name="NewBlogArticle" page="component://content/widget/forum/BlogScreens.xml#NewArticle" type="screen"/>
     <view-map name="EditBlogArticle" page="component://content/widget/forum/BlogScreens.xml#EditArticle" type="screen"/>
     <view-map name="ViewResponse" page="component://content/widget/forum/BlogScreens.xml#BlogMain" type="screen"/>
     <view-map name="RespondBlog" type="screen" page="component://ecommerce/widget/blog/BlogScreens.xml#AddBlogResponse"/>

Modified: ofbiz/trunk/applications/content/widget/content/ContentMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentMenus.xml?rev=736948&r1=736947&r2=736948&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/content/ContentMenus.xml (original)
+++ ofbiz/trunk/applications/content/widget/content/ContentMenus.xml Thu Jan 22 21:56:46 2009
@@ -153,9 +153,15 @@
     <menu name="blogSub" 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">
-        <menu-item name="NewBlog" title="${uiLabelMap.CommonCreateNew}">
+        <menu-item name="NewBlog" title="${uiLabelMap.ContentCreateNewBlog}">
             <link target="editBlog"/>
         </menu-item>
+        <menu-item name="NewBlogAricle" title="${uiLabelMap.ContentCreateNewBlogAricle}">
+            <condition>
+                <if-compare field="tabButtonItem" operator="equals" value="Articles"/>
+            </condition>
+            <link target="EditBlogArticle?blogContentId=${parameters.blogContentId}"/>
+        </menu-item>
     </menu>
 
     <menu name="blogArt"  menu-container-style="button-bar tab-bar" default-selected-style="selected" default-menu-item-name="content" default-permission-operation="CONTENT_ADMIN"
@@ -177,7 +183,7 @@
     <menu name="blogArtSub" 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">
-        <menu-item name="NewBlog" title="${uiLabelMap.CommonCreateNew}">
+        <menu-item name="NewBlogAricle" title="${uiLabelMap.ContentCreateNewBlogAricle}">
             <link target="EditBlogArticle?blogContentId=${parameters.blogContentId}"/>
         </menu-item>
     </menu>

Modified: ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml?rev=736948&r1=736947&r2=736948&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml Thu Jan 22 21:56:46 2009
@@ -177,34 +177,6 @@
         </section>
     </screen>
 
-    <screen name="NewArticle">
-        <section>
-            <actions>
-                <set field="blogContentId" from-field="parameters.blogContentId"/>
-                <set field="crPerm.ownerContentId" from-field="parameters.blogContentId"/>
-                <set field="crPerm.contentOperationId" value="CONTENT_CREATE"/>
-                <set field="crPerm.contentPurposeTypeId" value="ARTICLE"/>
-            </actions>
-            <widgets>
-                <section>
-                    <condition>
-                        <if-service-permission service-name="genericContentPermission" main-action="CREATE" context-map="crPerm"/>
-                    </condition>
-                    <widgets>
-                        <decorator-screen name="commonBlogDecorator" location="${parameters.mainDecoratorLocation}">
-                            <decorator-section name="body">
-                                <include-form name="EditArticle" location="component://ecommerce/widget/blog/BlogForms.xml"/>                                
-                            </decorator-section>
-                        </decorator-screen>
-                    </widgets>
-                    <fail-widgets>
-                        <label text="Permissions failed."></label>
-                    </fail-widgets>
-                </section>
-            </widgets>
-        </section>
-    </screen>
-    
     <screen name="EditArticle">
         <section>
             <actions>