Author: mble Date: 2012-11-30 19:54:54 +0100 (Fri, 30 Nov 2012) New Revision: 280 Url: http://chorem.org/projects/chorem/repository/revisions/280 Log: M chorem-web/src/main/webapp/WEB-INF/jsp/billy/quotationDetails.jsp M chorem-web/src/main/webapp/WEB-INF/jsp/billy/addQuotation.jsp M chorem-web/src/main/java/org/chorem/billy/action/QuotationAction.java M chorem-web/src/main/resources/org/chorem/billy/action/QuotationAction-modifyQuotation-validation.xml M chorem-web/src/main/resources/org/chorem/billy/action/QuotationAction-addQuotation-validation.xml M chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties M chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties M chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java M chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardAction.java M chorem-webmotion/src/main/resources/mapping M chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardSummary.jsp M chorem-webmotion/src/main/webapp/WEB-INF/jsp/view.jsp M chorem-webmotion/src/main/webapp/WEB-INF/jsp/report.jsp M chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp M chorem-webmotion/src/main/webapp/WEB-INF/jsp/decorator.jsp A + chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardRequestVacation.jsp M chorem-webmotion/src/main/webapp/js/chorem.js M chorem-webmotion/pom.xml D chorem-webmotion/nb-configuration.xml Added: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardRequestVacation.jsp Removed: trunk/chorem-webmotion/nb-configuration.xml Modified: trunk/chorem-web/src/main/java/org/chorem/billy/action/QuotationAction.java trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties trunk/chorem-web/src/main/resources/org/chorem/billy/action/QuotationAction-addQuotation-validation.xml trunk/chorem-web/src/main/resources/org/chorem/billy/action/QuotationAction-modifyQuotation-validation.xml trunk/chorem-web/src/main/webapp/WEB-INF/jsp/billy/addQuotation.jsp trunk/chorem-web/src/main/webapp/WEB-INF/jsp/billy/quotationDetails.jsp trunk/chorem-webmotion/pom.xml trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardAction.java trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java trunk/chorem-webmotion/src/main/resources/mapping trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardSummary.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/decorator.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/report.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/view.jsp trunk/chorem-webmotion/src/main/webapp/js/chorem.js Modified: trunk/chorem-web/src/main/java/org/chorem/billy/action/QuotationAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/billy/action/QuotationAction.java 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-web/src/main/java/org/chorem/billy/action/QuotationAction.java 2012-11-30 18:54:54 UTC (rev 280) @@ -46,7 +46,7 @@ protected String reference; protected String description; protected String amount; - protected String vta; + protected String vat; protected String beginDate; protected String endDate; protected String postedDate; @@ -125,7 +125,7 @@ setReference(quotation.getReference()); setDescription(quotation.getDescription()); setAmount(String.valueOf(quotation.getAmount())); - setVta(String.valueOf(quotation.getVTA())); + setVat(String.valueOf(quotation.getVAT())); if (quotation.getBeginDate() != null) { setBeginDate(formatter.format(quotation.getBeginDate())); } @@ -238,12 +238,12 @@ newQuotation.setAmount(Double.parseDouble(val)); } - if (getVta() != null) { - String val = getVta(); + if (getVat() != null) { + String val = getVat(); //Replaces the (possible) comma by a dot, so the string can be //parsed successfully as a double val = val.replace(',', '.'); - newQuotation.setVTA(Double.parseDouble(val)); + newQuotation.setVAT(Double.parseDouble(val)); } if (getProjectId() != null) { newQuotation.setProject(getProjectId()); @@ -365,17 +365,17 @@ } /** - * @return the vta + * @return the vat */ - public String getVta() { - return vta; + public String getVat() { + return vat; } /** - * @param vta the vta to set + * @param vat the vat to set */ - public void setVta(String vta) { - this.vta = vta; + public void setVat(String vat) { + this.vat = vat; } public String getBeginDate() { Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties =================================================================== --- trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2012-11-30 18:54:54 UTC (rev 280) @@ -19,7 +19,7 @@ chorem.billy.quotation.projectOrder.type= chorem.billy.quotation.reference=Reference chorem.billy.quotation.supplier= -chorem.billy.quotation.vta=VTA +chorem.billy.quotation.vat=VAT chorem.billy.quotationDetails.title= chorem.bonzoms.companies= chorem.bonzoms.company=Company %s Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties =================================================================== --- trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2012-11-30 18:54:54 UTC (rev 280) @@ -1,8 +1,8 @@ -chorem.beginDate.beforeToday=La date entr\u00E9e ne peut \u00EAtre ant\u00E9rieure \u00E0 la date du jour +chorem.beginDate.beforeToday=La date entr\u00e9e ne peut \u00eatre ant\u00e9rieure \u00e0 la date du jour chorem.billy.home=Accueil chorem.billy.quotation=Devis \#%s chorem.billy.quotation.add=Ajouter un nouveau devis -chorem.billy.quotation.addProjectOrder=Cr\u00E9er un contrat pour ce devis +chorem.billy.quotation.addProjectOrder=Cr\u00e9er un contrat pour ce devis chorem.billy.quotation.addToProject=Ajouter un nouveau devis au projet "%s" chorem.billy.quotation.amount=Montant chorem.billy.quotation.backToProjectDetails=Retourner sur le projet @@ -10,58 +10,58 @@ chorem.billy.quotation.description=Description chorem.billy.quotation.invalidCustomer= chorem.billy.quotation.invalidSupplier= -chorem.billy.quotation.postedDate=Date de d\u00E9p\u00F4t -chorem.billy.quotation.projectOrder=Contrat r\u00E9alis\u00E9 sur la base de ce devis -chorem.billy.quotation.projectOrder.beginDate=Date de d\u00E9but \: %s -chorem.billy.quotation.projectOrder.company=Soci\u00E9t\u00E9 \: %s +chorem.billy.quotation.postedDate=Date de d\u00e9p\u00f4t +chorem.billy.quotation.projectOrder=Contrat r\u00e9alis\u00e9 sur la base de ce devis +chorem.billy.quotation.projectOrder.beginDate=Date de d\u00e9but \: %s +chorem.billy.quotation.projectOrder.company=Soci\u00e9t\u00e9 \: %s chorem.billy.quotation.projectOrder.endDate=Date de fin \: %s chorem.billy.quotation.projectOrder.type=Type \: %s -chorem.billy.quotation.reference=R\u00E9f\u00E9rence +chorem.billy.quotation.reference=R\u00e9f\u00e9rence chorem.billy.quotation.supplier=Fournisseur -chorem.billy.quotation.vta=TVA -chorem.billy.quotationDetails.title=D\u00E9tails du devis "%s" +chorem.billy.quotation.vat=TVA +chorem.billy.quotationDetails.title=D\u00e9tails du devis "%s" chorem.bonzoms.companies=Liste des entreprises -chorem.bonzoms.company=Soci\u00E9t\u00E9 -chorem.bonzoms.company.add=Ajouter une nouvelle soci\u00E9t\u00E9 +chorem.bonzoms.company=Soci\u00e9t\u00e9 +chorem.bonzoms.company.add=Ajouter une nouvelle soci\u00e9t\u00e9 chorem.bonzoms.company.address=Adresse chorem.bonzoms.company.addressLine1=Adresse chorem.bonzoms.company.addressLine2=Adresse ligne 2 (opt.) chorem.bonzoms.company.city=Ville chorem.bonzoms.company.country=Pays -chorem.bonzoms.company.employees=Liste des employ\u00E9s -chorem.bonzoms.company.list=Les soci\u00E9t\u00E9s -chorem.bonzoms.company.name=Nom de la soci\u00E9t\u00E9 -chorem.bonzoms.company.phoneNb=Num\u00E9ro de t\u00E9l\u00E9phone (opt.) +chorem.bonzoms.company.employees=Liste des employ\u00e9s +chorem.bonzoms.company.list=Les soci\u00e9t\u00e9s +chorem.bonzoms.company.name=Nom de la soci\u00e9t\u00e9 +chorem.bonzoms.company.phoneNb=Num\u00e9ro de t\u00e9l\u00e9phone (opt.) chorem.bonzoms.company.postcode=Code postal -chorem.bonzoms.company.type=Type de la soci\u00E9t\u00E9 +chorem.bonzoms.company.type=Type de la soci\u00e9t\u00e9 chorem.bonzoms.company.website=Site internet (opt.) chorem.bonzoms.companyDetails.name=Entreprise "%s" -chorem.bonzoms.companyDetails.title=D\u00E9tails de l''entreprise "%s" -chorem.bonzoms.contactDetails=M\u00E9thode de contact -chorem.bonzoms.contactDetails.add=Ajouter une nouvelle m\u00E9thode de contact -chorem.bonzoms.contactDetails.name=Nom de la m\u00E9thode de contact -chorem.bonzoms.contactDetails.type=Type de la m\u00E9thode de contact -chorem.bonzoms.contactDetails.value=Valeur de la m\u00E9thode de contact -chorem.bonzoms.employee=Employ\u00E9 +chorem.bonzoms.companyDetails.title=D\u00e9tails de l''entreprise "%s" +chorem.bonzoms.contactDetails=M\u00e9thode de contact +chorem.bonzoms.contactDetails.add=Ajouter une nouvelle m\u00e9thode de contact +chorem.bonzoms.contactDetails.name=Nom de la m\u00e9thode de contact +chorem.bonzoms.contactDetails.type=Type de la m\u00e9thode de contact +chorem.bonzoms.contactDetails.value=Valeur de la m\u00e9thode de contact +chorem.bonzoms.employee=Employ\u00e9 chorem.bonzoms.employee.company=Entreprise -chorem.bonzoms.employee.diploma=Dipl\u00F4me (opt.) +chorem.bonzoms.employee.diploma=Dipl\u00f4me (opt.) chorem.bonzoms.employee.invalidCompany= -chorem.bonzoms.employee.paidLeave=Cong\u00E9s pay\u00E9s -chorem.bonzoms.employee.paidLeave.wrongFormat=Les cong\u00E9s pay\u00E9s doivent \u00EAtre \u00EAtre un entier positif ou un nombre \u00E0 virgule flottante positif +chorem.bonzoms.employee.paidLeave=Cong\u00e9s pay\u00e9s +chorem.bonzoms.employee.paidLeave.wrongFormat=Les cong\u00e9s pay\u00e9s doivent \u00eatre \u00eatre un entier positif ou un nombre \u00e0 virgule flottante positif chorem.bonzoms.employee.rtt=RTT -chorem.bonzoms.employee.rtt.wrongFormat=Les RTT doivent \u00EAtre \u00EAtre un entier positif ou un nombre \u00E0 virgule flottante positif -chorem.bonzoms.employees=List des employ\u00E9s +chorem.bonzoms.employee.rtt.wrongFormat=Les RTT doivent \u00eatre \u00eatre un entier positif ou un nombre \u00e0 virgule flottante positif +chorem.bonzoms.employees=List des employ\u00e9s chorem.bonzoms.employmentContract=Contrat de travail chorem.bonzoms.employmentContract.add=Ajouter un nouveau contrat de travail chorem.bonzoms.employmentContract.allFieldsRequired= -chorem.bonzoms.employmentContract.beginDate=Date de d\u00E9but +chorem.bonzoms.employmentContract.beginDate=Date de d\u00e9but chorem.bonzoms.employmentContract.description=Description chorem.bonzoms.employmentContract.endDate=Date de fin (opt.) chorem.bonzoms.employmentContract.salary=Salaire -chorem.bonzoms.employmentContract.salary.wrongFormat=Le salaire doit \u00EAtre un entier positif ou un nombre \u00E0 virgule flottante positif (le s\u00E9parateur d\u00E9cimal peut \u00EAtre un point ou une virgule) +chorem.bonzoms.employmentContract.salary.wrongFormat=Le salaire doit \u00eatre un entier positif ou un nombre \u00e0 virgule flottante positif (le s\u00e9parateur d\u00e9cimal peut \u00eatre un point ou une virgule) chorem.bonzoms.employmentContract.type=Type chorem.bonzoms.employmentContract.workingTime=Temps de travail -chorem.bonzoms.employmentContract.workingTime.wrongFormat=Le temps de travail doit \u00EAtre un entier positif +chorem.bonzoms.employmentContract.workingTime.wrongFormat=Le temps de travail doit \u00eatre un entier positif chorem.bonzoms.home=Accueil chorem.bonzoms.person=Personne chorem.bonzoms.person.add=Ajouter une nouvelle personne @@ -71,22 +71,22 @@ chorem.bonzoms.person.city=Ville chorem.bonzoms.person.country=Pays chorem.bonzoms.person.email=Email -chorem.bonzoms.person.email.wrongFormat=L''adresse email que vous avez entr\u00E9e est incorrecte +chorem.bonzoms.person.email.wrongFormat=L''adresse email que vous avez entr\u00e9e est incorrecte chorem.bonzoms.person.employmentContracts=Contrats de travail \: -chorem.bonzoms.person.firstName=Pr\u00E9nom +chorem.bonzoms.person.firstName=Pr\u00e9nom chorem.bonzoms.person.lastName=Nom chorem.bonzoms.person.list=Les personnes -chorem.bonzoms.person.phoneNb=Num\u00E9ro de t\u00E9l\u00E9phone (opt.) +chorem.bonzoms.person.phoneNb=Num\u00e9ro de t\u00e9l\u00e9phone (opt.) chorem.bonzoms.person.postcode=Code postal -chorem.bonzoms.personDetails.title=Informations d\u00E9taill\u00E9es de "%s" +chorem.bonzoms.personDetails.title=Informations d\u00e9taill\u00e9es de "%s" chorem.bonzoms.persons=Liste des personnes chorem.config.configFileName.description=Nom du fichier de configuration de chorem -chorem.create.error=Une erreur s''est produite, merci d''essayer \u00E0 nouveau. Si le probl\u00E8me se reproduit, merci de contacter un administrateur +chorem.create.error=Une erreur s''est produite, merci d''essayer \u00e0 nouveau. Si le probl\u00e8me se reproduit, merci de contacter un administrateur chorem.date.wrongFormat=La date doit respecter le format suivant \: jj/mm/yyyy chorem.date.wrongFormat.birth= chorem.date.wrongFormat.contractBegin= chorem.date.wrongFormat.contractEnd= -chorem.endDate.afterBegin=La date de fin ne doit pas pas \u00EAtre ant\u00E9rieure \u00E0 la date de d\u00E9but +chorem.endDate.afterBegin=La date de fin ne doit pas pas \u00eatre ant\u00e9rieure \u00e0 la date de d\u00e9but chorem.error.internal=Une erreur interne s''est produite chorem.field.required=Vous devez remplir ce champ chorem.gepeto.home=Accueil @@ -98,57 +98,57 @@ chorem.gepeto.projectDetails.noQuotations=Pas de devis chorem.gepeto.projectDetails.projectOrder=Contrat du %s au %s chorem.gepeto.projectDetails.projectOrders=Contrats du projet -chorem.gepeto.projectDetails.quotation=Devis du %s (r\u00E9f. %s) +chorem.gepeto.projectDetails.quotation=Devis du %s (r\u00e9f. %s) chorem.gepeto.projectDetails.quotationWithProjectOrder=Devis du projet avec un contrat chorem.gepeto.projectDetails.quotationsWithoutProjectOrder=Devis du projet sans contrat -chorem.gepeto.projectDetails.title=D\u00E9tails du projet "%s" +chorem.gepeto.projectDetails.title=D\u00e9tails du projet "%s" chorem.gepeto.projectOrder=Contrat de commande d''un projet chorem.gepeto.projectOrder.add=Ajouter le contrat d''un projet chorem.gepeto.projectOrder.addToQuotation=Lier un nouveau contrat au devis \#%s chorem.gepeto.projectOrder.backToQuotationDetails=Retourner sur le devis -chorem.gepeto.projectOrder.beginDate=Date de d\u00E9but +chorem.gepeto.projectOrder.beginDate=Date de d\u00e9but chorem.gepeto.projectOrder.company=Entreprise chorem.gepeto.projectOrder.company.name= chorem.gepeto.projectOrder.company.type= chorem.gepeto.projectOrder.description=Description -chorem.gepeto.projectOrder.estimatedEndDate=Date de fin estim\u00E9e +chorem.gepeto.projectOrder.estimatedEndDate=Date de fin estim\u00e9e chorem.gepeto.projectOrder.invalidCompany= chorem.gepeto.projectOrder.status=Statut chorem.gepeto.projectOrder.type=Type -chorem.gepeto.projectOrderDetails.beginDate=Date de d\u00E9but -chorem.gepeto.projectOrderDetails.companyName=Nom de la soci\u00E9t\u00E9 \: %s +chorem.gepeto.projectOrderDetails.beginDate=Date de d\u00e9but +chorem.gepeto.projectOrderDetails.companyName=Nom de la soci\u00e9t\u00e9 \: %s chorem.gepeto.projectOrderDetails.endDate=Date de fin -chorem.gepeto.projectOrderDetails.quotation=Contrat r\u00E9alis\u00E9 sur la base du devis \#%s -chorem.gepeto.projectOrderDetails.task.beginDate=D\u00E9but de la t\u00E2che \: %s -chorem.gepeto.projectOrderDetails.task.endDate=Fin de la t\u00E2che \: %s -chorem.gepeto.projectOrderDetails.task.name=Nom de la t\u00E2che \: %s -chorem.gepeto.projectOrderDetails.task.price=Prix de la t\u00E2che \: %s -chorem.gepeto.projectOrderDetails.task.status=Statut de la t\u00E2che \: %s -chorem.gepeto.projectOrderDetails.tasks=T\u00E2ches li\u00E9es au contrat -chorem.gepeto.projectOrderDetails.title=D\u00E9tails du contrat +chorem.gepeto.projectOrderDetails.quotation=Contrat r\u00e9alis\u00e9 sur la base du devis \#%s +chorem.gepeto.projectOrderDetails.task.beginDate=D\u00e9but de la t\u00e2che \: %s +chorem.gepeto.projectOrderDetails.task.endDate=Fin de la t\u00e2che \: %s +chorem.gepeto.projectOrderDetails.task.name=Nom de la t\u00e2che \: %s +chorem.gepeto.projectOrderDetails.task.price=Prix de la t\u00e2che \: %s +chorem.gepeto.projectOrderDetails.task.status=Statut de la t\u00e2che \: %s +chorem.gepeto.projectOrderDetails.tasks=T\u00e2ches li\u00e9es au contrat +chorem.gepeto.projectOrderDetails.title=D\u00e9tails du contrat chorem.gepeto.projectOrderDetails.type=Type de contrat chorem.gepeto.projects=Liste des projets chorem.gepeto.projectsByYear.thead.company=Demandeur chorem.gepeto.projectsByYear.thead.end=Fin chorem.gepeto.projectsByYear.thead.name=Nom -chorem.gepeto.projectsByYear.thead.start=D\u00E9but -chorem.gepeto.projectsByYear.title=Projets de l''ann\u00E9e %s +chorem.gepeto.projectsByYear.thead.start=D\u00e9but +chorem.gepeto.projectsByYear.title=Projets de l''ann\u00e9e %s chorem.gepeto.projectsByYear.withProjectOrder=Avec contrat chorem.gepeto.projectsByYear.withoutProjectOrder=Sans contrat chorem.gepeto.projectsWithoutQuotation=Liste des projets sans devis chorem.gepeto.projectsWithoutQuotation.title=Liste des projets sans devis -chorem.gepeto.results.title=R\u00E9sultats par ann\u00E0e -chorem.gepeto.task=T\u00E2che %s -chorem.gepeto.task.add=Ajouter une nouvelle t\u00E2che +chorem.gepeto.results.title=R\u00e9sultats par ann\u00e0e +chorem.gepeto.task=T\u00e2che %s +chorem.gepeto.task.add=Ajouter une nouvelle t\u00e2che chorem.gepeto.task.backToProjectDetails=Retourner sur le contrat -chorem.gepeto.task.beginDate=Date de d\u00E9but +chorem.gepeto.task.beginDate=Date de d\u00e9but chorem.gepeto.task.description=Description -chorem.gepeto.task.estimatedDays=Nombre de jours estim\u00E9s -chorem.gepeto.task.estimatedDays.wrongFormat=Le nombre de jours estim\u00E9 doit \u00EAtre un entier positif -chorem.gepeto.task.estimatedEndDate=Date de fin estim\u00E9e -chorem.gepeto.task.name=Nom de la t\u00E2che +chorem.gepeto.task.estimatedDays=Nombre de jours estim\u00e9s +chorem.gepeto.task.estimatedDays.wrongFormat=Le nombre de jours estim\u00e9 doit \u00eatre un entier positif +chorem.gepeto.task.estimatedEndDate=Date de fin estim\u00e9e +chorem.gepeto.task.name=Nom de la t\u00e2che chorem.gepeto.task.price=Prix -chorem.gepeto.task.price.wrongFormat=Le prix doit \u00EAtre un entier positif ou un nombre \u00E0 virgule flottante positif (le s\u00E9parateur d\u00E9cimal peut \u00EAtre un point ou une virgule) +chorem.gepeto.task.price.wrongFormat=Le prix doit \u00eatre un entier positif ou un nombre \u00e0 virgule flottante positif (le s\u00e9parateur d\u00e9cimal peut \u00eatre un point ou une virgule) chorem.gepeto.tasksList= chorem.home=Accueil chorem.misc.modify=Modifier Modified: trunk/chorem-web/src/main/resources/org/chorem/billy/action/QuotationAction-addQuotation-validation.xml =================================================================== --- trunk/chorem-web/src/main/resources/org/chorem/billy/action/QuotationAction-addQuotation-validation.xml 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-web/src/main/resources/org/chorem/billy/action/QuotationAction-addQuotation-validation.xml 2012-11-30 18:54:54 UTC (rev 280) @@ -22,13 +22,13 @@ <message key="chorem.billy.quotation.amount.wrongFormat" /> </field-validator> </field> - <field name="vta"> + <field name="vat"> <field-validator type="requiredstring"> <message key="chorem.field.required" /> </field-validator> <field-validator type="regex"> <param name="expression"><![CDATA[([0-9]+)([\.,][0-9]+)?]]></param> - <message key="chorem.billy.quotation.vta.wrongFormat" /> + <message key="chorem.billy.quotation.vat.wrongFormat" /> </field-validator> </field> <field name="postedDate"> Modified: trunk/chorem-web/src/main/resources/org/chorem/billy/action/QuotationAction-modifyQuotation-validation.xml =================================================================== --- trunk/chorem-web/src/main/resources/org/chorem/billy/action/QuotationAction-modifyQuotation-validation.xml 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-web/src/main/resources/org/chorem/billy/action/QuotationAction-modifyQuotation-validation.xml 2012-11-30 18:54:54 UTC (rev 280) @@ -17,13 +17,13 @@ <message key="chorem.billy.quotation.amount.wrongFormat" /> </field-validator> </field> - <field name="vta"> + <field name="vat"> <field-validator type="requiredstring"> <message key="chorem.field.required" /> </field-validator> <field-validator type="regex"> <param name="expression"><![CDATA[([0-9]+)([\.,][0-9]+)?]]></param> - <message key="chorem.billy.quotation.vta.wrongFormat" /> + <message key="chorem.billy.quotation.vat.wrongFormat" /> </field-validator> </field> <field name="postedDate"> Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/billy/addQuotation.jsp =================================================================== --- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/billy/addQuotation.jsp 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/billy/addQuotation.jsp 2012-11-30 18:54:54 UTC (rev 280) @@ -35,7 +35,7 @@ <br /> <s:textfield key="chorem.billy.quotation.amount" name="amount" labelSeparator=": " size="6" /> <br /> - <s:textfield key="chorem.billy.quotation.vta" name="vta" labelSeparator=": " size="2" />% + <s:textfield key="chorem.billy.quotation.vat" name="vat" labelSeparator=": " size="2" />% <br /> <s:textfield key="chorem.billy.quotation.beginDate" name="beginDate" labelSeparator=": " size="7" value="%{dayDate}" /> <br /> Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/billy/quotationDetails.jsp =================================================================== --- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/billy/quotationDetails.jsp 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/billy/quotationDetails.jsp 2012-11-30 18:54:54 UTC (rev 280) @@ -33,7 +33,7 @@ <br /> <s:textfield name="amount" key="chorem.billy.quotation.amount" labelSeparator=": " size="5" /> <br /> - <s:textfield name="vta" key="chorem.billy.quotation.vta" labelSeparator=": " size="2" />% + <s:textfield name="vat" key="chorem.billy.quotation.vat" labelSeparator=": " size="2" />% <br /> <s:textfield name="beginDate" key="chorem.billy.quotation.beginDate" labelSeparator=": " size="7" /> <br /> Deleted: trunk/chorem-webmotion/nb-configuration.xml =================================================================== (Binary files differ) Modified: trunk/chorem-webmotion/pom.xml =================================================================== --- trunk/chorem-webmotion/pom.xml 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-webmotion/pom.xml 2012-11-30 18:54:54 UTC (rev 280) @@ -64,7 +64,8 @@ <dependency> <groupId>org.chorem.chorem</groupId> <artifactId>chorem-entities</artifactId> - <version>${project.version}</version> + <version>0.3-SNAPSHOT</version> + <type>jar</type> </dependency> <dependency> Modified: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardAction.java =================================================================== --- trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardAction.java 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardAction.java 2012-11-30 18:54:54 UTC (rev 280) @@ -45,6 +45,7 @@ import org.chorem.entities.Category; import org.chorem.entities.Configuration; import org.chorem.entities.Employee; +import org.chorem.entities.EmployeeHR; import org.chorem.entities.Interval; import org.chorem.entities.Invoice; import org.chorem.entities.Quotation; @@ -58,6 +59,7 @@ import org.debux.webmotion.server.WebMotionController; import org.debux.webmotion.server.render.Render; import org.nuiton.util.DateUtil; +import org.nuiton.wikitty.WikittyUtil; import org.nuiton.wikitty.entities.Element; import org.nuiton.wikitty.entities.ElementField; import org.nuiton.wikitty.entities.WikittyExtension; @@ -82,7 +84,7 @@ static final public String budgetDateFormat = "MM/yyyy"; static final public String summaryDateFormat = "dd/MM/yyyy hh:mm"; - static final public String solRDateFormat = "yyyy-MM-dd'T'hh:mm:ss'Z'"; + //static final public String solRDateFormat = "yyyy-MM-dd'T'hh:mm:ss'Z'"; protected <E> Map<String, List<Attachment>> prepareAttachment(ChoremClient client, Collection<E> ids) { // recherche des attachments de chaque quotation trouvee @@ -113,20 +115,20 @@ * @param v * @return */ - public double computeVacationDays(Vacation v) { - Date endDate = v.getEndDate(); - if (0 == DateUtils.getFragmentInSeconds(endDate, Calendar.DATE)) { - // on rajoute un jour pour que les vances du 01/01/2012 au 01/01/2012 - // represente bien un jour plein - endDate = DateUtils.addDays(endDate, 1); - } - long end = endDate.getTime(); - long begin = v.getBeginDate().getTime(); +// public double computeVacationDays(Vacation v) { +// Date endDate = v.getEndDate(); +// if (0 == DateUtils.getFragmentInSeconds(endDate, Calendar.DATE)) { +// // on rajoute un jour pour que les vances du 01/01/2012 au 01/01/2012 +// // represente bien un jour plein +// endDate = DateUtils.addDays(endDate, 1); +// } +// long end = endDate.getTime(); +// long begin = v.getBeginDate().getTime(); +// +// double result = (end - begin) / (1000.0 * 3600.0 * 24.0); +// return result; +// } - double result = (end - begin) / (1000.0 * 3600.0 * 24.0); - return result; - } - public double computeWorkingDays(ChoremClient client, Time t) { Configuration config = client.getConfiguration(); long workingTime = t.getEndDate().getTime() - t.getBeginDate().getTime(); @@ -295,7 +297,7 @@ return renderView("dashboardSummary.jsp", "date", now, - "now", DateFormatUtils.format(now, solRDateFormat), + "now", "\"" + WikittyUtil.toString(now) + "\"", //DateFormatUtils.format(now, solRDateFormat), "inOneWeek", DateFormatUtils.format(inOneWeek, summaryDateFormat), "invoiceDebtNb", invoiceDebtNb, "invoiceDebt", invoiceDebt, @@ -925,98 +927,100 @@ // //////////////////////////////////////////////////////////////////////////// - public Render vacationFilter(ChoremClient client, String query, String jspRender, EnumSet<VacationStatus> status) { - // recuperation des vacances en fonction de leur status - WikittyQuery vacationQuery = new WikittyQueryMaker().and() - .parse(query) - .containsOne(Vacation.FQ_FIELD_VACATION_STATUS, status) - .end(); - - WikittyQueryResult<Vacation> vacations = - client.findAllByQuery(Vacation.class, vacationQuery); - - Map<String, Double> days = new HashMap<String, Double>(); - for (Vacation v : vacations) { - double d = computeVacationDays(v); - days.put(v.getWikittyId(), d); - } - - return renderView(jspRender, - "vacations", vacations.getAll(), - "days", days - ); - - } - - /** - * Les vacances demandees par des employes non encore validee. - * @param client - * @param query - * @return - */ - public Render vacationAsked(ChoremClient client, String query) { - return vacationFilter(client, query, "dashboardVacationAsked.jsp", - EnumSet.of(VacationStatus.ASKED)); - } - - /** - * Les vacances validees - * @param client - * @param query - * @return - */ - public Render vacation(ChoremClient client, String query) { - return vacationFilter(client, query, "dashboardVacation.jsp", - EnumSet.of(VacationStatus.ACCEPTED)); - } - - public Render vacationByEmployee(ChoremClient client, String query) { - WikittyQuery vacationQuery = new WikittyQueryMaker().and() - .parse(query) - .eq(Vacation.FQ_FIELD_VACATION_STATUS, VacationStatus.ACCEPTED) - .end(); - - WikittyQueryResult<Vacation> vacations = - client.findAllByQuery(Vacation.class, vacationQuery); - - Map<Employee, Double> days = new MapWithDefault<Employee, Double>( - new HashMap<Employee, Double>(), Double.valueOf(0)); - for(Vacation v : vacations) { -// FIXME poussin 20121109 suite modif model, ne compile plus. Mais toutes ces vielles methodes devrait etre remplacee par des nouvelles -// donc on met simplement en commentaire pour l'instant pour que ca compile -// Employee e = v.getEmployee(false); -// double d = days.get(e) + computeVacationDays(v); +// public Render vacationFilter(ChoremClient client, String query, String jspRender, EnumSet<VacationStatus> status) { +// // recuperation des vacances en fonction de leur status +// WikittyQuery vacationQuery = new WikittyQueryMaker().and() +// .parse(query) +// .containsOne(Vacation.FQ_FIELD_VACATION_STATUS, status) +// .end(); +// +// WikittyQueryResult<Vacation> vacations = +// client.findAllByQuery(Vacation.class, vacationQuery); +// +// Map<String, Double> days = new HashMap<String, Double>(); +// for (Vacation v : vacations) { +// double d = computeVacationDays(v); +// days.put(v.getWikittyId(), d); +// } +// +// return renderView(jspRender, +// "vacations", vacations.getAll(), +// "days", days +// ); +// +// } +// +// /** +// * Les vacances demandees par des employes non encore validee. +// * @param client +// * @param query +// * @return +// */ +// public Render vacationAsked(ChoremClient client, String query) { +// return vacationFilter(client, query, "dashboardVacationAsked.jsp", +// EnumSet.of(VacationStatus.ASKED)); +// } +// +// /** +// * Les vacances validees +// * @param client +// * @param query +// * @return +// */ +// public Render vacation(ChoremClient client, String query) { +// return vacationFilter(client, query, "dashboardVacation.jsp", +// EnumSet.of(VacationStatus.ACCEPTED)); +// } +// +// public Render vacationByEmployee(ChoremClient client, String query) { +// WikittyQuery vacationQuery = new WikittyQueryMaker().and() +// .parse(query) +// .eq(Vacation.FQ_FIELD_VACATION_STATUS, VacationStatus.ACCEPTED) +// .end(); +// +// WikittyQueryResult<Vacation> vacations = +// client.findAllByQuery(Vacation.class, vacationQuery); +// +// Map<Employee, Double> days = new MapWithDefault<Employee, Double>( +// new HashMap<Employee, Double>(), Double.valueOf(0)); +//// for(Vacation v : vacations) { +//// Employee e = v.getEmployee(false); +//// double d = days.get(e) + computeVacationDays(v); +//// days.put(e, d); +//// } +// +// return renderView("dashboardVacationByEmployee.jsp", +// "vacationByEmployee", days +// ); +// } +// +// +// /** +// * Bilan du nombre de jour travaille sur des projets client depuis le 01/01 par employer de la +// * societe par defaut (Configuration.defaultCompany) +// */ +// public Render workingProjectDaysByEmployee(ChoremClient client, String query) { +// WikittyQuery vacationQuery = new WikittyQueryMaker().and() +// .parse(query) +// .exteq(Time.EXT_TIME) +// .end(); +// +// WikittyQueryResult<Time> times = +// client.findAllByQuery(Time.class, vacationQuery); +// +// Map<Employee, Double> days = new MapWithDefault<Employee, Double>( +// new HashMap<Employee, Double>(), Double.valueOf(0)); +// for(Time t : times) { +// Employee e = t.getEmployee(false); +// double d = days.get(e) + computeWorkingDays(client, t); // days.put(e, d); - } +// } +// +// return renderView("dashboardWorkingProjectDaysByEmployee.jsp", +// "workingProjectDaysByEmployee", days +// ); +// } + - return renderView("dashboardVacationByEmployee.jsp", - "vacationByEmployee", days - ); - } - /** - * Bilan du nombre de jour travaille sur des projets client depuis le 01/01 par employer de la - * societe par defaut (Configuration.defaultCompany) - */ - public Render workingProjectDaysByEmployee(ChoremClient client, String query) { - WikittyQuery vacationQuery = new WikittyQueryMaker().and() - .parse(query) - .exteq(Time.EXT_TIME) - .end(); - WikittyQueryResult<Time> times = - client.findAllByQuery(Time.class, vacationQuery); - - Map<Employee, Double> days = new MapWithDefault<Employee, Double>( - new HashMap<Employee, Double>(), Double.valueOf(0)); - for(Time t : times) { - Employee e = t.getEmployee(false); - double d = days.get(e) + computeWorkingDays(client, t); - days.put(e, d); - } - - return renderView("dashboardWorkingProjectDaysByEmployee.jsp", - "workingProjectDaysByEmployee", days - ); - } - } Modified: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java =================================================================== --- trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java 2012-11-30 18:54:54 UTC (rev 280) @@ -30,6 +30,8 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import java.util.Date; +import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.LinkedHashSet; @@ -53,6 +55,7 @@ import org.debux.webmotion.server.call.UploadFile; import org.debux.webmotion.server.mapping.Config; import org.debux.webmotion.server.render.Render; +import org.nuiton.wikitty.WikittyUtil; import org.nuiton.wikitty.entities.Element; import org.nuiton.wikitty.entities.ElementField; import org.nuiton.wikitty.entities.Wikitty; @@ -233,7 +236,7 @@ return renderView("search.jsp", "result", map); } - + /** * Execute une recherche et retourne le resultat sous un format json * <pre> @@ -479,7 +482,7 @@ // si des nouvelles valeurs sont en parametre, on change les valeurs // actuel du wikitty Map<String, Object> params = call.getExtractParameters(); - String error = setWikittyField(w, params); + String error = setWikittyField(w, "", params); // on recharge des entites qui ont pu apparaitre, pour pouvoir les afficher comme il faut client.preload(Collections.singleton(w), ".*"); @@ -487,9 +490,75 @@ return renderView("edit.jsp", "wikitty", w, "extensions", exts); } + + + public Render editMultiRender(ChoremClient client, String ids, String[] extension, Call call, String jspRender) { + log.debug("editMulti: " + ids); + // on preload rien, le preload sera fait a la fin + List<WikittyExtension> newExts = null; + + if (extension != null) { + // Be sure that the wikitty has good extension if wanted and their requirements + List<String> extensionNames = Arrays.asList(extension); + newExts = client.restoreExtensionAndDependenciesLastVesion(extensionNames); + } + + + String[] idArrays = StringUtils.split(ids, ","); + + List<String> tmpList = Arrays.asList(idArrays); + ids = ""; + // il faut parcourir la liste tmpList qui contient les ids passés en paramètre + for (int ii=0;ii<tmpList.size();ii++) { + // puis vérifier si l'id passé correspond a un wikitty + Wikitty nw = new WikittyImpl(tmpList.get(ii)); + ids += nw.getWikittyId()+","; + } + idArrays = StringUtils.split(ids, ","); + + List<Wikitty> ws = client.restore(Arrays.asList(idArrays)); + + + + for (Wikitty w : ws) { + + String error=""; + // si on ne retrouve pas l'objet demande, on en edit un nouveau +// Wikitty wNew = null; +// if (w==null) { +// wNew = new WikittyImpl(); +// } + + LinkedHashSet<WikittyExtension> exts = new LinkedHashSet<WikittyExtension>(); + if (extension == null) { + // Show all wikitty if no extension were mentioned + exts.addAll(w.getExtensions()); + } + + // si des nouvelles valeurs sont en parametre, on change les valeurs + // actuel du wikitty + Map<String, Object> params = call.getExtractParameters(); + + error += setWikittyField(w, "", params); + // on recharge des entites qui ont pu apparaitre, pour pouvoir les afficher comme il faut + client.preload(Collections.singleton(w), ".*"); + + getContext().addInfoMessage("message", "Warning: Can't put some value in object" + error + " ! "); + } + return renderView(jspRender, "ws", ws); + } + + + public Render editMulti(ChoremClient client, String ids, String[] extension, Call call) { + return editMultiRender(client, ids, extension, call, "editMulti.jsp"); + } + + + public Render save(ChoremClient client, String id, String[] extension, Call call) { log.debug("save: " + id); + Wikitty w = client.restore(id); if (w == null) { w = new WikittyImpl(); @@ -498,7 +567,7 @@ client.restoreExtensionAndDependenciesLastVesion(Arrays.asList(extension)); w.addExtension(exts); Map<String, Object> params = call.getExtractParameters(); - String error = setWikittyField(w, params); + String error = setWikittyField(w, "", params); client.store(w); getContext().addInfoMessage("message", "Object saved" + error); @@ -506,6 +575,39 @@ return renderURL("/wikitty/view/"+w.getWikittyId()); } + + public Render saveMulti(ChoremClient client, String[] ids, Call call) { + log.debug("save: " + ids); + + List<Wikitty> toSave = new LinkedList<Wikitty>(); + List<String> newIds = new LinkedList<String>(); + Map<String, Object> params = call.getExtractParameters(); + for (String id : ids) { + Wikitty w = client.restore(id); + if (w == null) { + w = new WikittyImpl(); + } + + + String[] extension = (String[]) params.get(id + ".extension"); + + + List<WikittyExtension> exts = + client.restoreExtensionAndDependenciesLastVesion(Arrays.asList(extension)); + w.addExtension(exts); + + String error = setWikittyField(w, id + ".", params); + getContext().addInfoMessage("message", "Object saved" + error); + toSave.add(w); + newIds.add(w.getWikittyId()); + } + + client.storeWikitty(toSave); + + return renderURL("/wikitty/search?query=id={" + StringUtils.join(newIds, ",") + "}"); + } + + /** * Modifie les valeurs de l'objet passe en parametre avec les valeurs de * champs que l'on arrive a retrouver dans le params. @@ -514,44 +616,48 @@ * @param params les parametres dans lequel on peut trouver des valeurs * @return une chaine representant toutes les erreurs rencontrees */ - protected String setWikittyField(Wikitty w, Map<String, Object> params) { + protected String setWikittyField(Wikitty w, String prefix, Map<String, Object> params) { String error = ""; for (String fqfield : params.keySet()) { - if (w.hasField(fqfield)) { - Object v; - if (w.getFieldType(fqfield).getType() == WikittyTypes.BINARY) { - //TODO : from file, get the binary, maybe configure mimeType field ? - UploadFile file = (UploadFile) params.get(fqfield); - v = file.getFile(); - } else { - String[] values = (String[]) params.get(fqfield); - if (log.isDebugEnabled()) { - log.debug("ZZZZ fqfield:"+fqfield+" values: " + Arrays.toString(values) + " size:" + values.length); - } - if (w.getFieldType(fqfield).isCollection()) { - if (values.length == 1 && w.getFieldType(fqfield).getType() == WikittyTypes.WIKITTY) { - // petit hack si l'editeur utilise n'est pas un select, - // mais un input (et donc des valeurs separees par des ',' - values = StringUtils.split(values[0], ","); - if (log.isDebugEnabled()) { - log.debug("YYYY " + Arrays.toString(values) + " size: " + values.length); + String fqfieldPre = fqfield; + if (StringUtils.startsWith(fqfield, prefix)) { + fqfield = StringUtils.removeStart(fqfield, prefix); + if (w.hasField(fqfield)) { + Object v; + if (w.getFieldType(fqfield).getType() == WikittyTypes.BINARY) { + //TODO : from file, get the binary, maybe configure mimeType field ? + UploadFile file = (UploadFile) params.get(fqfieldPre); + v = file.getFile(); + } else { + String[] values = (String[]) params.get(fqfieldPre); + if (log.isDebugEnabled()) { + log.debug("ZZZZ fqfield:" + fqfieldPre + " values: " + Arrays.toString(values) + " size:" + values.length); + } + if (w.getFieldType(fqfield).isCollection()) { + if (values.length == 1 && w.getFieldType(fqfield).getType() == WikittyTypes.WIKITTY) { + // petit hack si l'editeur utilise n'est pas un select, + // mais un input (et donc des valeurs separees par des ',' + values = StringUtils.split(values[0], ","); + if (log.isDebugEnabled()) { + log.debug("YYYY " + Arrays.toString(values) + " size: " + values.length); + } } + v = values; + } else { + v = values[0]; } - v = values; - } else { - v = values[0]; } - } - try { - w.setFqField(fqfield, v); - if (log.isDebugEnabled()) { - log.debug("XXX after field: " + w.getFqField(fqfield) + - "(" + ClassUtils.getSimpleName(w.getFqField(fqfield), "NULLclasse!!!") + ")"); + try { + w.setFqField(fqfield, v); + if (log.isDebugEnabled()) { + log.debug("XXX after field: " + w.getFqField(fqfield) + + "(" + ClassUtils.getSimpleName(w.getFqField(fqfield), "NULLclasse!!!") + ")"); + } + } catch (Exception eee) { + String msg = String.format("Can't put value '%s' in field '%s'", v, fqfield); + error += "\n<li>" + msg + "</li>"; + log.error(msg, eee); } - } catch (Exception eee) { - String msg = String.format("Can't put value '%s' in field '%s'", v, fqfield); - error += "\n<li>" + msg + "</li>"; - log.error(msg, eee); } } } Modified: trunk/chorem-webmotion/src/main/resources/mapping =================================================================== --- trunk/chorem-webmotion/src/main/resources/mapping 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-webmotion/src/main/resources/mapping 2012-11-30 18:54:54 UTC (rev 280) @@ -24,21 +24,29 @@ * /wikitty/{extension}/search action:GenericAction.search * /wikitty/{extension}/view/{id} action:GenericAction.view * /wikitty/{extension}/edit/{id} action:GenericAction.edit +* /wikitty/{extension}/editMulti/{ids} action:GenericAction.editMulti * /wikitty/{extension}/delete/{id} action:GenericAction.delete * /wikitty/search action:GenericAction.search * /wikitty/searchRelated?id={query} action:GenericAction.search * /wikitty/view/{id} action:GenericAction.view * /wikitty/edit/{id} action:GenericAction.edit +* /wikitty/editMulti/{ids} action:GenericAction.editMulti * /wikitty/delete/{id} action:GenericAction.delete * /wikitty/save action:GenericAction.save +* /wikitty/saveMulti action:GenericAction.saveMulti * /wikitty/view/{id}/{extension}/{field} action:GenericAction.download wmDecoratorNo=true * /wikitty-json/searchField?q={query} action:GenericAction.searchFieldJson * /wikitty-json/search?q={query} action:GenericAction.searchJson * /wikitty-json/search?term={query} action:GenericAction.searchJson * /wikitty-json/get/{id} action:GenericAction.getById * /fragment/dashboard/{method} action:DashboardAction.{method} +* /fragment/dashboardHR/{method} action:DashboardHRAction.{method} * /admin view:contact.jsp * /admin/{method} action:AdminAction.{method} * /contact view:contact.jsp * /report view:report.jsp * /hr view:hr.jsp +* /hr/vacationRequest/edit/{id} action:HrAction.editVacationRequest +* /hr/vacationDiv/{ids} action:HrAction.editVacationDiv +* /hr/vacationRequest/save action:HrAction.saveVacationRequest +* /vracble action:VracBle.testBle Copied: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardRequestVacation.jsp (from rev 271, trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp) =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardRequestVacation.jsp (rev 0) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardRequestVacation.jsp 2012-11-30 18:54:54 UTC (rev 280) @@ -0,0 +1,60 @@ +<%-- + #%L + Chorem webmotion + $Id:$ + $HeadURL:$ + %% + Copyright (C) 2011 - 2012 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %> +<%@ taglib uri="/WEB-INF/wikitty.tld" prefix="w"%> + +<h1>${title}</h1> + +<table class="table table-striped table-bordered table-condensed"> + <thead> + <tr> + <th></th> + <th>Employee</th> + <th>Type</th> + <th>Start date</th> + <th>End date</th> + <th>Days</th> + <th>Status</th> + <th>Request Date</th> + </tr> + </thead> + + <c:forEach var="q" items="${vacations}"> + <tbody> + <tr> + <td><a href="hr/vacationRequest/edit/${q.vacationRequest}" />Edit</a></td> + <td><w:display wikitty="${q.wikitty}" toString="${q.getVacationRequest(true).getEmployeeRequest(false)}" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Vacation.typeLeave" label=""/></td> + <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Interval.beginDate" label=""/></td> + <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Interval.endDate" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Vacation.amount" label=""/></td> + <td><w:display wikitty="${q.wikitty}" toString="${q.getVacationRequest(false).statusRequest}" label=""/></td> + <td class="date"><w:display wikitty="${q.wikitty}" toString="${q.getVacationRequest(false).dateRequest}" label=""/></td> + </tr> + </tbody> + </c:forEach> +</table> + + Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardSummary.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardSummary.jsp 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardSummary.jsp 2012-11-30 18:54:54 UTC (rev 280) @@ -41,7 +41,7 @@ factures à payer</a> pour un montant de <f:formatNumber type="currency" value="${invoiceDebt}"/></li> <li>Il y a ${invoiceIncomeNb} - <a href='<c:url value="/report?report=invoiceIncome&query=Invoice.paymentDate=null Invoice.expectedDate<${now}"/>'> + <a href='<c:url value="/report?report=invoiceIncome&query=Invoice.paymentDate=null and Invoice.expectedDate<${now}"/>'> factures impayées</a> pour un montant de <f:formatNumber type="currency" value="${invoiceIncome}"/></li> <li>Il y a ${touchNb} <a href='<c:url value="/wikitty/search?query=${touchQueryString}"/>'> Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp 2012-11-30 18:54:54 UTC (rev 280) @@ -52,4 +52,4 @@ </tr> </tbody> </c:forEach> -</table> +</table> \ No newline at end of file Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/decorator.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/decorator.jsp 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/decorator.jsp 2012-11-30 18:54:54 UTC (rev 280) @@ -36,9 +36,9 @@ <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> - <script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/jquery.ui.datepicker-fr.js"></script> - <script type="text/javascript" src="<c:url value="/js/jquery-ui-timepicker-addon.js "/>"></script> - <script type="text/javascript" src="<c:url value="/js/jquery-ui-timepicker-fr.js "/>"></script> + <script type="text/javascript" src="<c:url value="/js/jquery.ui.datepicker-fr.js"/>"></script> + <script type="text/javascript" src="<c:url value="/js/jquery-ui-timepicker-addon.js"/>"></script> + <script type="text/javascript" src="<c:url value="/js/jquery-ui-timepicker-fr.js"/>"></script> <%-- Bootstrap --%> <link rel="stylesheet" href="<c:url value="/css/bootstrap.min.css"/>"> <link rel="stylesheet" href="<c:url value="/css/bootstrap-responsive.min.css"/>"> @@ -163,12 +163,20 @@ <b class="caret"></b> </a> <ul class="dropdown-menu"> + <li>Reference Year</li> + <li><a href="<c:url value="/wikitty/ReferenceYear/search"/>"><i class="icon-th-list icon-black"></i> All years</a></li> + <li><a href="<c:url value="/wikitty/ReferenceYear/edit/new"/>"><i class="icon-plus icon-black"></i> Add year</a></li> + <li>Employee HR</li> + <li><a href="<c:url value="/wikitty/EmployeeHR/search"/>"><i class="icon-th-list icon-black"></i> All employees</a></li> + <li><a href="<c:url value="/wikitty/EmployeeHR/edit/new"/>"><i class="icon-plus icon-black"></i> Add employee</a> <li>Vacation</li> <li><a href="<c:url value="/wikitty/Vacation/search"/>"><i class="icon-th-list icon-black"></i> All vacations</a></li> <li><a href="<c:url value="/wikitty/Vacation/edit/new"/>"><i class="icon-plus icon-black"></i> Add vacation</a></li> - <li class="divider"></li> - <li><a href="<c:url value="/wikitty/search?query=extension=Employee"/>">Employee</a></li> - <li><a href="<c:url value="/wikitty/search?query=extension=Interview"/>">Annual interview</a></li> + <li>Vacation Request</li> + <li><a href="<c:url value="/wikitty/VacationRequest/search"/>"><i class="icon-th-list icon-black"></i> All requests</a></li> + <li><a href="<c:url value="/wikitty/VacationRequest/edit/new"/>"><i class="icon-plus icon-black"></i> Add request</a></li> + <li><a href="<c:url value="/report?report=requestVacation"/>"><i class="icon-th-list icon-black"></i> Dashboard vacations</a></li> + <li><a href="<c:url value="/hr/vacationRequest/edit/new"/>"><i class="icon-plus icon-black"></i> Add Leave Request</a></li> </ul> </li> <li class="dropdown nav-group"> Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/report.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/report.jsp 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/report.jsp 2012-11-30 18:54:54 UTC (rev 280) @@ -58,3 +58,8 @@ <c:if test="${report == null || report == '' || report.contains('annualProfit')}"> <jsp:include page="/fragment/dashboard/annualProfit"/> </c:if> + + <%-- Tableau des congés --%> + <c:if test="${report == null || report == '' || report.contains('requestVacation')}"> + <jsp:include page="/fragment/dashboardHR/requestVacation"/> + </c:if> Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/view.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/view.jsp 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/view.jsp 2012-11-30 18:54:54 UTC (rev 280) @@ -35,6 +35,7 @@ <c:forEach var="ext" items="${extensions}"> <dl><dt><a href="<c:url value="/wikitty/search?extension=${ext.name}"/>">${ext.name}</a> <a class="btn btn-success btn-mini" href="<c:url value="/wikitty/edit/${wikitty.id}?extension=${ext.name}"/>"><i class="icon-pencil icon-white"></i> Edit</a> + <a class="btn btn-success btn-mini" href="<c:url value="/wikitty/editMulti/${wikitty.id}"/>"><i class="icon-pencil icon-white"></i> Edit Multi</a> <a class="btn btn-danger btn-mini" href="<c:url value="/wikitty/delete/${wikitty.id}?extension=${ext.name}&wmDecoratorNo=true"/>"><i class="icon-trash icon-white"></i> Delete</a></dt> <c:forEach var="fieldName" items="${ext.fieldNames}"> <dd><w:display wikitty="${wikitty}" fqfield="${ext.name}.${fieldName}"/></dd> Modified: trunk/chorem-webmotion/src/main/webapp/js/chorem.js =================================================================== --- trunk/chorem-webmotion/src/main/webapp/js/chorem.js 2012-11-30 18:41:13 UTC (rev 279) +++ trunk/chorem-webmotion/src/main/webapp/js/chorem.js 2012-11-30 18:54:54 UTC (rev 280) @@ -78,3 +78,36 @@ } }); +// ajout ble +// clic sur les cases à cocher half-day d'une vacation (VacationRequest) + +function change12or00(dt,dtVal,tim) { + if (tim) { + dtVal = dtVal.substring(0,11)+"12:00"; + } + else { + dtVal = dtVal.substring(0,11)+"00:00"; + } + dt.val(dtVal); +} + + +function gazou() { + $(".beginDateTR :checkbox").attr('checked',true); +}; + +$(document).ready(function() { + $('.beginDateTR :checkbox').change(function(){ + var dtetim = $(this).parent().parent().children('.beginDateTD').children('input'); + var dtetimVal = dtetim.attr("value"); + change12or00(dtetim,dtetimVal,$(this).attr("checked")); + }); +}); + +$(document).ready(function() { + $('.endDateTR :checkbox').change(function(){ + var dtetim = $(this).parent().parent().children('.endDateTD').children('input'); + var dtetimVal = dtetim.attr("value"); + change12or00(dtetim,dtetimVal,$(this).attr("checked")); + }); +});