Author: hansbak
Date: Mon Jun 29 07:09:15 2009 New Revision: 789239 URL: http://svn.apache.org/viewvc?rev=789239&view=rev Log: Create new portlet: Projectmanager request list Modified: ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectPermissionServices.xml ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml ofbiz/trunk/specialpurpose/projectmgr/widget/RequestScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml Modified: ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml?rev=789239&r1=789238&r2=789239&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml Mon Jun 29 07:09:15 2009 @@ -512,6 +512,9 @@ <value xml:lang="th">à¹à¸¡à¹à¸à¸³à¸«à¸à¸à¸à¸²à¸</value> <value xml:lang="zh">æªåé ä»»å¡</value> </property> + <property key="ProjectMgrCustomerRequestList"> + <value xml:lang="en">Project Customer Request list</value> + </property> <property key="ProjectMgrAcceptedCustomerRequestList"> <value xml:lang="en">Accepted Customer Request list</value> <value xml:lang="fr">Liste des demandes client acceptées</value> Modified: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml?rev=789239&r1=789238&r2=789239&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml Mon Jun 29 07:09:15 2009 @@ -26,7 +26,14 @@ screenLocation="component://projectmgr/widget/TimeSheetScreens.xml" description="My Current Timesheet" securityServiceName="portalPermissionIsEmployee" securityMainAction="VIEW"/> <PortletPortletCategory portalPortletId="mytimesheet" portletCategoryId="PROJECTMANAGER"/> - + + <PortalPortlet portalPortletId="ProjectRequestList" + portletName="Project Customer Request List" + screenName="ProjectRequestList" + screenLocation="component://projectmgr/widget/RequestScreens.xml" + description="Project Customer Request List" securityServiceName="projectMgrRequestPermission" securityMainAction="VIEW"/> + <PortletPortletCategory portalPortletId="ProjectRequestList" portletCategoryId="PROJECTMANAGER"/> + <PortalPortlet portalPortletId="mytasks" portletName="MyTasks" Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectPermissionServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectPermissionServices.xml?rev=789239&r1=789238&r2=789239&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectPermissionServices.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectPermissionServices.xml Mon Jun 29 07:09:15 2009 @@ -20,6 +20,18 @@ <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd"> + + <simple-method method-name="projectMgrRequestPermission" short-description="Make sure the sure the user can read the requests for the projects"> + <if-has-permission permission="PROJECTMGR" action="ADMIN"> + <set field="hasPermission" value="true" type="Boolean"/> + <else> + <set field="hasPermission" value="false" type="Boolean"/> + <set field="failMessage" value="You need at least PROJECTMGR_ADMIN permission to the the project requests"/> + <field-to-result field="failMessage"/> + </else> + </if-has-permission> + <field-to-result field="hasPermission"/> + </simple-method> <simple-method method-name="projectMgrPermission" short-description="general service to check access to the project component"> <set field="primaryPermission" value="PROJECTMGR"/> Modified: ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml?rev=789239&r1=789238&r2=789239&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml Mon Jun 29 07:09:15 2009 @@ -56,7 +56,12 @@ <attribute name="timesheetId" type="String" mode="IN" optional="true"/> <attribute name="timeEntryId" type="String" mode="IN" optional="true"/> </service> - + + <service name="projectMgrRequestPermission" engine="simple" + location="component://projectmgr/script/org/ofbiz/project/ProjectPermissionServices.xml" invoke="projectMgrRequestPermission"> + <implements service="permissionInterface"/> + </service> + <service name="updateTimeEntryByWorkeffort" engine="simple" location="component://projectmgr/script/org/ofbiz/project/ProjectServices.xml" invoke="updateTimeEntryByWorkeffort"> <description>Update workeffort by workeffortId and timesheetId </description> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=789239&r1=789238&r2=789239&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Mon Jun 29 07:09:15 2009 @@ -611,4 +611,9 @@ </link> </menu-item> </menu> + <menu name="ProjectRequestList"> + <menu-item name="newrequest"> + <link target="/projectmgr/control/newrequest" url-mode="inter-app"/> + </menu-item> + </menu> </menus> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/RequestScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/RequestScreens.xml?rev=789239&r1=789238&r2=789239&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/RequestScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/RequestScreens.xml Mon Jun 29 07:09:15 2009 @@ -20,27 +20,44 @@ <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> - <screen name="RequestList"> + + <screen name="ProjectRequestList"> <section> + <condition> + <if-has-permission permission="PROJECTMGR" action="ADMIN"/> + </condition> <actions> - <set field="titleProperty" value="PageTitleListWorkEffortRequests"/> - <set field="tabButtonItem" value="requestlist"/> - <set field="headerItem" value="request"/> <entity-and list="custRequests" entity-name="CustRequest"> <field-map field-name="statusId" value="CRQ_ACCEPTED"/> <order-by field-name="lastModifiedDate"/> </entity-and> </actions> <widgets> + <screenlet title="${uiLabelMap.ProjectMgrCustomerRequestList}" navigation-menu-name="ProjectRequestList"> + <label style="h2" text="${uiLabelMap.ProjectMgrAcceptedCustomerRequestList}"/> + <link target="newrequest" text="${uiLabelMap.OrderNewRequest}" style="buttontext"/> + <include-form name="ListRequests" location="component://projectmgr/widget/forms/RequestForms.xml"/> + <label style="h2" text="${uiLabelMap.ProjectMgrReviewedCustomerRequestTaskList}"/> + <include-form name="ListRequestsWorkEffortForm" location="component://projectmgr/widget/forms/RequestForms.xml"/> + </screenlet> + </widgets> + <fail-widgets> + <label style="h2" text="You need at least a PROJECT_ADMIN permission"></label> + </fail-widgets> + </section> + </screen> + + <screen name="RequestList"> + <section> + <actions> + <set field="titleProperty" value="PageTitleListWorkEffortRequests"/> + <set field="tabButtonItem" value="requestlist"/> + <set field="headerItem" value="request"/> + </actions> + <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <screenlet title="${uiLabelMap.ProjectMgrAcceptedCustomerRequestList}" navigation-form-name="ListRequests"> - <link target="newrequest" text="${uiLabelMap.OrderNewRequest}" style="buttontext"/> - <include-form name="ListRequests" location="component://projectmgr/widget/forms/RequestForms.xml"/> - </screenlet> - <screenlet title="${uiLabelMap.ProjectMgrReviewedCustomerRequestTaskList}" navigation-form-name="ListRequestsWorkEffortForm"> - <include-form name="ListRequestsWorkEffortForm" location="component://projectmgr/widget/forms/RequestForms.xml"/> - </screenlet> + <include-screen name="ProjectRequestList"/> </decorator-section> </decorator-screen> </widgets> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml?rev=789239&r1=789238&r2=789239&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml Mon Jun 29 07:09:15 2009 @@ -23,7 +23,7 @@ <form name="ListRequests" type="list" extends="ListRequestList" extends-resource="component://order/webapp/ordermgr/request/RequestForms.xml" paginate-target="requestlist" > <field name="createTaskFromRequest" title="${uiLabelMap.ProjectMgrCreateTaskFromRequest}" widget-style="buttontext"> - <hyperlink description="${uiLabelMap.ProjectMgrCreateTaskFromRequest}" target="EditTaskFromRequest"> + <hyperlink description="${uiLabelMap.ProjectMgrCreateTaskFromRequest}" target="/projectmgr/control/EditTaskFromRequest" target-type="inter-app"> <parameter param-name="custRequestId"/> </hyperlink> </field> |
Free forum by Nabble | Edit this page |