Author: hansbak
Date: Mon Feb 11 18:12:49 2008 New Revision: 620686 URL: http://svn.apache.org/viewvc?rev=620686&view=rev Log: only display add task screen if phases are defined Modified: ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Modified: ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties?rev=620686&r1=620685&r2=620686&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties (original) +++ ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties Mon Feb 11 18:12:49 2008 @@ -134,6 +134,7 @@ ProjectMgrTaskName=Task Name ProjectMgrTaskNoOpen1=Currently no 'open' tasks are assigned to you. ProjectMgrTaskNoOpen2=Add an existing or a new task to a project you are member of. +ProjectMgrNoPhasesYet=No phases have been created yet, tasks can not exist without a phase as parent, so create a phase first ProjectMgrTaskId=Task Id ProjectMgrTasks=Tasks ProjectMgrTreeDetails=TreeDetails Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=620686&r1=620685&r2=620686&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Mon Feb 11 18:12:49 2008 @@ -336,6 +336,10 @@ <order-by field-name="phaseName"/> <order-by field-name="workEffortName"/> </entity-and> + <entity-and entity-name="WorkEffort" list-name="phases"> + <field-map field-name="workEffortParentId" env-name="parameters.projectId"/> + <field-map field-name="workEffortTypeId" value="PHASE"/> + </entity-and> <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/> <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="10"/> </actions> @@ -347,14 +351,14 @@ <container style="head3"> <label text="${uiLabelMap.${titleProperty}}"/> </container> - </container> + </container> <container style="screenlet-body"> <section> <widgets> <include-form name="EditProjectTasks" location="component://projectmgr/widget/forms/ProjectForms.xml"/> </widgets> </section> - </container> + </container> </container> <container style="lefthalf"> <container style="screenlet"> @@ -364,11 +368,17 @@ </container> </container> <container style="screenlet-body"> - <section> - <widgets> - <include-form name="AddProjectTask" location="component://projectmgr/widget/forms/TaskForms.xml"/> - </widgets> - </section> + <section> + <condition> + <if-empty field-name="phases"/> + </condition> + <widgets> + <label style="head3" text="${uiLabelMap.ProjectMgrNoPhasesYet}"/> + </widgets> + <fail-widgets> + <include-form name="AddProjectTask" location="component://projectmgr/widget/forms/TaskForms.xml"/> + </fail-widgets> + </section> </container> </container> </container> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=620686&r1=620685&r2=620686&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Mon Feb 11 18:12:49 2008 @@ -163,9 +163,13 @@ <widgets> <include-form name="MyTasks" location="component://projectmgr/widget/forms/TaskForms.xml"/> </widgets> - <fail-widgets> - <label style="head3" text="${uiLabelMap.ProjectMgrTaskNoOpen1}"></label> - <label style="head3" text="${uiLabelMap.ProjectMgrTaskNoOpen2}"></label> + <fail-widgets> + <container> + <label style="head3" text="${uiLabelMap.ProjectMgrTaskNoOpen1}"></label> + </container> + <container> + <label style="head3" text="${uiLabelMap.ProjectMgrTaskNoOpen2}"></label> + </container> </fail-widgets> </section> </container> |
Free forum by Nabble | Edit this page |