svn commit: r802308 [1/2] - in /ofbiz/trunk/applications: humanres/config/ humanres/data/ humanres/entitydef/ humanres/script/org/ofbiz/humanres/ humanres/servicedef/ humanres/webapp/humanres/WEB-INF/ humanres/widget/ humanres/widget/forms/ workeffort/...

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

svn commit: r802308 [1/2] - in /ofbiz/trunk/applications: humanres/config/ humanres/data/ humanres/entitydef/ humanres/script/org/ofbiz/humanres/ humanres/servicedef/ humanres/webapp/humanres/WEB-INF/ humanres/widget/ humanres/widget/forms/ workeffort/...

hansbak-2
Author: hansbak
Date: Sat Aug  8 07:20:30 2009
New Revision: 802308

URL: http://svn.apache.org/viewvc?rev=802308&view=rev
Log:
commited patch of OFBIZ-2531 with minor changes, however added initial help screens, initial commit need some more work on the permissions for admin and employee

Added:
    ofbiz/trunk/applications/humanres/config/HumanResHelpUrls.xml   (with props)
Modified:
    ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml
    ofbiz/trunk/applications/humanres/data/HumanResTypeData.xml
    ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml
    ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
    ofbiz/trunk/applications/humanres/servicedef/services.xml
    ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
    ofbiz/trunk/applications/humanres/widget/CommonScreens.xml
    ofbiz/trunk/applications/humanres/widget/GlobalHRSettingScreens.xml
    ofbiz/trunk/applications/humanres/widget/LookupScreens.xml
    ofbiz/trunk/applications/humanres/widget/Menus.xml
    ofbiz/trunk/applications/humanres/widget/PersonTrainingScreens.xml
    ofbiz/trunk/applications/humanres/widget/forms/GlobalHRSettingForms.xml
    ofbiz/trunk/applications/humanres/widget/forms/LookupForms.xml
    ofbiz/trunk/applications/humanres/widget/forms/PersonTrainingForms.xml
    ofbiz/trunk/applications/workeffort/data/WorkEffortTypeData.xml
    ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl
    ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/month.ftl
    ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/week.ftl

Added: ofbiz/trunk/applications/humanres/config/HumanResHelpUrls.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/config/HumanResHelpUrls.xml?rev=802308&view=auto
==============================================================================
--- ofbiz/trunk/applications/humanres/config/HumanResHelpUrls.xml (added)
+++ ofbiz/trunk/applications/humanres/config/HumanResHelpUrls.xml Sat Aug  8 07:20:30 2009
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+-->
+<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <property key="HR_EditTrainingTypes">
+        <value xml:lang="en">HR-Edit+Training+Types</value>
+    </property>
+    <property key="HR_TrainingCalendar">
+        <value xml:lang="en">HR-Training+Calendar</value>
+    </property>
+    <property key="HR_FindTrainingApprovals">
+        <value xml:lang="en">Training+Approval</value>"
+    </property>
+</resource>

Propchange: ofbiz/trunk/applications/humanres/config/HumanResHelpUrls.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/humanres/config/HumanResHelpUrls.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/humanres/config/HumanResHelpUrls.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml (original)
+++ ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml Sat Aug  8 07:20:30 2009
@@ -1623,7 +1623,7 @@
     </property>
     <property key="HumanResTraining">
         <value xml:lang="de">Schulungen</value>
-        <value xml:lang="en">Trainings</value>
+        <value xml:lang="en">Training</value>
         <value xml:lang="es">Entrenamiento</value>
         <value xml:lang="fr">Formation</value>
         <value xml:lang="it">Corsi</value>
@@ -1838,4 +1838,31 @@
      <property key="PageTitleFindRelocationDetails">
         <value xml:lang="en">Find Relocation Details</value>
     </property>
+ <property key="HumanResPreRequisiteSkill">
+        <value xml:lang="en">Pre Requisite Skill</value>
+    </property>
+    <property key="HumanResTrainingApprovals">
+        <value xml:lang="en">Training Approvals</value>
+    </property>
+    <property key="HumanResTrainingClassType">
+        <value xml:lang="en">Training Class Type</value>
+    </property>
+    <property key="HumanResTrainings">
+        <value xml:lang="en">Training</value>
+    </property>
+    <property key="HumanResTrainingStatus">
+        <value xml:lang="en">Training Status</value>
+    </property>
+    <property key="HumanResTrainingTypes">
+        <value xml:lang="en">Training Types</value>
+    </property>
+    <property key="PageTitleEditTrainingTypes">
+        <value xml:lang="en">Edit Training Types</value>
+    </property>
+    <property key="PageTitleFindTrainingStatus">
+        <value xml:lang="en">Find Training Status</value>
+    </property>
+    <property key="PageTitleFindTrainingApprovals">
+        <value xml:lang="en">Find Training Approvals</value>
+    </property>
 </resource>

Modified: ofbiz/trunk/applications/humanres/data/HumanResTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/data/HumanResTypeData.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/data/HumanResTypeData.xml (original)
+++ ofbiz/trunk/applications/humanres/data/HumanResTypeData.xml Sat Aug  8 07:20:30 2009
@@ -48,6 +48,10 @@
     <StatusType statusTypeId="RELOCATION_STATUS" description="Relocation Status"/>
     <StatusItem statusId="STATUS_PENDING" statusTypeId="RELOCATION_STATUS" description="Pending"/>
     <StatusItem statusId="STATUS_RELOCATED" statusTypeId="RELOCATION_STATUS"  description="Relocated"/>
+    
+    <StatusType statusTypeId="TRAINING_STATUS" description="Training Status"/>
+    <StatusItem statusId="TRAINING_APPROVED" statusTypeId="TRAINING_STATUS"  description="Approved"/>
+    <StatusItem statusId="TRAINING_REJECTED" statusTypeId="TRAINING_STATUS"  description="Rejected"/>
 
     <EmplPositionType description="Programmer" hasTable="N" parentTypeId="" emplPositionTypeId="PROGRAMMER"/>
     <EmplPositionType description="System Administrator" hasTable="N" parentTypeId="" emplPositionTypeId="SYS_ADMIN"/>

Modified: ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml Sat Aug  8 07:20:30 2009
@@ -232,18 +232,32 @@
             package-name="org.ofbiz.humanres.ability"
             title="Person Training Entity">
       <field name="partyId" type="id-ne"></field>
+      <field name="trainingRequestId" type="id-ne"></field>
       <field name="trainingClassTypeId" type="id-ne"></field>
+      <field name="workEffortId" type="id-ne"></field>
       <field name="fromDate" type="date-time"></field>
       <field name="thruDate" type="date-time"></field>
+      <field name="approverId" type="id-ne"></field>
+      <field name="approvalStatus" type="short-varchar"></field>
+      <field name="reason" type="description"></field>
       <prim-key field="partyId"/>
       <prim-key field="trainingClassTypeId"/>
       <prim-key field="fromDate"/>
       <relation type="one" fk-name="PERS_TRNG_PRTY" rel-entity-name="Party">
         <key-map field-name="partyId"/>
       </relation>
+      <relation type="one" fk-name="PERS_TRNG_APPR" title="Approver" rel-entity-name="Person">
+          <key-map field-name="approverId" rel-field-name="partyId"/>
+      </relation>
       <relation type="one" fk-name="PERS_TRNG_TCTP" rel-entity-name="TrainingClassType">
         <key-map field-name="trainingClassTypeId"/>
       </relation>
+      <relation type="one" fk-name="PERS_TRNG_WREF" rel-entity-name="WorkEffort">
+        <key-map field-name="workEffortId"/>
+      </relation>
+      <relation type="one" fk-name="PERS_TRNG_TRNRQ" title="Training Request" rel-entity-name="TrainingRequest">
+          <key-map field-name="trainingRequestId"/>
+      </relation>
     </entity>
     <entity entity-name="ResponsibilityType"
             package-name="org.ofbiz.humanres.ability"
@@ -914,4 +928,10 @@
         <key-map field-name="emplPositionId" rel-field-name="emplPositionIdManagedBy"/>
       </view-link>
     </view-entity>
+    <entity entity-name="TrainingRequest"
+            package-name="org.ofbiz.humanres.trainings"
+            title="Training Request Entity">
+        <field name="trainingRequestId" type="id-ne"></field>
+        <prim-key field="trainingRequestId"/>
+    </entity>
 </entitymodel>

Modified: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml (original)
+++ ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml Sat Aug  8 07:20:30 2009
@@ -164,28 +164,6 @@
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
 
-    <simple-method method-name="createPersonTraining" short-description="Create Person Training">
-        <make-value entity-name="PersonTraining" value-field="newEntity"/>
-        <set-pk-fields value-field="newEntity" map="parameters"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <if-empty field="newEntity.fromDate">
-            <now-timestamp field="nowTimeStamp"/>
-            <set field="newEntity.fromDate" from-field="nowTimeStamp"/>
-        </if-empty>
-        <create-value value-field="newEntity"/>
-    </simple-method>
-
-    <simple-method method-name="updatePersonTraining" short-description="Update a Person Training">
-        <entity-one entity-name="PersonTraining" value-field="lookedUpValue"/>
-        <set-nonpk-fields value-field="lookedUpValue" map="parameters"/>
-        <store-value value-field="lookedUpValue"/>
-    </simple-method>
-
-    <simple-method method-name="deletePersonTraining" short-description="Delete a Person Training">
-        <entity-one entity-name="PersonTraining" value-field="lookedUpValue"/>
-        <remove-value value-field="lookedUpValue"/>
-    </simple-method>
-
     <!-- Employment Group -->
     <simple-method method-name="createEmployment" short-description="Create Employment">
         <make-value entity-name="Employment" value-field="newEntity"/>
@@ -816,4 +794,57 @@
         <set-nonpk-fields value-field="lookedUpValue" map="parameters"/>
         <store-value value-field="lookedUpValue"/>
     </simple-method>
+    
+    <simple-method method-name="updateTrainingStatus" short-description="Update Training Status">
+        <entity-one entity-name="PersonTraining" value-field="lookedUpValue"/>
+        <set-nonpk-fields value-field="lookedUpValue" map="parameters"/>
+        <store-value value-field="lookedUpValue"/>
+    </simple-method>
+    
+    <simple-method method-name="applyTraining" short-description="Apply Training">
+        <make-value entity-name="TrainingRequest" value-field="trainingRequest"/>
+        <make-next-seq-id value-field="trainingRequest" seq-field-name="trainingRequestId"/>
+        <create-value value-field="trainingRequest"/>
+        <make-value entity-name="PersonTraining" value-field="personTraining"/>
+        <set-pk-fields map="parameters" value-field="personTraining"/>
+        <set-nonpk-fields map="parameters" value-field="personTraining"/>
+        <set from-field="trainingRequest.trainingRequestId" field="personTraining.trainingRequestId"/>
+        <set field="personTraining.fromDate" from-field="parameters.fromDate"/>
+        <set field="personTraining.thruDate" from-field="parameters.thruDate"/>
+        <set field="personTraining.trainingClassTypeId" from-field="parameters.workEffortName"/>
+        <create-value value-field="personTraining"/>
+        <check-errors/>
+    </simple-method>
+    <simple-method method-name="assignTraining" short-description="Assign Training">
+        <make-value entity-name="TrainingRequest" value-field="trainingRequest"/>
+        <make-next-seq-id value-field="trainingRequest" seq-field-name="trainingRequestId"/>
+        <create-value value-field="trainingRequest"/>
+        <make-value entity-name="PersonTraining" value-field="personTraining"/>
+        <set-pk-fields map="parameters" value-field="personTraining"/>
+        <set-nonpk-fields map="parameters" value-field="personTraining"/>
+        <set from-field="trainingRequest.trainingRequestId" field="personTraining.trainingRequestId"/>
+        <set field="personTraining.fromDate" from-field="parameters.fromDate"/>
+        <set field="personTraining.thruDate" from-field="parameters.thruDate"/>
+        <create-value value-field="personTraining"/>
+        <check-errors/>
+    </simple-method>
+    
+    <simple-method method-name="createTrainingTypes" short-description="Create Training Types">
+        <make-value entity-name="TrainingClassType" value-field="newEntity"/>
+        <set-pk-fields value-field="newEntity" map="parameters"/>
+        <set-nonpk-fields map="parameters" value-field="newEntity"/>
+        <create-value value-field="newEntity"/>
+    </simple-method>
+    
+    <simple-method method-name="updateTrainingTypes" short-description="Update Training Types">
+        <entity-one entity-name="TrainingClassType" value-field="lookedUpValue"/>
+        <set-nonpk-fields value-field="lookedUpValue" map="parameters"/>
+        <store-value value-field="lookedUpValue"/>
+    </simple-method>
+    
+    <simple-method method-name="deleteTrainingTypes" short-description="Delete Training Types">
+        <entity-one entity-name="TrainingClassType" value-field="lookedUpValue"/>
+        <remove-value value-field="lookedUpValue"/>
+    </simple-method>
+    
 </simple-methods>

Modified: ofbiz/trunk/applications/humanres/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/servicedef/services.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/humanres/servicedef/services.xml Sat Aug  8 07:20:30 2009
@@ -167,31 +167,7 @@
         <permission-service service-name="humanResManagerPermission" main-action="DELETE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
-
-    <service name="createPersonTraining" engine="simple" default-entity-name="PersonTraining"
-             location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="createPersonTraining" auth="true">
-        <description>Create Training for a party</description>
-        <permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
-        <auto-attributes mode="IN" include="pk" optional="false"/>
-        <auto-attributes mode="IN" include="nonpk" optional="true"/>
-        <override type="Timestamp" mode="IN" name="fromDate" optional="true"/>
-    </service>
-
-    <service name="updatePersonTraining" engine="simple" default-entity-name="PersonTraining"
-             location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="updatePersonTraining" auth="true">
-        <description>Update a Person Training</description>
-        <permission-service service-name="humanResManagerPermission" main-action="UPDATE"/>
-        <auto-attributes mode="IN" include="pk" optional="false"/>
-        <auto-attributes mode="IN" include="nonpk" optional="true"/>
-    </service>
-
-    <service name="deletePersonTraining" engine="simple" default-entity-name="PersonTraining"
-             location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="deletePersonTraining" auth="true">
-        <description>Delete a Person Training</description>
-        <permission-service service-name="humanResManagerPermission" main-action="DELETE"/>
-        <auto-attributes mode="IN" include="pk" optional="false"/>
-    </service>
-
+    
     <!-- Employment Group -->
     <service name="createEmployment" engine="simple" default-entity-name="Employment"
              location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="createEmployment" auth="true">
@@ -846,5 +822,57 @@
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
     </service>
+    
+    <service name="updateTrainingStatus" engine="simple" default-entity-name="PersonTraining"
+             location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="updateTrainingStatus" auth="true">
+        <description>Update Training Status</description>
+        <auto-attributes mode="IN" include="pk" optional="false"/>
+        <auto-attributes mode="IN" include="nonpk" optional="true"/>
+        <override name="reason" optional="false"/>
+    </service>
+    
+    <service name="applyTraining" engine="simple" default-entity-name="PersonTraining"
+             location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="applyTraining" auth="true">
+        <description>Create Training Request</description>
+        <auto-attributes mode="IN" include="pk" optional="false"/>
+        <auto-attributes mode="IN" include="nonpk" optional="true"/>
+        <override name="approverId" optional="false"/>
+        <override name="trainingClassTypeId" optional="true"/>
+        <override name="fromDate" optional="true"/>
+        <override name="workEffortId" optional="false"/>
+    </service>
+    <service name="assignTraining" engine="simple" default-entity-name="PersonTraining"
+             location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="assignTraining" auth="true">
+        <description>Create Training Request</description>
+        <auto-attributes mode="IN" include="pk" optional="false"/>
+        <auto-attributes mode="IN" include="nonpk" optional="true"/>
+        <override name="approverId" optional="false"/>
+        <override name="trainingClassTypeId" optional="true"/>
+    </service>
+    
+    <service name="createTrainingTypes" engine="simple" default-entity-name="TrainingClassType"
+             location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="createTrainingTypes" auth="true">
+        <description>Create a New Training type</description>
+        <permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
+        <attribute name="trainingClassTypeId" mode="IN" type="String" optional="false"/>
+        <attribute name="parentTypeId" mode="IN" type="String" optional="true"/>
+        <attribute name="description" mode="IN" type="String" optional="false"/>    
+    </service>
+    
+    <service name="updateTrainingTypes" engine="simple" default-entity-name="TrainingClassType"
+             location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="updateTrainingTypes" auth="true">
+        <description>Update a Training Type</description>
+        <permission-service service-name="humanResManagerPermission" main-action="UPDATE"/>
+        <auto-attributes mode="IN" include="pk" optional="false"/>
+        <auto-attributes mode="IN" include="nonpk" optional="true"/>
+        <override name="description" optional="false"/>
+    </service>
+    
+    <service name="deleteTrainingTypes" engine="simple" default-entity-name="TrainingClassType"
+             location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="deleteTrainingTypes" auth="true">
+        <description>Delete a Training Type</description>
+        <permission-service service-name="humanResManagerPermission" main-action="DELETE"/>
+        <auto-attributes mode="IN" include="pk" optional="false"/>
+    </service>
 
 </services>

Modified: ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml Sat Aug  8 07:20:30 2009
@@ -620,29 +620,6 @@
         <response name="success" type="view" value="EditEmployeeQuals"/>
         <response name="error" type="view" value="EditEmployeeQuals"/>
     </request-map>
-    <request-map uri="EditEmployeeTrainings">
-        <security https="true" auth="true"/>
-        <response name="success" type="view" value="EditEmployeeTrainings"/>
-    </request-map>
-    <request-map uri="createEmployeeTraining">
-        <security https="true" auth="true"/>
-        <event type="service" invoke="createPersonTraining"/>
-        <response name="success" type="view" value="EditEmployeeTrainings"/>
-        <response name="error" type="view" value="EditEmployeeTrainings"/>
-    </request-map>
-    <request-map uri="updateEmployeeTraining">
-        <security https="true" auth="true"/>
-        <event type="service" invoke="updatePersonTraining"/>
-        <response name="success" type="view" value="EditEmployeeTrainings"/>
-        <response name="error" type="view" value="EditEmployeeTrainings"/>
-    </request-map>
-    <request-map uri="deleteEmployeeTraining">
-        <security https="true" auth="true"/>
-        <event type="service" invoke="deletePersonTraining"/>
-        <response name="success" type="view" value="EditEmployeeTrainings"/>
-        <response name="error" type="view" value="EditEmployeeTrainings"/>
-    </request-map>
-
     <request-map uri="EditEmployeeResumes">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditEmployeeResumes"/>
@@ -696,26 +673,6 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EmplPositionView"/>
     </request-map>
-    <request-map uri="FindPersonTrainings">
-        <security https="true" auth="true"/>
-        <response  name="success" type="view" value="FindPersonTrainings"/>
-    </request-map>
-    <request-map uri="NewPersonTraining">
-        <security https="true" auth="true"/>
-        <response name="success" type="view" value="NewPersonTraining"/>
-    </request-map>
-    <request-map uri="createPersonTraining">
-        <security https="true" auth="true"/>
-        <event type="service" invoke="createPersonTraining"/>
-        <response name="success" type="view" value="FindPersonTrainings"/>
-        <response name="error" type="view" value="NewPersonTraining"/>
-    </request-map>
-    <request-map uri="updatePersonTrainings">
-        <security https="true" auth="true"/>
-        <event type="service-multi" invoke="updatePersonTraining"/>
-        <response name="success" type="view" value="FindPersonTrainings"/>
-        <response name="error" type="view" value="FindPersonTrainings"/>
-    </request-map>
     <request-map uri="globalHRSettings">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditSkillTypes"/>
@@ -804,11 +761,6 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditPersonTrainings"/>
     </request-map>
-    <request-map uri="EditPersonTrainingsExt">
-        <security https="true" auth="true"/>
-        <response name="success" type="view" value="EditPersonTrainings"/>
-        <response name="error"  type="view" value="EditPersonTrainings"/>
-    </request-map>
     <request-map uri="EditPartyResumes">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditPartyResumes"/>
@@ -849,18 +801,6 @@
         <response name="success" type="view" value="EditPartyQuals"/>
         <response name="error" type="view" value="EditPartyQuals"/>
     </request-map>
-    <request-map uri="createPersonTrainingExt">
-        <security https="true" auth="true"/>
-        <event type="service" invoke="createPersonTraining"/>
-        <response name="success" type="view" value="EditPersonTrainings"/>
-        <response name="error" type="view" value="EditPersonTrainings"/>
-    </request-map>
-    <request-map uri="updatePersonTrainingsExt">
-        <security https="true" auth="true"/>
-        <event type="service-multi" invoke="updatePersonTraining"/>
-        <response name="success" type="view" value="EditPersonTrainings"/>
-        <response name="error" type="view" value="EditPersonTrainings"/>
-    </request-map>
     <request-map uri="createEmploymentAppExt">
         <security https="true" auth="true"/>
         <event type="service" invoke="createEmploymentApp"/>
@@ -998,7 +938,87 @@
         <event type="service" invoke="deleteJobInterviewType"/>
         <response name="success" type="request" value="EditJobInterviewType"/>
     </request-map>
-
+    <!--====================Trainings Requests===================================-->
+    <request-map uri="TrainingCalendar">
+        <security auth="true" https="true"/>
+        <response name="success" type="view" value="TrainingCalendar"/>
+    </request-map>
+    <request-map uri="createTrainingCalendar">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createWorkEffortAndPartyAssign"/>
+        <response name="success" type="view" value="TrainingCalendar"/>
+        <response name="error" type="view" value="TrainingCalendar"/>
+    </request-map>
+    <request-map uri="updateTrainingCalendar">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateWorkEffort"/>
+        <response name="success" type="view-home" value="TrainingCalendar"/>
+        <response name="error" type="view" value="TrainingCalendar"/>
+    </request-map>
+    <request-map uri="EditWorkEffort">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="TrainingCalendar"/>
+    </request-map>
+    <request-map uri="FindTrainings">
+        <security auth="true" https="true"/>
+        <response name="success" type="view" value="FindTrainings"/>
+    </request-map>
+    <request-map uri="createTrainingTypes">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createTrainingTypes"/>
+        <response name="success" type="view" value="EditTrainingTypes"/>
+        <response name="error" type="view" value="EditTrainingTypes"/>
+    </request-map>
+    <request-map uri="EditTrainingTypes">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditTrainingTypes"/>
+    </request-map>
+    <request-map uri="updateTrainingTypes">
+        <security https="true" auth="true"/>
+        <event type="service-multi" invoke="updateTrainingTypes"/>
+        <response name="success" type="view" value="EditTrainingTypes"/>
+        <response name="error" type="view" value="EditTrainingTypes"/>
+    </request-map>
+    <request-map uri="deleteTrainingTypes">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteTrainingTypes"/>
+        <response name="success" type="view" value="EditTrainingTypes"/>
+        <response name="error" type="view" value="EditTrainingTypes"/>
+    </request-map>
+    <request-map uri="FindTrainingStatus">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="FindTrainingStatus"/>
+    </request-map>
+    <request-map uri="updateTrainingStatus">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateTrainingStatus"/>
+        <response name="success" type="view" value="EditTrainingApprovals"/>
+        <response name="error" type="view" value="EditTrainingApprovals"/>
+    </request-map>
+    <request-map uri="FindTrainingApprovals">
+        <security auth="true" https="true"/>
+        <response name="success" type="view" value="FindTrainingApprovals"/>
+    </request-map>
+    <request-map uri="EditTrainingApprovals">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditTrainingApprovals"/>
+    </request-map>
+    <request-map uri="applyTraining">
+        <security auth="true" https="true"/>
+        <event type="service" invoke="applyTraining"/>
+        <response name="success" type="view" value="FindTrainingStatus"/>
+        <response name="error" type="view" value="TrainingCalendar"/>
+    </request-map>
+    <request-map uri="assignTraining">
+        <security auth="true" https="true"/>
+        <event type="service" invoke="assignTraining"/>
+        <response name="success" type="view" value="FindTrainingApprovals"/>
+        <response name="error" type="view" value="TrainingCalendar"/>
+    </request-map>
+    <request-map uri="LookupTraining">
+        <security auth="true" https="true"/>
+        <response name="success" type="view" value="LookupTraining"/>
+    </request-map>
     <!-- ===================Lookup Request===================== -->
     <request-map uri="LookupPartyName"><security auth="true" https="true"/><response name="success" type="view" value="LookupPartyName"/></request-map>
     <request-map uri="LookupPayment"><security auth="true" https="true"/><response name="success" type="view" value="LookupPayment"/></request-map>
@@ -1051,7 +1071,6 @@
     <view-map name="EmployeeProfile" type="screen" page="component://humanres/widget/EmployeeScreens.xml#EmployeeProfile"/>
     <view-map name="EditEmployeeSkills" type="screen" page="component://humanres/widget/EmployeeScreens.xml#EditEmployeeSkills"/>
     <view-map name="EditEmployeeQuals" type="screen" page="component://humanres/widget/EmployeeScreens.xml#EditEmployeeQuals"/>
-    <view-map name="EditEmployeeTrainings" type="screen" page="component://humanres/widget/EmployeeScreens.xml#EditEmployeeTrainings"/>
     <view-map name="EditEmployeeEmploymentApps" type="screen" page="component://humanres/widget/EmployeeScreens.xml#EditEmployeeEmploymentApps"/>
     <view-map name="EditEmployeeResumes" type="screen" page="component://humanres/widget/EmployeeScreens.xml#EditEmployeeResumes"/>
     <view-map name="EditEmployeePerformanceNotes" type="screen" page="component://humanres/widget/EmployeeScreens.xml#EditEmployeePerformanceNotes"/>
@@ -1075,10 +1094,6 @@
     <view-map name="NewPartyQual" type="screen" page="component://humanres/widget/PartyQualScreens.xml#NewPartyQual"/>
     <view-map name="EditPartyQuals" type="screen" page="component://humanres/widget/PartyQualScreens.xml#EditPartyQuals"/>
 
-    <view-map name="FindPersonTrainings" type="screen" page="component://humanres/widget/PersonTrainingScreens.xml#FindPersonTrainings"/>
-    <view-map name="NewPersonTraining" type="screen" page="component://humanres/widget/PersonTrainingScreens.xml#NewPersonTraining"/>
-    <view-map name="EditPersonTrainings" type="screen" page="component://humanres/widget/PersonTrainingScreens.xml#EditPersonTrainings"/>
-
     <view-map name="FindEmploymentApps" type="screen" page="component://humanres/widget/EmploymentAppScreens.xml#FindEmploymentApps"/>
     <view-map name="NewEmploymentApp" type="screen" page="component://humanres/widget/EmploymentAppScreens.xml#NewEmploymentApp"/>
 
@@ -1100,7 +1115,8 @@
     <view-map name="EditResponsibilityTypes" type="screen" page="component://humanres/widget/GlobalHRSettingScreens.xml#EditResponsibilityTypes"/>
     <view-map name="EditTerminationTypes" type="screen" page="component://humanres/widget/GlobalHRSettingScreens.xml#EditTerminationTypes"/>
     <view-map name="EditTerminationReasons" type="screen" page="component://humanres/widget/GlobalHRSettingScreens.xml#EditTerminationReasons"/>
-
+    <view-map name="EditTrainingTypes" type="screen" page="component://humanres/widget/GlobalHRSettingScreens.xml#EditTrainingTypes"/>
+    
     <view-map name="EditPartyResumes" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#EditPartyResumes"/>
     <view-map name="EditEmploymentApps" type="screen" page="component://humanres/widget/EmploymentAppScreens.xml#EditEmploymentApps"/>
 
@@ -1120,4 +1136,12 @@
     <view-map name="EditApprovalStatus" type="screen" page="component://humanres/widget/RecruitmentScreens.xml#EditApprovalStatus"/>    
     <view-map name="FindRelocation" type="screen" page="component://humanres/widget/RecruitmentScreens.xml#FindRelocation"/>
     <view-map name="EditJobInterviewType" type="screen" page="component://humanres/widget/GlobalHRSettingScreens.xml#EditJobInterviewType"/>
+    
+    <!-- ==================Trainings View Map===================== -->
+    <view-map name="TrainingCalendar" type="screen" page="component://humanres/widget/PersonTrainingScreens.xml#TrainingCalendarWithDecorator"/>
+    <view-map name="FindTrainings" type="screen" page="component://humanres/widget/PersonTrainingScreens.xml#FindTrainings"/>
+    <view-map name="FindTrainingStatus" type="screen" page="component://humanres/widget/PersonTrainingScreens.xml#FindTrainingStatus"/>
+    <view-map name="FindTrainingApprovals" type="screen" page="component://humanres/widget/PersonTrainingScreens.xml#FindTrainingApprovals"/>
+    <view-map name="EditTrainingApprovals" type="screen" page="component://humanres/widget/PersonTrainingScreens.xml#EditTrainingApprovals"/>
+    <view-map name="LookupTraining" type="screen" page="component://humanres/widget/LookupScreens.xml#LookupTraining"/>
 </site-conf>

Modified: ofbiz/trunk/applications/humanres/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/CommonScreens.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/CommonScreens.xml Sat Aug  8 07:20:30 2009
@@ -35,6 +35,7 @@
                 <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set,
                      then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. -->
                 <!--<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.gif" global="true"/>-->
+                <property-map resource="HumanResHelpUrls" map-name="helpUrlsMap" global="true"/>
                 <set field="activeApp" value="humanres" global="true"/>
                 <set field="layoutSettings.javaScripts[]" value="/partymgr/static/partymgr.js" global="true"/>
                 <set field="layoutSettings.styleSheets[]" value="/partymgr/static/partymgr.css" global="true"/>
@@ -382,4 +383,27 @@
             </widgets>
         </section>
     </screen>
+    <screen name="CommonTrainingDecorator">
+        <section>
+            <actions>
+                <property-map resource="WebPosUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="ManufacturingUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="headerItem" value="Training"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <widgets>
+                                <container>
+                                    <include-menu name="TrainingTypeMenu" location="component://humanres/widget/Menus.xml"/>
+                                </container>
+                            </widgets>
+                        </section>
+                        <decorator-section-include name="body"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/humanres/widget/GlobalHRSettingScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/GlobalHRSettingScreens.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/GlobalHRSettingScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/GlobalHRSettingScreens.xml Sat Aug  8 07:20:30 2009
@@ -208,4 +208,22 @@
             </widgets>            
         </section>
     </screen>
+    <screen name="EditTrainingTypes">
+        <section>                        
+            <actions>
+                <set field="tabButtonItem" value="EditTrainingTypes"/>
+                <set field="titleProperty" value="PageTitleEditTrainingTypes"/>
+            </actions>            
+            <widgets>
+                <decorator-screen name="GlobalHRSettingsDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">                                                                                      
+                        <screenlet id="AddTrainingTypePanel" title="${uiLabelMap.CommonAdd} ${uiLabelMap.HumanResTrainingTypes}" collapsible="true">
+                            <include-form name="AddTrainingTypes" location="component://humanres/widget/forms/GlobalHRSettingForms.xml"/>
+                        </screenlet>
+                            <include-form name="ListTrainingTypes" location="component://humanres/widget/forms/GlobalHRSettingForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>            
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/humanres/widget/LookupScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/LookupScreens.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/LookupScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/LookupScreens.xml Sat Aug  8 07:20:30 2009
@@ -290,4 +290,22 @@
             </widgets>
         </section>
     </screen>
+    <screen name="LookupTraining">
+        <section>
+            <actions>
+                 <property-map resource="HumanResUiLabels" map-name="uiLabelMap" global="true"/>
+                 <set field="title" value="${uiLabelMap.LookupTraining}"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
+                    <decorator-section name="search-options">
+                        <include-form name="LookupTraining" location="component://humanres/widget/forms/LookupForms.xml"/>
+                    </decorator-section>
+                    <decorator-section name="search-results">
+                        <include-form name="ListLookupTraining" location="component://humanres/widget/forms/LookupForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/humanres/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/Menus.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/Menus.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/Menus.xml Sat Aug  8 07:20:30 2009
@@ -28,7 +28,7 @@
         <menu-item name="EmplSkills" title="${uiLabelMap.HumanResSkills}"><link target="FindPartySkills"/></menu-item>
         <menu-item name="PartyQual" title="${uiLabelMap.HumanResPartyQualification}"><link target="FindPartyQuals"/></menu-item>
         <menu-item name="Recruitment" title="${uiLabelMap.HumanResRecruitment}"><link target="FindJobRequisitions"/></menu-item>        
-        <menu-item name="Training" title="${uiLabelMap.HumanResTraining}"><link target="FindPersonTrainings"/></menu-item>
+        <menu-item name="Training" title="${uiLabelMap.HumanResTraining}"><link target="TrainingCalendar"/></menu-item>
         <menu-item name="EmploymentApp" title="${uiLabelMap.HumanResEmploymentApp}"><link target="FindEmploymentApps"/></menu-item>
         <menu-item name="PartyResume" title="${uiLabelMap.HumanResPartyResume}"><link target="FindPartyResumes"/></menu-item>
         <menu-item name="Leave" title="${uiLabelMap.HumanResEmplLeave}"><link target="FindEmplLeaves"/></menu-item>
@@ -169,6 +169,9 @@
         <menu-item name="JobInterviewType" title="${uiLabelMap.HumanResJobInterviewType}">
             <link target="EditJobInterviewType"/>
         </menu-item>
+        <menu-item name="EditTrainingTypes" title="${uiLabelMap.HumanResTrainingClassType}">
+            <link target="EditTrainingTypes"/>
+        </menu-item>
     </menu>
 
     <menu name="EmployeeProfileTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
@@ -198,8 +201,8 @@
                 <parameter param-name="partyId"/>
             </link>
         </menu-item>
-        <menu-item name="EditEmployeeTrainings" title="${uiLabelMap.HumanResTraining}">
-            <link target="EditEmployeeTrainings">
+        <menu-item name="EditTrainingCalendar" title="${uiLabelMap.HumanResTraining}">
+            <link target="TrainingCalendar">
                 <parameter param-name="partyId"/>
             </link>
         </menu-item>
@@ -272,4 +275,18 @@
         </menu-item>
     </menu>
     
+    <menu name="TrainingTypeMenu" type="simple" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" default-menu-item-name="FindTrainings">
+        <menu-item name="TrainingCalendar" title="${uiLabelMap.HumanResTraining} ${uiLabelMap.WorkEffortCalendar}">
+            <link target="TrainingCalendar"/>
+        </menu-item>
+        <menu-item name="FindTrainingStatus" title="${uiLabelMap.HumanResTrainingStatus}">
+            <condition><not><if-has-permission permission="HUMANRES" action="_ADMIN"/></not></condition><!-- TODO: is not possible need to create a permission for this.-->
+            <link target="FindTrainingStatus"/>
+        </menu-item>
+        <menu-item name="FindTrainingApprovals" title="${uiLabelMap.HumanResTrainingApprovals}">
+            <condition><if-has-permission permission="HUMANRES" action="_ADMIN"/></condition>
+            <link target="FindTrainingApprovals"/>
+        </menu-item>
+    </menu>
+    
 </menus>

Modified: ofbiz/trunk/applications/humanres/widget/PersonTrainingScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/PersonTrainingScreens.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/PersonTrainingScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/PersonTrainingScreens.xml Sat Aug  8 07:20:30 2009
@@ -20,84 +20,248 @@
 
 <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
-    <screen name="FindPersonTrainings">
+    <screen name="TrainingCalendar">
         <section>
             <actions>
-                <set field="titleProperty" value="HumanResFindPersonTraining"/>
-                <set field="headerItem" value="Training"/>
-                <set field="partyId" from-field="parameters.partyId"/>
-                <set field="personTrainingsCtx" from-field="parameters"/>
+                <set field="titleProperty" value="PageTitleFindTrainingCalendar"/>
+                <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
+                <set field="parameters.period" from-field="parameters.period" default-value="${initialView}"/>
             </actions>
             <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                        <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
-                           <decorator-section name="menu-bar">
-                               <section>
-                                   <widgets>
-                                       <container style="button-bar">
-                                           <link target="NewPersonTraining" text="${uiLabelMap.HumanResNewPersonTraining}" style="buttontext"/>
-                                       </container>
-                                   </widgets>
-                               </section>
-                           </decorator-section>
-                           <decorator-section name="search-options">
-                               <include-form name="FindPersonTrainings" location="component://humanres/widget/forms/PersonTrainingForms.xml"></include-form>
-                           </decorator-section>
-                           <decorator-section name="search-results">
-                               <include-form name="ListPersonTrainings" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
-                           </decorator-section>
-                       </decorator-screen>
-                    </decorator-section>
-                </decorator-screen>
+                <section>
+                    <condition>
+                        <if-compare field="parameters.period" operator="equals" value="day"/>
+                    </condition>
+                    <actions>
+                        <set field="titleProperty" value="PageTitleCalendarDay"/>
+                        <set field="tabButtonItem" value="day"/>
+                        <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy"/>
+                    </actions>
+                    <widgets>
+                        <screenlet title="${uiLabelMap.WorkEffortDayView}: ${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, &quot;EEEE MMMM d, yyyy&quot;, timeZone, locale)}" navigation-menu-name="Day">
+                            <include-menu name="Day" location="component://workeffort/widget/WorkEffortMenus.xml"/>
+                            <include-screen name="trainingCalendarDetail"/>
+                            <platform-specific>
+                                <html><html-template location="component://workeffort/webapp/workeffort/calendar/day.ftl"/></html>
+                            </platform-specific>
+                        </screenlet>
+                    </widgets>
+                </section>
+                <section>
+                    <condition>
+                        <or>
+                            <if-compare field="parameters.period" operator="equals" value="week"/>
+                            <if-empty field="parameters.period"/>
+                        </or>
+                    </condition>
+                    <actions>
+                        <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy"/>
+                    </actions>
+                    <widgets>
+                        <screenlet title="${uiLabelMap.WorkEffortWeekView}: ${uiLabelMap.CommonWeek} ${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, &quot;w&quot;, timeZone, locale)}" navigation-menu-name="Week">
+                            <include-menu name="Week" location="component://workeffort/widget/WorkEffortMenus.xml"/>
+                            <include-screen name="trainingCalendarDetail"/>
+                            <platform-specific>
+                                <html><html-template location="component://workeffort/webapp/workeffort/calendar/week.ftl"/></html>
+                            </platform-specific>
+                        </screenlet>
+                    </widgets>
+                </section>
+                <section>
+                    <condition>
+                        <if-compare field="parameters.period" operator="equals" value="month"/>
+                    </condition>
+                    <actions>
+                        <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy"/>
+                    </actions>
+                    <widgets>
+                        <screenlet title="${uiLabelMap.WorkEffortMonthView}: ${bsh:org.ofbiz.base.util.UtilDateTime.timeStampToString(start, &quot;MMMM yyyy&quot;, timeZone, locale)}" navigation-menu-name="Month">
+                            <include-menu name="Month" location="component://workeffort/widget/WorkEffortMenus.xml"/>
+                            <include-screen name="trainingCalendarDetail"/>
+                            <platform-specific>
+                                <html><html-template location="component://workeffort/webapp/workeffort/calendar/month.ftl"/></html>
+                            </platform-specific>
+                        </screenlet>
+                    </widgets>
+                </section>
+                <section>
+                    <condition>
+                        <if-compare field="parameters.period" operator="equals" value="upcoming"/>
+                    </condition>
+                    <actions>
+                        <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/Upcoming.groovy"/>
+                    </actions>
+                    <widgets>
+                        <screenlet title="${uiLabelMap.WorkEffortCalendarUpComingEventsView}" navigation-menu-name="Upcoming">
+                            <include-menu name="Upcoming" location="component://workeffort/widget/WorkEffortMenus.xml"/>
+                            <platform-specific>
+                                <html><html-template location="component://workeffort/webapp/workeffort/calendar/upcoming.ftl"/></html>
+                            </platform-specific>
+                        </screenlet>
+                    </widgets>
+                </section>
             </widgets>
         </section>
     </screen>
-    <screen name="EditPersonTrainings">
+    <screen name="TrainingCalendarWithDecorator">
         <section>
             <actions>
-                <set field="titleProperty" value="PageTitleViewPersonTraining"/>
-                <set field="headerItem" value="Employee"/>
-                <set field="tabButtonItem" value="EditPersonTrainings"/>
-                <set field="partyId" from-field="parameters.partyId"/>
-                <set field="trainingClassTypeId" from-field="parameters.trainingClassTypeId"/>
-                <set field="personTrainingsCtx.partyId" from-field="parameters.partyId"/>
-                <set field="parameters.insideEmployee" value="true"/>
+                <set field="tabButtonItem" value="TrainingCalendar"/>
+                <set field="titleProperty" value="PageTitleFindTrainingCalendar"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-screen name="CommonTrainingDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <include-form name="ListPersonTrainings" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
-                        <screenlet id="AddPersonTrainingPanel" title="${uiLabelMap.HumanResAddPersonTraining}" collapsible="true">
-                            <include-form name="AddPersonTraining" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
-                        </screenlet>
+                        <include-screen name="TrainingCalendar"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
-    <screen name="NewPersonTraining">
+    <screen name="trainingCalendarDetail">
         <section>
             <actions>
-                <set field="titleProperty" value="HumanResAddPersonTraining"/>
-                <set field="headerItem" value="Training"/>
-                <set field="partyId" from-field="parameters.partyId"/>
-                <entity-one entity-name="Party" value-field="party"/>
-                <set field="trainingClassTypeId" from-field="parameters.trainingClassTypeId"/>
+                <entity-one entity-name="WorkEffort" value-field="workEffort"/>
+                <script location="component://workeffort/script/isCalOwner.groovy"/>
+                <set field="workEffortId" from-field="parameters.workEffortId"/>
+                <set field="trainingClassTypeId" from-field="workEffort.workEffortName"/>
+                <set field="workEffortTypeId" from-field="workEffort.workEffortTypeId"/>
+                <set field="fromDate" from-field="workEffort.estimatedStartDate"/>
+                <set field="thruDate" from-field="workEffort.estimatedCompletionDate"/>
+                <set field="loginPartyId" from-field="parameters.userLogin.partyId"/>
+                <set field="approvalStatus" from-field="workEffort.status"/>
             </actions>
             <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                <section>
+                    <condition>
+                        <and>
+                            <or>
+                                <and>
+                                    <not><if-empty field="workEffort"/></not>
+                                    <if-compare field="workEffort.currentStatusId" operator="not-equals" value="CAL_CANCELLED"/>
+                                </and>
+                                <if-empty field="workEffort"/>
+                                <if-has-permission permission="WORKEFFORTMGR" action="ADMIN"/>
+                            </or>
+                            <if-compare field="parameters.form" operator="equals" value="edit"/>
+                        </and>
+                    </condition>
+                    <widgets>
+                        <section>
+                            <condition>
+                                <or>
+                                    <if-compare field="isCalOwner" operator="equals" value="true" type="Boolean"/>
+                                    <if-empty field="workEffort"/>
+                                </or>
+                            </condition>
+                            <widgets><!-- edit section -->
+                                <container style="lefthalf">
+                                    <label style="h1" text="Add/Edit a Calendar Event"/>
+                                    <include-form name="editTrainingCalendar" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
+                                </container>
+                                <container style="righthalf">
+                                    <label style="h1" text="Participants"/>
+                                    <include-form name="ListTrainingParticipants" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
+                                    <section>
+                                        <condition>
+                                            <and>
+                                                <not><if-empty field="workEffort"/></not>
+                                                <if-compare field="workEffortTypeId" operator="not-equals" value="WES_PUBLIC"/>
+                                            </and>
+                                        </condition>
+                                        <widgets>
+                                            <container>
+                                                <label/>
+                                                <include-form name="AssignTraining" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
+                                            </container>
+                                        </widgets>
+                                    </section>
+                                </container>
+                            </widgets>
+                            <fail-widgets><!-- view section -->
+                                <container style="lefthalf">
+                                    <label style="h1" text="Calendar Event Summary"/>
+                                    <include-form name="showTrainingCalendar" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
+                                </container>
+                            </fail-widgets>
+                        </section>                
+                    </widgets>            
+                </section>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="FindTrainingApprovals">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="FindTrainingApprovals"/>
+                <set field="titleProperty" value="PageTitleFindTrainingApprovals"/>
+                <service service-name="humanResManagerPermission" result-map="permResult">
+                    <field-map field-name="mainAction" value="ADMIN"/>
+                </service>
+                <set field="hasAdminPermission" from-field="permResult.hasPermission"/>
+                <set field="loginPartyId" from-field="parameters.userLogin.partyId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonTrainingDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.HumanResNewPersonTraining}">
-                            <section>
-                                <widgets>
-                                    <include-form name="AddPersonTraining" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
-                                </widgets>
-                            </section>
-                        </screenlet>
+                        <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
+                            <decorator-section name="search-options">
+                                <include-form name="FindTrainingApprovals" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
+                            </decorator-section>
+                            <decorator-section name="search-results">
+                                <include-form name="ListTrainingApprovals" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
+                            </decorator-section>
+                        </decorator-screen>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
+    <screen name="EditTrainingApprovals">
+       <section>
+           <actions>
+               <set field="tabButtonItem" value="FindTrainingApprovals"/>
+               <set field="partyId" from-field="parameters.partyId"/>
+               <set field="trainingClassTypeId" from-field="parameters.trainingClassTypeId"/>
+               <set field="fromDate" from-field="parameters.fromDate"/>
+               <entity-one entity-name="PersonTraining" value-field="personTraining"/>
+           </actions>
+               <widgets>
+                   <decorator-screen name="CommonTrainingDecorator" location="${parameters.mainDecoratorLocation}">
+                       <decorator-section name="body">
+                           <screenlet id="EditTrainingApprovals" title="${uiLabelMap.CommonEdit} ${uiLabelMap.HumanResTrainingApproval}" collapsible="true">
+                               <include-form name="EditTrainingApprovals" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
+                           </screenlet>
+                       </decorator-section>
+                   </decorator-screen>
+               </widgets>
+       </section>
+     </screen>
+     <screen name="FindTrainingStatus">
+         <section>
+             <actions>
+                 <set field="tabButtonItem" value="FindTrainingStatus"/>
+                 <set field="titleProperty" value="PageTitleFindTrainingStatus"/>
+                 <service service-name="humanResManagerPermission" result-map="permResult">
+                     <field-map field-name="mainAction" value="ADMIN"/>
+                 </service>
+                 <set field="hasAdminPermission" from-field="permResult.hasPermission"/>
+                 <set field="loginPartyId" from-field="parameters.userLogin.partyId"/>
+             </actions>
+                 <widgets>
+                     <decorator-screen name="CommonTrainingDecorator" location="${parameters.mainDecoratorLocation}">
+                         <decorator-section name="body">
+                     <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
+                         <decorator-section name="search-options">
+                             <include-form name="FindTrainingStatus" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
+                         </decorator-section>
+                         <decorator-section name="search-results">
+                             <include-form name="ListTrainingStatus" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
+                         </decorator-section>
+                     </decorator-screen>
+                        </decorator-section>
+                     </decorator-screen>
+                 </widgets>
+         </section>
+     </screen>
 </screens>
\ No newline at end of file

Modified: ofbiz/trunk/applications/humanres/widget/forms/GlobalHRSettingForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/forms/GlobalHRSettingForms.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/forms/GlobalHRSettingForms.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/forms/GlobalHRSettingForms.xml Sat Aug  8 07:20:30 2009
@@ -230,4 +230,26 @@
         <field name="description" title="${uiLabelMap.CommonDescription}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
         <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="buttontext"><submit button-type="text-link"/></field>
     </form>
+    <form name="ListTrainingTypes" type="multi" title="" target="updateTrainingTypes" odd-row-style="alternate-row" header-row-style="header-row-2"
+        default-table-style="basic-table hover-bar">
+        <actions>
+            <entity-condition entity-name="TrainingClassType"><order-by field-name="trainingClassTypeId"/></entity-condition>
+        </actions>
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}"><display/></field>
+        <field name="parentTypeId" title="${uiLabelMap.HumanResPreRequisiteSkill}" widget-style="buttontext"><text/></field>
+        <field name="description" title="${uiLabelMap.CommonDescription}"><text/></field>
+        <field name="deleteLink" title="${uiLabelMap.CommonDelete}" widget-style="buttontext">
+           <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deleteTrainingTypes">
+                <parameter param-name="trainingClassTypeId"/>
+            </hyperlink>
+        </field>
+        <field name="_rowSubmit" title="${uiLabelMap.CommonSelect}"><hidden value="Y"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit/></field>
+    </form>            
+    <form name="AddTrainingTypes" type="single" target="createTrainingTypes" header-row-style="header-row" default-table-style="basic-table">
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
+        <field name="parentTypeId" title="${uiLabelMap.HumanResPreRequisiteSkill}"><lookup target-form-name="LookupTraining"/></field>
+        <field name="description" title="${uiLabelMap.CommonDescription}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="buttontext"><submit button-type="text-link"/></field>
+    </form>
 </forms>

Modified: ofbiz/trunk/applications/humanres/widget/forms/LookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/forms/LookupForms.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/forms/LookupForms.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/forms/LookupForms.xml Sat Aug  8 07:20:30 2009
@@ -326,4 +326,24 @@
         <field name="skillTypeId"><display/></field>
         <field name="location"><display/></field>
     </form>
+    <form name="LookupTraining" type="single" target="LookupTraining" header-row-style="header-row" default-table-style="basic-table">
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}"><text-find default-option="contains" ignore-case="true"/></field>
+        <field name="parentTypeId" title="${uiLabelMap.HumanResPreRequisiteSkill}"><text-find default-option="contains" ignore-case="true"/></field>
+        <field name="description" title="${uiLabelMap.CommonDescription}"><text-find default-option="contains" ignore-case="true"/></field>              
+        <field name="noConditionFind"><hidden value="Y"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    <form name="ListLookupTraining" type="list" list-name="listIt" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+        <actions>
+            <service service-name="performFind" result-map="result" result-map-list="listIt">
+                <field-map field-name="inputFields" from-field="parameters"/>
+                <field-map field-name="entityName" value="TrainingClassType"/>
+            </service>
+        </actions>
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}" widget-style="buttontext">
+             <hyperlink also-hidden="false" target-type="plain" description="${trainingClassTypeId}" target="javascript:set_value('${trainingClassTypeId}')"/>
+        </field>        
+        <field name="parentTypeId" title="${uiLabelMap.HumanResPreRequisiteSkill}"><display/></field>
+        <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field>
+    </form>
 </forms>

Modified: ofbiz/trunk/applications/humanres/widget/forms/PersonTrainingForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/forms/PersonTrainingForms.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/forms/PersonTrainingForms.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/forms/PersonTrainingForms.xml Sat Aug  8 07:20:30 2009
@@ -20,58 +20,172 @@
 
 <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
-    <form name="FindPersonTrainings" type="single" target="FindPersonTrainings"
-        header-row-style="header-row" default-table-style="basic-table">
+    <form name="showTrainingCalendar" type="single" target="applyTraining">
+        <field name="partyId"><hidden value="${loginPartyId}"/></field>
+        <field name="approverId" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTraining} ${uiLabelMap.CommonName}"><display/></field>
+        <field name="approvalStatus"><hidden value="TRAINING_APPLIED"/></field>
+        <field name="workEffortTypeId"><hidden/></field>
+        <field name="workEffortId"><display/></field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display type="date-time"></display></field>
+        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display type="date-time"></display></field>
+        <field name="submitButton" title="${uiLabelMap.CommonApply}"><submit button-type="button"/></field>
+    </form>
+    <form name="editTrainingCalendar" type="single" target="createTrainingCalendar" default-map-name="workEffort">
+        <alt-target use-when="workEffort!=null" target="updateTrainingCalendar"/>
+        <field name="workEffortId" use-when="workEffort!=null"><hidden/></field>
+        <field name="partyId"><hidden value="${parameters.userLogin.partyId}"/></field>
+        <field name="roleTypeId" use-when="workEffort==null"><hidden value="CAL_OWNER"/></field>
+        <field name="workEffortTypeId"><hidden value="TRAINING"/></field>
+        <field name="statusId" use-when="workEffort==null"><hidden value="PRTYASGN_ASSIGNED"/></field>
+        <field name="currentStatusId"><hidden value="CAL_TENTATIVE"/></field>
+        <field name="workEffortName" title="${uiLabelMap.HumanResTrainings} ${uiLabelMap.CommonName}">
+            <drop-down allow-empty="false">
+                <entity-options description="${description}" key-field-name="trainingClassTypeId" entity-name="TrainingClassType">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="description" title="${uiLabelMap.CommonDescription}"><text/></field>
+        <field name="scopeEnumId"><hidden value="WES_PUBLIC"/></field>
+        <field name="estimatedStartDate" title="${uiLabelMap.CommonFromDate}"><date-time input-method="time-dropdown" /></field>
+        <field name="estimatedCompletionDate" title="${uiLabelMap.CommonThruDate}"><date-time input-method="time-dropdown"/></field>
+        <field name="add" title="${uiLabelMap.CommonAdd}"><submit/></field>
+    </form>
+    <form name="AssignTraining" type="single" target="assignTraining">
+        <field name="approverId"><hidden value="${loginPartyId}"/></field>
+        <field name="fromDate"><hidden/></field>
+        <field name="thruDate"><hidden/></field>
+        <field name="trainingClassTypeId"><hidden/></field>
+        <field name="workEffortId"><hidden/></field>
+        <field name="approvalStatus"><hidden value="TRAINING_ASSIGNED"/></field>
+        <field name="partyId" position="1"><lookup target-form-name="LookupPartyName" size="10"></lookup></field>
+        <field name="roleTypeId"> <hidden value="CAL_ATTENDEE"/></field>
+        <field name="add"><submit/></field>
+    </form>
+    <form name="ListTrainingParticipants" list-name="listIt" title="" type="list" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <actions>
+            <service service-name="performFind" result-map="result" result-map-list="listIt">
+                <field-map field-name="inputFields" from-field="parameters"/>
+                <field-map field-name="entityName" value="PersonTraining"/>
+            </service>
+        </actions>
+        <auto-fields-entity entity-name="PersonTraining" default-field-type="hidden"/>
+        <field name="partyId" title="${uiLabelMap.WebPosEmployee} ${uiLabelMap.CommonId}" widget-style="buttontext">
+            <display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}">
+                <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="${partyId}" link-style="buttontext">
+                    <parameter param-name="partyId" from-field="partyId"/>
+                </sub-hyperlink>
+            </display-entity>
+        </field>
+        <field name="approvalStatus"><display/></field>
+        <field name="trainingRequestId" widget-style="buttontext"></field>
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}"><display/></field>
+    </form>
+    <form name="FindTrainingApprovals" target="FindTrainingApprovals" title="" type="single" default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox">
         <auto-fields-entity entity-name="PersonTraining" default-field-type="find"/>
-        <field name="partyId"><lookup target-form-name="LookupPartyName"/></field>
-        <field name="trainingClassTypeId">
+        <field name="partyId" title="${uiLabelMap.WebPosEmployee} ${uiLabelMap.CommonId}"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}">
             <drop-down allow-empty="true">
                 <entity-options description="${description}" key-field-name="trainingClassTypeId" entity-name="TrainingClassType">
                     <entity-order-by field-name="description"/>
                 </entity-options>
             </drop-down>
         </field>
-        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
-        <field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field>
+        <field name="approverId" use-when="!hasAdminPermission"><hidden value="${loginPartyId}"/></field>
+        <field name="reason"><text-find default-option="contains" ignore-case="true"/></field>
+        <field name="noConditionFind"><hidden value="Y"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonSearch}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-    <form name="ListPersonTrainings" type="multi" list-name="listIt" separate-columns="true" target="updatePersonTrainingsExt?partyId=${partyId}" paginate-target="FindPersonTrainings"
-        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+    <form name="ListTrainingApprovals" type="list" list-name="listIt" target="updateTrainingStatus" title="" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <actions>
             <service service-name="performFind" result-map="result" result-map-list="listIt">
-                <field-map field-name="inputFields" from-field="personTrainingsCtx"/>
+                <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="PersonTraining"/>
-                <field-map field-name="orderBy" value="fromDate"/>
             </service>
-            <set field="insideEmployee" from-field="parameters.insideEmployee"/>
         </actions>
-        <alt-target use-when="insideEmployee==null" target="updatePersonTrainings"/>
-        <auto-fields-service default-field-type="display" service-name="updatePersonTraining"/>
-        <field name="partyId" widget-style="linktext">
-            <hyperlink also-hidden="true" target="viewprofile" target-type="plain" description="${partyId}">
+        <auto-fields-entity entity-name="PersonTraining" default-field-type="display"/>
+        <field name="partyId" title="${uiLabelMap.WebPosEmployee} ${uiLabelMap.CommonId}" widget-style="buttontext">
+            <display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}">
+                <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="${partyId}" link-style="buttontext">
+                    <parameter param-name="partyId" from-field="partyId"/>
+                </sub-hyperlink>
+            </display-entity>
+        </field>
+        <field name="approverId" field-name="partyId" widget-style="buttontext">
+            <display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}">
+                <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="${approverId}" link-style="buttontext">
+                    <parameter param-name="approverId" from-field="approverId"/>
+                </sub-hyperlink>
+            </display-entity>
+        </field>
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}"></field>
+        <field name="trainingRequestId" widget-style="buttontext"></field>
+        <field name="UpdateStatus" title="${uiLabelMap.CommonUpdate}"><display description="Update"/></field>
+        <field name="UpdateStatus" title="${uiLabelMap.CommonUpdate}" widget-style="buttontext" use-when="(&quot;${approvalStatus}&quot;.equals(&quot;TRAINING_APPLIED&quot;))||(&quot;${approvalStatus}&quot;.equals(&quot;TRAINING_APPROVED&quot;))">
+            <hyperlink description="${uiLabelMap.CommonUpdate}" target="EditTrainingApprovals">
                 <parameter param-name="partyId"/>
+                <parameter param-name="trainingClassTypeId"/>
+                <parameter param-name="fromDate"/>
             </hyperlink>
         </field>
-        <field name="trainingClassTypeId"><display-entity description="${description}" entity-name="TrainingClassType"/></field>
-        <field name="thruDate"><date-time type="timestamp"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit/></field>
     </form>
-    <form name="AddPersonTraining" type="single" target="createPersonTraining" default-map-name="party"
-        header-row-style="header-row" default-table-style="basic-table">
-        <actions>
-            <set field="insideEmployee" from-field="parameters.insideEmployee"/>
-        </actions>
-        <alt-target use-when="insideEmployee != null" target="createPersonTrainingExt"/>
-        <field use-when="party!=null" name="partyId"><hidden/></field>
-        <field use-when="party==null" name="partyId" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><lookup target-form-name="LookupPartyName"/></field>
-        <field name="trainingClassTypeId" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
+    <form name="EditTrainingApprovals" type="single" target="updateTrainingStatus" default-map-name="personTraining">
+        <auto-fields-service service-name="updateTrainingStatus" default-field-type="display"/>
+        <field name="partyId" title="${uiLabelMap.WebPosEmployee} ${uiLabelMap.CommonId}"></field>
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}"></field>
+        <field name="approvalStatus">
             <drop-down allow-empty="false">
-                <entity-options description="${description}" entity-name="TrainingClassType">
-                    <entity-order-by field-name="description"/>
+                <entity-options entity-name="StatusItem" key-field-name="statusId" description="${description}">
+                    <entity-constraint name="statusTypeId" operator="equals" value="TRAINING_STATUS"/>
+                        <entity-order-by field-name="description"/>
                 </entity-options>
             </drop-down>
         </field>
-        <field name="fromDate" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><date-time type="timestamp"/></field>
-        <field name="thruDate"><date-time type="timestamp"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+        <field name="approvalStatus" use-when="personTraining!=null&amp;&amp;personTraining.getString(&quot;approvalStatus&quot;).equals(&quot;TRAINING_REJECTED&quot;)"><display/></field>
+        <field name="reason" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
+        <field name="reason" use-when="personTraining!=null&amp;&amp;personTraining.getString(&quot;approvalStatus&quot;).equals(&quot;TRAINING_REJECTED&quot;)"><display/></field>
+        <field name="submitButton" title="Update" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    <form name="FindTrainingStatus" target="FindTrainingStatus" title="" type="single" default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox">
+        <auto-fields-entity entity-name="PersonTraining" default-field-type="find"/>
+        <field name="partyId"><hidden value="${loginPartyId}"/></field>
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}">
+            <drop-down allow-empty="true">
+                <entity-options description="${description}" key-field-name="trainingClassTypeId" entity-name="TrainingClassType">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>  
+        </field>
+        <field name="approverId"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="approvalStatus"><text-find default-option="contains" ignore-case="true"/></field>
+        <field name="reason"><text-find default-option="contains" ignore-case="true"/></field>
+        <field name="noConditionFind"><hidden value="Y"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonSearch}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    <form name="ListTrainingStatus" list-name="listIt" title="" type="list" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <actions>
+            <service service-name="performFind" result-map="result" result-map-list="listIt">
+                <field-map field-name="inputFields" from-field="parameters"/>
+                <field-map field-name="entityName" value="PersonTraining"/>
+            </service>
+        </actions>
+        <auto-fields-entity entity-name="PersonTraining" default-field-type="display"/>
+        <field name="partyId" title="${uiLabelMap.WebPosEmployee} ${uiLabelMap.CommonId}" widget-style="buttontext">
+            <display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}">
+                <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="${partyId}" link-style="buttontext">
+                    <parameter param-name="partyId" from-field="partyId"/>
+                </sub-hyperlink>
+            </display-entity>
+        </field>
+        <field name="approverId" field-name="partyId" widget-style="buttontext">
+            <display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}">
+                <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="${approverId}" link-style="buttontext">
+                    <parameter param-name="approverId" from-field="approverId"/>
+                </sub-hyperlink>
+            </display-entity>
+        </field>
+        <field name="trainingRequestId" widget-style="buttontext"></field>
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}"></field>
     </form>
 </forms>
\ No newline at end of file

Modified: ofbiz/trunk/applications/workeffort/data/WorkEffortTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/data/WorkEffortTypeData.xml?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/data/WorkEffortTypeData.xml (original)
+++ ofbiz/trunk/applications/workeffort/data/WorkEffortTypeData.xml Sat Aug  8 07:20:30 2009
@@ -172,6 +172,7 @@
 
     <WorkEffortType description="Business Travel" hasTable="N" parentTypeId="EVENT" workEffortTypeId="BUSINESS_TRAVEL"/>
     <WorkEffortType description="Meeting" hasTable="N" parentTypeId="EVENT" workEffortTypeId="MEETING"/>
+    <WorkEffortType description="Training" hasTable="N" parentTypeId="EVENT" workEffortTypeId="TRAINING"/>
     <WorkEffortType description="Personal Time Off" hasTable="N" parentTypeId="EVENT" workEffortTypeId="PERSONAL_TIMEOFF"/>
     <WorkEffortType description="Publish Properties" hasTable="N" workEffortTypeId="PUBLISH_PROPS"/>
 

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl?rev=802308&r1=802307&r2=802308&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/day.ftl Sat Aug  8 07:20:30 2009
@@ -33,7 +33,7 @@
   <tr<#if currentPeriod> class="current-period"<#else><#if (period.calendarEntries?size > 0)> class="active-period"</#if></#if>>
     <td class="label">
       ${period.start?time?string.short}<br/>
-      <a href="<@ofbizUrl>${parameters._LAST_VIEW_NAME_}?period=day&form=edit&parentTypeId=${parentTypeId}&start=${parameters.start?if_exists}&currentStatusId=CAL_TENTATIVE&estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}${urlParam?if_exists}${addlParam?if_exists}</@ofbizUrl>">${uiLabelMap.CommonAddNew}</a>
+      <a href="<@ofbizUrl>${parameters._LAST_VIEW_NAME_}?period=day&form=edit&parentTypeId=${parentTypeId?if_exists}&start=${parameters.start?if_exists}&currentStatusId=CAL_TENTATIVE&estimatedStartDate=${period.start?string("yyyy-MM-dd HH:mm:ss")}&estimatedCompletionDate=${period.end?string("yyyy-MM-dd HH:mm:ss")}${urlParam?if_exists}${addlParam?if_exists}</@ofbizUrl>">${uiLabelMap.CommonAddNew}</a>
     </td>
       <#list period.calendarEntries as calEntry>
         <#if calEntry.workEffort.actualStartDate?exists>