Author: mor
Date: Fri May 9 07:45:35 2008 New Revision: 654830 URL: http://svn.apache.org/viewvc?rev=654830&view=rev Log: Applied patch from Parimal Gain for new screens, forms, and services created for ResponsibilityType entity, this patch is part of Jira issue OFBIZ-1486 (https://issues.apache.org/jira/browse/OFBIZ-1486) and also thanks to Mridul Pathak for reviewing this patch Modified: ofbiz/trunk/applications/humanres/config/HumanResUiLabels.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/webapp/humanres/includes/appheader.ftl ofbiz/trunk/applications/humanres/widget/CommonScreens.xml ofbiz/trunk/applications/humanres/widget/PartyAbilityScreens.xml ofbiz/trunk/applications/humanres/widget/forms/PartyAbilityForms.xml Modified: ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml?rev=654830&r1=654829&r2=654830&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml (original) +++ ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml Fri May 9 07:45:35 2008 @@ -819,6 +819,9 @@ <value xml:lang="it">Sequenza Preferenze Paghe</value> <value xml:lang="th">รหัสรายà¸à¸²à¸£à¹à¸à¸´à¸à¹à¸à¸·à¸à¸à¸ªà¸´à¸à¸à¸´à¸à¸´à¹à¸¨à¸©</value> </property> + <property key="HumanResResponsibilityType"> + <value xml:lang="en">Responsibility Type</value> + </property> <property key="HumanResResponsibilityTypeId"> <value xml:lang="en">Responsibility TypeId</value> <value xml:lang="it">Tipo Responsabilità </value> @@ -928,6 +931,9 @@ <value xml:lang="it">Aggiorna Riga Rassegna Prestazioni</value> <value xml:lang="th">=à¹à¸à¹à¹à¸à¸£à¸²à¸¢à¸à¸²à¸£à¸à¸²à¸£à¸à¸£à¸§à¸à¸ªà¸à¸à¸ªà¸´à¸à¸à¸´à¸à¸´à¹à¸¨à¸©</value> </property> + <property key="PageTitleEditResponsibilityType"> + <value xml:lang="en">Edit Responsibility Type</value> + </property> <property key="PageTitleEditSkillType"> <value xml:lang="en">Edit Skill Type</value> <value xml:lang="it">Aggiorna Tipo Abilità </value> @@ -939,6 +945,9 @@ <value xml:lang="it">Aggiorna Validità Responsibilità </value> <value xml:lang="th">à¹à¸à¹à¹à¸à¸«à¸à¹à¸²à¸à¸µà¹à¸£à¸±à¸à¸à¸´à¸à¸à¸à¸</value> </property> + <property key="PageTitleFindResponsibilityType"> + <value xml:lang="en">Find Responsibility Type</value> + </property> <property key="PageTitleListEmplPosition"> <value xml:lang="en">List EmplPosition</value> <value xml:lang="it">Lista Posizione Impiegato</value> 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=654830&r1=654829&r2=654830&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml (original) +++ ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml Fri May 9 07:45:35 2008 @@ -548,4 +548,26 @@ </simple-method> + <!-- Responsibility Types --> + <simple-method method-name="createResponsibilityType" short-description="Create a ResponsibilityType"> + <make-value entity-name="ResponsibilityType" value-name="newEntity"/> + <set-pk-fields map-name="parameters" value-name="newEntity"/> + <set-nonpk-fields map-name="parameters" value-name="newEntity"/> + <if-empty field-name="newEntity.responsibilityTypeId"> + <sequenced-id-to-env sequence-name="ResponsibilityType" env-name="newEntity.responsibilityTypeId"/> + </if-empty> + <field-to-result field-name="newEntity.responsibilityTypeId" result-name="responsibilityTypeId"/> + <create-value value-name="newEntity"/> + </simple-method> + + <simple-method method-name="updateResponsibilityType" short-description="Update ResponsibilityType"> + <entity-one entity-name="ResponsibilityType" value-name="lookedUpValue"/> + <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/> + <store-value value-name="lookedUpValue"/> + </simple-method> + + <simple-method method-name="deleteResponsibilityType" short-description="Delete ResponsibilityType"> + <entity-one entity-name="ResponsibilityType" value-name="lookedUpValue"/> + <remove-value value-name="lookedUpValue"/> + </simple-method> </simple-methods> \ No newline at end of file Modified: ofbiz/trunk/applications/humanres/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/servicedef/services.xml?rev=654830&r1=654829&r2=654830&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/servicedef/services.xml (original) +++ ofbiz/trunk/applications/humanres/servicedef/services.xml Fri May 9 07:45:35 2008 @@ -582,4 +582,27 @@ <attribute name="mobileExtension" type="String" mode="IN" optional="true"/> <attribute name="otherEmail" type="String" mode="IN" optional="true"/> </service> + + <service name="createResponsibilityType" default-entity-name="ResponsibilityType" engine="simple" + location="org/ofbiz/humanres/HumanResServices.xml" invoke="createResponsibilityType" auth="true"> + <description>Create Valid ResponsibilityType</description> + <permission-service service-name="humanResManagerPermission" main-action="CREATE"/> + <auto-attributes include="pk" mode="INOUT" optional="true"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="description" optional="false"/> + </service> + <service name="updateResponsibilityType" default-entity-name="ResponsibilityType" engine="simple" + location="org/ofbiz/humanres/HumanResServices.xml" invoke="updateResponsibilityType" auth="true"> + <description>Update Valid ResponsibilityType</description> + <permission-service service-name="humanResManagerPermission" main-action="UPDATE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="description" optional="false"/> + </service> + <service name="deleteResponsibilityType" default-entity-name="ResponsibilityType" engine="simple" + location="org/ofbiz/humanres/HumanResServices.xml" invoke="deleteResponsibilityType" auth="true"> + <description>Delete Valid ResponsibilityTrype</description> + <permission-service service-name="humanResManagerPermission" main-action="DELETE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + </service> </services> \ No newline at end of file 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=654830&r1=654829&r2=654830&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml Fri May 9 07:45:35 2008 @@ -526,6 +526,33 @@ <response name="success" type="request" value="viewprofile"/> <response name="error" type="view" value="CreateEmployee"/> </request-map> + <!-- ===================Responsibility Request============== --> + <request-map uri="FindResponsibilityType"> + <security https="true" auth="true"/> + <response name="success" type="view" value="FindResponsibilityType"/> + </request-map> + <request-map uri="EditResponsibilityType"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditResponsibilityType"/> + </request-map> + <request-map uri="createResponsibilityType"> + <security https="true" auth="true"/> + <event type="service" invoke="createResponsibilityType"/> + <response name="success" type="view" value="EditResponsibilityType"/> + <response name="error" type="view" value="EditResponsibilityType"/> + </request-map> + <request-map uri="updateResponsibilityType"> + <security https="true" auth="true"/> + <event type="service" invoke="updateResponsibilityType"/> + <response name="success" type="view" value="EditResponsibilityType"/> + <response name="error" type="view" value="EditResponsibilityType"/> + </request-map> + <request-map uri="deleteResponsibilityType"> + <security https="true" auth="true"/> + <event type="service" invoke="deleteResponsibilityType"/> + <response name="success" type="view" value="FindResponsibilityType"/> + <response name="error" type="view" value="EditResponsibilityType"/> + </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> @@ -584,4 +611,6 @@ <view-map name="EditSkillTypes" type="screen" page="component://humanres/widget/PartyAbilityScreens.xml#EditSkillTypes"/> <view-map name="FindEmployee" type="screen" page="component://humanres/widget/EmploymentScreens.xml#FindEmployee"/> <view-map name="CreateEmployee" type="screen" page="component://humanres/widget/EmploymentScreens.xml#CreateEmployee"/> + <view-map name="FindResponsibilityType" type="screen" page="component://humanres/widget/PartyAbilityScreens.xml#FindResponsibilityType"/> + <view-map name="EditResponsibilityType" type="screen" page="component://humanres/widget/PartyAbilityScreens.xml#EditResponsibilityType"/> </site-conf> Modified: ofbiz/trunk/applications/humanres/webapp/humanres/includes/appheader.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/includes/appheader.ftl?rev=654830&r1=654829&r2=654830&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/webapp/humanres/includes/appheader.ftl (original) +++ ofbiz/trunk/applications/humanres/webapp/humanres/includes/appheader.ftl Fri May 9 07:45:35 2008 @@ -32,6 +32,7 @@ <li<#if selected == "PartySkills"> class="selected"</#if>><a href="<@ofbizUrl>ListPartySkills</@ofbizUrl>">${uiLabelMap.HumanResListPartySkill}</a></li> <li<#if selected == "SkillType"> class="selected"</#if>><a href="<@ofbizUrl>findSkillTypes</@ofbizUrl>">${uiLabelMap.HumanResSkillType}</a></li> <li<#if selected == "Employee"> class="selected"</#if>><a href="<@ofbizUrl>findEmployees</@ofbizUrl>">${uiLabelMap.HumanResEmployee}</a></li> + <li<#if selected == "ResponsibilityType"> class="selected"</#if>><a href="<@ofbizUrl>FindResponsibilityType</@ofbizUrl>">${uiLabelMap.HumanResResponsibilityType}</a></li> <#if userLogin?has_content> <li class="opposed"><a href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li> <#else> Modified: ofbiz/trunk/applications/humanres/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/CommonScreens.xml?rev=654830&r1=654829&r2=654830&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/widget/CommonScreens.xml (original) +++ ofbiz/trunk/applications/humanres/widget/CommonScreens.xml Fri May 9 07:45:35 2008 @@ -233,4 +233,48 @@ </widgets> </section> </screen> + <screen name="CommonResponsibilityTypeDecorator"> + <section> + <actions> + <set field="headerItem" value="ResponsibilityType"/> + <set field="responsibilityTypeId" from-field="parameters.responsibilityTypeId"/> + <entity-one entity-name="ResponsibilityType" value-name="responsibilityType"/> + </actions> + <widgets> + <decorator-screen name="main-decorator"> + <decorator-section name="body"> + <section> + <condition> + <if-has-permission permission="HUMANRES" action="_VIEW"/> + </condition> + <widgets> + <section> + <condition> + <not><if-empty field-name="responsibilityType"/></not> + </condition> + <widgets> + <container style="h1"> + <label>${uiLabelMap.${titleProperty}} ${uiLabelMap.CommonFor} [${responsibilityTypeId}]</label> + </container> + <container style="button-bar"> + <link target="EditResponsibilityType" text="${uiLabelMap.CommonNew} ${uiLabelMap.HumanResResponsibilityType}" style="buttontext"/> + </container> + </widgets> + <fail-widgets> + <container style="h1"> + <label>${uiLabelMap.CommonNew} ${uiLabelMap.HumanResResponsibilityType}</label> + </container> + </fail-widgets> + </section> + <decorator-section-include name="body"/> + </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.HumanResViewPermissionError}</label> + </fail-widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/applications/humanres/widget/PartyAbilityScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/PartyAbilityScreens.xml?rev=654830&r1=654829&r2=654830&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/widget/PartyAbilityScreens.xml (original) +++ ofbiz/trunk/applications/humanres/widget/PartyAbilityScreens.xml Fri May 9 07:45:35 2008 @@ -322,4 +322,52 @@ </widgets> </section> </screen> + <screen name="FindResponsibilityType"> + <section> + <actions> + <set field="headerItem" value="ResponsibilityType"/> + <set field="titleProperty" value="PageTitleFindResponsibilityType"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <condition> + <if-has-permission permission="HUMANRES" action="_VIEW"/> + </condition> + <widgets> + <container style="h1"> + <label>${uiLabelMap.${titleProperty}}</label> + </container> + <container style="button-bar"> + <link target="EditResponsibilityType" text="${uiLabelMap.CommonNew} ${uiLabelMap.HumanResResponsibilityType}" style="buttontext"/> + </container> + <include-form name="ListResponsibilityTypes" location="component://humanres/widget/forms/PartyAbilityForms.xml"/> + </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.HumanResViewPermissionError}</label> + </fail-widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="EditResponsibilityType"> + <section> + <actions> + <set field="titleProperty" value="PageTitleEditResponsibilityType"/> + <set field="tabButtonItem" value="EditResponsibilityType"/> + <set field="responsibilityTypeId" from-field="parameters.responsibilityTypeId"/> + <entity-one entity-name="ResponsibilityType" value-name="responsibilityType"/> + </actions> + <widgets> + <decorator-screen name="CommonResponsibilityTypeDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <include-form name="EditResponsibilityType" location="component://humanres/widget/forms/PartyAbilityForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> \ No newline at end of file Modified: ofbiz/trunk/applications/humanres/widget/forms/PartyAbilityForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/forms/PartyAbilityForms.xml?rev=654830&r1=654829&r2=654830&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/widget/forms/PartyAbilityForms.xml (original) +++ ofbiz/trunk/applications/humanres/widget/forms/PartyAbilityForms.xml Fri May 9 07:45:35 2008 @@ -298,4 +298,25 @@ <field name="submitButton" use-when="skillType==null" title="${uiLabelMap.CommonCreate}" widget-style="buttontext"><submit button-type="text-link"/></field> <field name="submitButton" use-when="skillType!=null" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> + <form name="ListResponsibilityTypes" type="list" list-name="responsibilityTypes" paginate-target="FindResponsibilityType"> + <actions> + <entity-condition entity-name="ResponsibilityType"><order-by field-name="responsibilityTypeId"/></entity-condition> + </actions> + <field name="responsibilityTypeId" title="${uiLabelMap.HumanResResponsibilityTypeId}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${responsibilityTypeId}" target="EditResponsibilityType?responsibilityTypeId=${responsibilityTypeId}"/> + </field> + <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field> + <field name="deleteLink" title="" widget-style="buttontext"> + <hyperlink target="deleteResponsibilityType?responsibilityTypeId=${responsibilityTypeId}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/> + </field> + </form> + <form name="EditResponsibilityType" type="single" target="updateResponsibilityType" title="" default-map-name="responsibilityType"> + <alt-target use-when="responsibilityType==null" target="createResponsibilityType"/> + <auto-fields-service service-name="updateResponsibilityType"/> + <field use-when="responsibilityType!=null" name="responsibilityTypeId" title="${uiLabelMap.HumanResResponsibilityTypeId}" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field> + <field use-when="responsibilityType==null&&responsibilityTypeId==null" name="responsibilityTypeId" title="${uiLabelMap.HumanResResponsibilityTypeId}"><text/></field> + <field use-when="responsibilityType==null&&responsibilityTypeId!=null" name="responsibilityTypeId" title="${uiLabelMap.HumanResResponsibilityTypeId}" tooltip="${uiLabelMap.CommonCannotBeFound}: [${responsibilityTypeId}]"><display/></field> + <field name="submitButton" use-when="responsibilityType==null" title="${uiLabelMap.CommonCreate}" widget-style="buttontext"><submit button-type="text-link"/></field> + <field name="submitButton" use-when="responsibilityType!=null" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> </forms> \ No newline at end of file |
Free forum by Nabble | Edit this page |