Chorem-commits
Threads by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 542 discussions
Author: bpoussin
Date: 2012-08-08 19:45:19 +0200 (Wed, 08 Aug 2012)
New Revision: 236
Url: http://chorem.org/repositories/revision/chorem/236
Log:
changement de version de l'objet
Modified:
trunk/chorem-entities/src/main/xmi/chorem-model.properties
Modified: trunk/chorem-entities/src/main/xmi/chorem-model.properties
===================================================================
--- trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-08 17:44:53 UTC (rev 235)
+++ trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-08 17:45:19 UTC (rev 236)
@@ -108,7 +108,7 @@
#
# Invoiceable
#
-org.chorem.entities.Invoiceable.class.tagvalue.version=11.0
+org.chorem.entities.Invoiceable.class.tagvalue.version=12.0
org.chorem.entities.Invoiceable.class.tagvalue.preload=Invoiceable.target;Invoiceable.category
org.chorem.entities.Invoiceable.class.tagvalue.toString=%Invoiceable.name|noname$s
org.chorem.entities.Invoiceable.class.tagvalue.sortOrder=Invoiceable.name
1
0
Author: bpoussin
Date: 2012-08-08 19:44:53 +0200 (Wed, 08 Aug 2012)
New Revision: 235
Url: http://chorem.org/repositories/revision/chorem/235
Log:
les zones de script doivent etre multiligne
Modified:
trunk/chorem-entities/src/main/xmi/chorem-model.properties
Modified: trunk/chorem-entities/src/main/xmi/chorem-model.properties
===================================================================
--- trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-08 17:26:01 UTC (rev 234)
+++ trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-08 17:44:53 UTC (rev 235)
@@ -115,8 +115,11 @@
org.chorem.entities.Invoiceable.attribute.name.tagvalue.help=Nom de ce facturable (si n\u00e9cessaire) ex: "facture VSR"
org.chorem.entities.Invoiceable.attribute.target.tagvalue.help=L'objet sur lequel la facture s'appliquera
org.chorem.entities.Invoiceable.attribute.condition.tagvalue.help=Script qui lorsqu'il est \u00e9valu\u00e9 \u00e0 TRUE cr\u00e9e la facture
+org.chorem.entities.Invoiceable.attribute.condition.tagvalue.subtype=application/javascript
org.chorem.entities.Invoiceable.attribute.value.tagvalue.help=Script qui permet de calculer le montant de la facture
+org.chorem.entities.Invoiceable.attribute.value.tagvalue.subtype=application/javascript
org.chorem.entities.Invoiceable.attribute.recurrence.tagvalue.help=Script qui permet de calculer la r\u00e9currence de cette facture
+org.chorem.entities.Invoiceable.attribute.recurrence.tagvalue.subtype=application/javascript
org.chorem.entities.Invoiceable.attribute.mimetype.tagvalue.help=Langage utilis\u00e9 pour les scripts (ex: application/javascript)
org.chorem.entities.Invoiceable.attribute.category.tagvalue.help=La cat\u00e9gorie de cette facture
#
1
0
r234 - in trunk: chorem-entities/src/main/xmi chorem-webmotion/src/main/java/org/chorem/webmotion/actions chorem-webmotion/src/main/java/org/wikitty/web/jsptag chorem-webmotion/src/main/webapp/WEB-INF/jsp
by bpoussin@users.chorem.org Aug. 8, 2012
by bpoussin@users.chorem.org Aug. 8, 2012
Aug. 8, 2012
Author: bpoussin
Date: 2012-08-08 19:26:01 +0200 (Wed, 08 Aug 2012)
New Revision: 234
Url: http://chorem.org/repositories/revision/chorem/234
Log:
- gros travail de description des entit?\195?\169s
- petite correction de bug sur les viewAction
Added:
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionQuotation.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionTask.jsp
Modified:
trunk/chorem-entities/src/main/xmi/chorem-model.properties
trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java
trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java
trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyInput.java
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionCompany.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionPerson.jsp
Modified: trunk/chorem-entities/src/main/xmi/chorem-model.properties
===================================================================
--- trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-08 15:58:13 UTC (rev 233)
+++ trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-08 17:26:01 UTC (rev 234)
@@ -20,42 +20,231 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #L%
###
+
+#
+# Attachment
+#
+org.chorem.entities.Attachment.class.tagvalue.version=9.0
+org.chorem.entities.Attachment.class.tagvalue.toString=%Attachment.name|noname$s (%Attachment.mimetype|notype$s) %Attachment.date$tF
+org.chorem.entities.Attachment.class.tagvalue.sortOrder=Attachment.name,Attachment.mimetype,Attachment.date
+org.chorem.entities.Attachment.attribute.name.tagvalue.help=Le nom de la pi\u00e8ce attach\u00e9e (souvent le nom du fichier)
+org.chorem.entities.Attachment.attribute.target.tagvalue.help=L'objet auquel attacher cette pi\u00e8ce (ex: un devis, une facture, ...)
+org.chorem.entities.Attachment.attribute.date.tagvalue.help=La date d'ajout de cette pi\u00e8ce
+org.chorem.entities.Attachment.attribute.mimetype.tagvalue.help=Le type mime de la pi\u00e8ce attach\u00e9e (ex: application/pdf)
+org.chorem.entities.Attachment.attribute.mimetype.tagvalue.choiceQuery=SELECT Attachment.mimetype WHERE extension=Attachment
+org.chorem.entities.Attachment.attribute.content.tagvalue.help=Le fichier \u00e0 importer
+org.chorem.entities.Attachment.attribute.contentUrl.tagvalue.help=Si on ne souhaite pas importer le fichier, on peut indiquer ici sont URL (ex: http://commun.codelutin.home/Clients/...)
+#
+# Configuration
+#
org.chorem.entities.Configuration.class.tagvalue.version=3.0
-org.chorem.entities.Category.class.tagvalue.version=4.0
+#
+# category
+#
+org.chorem.entities.Category.class.tagvalue.version=5.0
org.chorem.entities.Category.class.tagvalue.toString=%WikittyTreeNode.name|noname$s
-org.chorem.entities.Project.class.tagvalue.version=6.0
+org.chorem.entities.Category.attribute.index.tagvalue.help=La position de cette cat\u00e9gorie dans son niveau
+org.chorem.entities.WikittyTreeNode.attribute.name.tagvalue.help=Le nom pour cette cat\u00e9gorie (ex: d\u00e9pense, Salaire, ...)
+org.chorem.entities.WikittyTreeNode.attribute.attachment.tagvalue.visible=false
+org.chorem.entities.WikittyTreeNode.attribute.parent.tagvalue.help=La cat\u00e9gorie Parente de celle-ci (ex: d\u00e9pense pour Loyer)
+org.chorem.entities.WikittyTreeNode.attribute.parent.tagvalue.allowed=Category
+#
+# Company
+#
+org.chorem.entities.Company.class.tagvalue.version=7.0
+org.chorem.entities.Company.class.tagvalue.toString=%Company.name|noname$s
+org.chorem.entities.Company.class.tagvalue.sortOrder=Company.name
+org.chorem.entities.Company.attribute.name.tagvalue.help=Nom de la soci\u00e9t\u00e9
+org.chorem.entities.Company.attribute.type.tagvalue.help=type de la soci\u00e9t\u00e9 (SARL, SA, SAS, ...)
+org.chorem.entities.Company.attribute.type.tagvalue.choiceQuery=SELECT Company.type WHERE extension=Company
+#
+# ContactDetails
+#
+org.chorem.entities.ContactDetails.class.tagvalue.version=7.0
+org.chorem.entities.ContactDetails.class.tagvalue.toString=%ContactDetails.type|notype$s %ContactDetails.name|noname$s %ContactDetails.value$s
+org.chorem.entities.ContactDetails.class.tagvalue.sortOrder=ContactDetails.type, ContactDetails.name,ContactDetails.value
+org.chorem.entities.ContactDetails.attribute.name.tagvalue.help=Le nom utiliser pour cette adresse (ex: domicile, bureau, ...)
+org.chorem.entities.ContactDetails.attribute.name.tagvalue.choiceQuery=SELECT ContactDetails.name WHERE extension=ContactDetails
+org.chorem.entities.ContactDetails.attribute.type.tagvalue.help=Le type d'adresse (ex: mail, phone, im, web, ...)
+org.chorem.entities.ContactDetails.attribute.type.tagvalue.choiceQuery=SELECT ContactDetails.type WHERE extension=ContactDetails
+org.chorem.entities.ContactDetails.attribute.value.tagvalue.help=L'adresse en elle m\u00eame
+org.chorem.entities.ContactDetails.attribute.target.tagvalue.help=L'objet sur lequel porte cette adresse
+#
+# Employee
+#
+org.chorem.entities.Employee.class.tagvalue.version=9.0
+org.chorem.entities.Employee.class.tagvalue.preload=Employee.company;Employee.person
+org.chorem.entities.Employee.class.tagvalue.toString=%Employee.person$s (%Employee.company$s)
+org.chorem.entities.Employee.class.tagvalue.sortOrder=Employee.company,Employee.person
+org.chorem.entities.Employee.attribute.type.tagvalue.help=Le type de contrat de travail (CDI, CDD, Stage, ...)
+org.chorem.entities.Employee.attribute.type.tagvalue.choiceQuery=SELECT Employee.type WHERE extension=Employee
+org.chorem.entities.Employee.attribute.paidLeave.tagvalue.help=Le nombre de jours de cong\u00e9s pay\u00e9s
+org.chorem.entities.Employee.attribute.rtt.tagvalue.help=Le nombre de jours de RTT
+org.chorem.entities.Employee.attribute.salary.tagvalue.help=Le salaire brut mensuel
+org.chorem.entities.Employee.attribute.workingTime.tagvalue.help=Le temps de travail mensuel
+org.chorem.entities.Employee.attribute.description.tagvalue.help=Description du poste
+org.chorem.entities.Employee.attribute.description.tagvalue.subtype=text/rst
+org.chorem.entities.Employee.attribute.person.tagvalue.help=Autocompl\u00e8tion possible
+org.chorem.entities.Employee.attribute.company.tagvalue.help=Autocompl\u00e8tion possible
+#
+# Invoice
+#
+org.chorem.entities.Invoice.class.tagvalue.version=12.0
+org.chorem.entities.Invoice.class.tagvalue.preload=Invoice.customer;Invoice.supplier
+org.chorem.entities.Invoice.class.tagvalue.toString=%Invoice.reference|noref$s %Invoice.amount|noamount$s %Invoice.postedDate$tF %Invoice.expectedDate$tF %Invoice.paymentDate$tF
+org.chorem.entities.Invoice.class.tagvalue.sortOrder=Invoice.postedDate desc,Invoice.expectedDate,Invoice.paymentDate,Invoice.reference,Invoice.amount
+org.chorem.entities.Invoice.attribute.reference.tagvalue.help=La r\u00e9f\u00e9rence de la facture
+org.chorem.entities.Invoice.attribute.description.tagvalue.help=la description de la facture (ce sur quoi elle porte)
+org.chorem.entities.Invoice.attribute.description.tagvalue.subtype=text/rst
+org.chorem.entities.Invoice.attribute.amount.tagvalue.help=Le montant HT de la facture
+org.chorem.entities.Invoice.attribute.amount.tagvalue.subtype=currency
+org.chorem.entities.Invoice.attribute.VTA.tagvalue.help=La TVA \u00e0 appliquer \u00e0 la facture
+org.chorem.entities.Invoice.attribute.postedDate.tagvalue.help=La date d'envoi au client
+org.chorem.entities.Invoice.attribute.expectedDate.tagvalue.help=La date souhait\u00e9e de paiement
+org.chorem.entities.Invoice.attribute.paymentDate.tagvalue.help=La date de paiement r\u00e9elle
+org.chorem.entities.Invoice.attribute.supplier.tagvalue.help=La personne chez Code Lutin qui g\u00e8re la facturation
+org.chorem.entities.Invoice.attribute.supplier.tagvalue.allowedQuery=SELECT id WHERE Employee.company="1628bcf9-82ea-440d-ab8d-ea93498af2d9"
+org.chorem.entities.Invoice.attribute.customer.tagvalue.help=La personne chez le client \u00e0 qui ont a envoyer la facture
+#
+# Invoiceable
+#
+org.chorem.entities.Invoiceable.class.tagvalue.version=11.0
+org.chorem.entities.Invoiceable.class.tagvalue.preload=Invoiceable.target;Invoiceable.category
+org.chorem.entities.Invoiceable.class.tagvalue.toString=%Invoiceable.name|noname$s
+org.chorem.entities.Invoiceable.class.tagvalue.sortOrder=Invoiceable.name
+org.chorem.entities.Invoiceable.attribute.name.tagvalue.help=Nom de ce facturable (si n\u00e9cessaire) ex: "facture VSR"
+org.chorem.entities.Invoiceable.attribute.target.tagvalue.help=L'objet sur lequel la facture s'appliquera
+org.chorem.entities.Invoiceable.attribute.condition.tagvalue.help=Script qui lorsqu'il est \u00e9valu\u00e9 \u00e0 TRUE cr\u00e9e la facture
+org.chorem.entities.Invoiceable.attribute.value.tagvalue.help=Script qui permet de calculer le montant de la facture
+org.chorem.entities.Invoiceable.attribute.recurrence.tagvalue.help=Script qui permet de calculer la r\u00e9currence de cette facture
+org.chorem.entities.Invoiceable.attribute.mimetype.tagvalue.help=Langage utilis\u00e9 pour les scripts (ex: application/javascript)
+org.chorem.entities.Invoiceable.attribute.category.tagvalue.help=La cat\u00e9gorie de cette facture
+#
+# Interval
+#
+org.chorem.entities.Interval.class.tagvalue.version=8.0
+org.chorem.entities.Interval.class.tagvalue.toString=%Interval.beginDate$tF-%Interval.endDate$tF
+org.chorem.entities.Interval.class.tagvalue.sortOrder=Interval.beginDate,Interval.endDate
+org.chorem.entities.Interval.attribute.beginDate.tagvalue.subtype=datetime
+org.chorem.entities.Interval.attribute.endDate.tagvalue.subtype=datetime
+#
+# Note
+#
+org.chorem.entities.Note.class.tagvalue.version=3.0
+org.chorem.entities.Note.class.tagvalue.toString=(%Note.date$tF) %Note.title|noname$s
+org.chorem.entities.Note.class.tagvalue.sortOrder=Note.date desc
+org.chorem.entities.Note.attribute.date.tagvalue.help=La date de cr\u00e9ation de cette note
+org.chorem.entities.Note.attribute.title.tagvalue.help=Le titre de la note
+org.chorem.entities.Note.attribute.content.tagvalue.help=Le contenu de la note
+org.chorem.entities.Note.attribute.content.tagvalue.subtype=text/rst
+org.chorem.entities.Note.attribute.target.tagvalue.help=L'objet sur lequel porte la note (ex: un projet, une personne, ...)
+#
+# Person
+#
+org.chorem.entities.Person.class.tagvalue.version=7.0
+org.chorem.entities.Person.class.tagvalue.toString=%Person.lastName$s %Person.firstName|noname$s
+org.chorem.entities.Person.class.tagvalue.sortOrder=Person.lastName,Person.firstName
+org.chorem.entities.Person.attribute.diploma.tagvalue.help=Le plus haut dipl\u00f4me obtenu
+#
+# Project
+#
+org.chorem.entities.Project.class.tagvalue.version=7.0
org.chorem.entities.Project.class.tagvalue.toString=%Project.name|noname$s
org.chorem.entities.Project.class.tagvalue.sortOrder=Project.name
-org.chorem.entities.Task.class.tagvalue.version=9.0
+org.chorem.entities.Project.attribute.name.tagvalue.help=Le nom du projet
+org.chorem.entities.Project.attribute.name.tagvalue.fieldIndex=0
+org.chorem.entities.Project.attribute.description.tagvalue.help=La description du projet
+org.chorem.entities.Project.attribute.description.tagvalue.subtype=text/rst
+#
+# Quotation
+#
+org.chorem.entities.Quotation.class.tagvalue.version=15.0
+org.chorem.entities.Quotation.class.tagvalue.preload=Quotation.project;Quotation.customer;Quotation.supplier;Quotation.category
+org.chorem.entities.Quotation.class.tagvalue.toString=%Interval.beginDate$tF-%Interval.endDate$tF %Quotation.reference|noref$s(%Quotation.category|noCategory$s) %Quotation.description|nodescription$s
+org.chorem.entities.Quotation.class.tagvalue.sortOrder=Interval.beginDate desc,Interval.endDate,Quotation.reference,Quotation.type,Quotation.description
+org.chorem.entities.Quotation.attribute.status.tagvalue.allowed=LEAD,DRAFT,SENT,REJECTED,ACCEPTED,STARTED,DELIVERED,RSV,WARRANTY,CLOSED
+org.chorem.entities.Quotation.attribute.reference.tagvalue.help=R\u00e9f\u00e9rence du devis
+org.chorem.entities.Quotation.attribute.description.tagvalue.help=R\u00e9sum\u00e9 du devis (en quelque mot)
+org.chorem.entities.Quotation.attribute.description.tagvalue.subtype=text/rst
+org.chorem.entities.Quotation.attribute.estimatedDays.tagvalue.help=Le nombre de jour estim\u00e9 pour ce devis
+org.chorem.entities.Quotation.attribute.amount.tagvalue.help=Montant du devis HT
+org.chorem.entities.Quotation.attribute.amount.tagvalue.subtype=currency
+org.chorem.entities.Quotation.attribute.VTA.tagvalue.help=Taxe a appliquer au montant
+org.chorem.entities.Quotation.attribute.VTA.tagvalue.subtype=percent
+org.chorem.entities.Quotation.attribute.postedDate.tagvalue.help=Date d'envoi du devis au client
+org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.help=Pourcentage de r\u00e9ussite du projet
+org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.subtype=percent
+org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.min=0
+org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.max=1
+org.chorem.entities.Quotation.attribute.status.tagvalue.help=\u00c9tat d'avancement de ce devis
+org.chorem.entities.Quotation.attribute.vrsPeriod.tagvalue.help=Nombre de jour de VSR (Validation en Service R\u00e9gulier)
+org.chorem.entities.Quotation.attribute.vrsPeriod.tagvalue.subtype=integer
+org.chorem.entities.Quotation.attribute.warrantyPeriod.tagvalue.help=Nombre de jour de garantie
+org.chorem.entities.Quotation.attribute.warrantyPeriod.tagvalue.subtype=integer
+org.chorem.entities.Quotation.attribute.vrsStart.tagvalue.help=Date de d\u00e9but de la VSR (Validation en Service R\u00e9gulier)
+org.chorem.entities.Quotation.attribute.warrantyStart.tagvalue.help=Date de d\u00e9but de la garantie
+org.chorem.entities.Quotation.attribute.supplier.tagvalue.help=La personne en charge du dossier chez Code Lutin
+org.chorem.entities.Quotation.attribute.supplier.tagvalue.allowedQuery=SELECT id WHERE Employee.company="1628bcf9-82ea-440d-ab8d-ea93498af2d9"
+org.chorem.entities.Quotation.attribute.customer.tagvalue.help=La personne en charge du dossier chez le client
+org.chorem.entities.Quotation.attribute.project.tagvalue.help=Le projet auquel se rapport ce devis
+org.chorem.entities.Quotation.attribute.category.tagvalue.help=La cat\u00e9gorie de ce devis
+#
+# Task
+#
+org.chorem.entities.Task.class.tagvalue.version=10.0
org.chorem.entities.Task.class.tagvalue.toString=%Task.name|noname$s - %Task.quotation$s
org.chorem.entities.Task.class.tagvalue.sortOrder=Task.name
org.chorem.entities.Task.class.tagvalue.preload=Task.quotation
+org.chorem.entities.Task.attribute.description.tagvalue.help=R\u00e9sum\u00e9 de ce qu'il devra \u00eatre fait durant cette t\u00e2che
+org.chorem.entities.Task.attribute.description.tagvalue.subtype=text/rst
+org.chorem.entities.Task.attribute.price.tagvalue.help=Montant HT de cette t\u00e2che
+org.chorem.entities.Task.attribute.reestimatedEnd.tagvalue.help=Date estim\u00e9e de fin de t\u00e2che
+org.chorem.entities.Task.attribute.estimatedDays.tagvalue.help=Le nombre de jours estim\u00e9s pour cette t\u00e2che
+org.chorem.entities.Task.attribute.name.tagvalue.help=Nom de la t\u00e2che ou N\u00b0 dans le devis
+org.chorem.entities.Task.attribute.status.tagvalue.help=\u00c9tat actuel de la t\u00e2che
org.chorem.entities.Task.attribute.status.tagvalue.allowed=SCHEDULED,STARTED,FINISHED,CLOSED
-org.chorem.entities.Worker.class.tagvalue.version=7.0
+org.chorem.entities.Task.attribute.quotation.tagvalue.help=Devis auquel appartient cette t\u00e2che
+#
+# Time
+#
+org.chorem.entities.Time.class.tagvalue.version=9.0
+org.chorem.entities.Time.class.tagvalue.preload=Time.task;Time.employee
+org.chorem.entities.Time.class.tagvalue.toString=%Time.employee$s - %Time.task$s - %Interval.beginDate$tF-%Interval.endDate$tF
+org.chorem.entities.Time.attribute.task.tagvalue.help=La ta\u0109he auquel il faut assigner du temps
+org.chorem.entities.Time.attribute.task.tagvalue.fieldIndex=0
+org.chorem.entities.Time.attribute.employee.tagvalue.help=L'employer qui a pass\u00e9 du temps sur la t\u00e2che
+#
+# Touch
+#
+org.chorem.entities.Touch.class.tagvalue.version=9.0
+org.chorem.entities.Touch.class.tagvalue.preload=Touch.participant
+org.chorem.entities.Touch.class.tagvalue.toString=%Interval.beginDate$tF - %Touch.type$s - %Touch.goal|nogoal$s
+org.chorem.entities.Touch.class.tagvalue.sortOrder=Interval.beginDate desc,Touch.type,Touch.goal
+org.chorem.entities.Touch.attribute.goal.tagvalue.help=But de la prise de contact
+org.chorem.entities.Touch.attribute.goal.tagvalue.subtype=text/rst
+org.chorem.entities.Touch.attribute.digest.tagvalue.help=R\u00e9sum\u00e9 de l'\u00e9change durant la prise de contact
+org.chorem.entities.Touch.attribute.digest.tagvalue.subtype=text/rst
+org.chorem.entities.Touch.attribute.type.tagvalue.help=Le type de contact (t\u00e9l\u00e9phone, visio, physique, ...)
+org.chorem.entities.Touch.attribute.type.tagvalue.choiceQuery=SELECT Touch.type WHERE extension=Touch
+org.chorem.entities.Touch.attribute.link.tagvalue.help=Sur quoi portait le contact (un projet, un devis, ...)
+org.chorem.entities.Touch.attribute.participant.tagvalue.help=Liste des personnes qui \u00e9taient pr\u00e9sentes
+#
+# Worker
+#
+org.chorem.entities.Worker.class.tagvalue.version=8.0
org.chorem.entities.Worker.class.tagvalue.toString=%Worker.person$s - %Worker.task$s - %Worker.percentage|nopercentage$s
org.chorem.entities.Worker.class.tagvalue.sortOrder=Worker.percentage
org.chorem.entities.Worker.class.tagvalue.preload=Worker.person;Work.task
-org.chorem.entities.Person.class.tagvalue.version=6.0
-org.chorem.entities.Person.class.tagvalue.toString=%Person.lastName$s %Person.firstName|noname$s
-org.chorem.entities.Person.class.tagvalue.sortOrder=Person.lastName,Person.firstName
-org.chorem.entities.Interval.class.tagvalue.version=8.0
-org.chorem.entities.Interval.class.tagvalue.toString=%Interval.beginDate$tF-%Interval.endDate$tF
-org.chorem.entities.Interval.class.tagvalue.sortOrder=Interval.beginDate,Interval.endDate
-org.chorem.entities.Interval.attribute.beginDate.tagvalue.subtype=datetime
-org.chorem.entities.Interval.attribute.endDate.tagvalue.subtype=datetime
-org.chorem.entities.Company.class.tagvalue.version=6.0
-org.chorem.entities.Company.class.tagvalue.toString=%Company.name|noname$s
-org.chorem.entities.Company.class.tagvalue.sortOrder=Company.name
-org.chorem.entities.ContactDetails.class.tagvalue.version=6.0
-org.chorem.entities.ContactDetails.class.tagvalue.toString=%ContactDetails.type|notype$s %ContactDetails.name|noname$s %ContactDetails.value$s
-org.chorem.entities.ContactDetails.class.tagvalue.sortOrder=ContactDetails.type, ContactDetails.name,ContactDetails.value
-org.chorem.entities.Time.class.tagvalue.version=8.0
-org.chorem.entities.Time.class.tagvalue.preload=Time.task;Time.employee
-org.chorem.entities.Time.class.tagvalue.toString=%Time.employee$s - %Time.task$s - %Interval.beginDate$tF-%Interval.endDate$tF
-org.chorem.entities.Employee.class.tagvalue.version=8.0
-org.chorem.entities.Employee.class.tagvalue.preload=Employee.company;Employee.person
-org.chorem.entities.Employee.class.tagvalue.toString=%Employee.person$s (%Employee.company$s)
-org.chorem.entities.Employee.class.tagvalue.sortOrder=Employee.company,Employee.person
+org.chorem.entities.Worker.attribute.task.tagvalue.help=La t\u00e2che auquel on assigne quelqu'un
+org.chorem.entities.Worker.attribute.person.tagvalue.help=La personne \u00e0 ajouter en tant que travaillant sur cette t\u00e2che
+org.chorem.entities.Worker.attribute.percentage.tagvalue.help=Le pourcentage de temps de la personne sur cette t\u00e2che
+org.chorem.entities.Worker.attribute.percentage.tagvalue.fieldIndex=10
+org.chorem.entities.Worker.attribute.percentage.tagvalue.subtype=percent
+#
+# Les objets suivant n'ont pas encore ete complete.
+# Lorsqu'il le seront, il faudra les remettre dans l'ordre alphabetique avec les
+# autres
+#
org.chorem.entities.Goal.class.tagvalue.version=6.0
org.chorem.entities.Goal.class.tagvalue.toString=%Goal.name|noname$s
org.chorem.entities.Goal.class.tagvalue.sortOrder=Goal.name
@@ -83,38 +272,3 @@
org.chorem.entities.Vacation.class.tagvalue.preload=Vacation.employee
org.chorem.entities.Vacation.class.tagvalue.sortOrder=Interval.beginDate,Interval.endDate,Vacation.type
org.chorem.entities.Vacation.attribute.status.tagvalue.allowed=DRAFT,ASKED,REJECTED,ACCEPTED
-org.chorem.entities.Touch.class.tagvalue.version=8.0
-org.chorem.entities.Touch.class.tagvalue.preload=Touch.participant
-org.chorem.entities.Touch.class.tagvalue.toString=%Interval.beginDate$tF - %Touch.type$s - %Touch.goal|nogoal$s
-org.chorem.entities.Touch.class.tagvalue.sortOrder=Interval.beginDate desc,Touch.type,Touch.goal
-org.chorem.entities.Touch.attribute.goal.tagvalue.help=But de la prise de contact
-org.chorem.entities.Touch.attribute.goal.tagvalue.subtype=text/rst
-org.chorem.entities.Touch.attribute.digest.tagvalue.help=R\u00e9sum\u00e9 de l'\u00e9change durant la prise de contact
-org.chorem.entities.Touch.attribute.digest.tagvalue.subtype=text/rst
-org.chorem.entities.Touch.attribute.type.tagvalue.choiceQuery=SELECT Touch.type WHERE extension=Touch
-org.chorem.entities.Attachment.class.tagvalue.version=7.0
-org.chorem.entities.Attachment.class.tagvalue.toString=%Attachment.name|noname$s (%Attachment.mimetype|notype$s) %Attachment.date$tF
-org.chorem.entities.Attachment.class.tagvalue.sortOrder=Attachment.name,Attachment.mimetype,Attachment.date
-org.chorem.entities.Note.class.tagvalue.version=2.0
-org.chorem.entities.Note.class.tagvalue.toString=(%Note.date$tF) %Note.title|noname$s
-org.chorem.entities.Note.class.tagvalue.sortOrder=Note.date
-org.chorem.entities.Note.Attachment.content.tagvalue.subtype=text/rst
-org.chorem.entities.Quotation.class.tagvalue.version=14.0
-org.chorem.entities.Quotation.class.tagvalue.preload=Quotation.project;Quotation.customer;Quotation.supplier;Quotation.category
-org.chorem.entities.Quotation.class.tagvalue.toString=%Interval.beginDate$tF-%Interval.endDate$tF %Quotation.reference|noref$s(%Quotation.category|noCategory$s) %Quotation.description|nodescription$s
-org.chorem.entities.Quotation.class.tagvalue.sortOrder=Interval.beginDate desc,Interval.endDate,Quotation.reference,Quotation.type,Quotation.description
-org.chorem.entities.Quotation.attribute.status.tagvalue.allowed=LEAD,DRAFT,SENT,REJECTED,ACCEPTED,STARTED,DELIVERED,RSV,WARRANTY,CLOSED
-org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.help=Pourcentage de r\u00e9ussite du projet
-org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.subtype=percent
-org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.min=0
-org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.max=100
-org.chorem.entities.Invoice.class.tagvalue.version=11.0
-org.chorem.entities.Invoice.class.tagvalue.preload=Invoice.customer;Invoice.supplier
-org.chorem.entities.Invoice.class.tagvalue.toString=%Invoice.reference|noref$s %Invoice.amount|noamount$s %Invoice.postedDate$tF %Invoice.expectedDate$tF %Invoice.paymentDate$tF
-org.chorem.entities.Invoice.class.tagvalue.sortOrder=Invoice.postedDate desc,Invoice.expectedDate,Invoice.paymentDate,Invoice.reference,Invoice.amount
-org.chorem.entities.Invoice.attribute.amount.tagvalue.subtype=currency
-org.chorem.entities.Invoice.attribute.description.tagvalue.subtype=text/rst
-org.chorem.entities.Invoiceable.class.tagvalue.version=10.0
-org.chorem.entities.Invoiceable.class.tagvalue.preload=Invoiceable.target;Invoiceable.category
-org.chorem.entities.Invoiceable.class.tagvalue.toString=%Invoiceable.name|noname$s
-org.chorem.entities.Invoiceable.class.tagvalue.sortOrder=Invoiceable.name
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-08-08 15:58:13 UTC (rev 233)
+++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java 2012-08-08 17:26:01 UTC (rev 234)
@@ -411,7 +411,7 @@
// recherche des JSP d'action specifique pour les extensions
List<String> viewActions = new LinkedList<String>();
for (WikittyExtension e : exts) {
- String viewAction = pathView + "footer" + e.getName() + ".jsp";
+ String viewAction = pathView + "viewAction" + e.getName() + ".jsp";
try {
if (servletContext.getResource(viewAction) != null) {
viewActions.add(viewAction);
Modified: trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java
===================================================================
--- trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java 2012-08-08 15:58:13 UTC (rev 233)
+++ trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java 2012-08-08 17:26:01 UTC (rev 234)
@@ -110,6 +110,12 @@
String fieldName = WikittyUtil.getFieldNameFromFQFieldName(fqfield);
FieldType field = wikitty.getFieldType(fqfield);
+ String visible = field.getTagValue("visible");
+ if ("false".equals(visible)) {
+ // on affiche rien pour ce champs
+ return;
+ }
+
// par defaut si pas de label on utilise le nom du field
if (null == label) {
label = fieldName;
Modified: trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyInput.java
===================================================================
--- trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyInput.java 2012-08-08 15:58:13 UTC (rev 233)
+++ trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyInput.java 2012-08-08 17:26:01 UTC (rev 234)
@@ -102,6 +102,12 @@
String fieldName = WikittyUtil.getFieldNameFromFQFieldName(fqfield);
FieldType field = wikitty.getFieldType(fqfield);
+ String visible = field.getTagValue("visible");
+ if ("false".equals(visible)) {
+ // on affiche rien pour ce champs
+ return;
+ }
+
if (field != null) {
switch(field.getType()) {
case BINARY:
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionCompany.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionCompany.jsp 2012-08-08 15:58:13 UTC (rev 233)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionCompany.jsp 2012-08-08 17:26:01 UTC (rev 234)
@@ -24,3 +24,4 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<a class="btn btn-success" href="<c:url value="/wikitty/ContactDetails/edit/new?ContactDetails.target=${wikitty.id}"/>"><i class="icon-plus icon-white"></i> Add Contact Details</a>
+<a class="btn btn-success" href="<c:url value="/wikitty/Employee/edit/new?Employee.company=${wikitty.id}"/>"><i class="icon-plus icon-white"></i> Add Employee</a>
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionPerson.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionPerson.jsp 2012-08-08 15:58:13 UTC (rev 233)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionPerson.jsp 2012-08-08 17:26:01 UTC (rev 234)
@@ -24,3 +24,4 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<a class="btn btn-success" href="<c:url value="/wikitty/ContactDetails/edit/new?ContactDetails.target=${wikitty.id}"/>"><i class="icon-plus icon-white"></i> Add Contact Details</a>
+<a class="btn btn-success" href="<c:url value="/wikitty/Employee/edit/new?Employee.person=${wikitty.id}"/>"><i class="icon-plus icon-white"></i> Add Employee</a>
Added: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionQuotation.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionQuotation.jsp (rev 0)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionQuotation.jsp 2012-08-08 17:26:01 UTC (rev 234)
@@ -0,0 +1,26 @@
+<%--
+ #%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" %>
+
+<a class="btn btn-success" href="<c:url value="/wikitty/Task/edit/new?Task.quotation=${wikitty.id}"/>"><i class="icon-plus icon-white"></i> Add Task</a>
Added: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionTask.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionTask.jsp (rev 0)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/viewActionTask.jsp 2012-08-08 17:26:01 UTC (rev 234)
@@ -0,0 +1,27 @@
+<%--
+ #%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" %>
+
+<a class="btn btn-success" href="<c:url value="/wikitty/Worker/edit/new?Worker.task=${wikitty.id}"/>"><i class="icon-plus icon-white"></i> Add Worker</a>
+<a class="btn btn-success" href="<c:url value="/wikitty/Time/edit/new?Time.task=${wikitty.id}"/>"><i class="icon-plus icon-white"></i> Add Time</a>
1
0
Aug. 8, 2012
Author: bpoussin
Date: 2012-08-08 17:58:13 +0200 (Wed, 08 Aug 2012)
New Revision: 233
Url: http://chorem.org/repositories/revision/chorem/233
Log:
correction erreur qui faisait planter le js
Modified:
trunk/chorem-webmotion/src/main/webapp/js/chorem.js
Modified: trunk/chorem-webmotion/src/main/webapp/js/chorem.js
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/js/chorem.js 2012-08-07 18:30:03 UTC (rev 232)
+++ trunk/chorem-webmotion/src/main/webapp/js/chorem.js 2012-08-08 15:58:13 UTC (rev 233)
@@ -31,10 +31,9 @@
});
// "option", "gotoCurrent", true );
});
-// tout ce qui aura la classe datetimepicker servira a editer une date avec heure
$(function() {
- $( ".datetimepicker" ).datetimepicker($.datetimepicker.regional['fr']);
- $( ".datetimepicker" ).datetimepicker({
+ $( ".timepicker" ).timepicker($.timepicker.regional['fr']);
+ $( ".timepicker" ).timepicker({
showWeek: true,
firstDay: 1,
changeMonth: true,
@@ -42,9 +41,10 @@
});
// "option", "gotoCurrent", true );
});
+// tout ce qui aura la classe datetimepicker servira a editer une date avec heure
$(function() {
- $( ".timepicker" ).timepicker($.timepicker.regional['fr']);
- $( ".timepicker" ).timepicker({
+ $( ".datetimepicker" ).datetimepicker($.timepicker.regional['fr']);
+ $( ".datetimepicker" ).datetimepicker({
showWeek: true,
firstDay: 1,
changeMonth: true,
1
0
r232 - in trunk: chorem-entities/src/main/xmi chorem-webmotion/src/main/java/org/wikitty/web/jsptag chorem-webmotion/src/main/webapp/WEB-INF chorem-webmotion/src/main/webapp/WEB-INF/jsp
by bpoussin@users.chorem.org Aug. 7, 2012
by bpoussin@users.chorem.org Aug. 7, 2012
Aug. 7, 2012
Author: bpoussin
Date: 2012-08-07 20:30:03 +0200 (Tue, 07 Aug 2012)
New Revision: 232
Url: http://chorem.org/repositories/revision/chorem/232
Log:
gros travail sur les tag display et utilisation dans les dashboard
Modified:
trunk/chorem-entities/src/main/xmi/chorem-model.properties
trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProfitability.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProject.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardQuotation.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/financial.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/wikitty.tld
Modified: trunk/chorem-entities/src/main/xmi/chorem-model.properties
===================================================================
--- trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-07 15:55:35 UTC (rev 231)
+++ trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-07 18:30:03 UTC (rev 232)
@@ -99,18 +99,21 @@
org.chorem.entities.Note.class.tagvalue.toString=(%Note.date$tF) %Note.title|noname$s
org.chorem.entities.Note.class.tagvalue.sortOrder=Note.date
org.chorem.entities.Note.Attachment.content.tagvalue.subtype=text/rst
-org.chorem.entities.Quotation.class.tagvalue.version=13.0
+org.chorem.entities.Quotation.class.tagvalue.version=14.0
org.chorem.entities.Quotation.class.tagvalue.preload=Quotation.project;Quotation.customer;Quotation.supplier;Quotation.category
org.chorem.entities.Quotation.class.tagvalue.toString=%Interval.beginDate$tF-%Interval.endDate$tF %Quotation.reference|noref$s(%Quotation.category|noCategory$s) %Quotation.description|nodescription$s
org.chorem.entities.Quotation.class.tagvalue.sortOrder=Interval.beginDate desc,Interval.endDate,Quotation.reference,Quotation.type,Quotation.description
org.chorem.entities.Quotation.attribute.status.tagvalue.allowed=LEAD,DRAFT,SENT,REJECTED,ACCEPTED,STARTED,DELIVERED,RSV,WARRANTY,CLOSED
org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.help=Pourcentage de r\u00e9ussite du projet
+org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.subtype=percent
org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.min=0
org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.max=100
-org.chorem.entities.Invoice.class.tagvalue.version=10.0
+org.chorem.entities.Invoice.class.tagvalue.version=11.0
org.chorem.entities.Invoice.class.tagvalue.preload=Invoice.customer;Invoice.supplier
org.chorem.entities.Invoice.class.tagvalue.toString=%Invoice.reference|noref$s %Invoice.amount|noamount$s %Invoice.postedDate$tF %Invoice.expectedDate$tF %Invoice.paymentDate$tF
org.chorem.entities.Invoice.class.tagvalue.sortOrder=Invoice.postedDate desc,Invoice.expectedDate,Invoice.paymentDate,Invoice.reference,Invoice.amount
+org.chorem.entities.Invoice.attribute.amount.tagvalue.subtype=currency
+org.chorem.entities.Invoice.attribute.description.tagvalue.subtype=text/rst
org.chorem.entities.Invoiceable.class.tagvalue.version=10.0
org.chorem.entities.Invoiceable.class.tagvalue.preload=Invoiceable.target;Invoiceable.category
org.chorem.entities.Invoiceable.class.tagvalue.toString=%Invoiceable.name|noname$s
Modified: trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java
===================================================================
--- trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java 2012-08-07 15:55:35 UTC (rev 231)
+++ trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java 2012-08-07 18:30:03 UTC (rev 232)
@@ -43,14 +43,25 @@
/**
* Tag Support to display Wikitty fields.
*
+ * attribute:
+ * <li>wikitty: wikitty object
+ * <li>fqfield: fully qualified field to display
+ * <li>label: if not presente use field name, if empty or blank don't show label
+ * <li>toString: String used to transforme Wikitty to string representation (overwrite default toString)
+ * <li>pattern: pattern used to display field (Date, Number) (overwrite default format)
+ * <li>subtype: subtype used for display field (overwrite default subtype)
+ *
* @author ymartel <martel(a)codelutin.com>
* @since 04/26/2012
*/
public class WikittyDisplay extends SimpleTagSupport {
protected Wikitty wikitty;
- protected String fqfield="";
- protected String label="";
+ protected String fqfield = "";
+ protected String label = null;
+ protected String toString = null;
+ protected String pattern = null;
+ protected String subtype = null;
public void setWikitty(Wikitty wikitty) {
this.wikitty = wikitty;
@@ -64,54 +75,82 @@
this.label = label;
}
+ public void setToString(String toString) {
+ this.toString = toString;
+ }
+
+ public void setPattern(String pattern) {
+ this.pattern = pattern;
+ }
+
+ public void setSubtype(String subtype) {
+ this.subtype = subtype;
+ }
+
@Override
public void doTag() throws JspException, IOException {
+ if (wikitty == null) {
+ // si pas de wikitty, on a rien a faire
+ return;
+ }
JspWriter output = getJspContext().getOut();
PageContext pageContext = (PageContext)getJspContext();
ServletContext servletContext = pageContext.getServletContext();
String contextPath = servletContext.getContextPath();
- String extName = WikittyUtil.getExtensionNameFromFQFieldName(fqfield);
- String fieldName = WikittyUtil.getFieldNameFromFQFieldName(fqfield);
- FieldType field = wikitty.getFieldType(fqfield);
+ if (StringUtils.isBlank(fqfield)) {
+ // pas de champs precisse, on doit afficher le wikitty lui meme
+ if (StringUtils.isNotBlank(label)) {
+ /*{<%=label%> : }*/
+ }
+ renderWikitty(output, contextPath, wikitty.getWikittyId(), wikitty, toString);
+ } else {
+ String extName = WikittyUtil.getExtensionNameFromFQFieldName(fqfield);
+ String fieldName = WikittyUtil.getFieldNameFromFQFieldName(fqfield);
+ FieldType field = wikitty.getFieldType(fqfield);
- // par defaut si pas de label on utilise le nom du field
- if (StringUtils.isBlank(label)) {
- label = fieldName;
- }
+ // par defaut si pas de label on utilise le nom du field
+ if (null == label) {
+ label = fieldName;
+ }
- if (field != null) {
- switch(field.getType()) {
- case BINARY:
- viewBinary(output, contextPath, label, wikitty, extName, fieldName);
- break;
- case BOOLEAN:
- viewBoolean(output, contextPath, label, wikitty, extName, fieldName);
- break;
- case DATE:
- viewDate(output, contextPath, label, wikitty, field, extName, fieldName);
- break;
- case NUMERIC:
- viewNumeric(output, contextPath, label, wikitty, field, extName, fieldName);
- break;
- case STRING:
- if (field.isCollection()) {
- viewCollectionString(output, contextPath, label, wikitty, extName, fieldName);
- } else {
- viewString(output, label, wikitty, extName, fieldName);
- }
- break;
- case WIKITTY:
- if (field.isCollection()) {
- viewCollectionWikitty(output, contextPath, label, wikitty, extName, fieldName);
- } else {
- viewWikitty(output, contextPath, label, wikitty, extName, fieldName);
- }
- break;
+ if (field != null) {
+ if (StringUtils.isNotBlank(label)) {
+ /*{<%=label%> : }*/
+ }
+
+ switch(field.getType()) {
+ case BINARY:
+ viewBinary(output, contextPath, label, wikitty, extName, fieldName);
+ break;
+ case BOOLEAN:
+ viewBoolean(output, contextPath, label, wikitty, extName, fieldName);
+ break;
+ case DATE:
+ viewDate(output, contextPath, label, wikitty, field, extName, fieldName);
+ break;
+ case NUMERIC:
+ viewNumeric(output, contextPath, label, wikitty, field, extName, fieldName);
+ break;
+ case STRING:
+ if (field.isCollection()) {
+ viewCollectionString(output, contextPath, label, wikitty, field, extName, fieldName);
+ } else {
+ viewString(output, label, wikitty, field, extName, fieldName);
+ }
+ break;
+ case WIKITTY:
+ if (field.isCollection()) {
+ viewCollectionWikitty(output, contextPath, label, wikitty, field, extName, fieldName);
+ } else {
+ viewWikitty(output, contextPath, label, wikitty, field, extName, fieldName);
+ }
+ break;
+ }
+ } else {
+ /*{<div class="alert alert-error"><%=wikitty.getWikittyId()%> doesn't have field '<%=fqfield%>'</div>}*/
}
- } else {
- /*{<div class="alert alert-error"><%=wikitty.getWikittyId()%> doesn't have field '<%=fqfield%>'</div>}*/
}
}
@@ -121,9 +160,9 @@
byte[] fieldAsBytes = wikitty.getFieldAsBytes(extName, fieldName);
if (fieldAsBytes != null) {
String url = contextPath + "/wikitty/view/" + wikitty.getWikittyId() + "/" + extName + "/" + fieldName;
- /*{<%=label%> : <a href="<%=url%>">Download</a>}*/
+ /*{<a href="<%=url%>">Download</a>}*/
} else {
- /*{<%=label%> : }*/
+ // nothing
}
}
@@ -131,7 +170,7 @@
Wikitty wikitty, String extName , String fieldName)
throws JspException, IOException {
boolean value = wikitty.getFieldAsBoolean(extName, fieldName);
- /*{<%=label%> : <%=value%>}*/
+ /*{<%=value%>}*/
}
protected void viewDate(JspWriter output, String contextPath, String label,
@@ -140,22 +179,25 @@
Date date = wikitty.getFieldAsDate(extName, fieldName);
String value = "";
+ if (date != null) {
- if (field.hasPattern() && date != null) {
- String pattern = field.getPattern();
+ pattern = StringUtils.defaultIfBlank(pattern, field.getPattern());
+
+ if (StringUtils.isBlank(pattern)) {
+ subtype = StringUtils.defaultIfBlank(subtype, field.getSubtype());
+ if ("month".equalsIgnoreCase(subtype)) {
+ pattern = "MM/yyyy";
+ } else if ("time".equalsIgnoreCase(subtype)) {
+ pattern = "hh:mm";
+ } else if ("datetime".equalsIgnoreCase(subtype)) {
+ pattern = "dd/MM/yyyy hh:mm";
+ } else {
+ pattern = "dd/MM/yyyy";
+ }
+ }
value = DateFormatUtils.format(date, pattern);
- } else if (date != null) {
- if ("month".equals(field.getTagValue("subtype"))) {
- value = DateFormatUtils.format(date, "MM/yyyy");
- } else if ("time".equals(field.getTagValue("subtype"))) {
- value = DateFormatUtils.format(date, "hh:mm");
- } else if ("datetime".equals(field.getTagValue("subtype"))) {
- value = DateFormatUtils.format(date, "dd/MM/yyyy hh:mm");
- } else {
- value = DateFormatUtils.format(date, "dd/MM/yyyy");
- }
}
- /*{<%=label%> : <%=value%> }*/
+ /*{<%=value%> }*/
}
protected void viewNumeric(JspWriter output, String contextPath, String label,
@@ -163,26 +205,43 @@
throws JspException, IOException {
BigDecimal value = wikitty.getFieldAsBigDecimal(extName, fieldName);
- NumberFormat formatter;
- if (field.hasPattern()) {
- String pattern = field.getPattern();
- //TODO ymartel 2012-05-02 : manage localization
- formatter = new DecimalFormat(pattern);
- } else {
- formatter = new DecimalFormat();
+ String formattedValue = "";
+ if (value != null) {
+
+ pattern = StringUtils.defaultIfBlank(pattern, field.getPattern());
+ NumberFormat formatter;
+
+ if (StringUtils.isNotBlank(pattern)) {
+ formatter = new DecimalFormat(pattern);
+ } else {
+ subtype = StringUtils.defaultIfBlank(subtype, field.getSubtype());
+
+ if ("currency".equalsIgnoreCase(subtype)) {
+ formatter = NumberFormat.getCurrencyInstance();
+ } else if ("percent".equalsIgnoreCase(subtype)) {
+ formatter = NumberFormat.getPercentInstance();
+ } else if ("integer".equalsIgnoreCase(subtype)) {
+ formatter = NumberFormat.getIntegerInstance();
+ } else {
+ formatter = NumberFormat.getNumberInstance();
+ }
+ }
+ formattedValue = formatter.format(value);
}
- String formattedValue = formatter.format(value);
- /*{<%=label%> : <%=formattedValue%> }*/
+ /*{<%=formattedValue%> }*/
}
protected void viewCollectionString(JspWriter output, String contextPath, String label,
- Wikitty wikitty, String extName , String fieldName)
+ Wikitty wikitty, FieldType field, String extName , String fieldName)
throws JspException, IOException {
List<String> values = wikitty.getFieldAsList(extName, fieldName, String.class);
- /*{<%=label%> : <ul>}*/
+ subtype = StringUtils.defaultIfBlank(subtype, field.getSubtype());
+
+ /*{<ul>}*/
if (values != null) {
for (String value : values) {
if (value != null) {
+ value = transformString(subtype, value);
/*{<li><%=value%></li>}*/
}
}
@@ -190,23 +249,32 @@
/*{</ul>}*/
}
- protected void viewString(JspWriter output, String label, Wikitty wikitty, String extName , String fieldName)
+ protected void viewString(JspWriter output, String label, Wikitty wikitty,
+ FieldType field, String extName , String fieldName)
throws JspException, IOException {
- String fieldAsString = wikitty.getFieldAsString(extName, fieldName);
- String value = fieldAsString != null ? fieldAsString : "";
- /*{<%=label%> : <%=value%>}*/
+ String value = wikitty.getFieldAsString(extName, fieldName);
+ subtype = StringUtils.defaultIfBlank(subtype, field.getSubtype());
+
+ if (StringUtils.isNotBlank(value)) {
+ value = transformString(subtype, value);
+ } else {
+ value = "";
+ }
+ /*{<%=value%>}*/
}
protected void viewCollectionWikitty(JspWriter output, String contextPath, String label,
- Wikitty wikitty, String extName , String fieldName)
+ Wikitty wikitty, FieldType field, String extName , String fieldName)
throws JspException, IOException {
List<Wikitty> values = wikitty.getFieldAsWikittyList(extName, fieldName, false);
- /*{<%=label%> : <ul>}*/
+ toString = StringUtils.defaultIfBlank(toString, field.getToString());
+
+ /*{<ul>}*/
if (values != null) {
- for (Wikitty value : values) {
- if (value != null) {
- String url = contextPath + "/wikitty/view/" + value.getWikittyId();
- /*{<li><a href="<%=url%>"><%=value%></a></li>}*/
+ for (Wikitty wikittyValue : values) {
+ if (wikittyValue != null) {
+ String id = wikittyValue.getWikittyId();
+ renderWikitty(output, contextPath, id, wikittyValue, toString);
}
}
}
@@ -214,17 +282,63 @@
}
+ /**
+ * Si l'objet de ce champs est non preloaded alors utilise l'id comme representation texte.
+ * Si l'objet est preloaded alors on utilise le toString du tag s'il existe
+ * sinon le toString du champs et en dernier le toString du wikitty
+ *
+ * @param output
+ * @param contextPath
+ * @param label
+ * @param wikitty
+ * @param field
+ * @param extName
+ * @param fieldName
+ * @throws JspException
+ * @throws IOException
+ */
protected void viewWikitty(JspWriter output, String contextPath, String label,
- Wikitty wikitty, String extName , String fieldName)
+ Wikitty wikitty, FieldType field, String extName , String fieldName)
throws JspException, IOException {
- String value = wikitty.getFieldAsWikitty(extName, fieldName);
+ String id = wikitty.getFieldAsWikitty(extName, fieldName);
Wikitty wikittyValue = wikitty.getFieldAsWikitty(extName, fieldName, false);
+ String value = id; // par defaut, si on a pas mieux on met l'id de l'objet
+ toString = StringUtils.defaultIfBlank(toString, field.getToString());
+
+ renderWikitty(output, contextPath, id, wikittyValue, toString);
+ }
+
+ protected void renderWikitty(JspWriter output, String contextPath,
+ String id, Wikitty wikittyValue, String toString)
+ throws JspException, IOException {
+ String url = contextPath + "/wikitty/view/" + id;
+ String value = id; // par defaut, si on a pas mieux on met l'id de l'objet
+
if (wikittyValue != null) {
- String url = contextPath + "/wikitty/view/" + value;
- if (wikittyValue != null) {
- /*{<%=label%>: <a href="<%=url%>"><%=wikittyValue%></a>}*/
+ if (StringUtils.isNotBlank(toString)) {
+ value = WikittyUtil.format(toString, wikittyValue);
+ } else {
+ value = wikittyValue.toString();
}
}
+ /*{<a href="<%=url%>"><%=value%></a>}*/
}
+ /**
+ * Transform String in specifique format to other format (ex: HTML).
+ *
+ * @param subtype mimetype or other used to choice output format
+ * @param value value to transform
+ * @return
+ */
+ protected String transformString(String subtype, String value) {
+ String result = value;
+ if ("text/rst".equalsIgnoreCase(subtype)) {
+ // TODO poussin 20120807 use jrst to transforme string to html
+ } else if ("text/dbkx".equalsIgnoreCase(subtype)) {
+ // TODO poussin 20120807 use docbook jrst xsl to transforme string to html
+ }
+ return result;
+ }
+
}//WikittyDisplay
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp 2012-08-07 15:55:35 UTC (rev 231)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp 2012-08-07 18:30:03 UTC (rev 232)
@@ -44,15 +44,15 @@
<c:forEach var="q" items="${invoices}">
<tbody>
<tr>
- <td><a href="<c:url value="/wikitty/view/${q.target}"/>">${q.getTarget(false)}</a></td>
- <td><a href="<c:url value="/wikitty/Invoice/view/${q.wikittyId}"/>">${q.reference}</a></td>
- <td>${q.description}</td>
- <td><a href="<c:url value="/wikitty/Employee/view/${q.customer}"/>">${q.getCustomer(false)}</a></td>
- <td><a href="<c:url value="/wikitty/Employee/view/${q.supplier}"/>">${q.getSupplier(false)}</a></td>
- <td>${q.amount}</td>
- <td>${q.postedDate}</td>
- <td>${q.expectedDate}</td>
- <td>${q.paymentDate}</td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Invoiceable.target" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" toString="%Invoice.reference$s" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.description" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.customer" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.supplier" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.amount" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.postedDate" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.expectedDate" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.paymentDate" label=""/></td>
<td>${attachments.get(q.wikittyId)}</td>
</tr>
</tbody>
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProfitability.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProfitability.jsp 2012-08-07 15:55:35 UTC (rev 231)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProfitability.jsp 2012-08-07 18:30:03 UTC (rev 232)
@@ -45,17 +45,17 @@
<c:forEach var="q" items="${quotations}">
<tbody>
<tr>
- <td><a href="<c:url value="/wikitty/Project/view/${q.project}"/>">${q.getProject(false)}</a></td>
- <td>${q.getCategory(false)}</td>
- <td><a href="<c:url value="/wikitty/Quotation/view/${q.wikittyId}"/>">${q.description}</a></td>
- <td>${q.estimatedDays}</td>
- <td>${q.amount}</td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.project" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.category" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" toString="%Quotation.description$s" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.estimatedDays" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td>
<td>${taskInfos.get(q.wikittyId).workingDays}</td>
<td>${taskInfos.get(q.wikittyId).hopedPriceDay}</td>
<td>${taskInfos.get(q.wikittyId).realPriceDay}</td>
<td>${taskInfos.get(q.wikittyId).hopedProfit}</td>
<td>${taskInfos.get(q.wikittyId).realProfit}</td>
- <td>${q.status}</td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td>
<td>${attachments.get(q.wikittyId)}</td>
</tr>
</tbody>
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProject.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProject.jsp 2012-08-07 15:55:35 UTC (rev 231)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProject.jsp 2012-08-07 18:30:03 UTC (rev 232)
@@ -22,6 +22,7 @@
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="/WEB-INF/wikitty.tld" prefix="w"%>
<h1>${title}</h1>
@@ -45,17 +46,17 @@
<c:forEach var="q" items="${quotations}">
<tbody>
<tr>
- <td><a href="<c:url value="/wikitty/Project/view/${q.project}"/>">${q.getProject(false).getName()}</a></td>
- <td><a href="<c:url value="/wikitty/Category/view/${q.category}"/>">${q.getCategory(false)}</a></td>
- <td><a href="<c:url value="/wikitty/Quotation/view/${q.wikittyId}"/>">${q.description}</a></td>
- <td><a href="<c:url value="/wikitty/Employee/view/${q.customer}"/>">${q.getCustomer(false)}</a></td>
- <td><a href="<c:url value="/wikitty/Employee/view/${q.supplier}"/>">${q.getSupplier(false)}</a></td>
- <td>${q.estimatedDays}</td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.project" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.category" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" toString="%Quotation.description$s" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.customer" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.supplier" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.estimatedDays" label=""/></td>
<td>${taskInfos.get(q.wikittyId).workingDays}</td>
<td>${taskInfos.get(q.wikittyId).opened}</td>
<td>${taskInfos.get(q.wikittyId).closed}</td>
- <td>${q.amount}</td>
- <td>${q.status}</td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td>
<td>${attachments.get(q.wikittyId)}</td>
</tr>
</tbody>
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardQuotation.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardQuotation.jsp 2012-08-07 15:55:35 UTC (rev 231)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardQuotation.jsp 2012-08-07 18:30:03 UTC (rev 232)
@@ -22,6 +22,7 @@
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="/WEB-INF/wikitty.tld" prefix="w"%>
<h1>${title}</h1>
@@ -44,16 +45,16 @@
<c:forEach var="q" items="${quotations}">
<tbody>
<tr>
- <td><a href="<c:url value="/wikitty/Project/view/${q.project}"/>">${q.getProject(false).getName()}</a></td>
- <td><a href="<c:url value="/wikitty/Category/view/${q.category}"/>">${q.getCategory(false)}</a></td>
- <td><a href="<c:url value="/wikitty/Quotation/view/${q.wikittyId}"/>">${q.description}</a></td>
- <td><a href="<c:url value="/wikitty/Employee/view/${q.customer}"/>">${q.getCustomer(false)}</a></td>
- <td><a href="<c:url value="/wikitty/Employee/view/${q.supplier}"/>">${q.getSupplier(false)}</a></td>
- <td>${q.estimatedDays}</td>
- <td>${q.conversionHope}</td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.project" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.category" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" toString="%Quotation.description$s" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.customer" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.supplier" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.estimatedDays" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.conversionHope" label=""/></td>
<td>${q.amount / q.estimatedDays}</td>
- <td>${q.amount}</td>
- <td>${q.status}</td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td>
<td>${attachments.get(q.wikittyId)}</td>
</tr>
</tbody>
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/financial.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/financial.jsp 2012-08-07 15:55:35 UTC (rev 231)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/financial.jsp 2012-08-07 18:30:03 UTC (rev 232)
@@ -22,7 +22,7 @@
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<h1>HR</h1>
+<h1>Financial</h1>
<form>
<input type="text" name="query"/>
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/wikitty.tld
===================================================================
(Binary files differ)
1
0
r231 - in trunk/chorem-webmotion/src/main/java/org: chorem/webmotion/actions wikitty/web/jsptag
by bpoussin@users.chorem.org Aug. 7, 2012
by bpoussin@users.chorem.org Aug. 7, 2012
Aug. 7, 2012
Author: bpoussin
Date: 2012-08-07 17:55:35 +0200 (Tue, 07 Aug 2012)
New Revision: 231
Url: http://chorem.org/repositories/revision/chorem/231
Log:
prise en compte des nouvelles methodes wikitty 3.8 (getWikittyId au lieu de getId)
Modified:
trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java
trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java
trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyInput.java
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-08-07 15:55:07 UTC (rev 230)
+++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java 2012-08-07 15:55:35 UTC (rev 231)
@@ -110,7 +110,7 @@
Wikitty w = client.restore(id);
if (w != null) {
result.put("id", id);
- result.put("version", w.getVersion());
+ result.put("version", w.getWikittyVersion());
result.put("extensions", StringUtils.join(w.getExtensionNames(), ","));
for (WikittyExtension ext : w.getExtensions()) {
result.put(ext.getName() + ".version", ext.getVersion());
@@ -249,7 +249,7 @@
Wikitty value = e.getValue();
// Avoid potential null value
if (value != null) {
- String id = value.getId();
+ String id = value.getWikittyId();
String label = value.toString(extName);
Map<String, String> item = new LinkedHashMap<String, String>();
item.put("extension", extName);
@@ -478,7 +478,7 @@
getContext().addInfoMessage("message", "Object saved" + error);
- return renderURL("/wikitty/view/"+w.getId());
+ return renderURL("/wikitty/view/"+w.getWikittyId());
}
/**
Modified: trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java
===================================================================
--- trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java 2012-08-07 15:55:07 UTC (rev 230)
+++ trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java 2012-08-07 15:55:35 UTC (rev 231)
@@ -111,7 +111,7 @@
break;
}
} else {
- /*{<div class="alert alert-error"><%=wikitty.getId()%> doesn't have field '<%=fqfield%>'</div>}*/
+ /*{<div class="alert alert-error"><%=wikitty.getWikittyId()%> doesn't have field '<%=fqfield%>'</div>}*/
}
}
@@ -120,7 +120,7 @@
throws JspException, IOException {
byte[] fieldAsBytes = wikitty.getFieldAsBytes(extName, fieldName);
if (fieldAsBytes != null) {
- String url = contextPath + "/wikitty/view/" + wikitty.getId() + "/" + extName + "/" + fieldName;
+ String url = contextPath + "/wikitty/view/" + wikitty.getWikittyId() + "/" + extName + "/" + fieldName;
/*{<%=label%> : <a href="<%=url%>">Download</a>}*/
} else {
/*{<%=label%> : }*/
@@ -205,7 +205,7 @@
if (values != null) {
for (Wikitty value : values) {
if (value != null) {
- String url = contextPath + "/wikitty/view/" + value.getId();
+ String url = contextPath + "/wikitty/view/" + value.getWikittyId();
/*{<li><a href="<%=url%>"><%=value%></a></li>}*/
}
}
Modified: trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyInput.java
===================================================================
--- trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyInput.java 2012-08-07 15:55:07 UTC (rev 230)
+++ trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyInput.java 2012-08-07 15:55:35 UTC (rev 231)
@@ -138,7 +138,7 @@
/*{<i class="icon-question-sign" title="<%=help%>"></i>}*/
}
} else {
- /*{<div class="alert alert-error"><%=wikitty.getId()%> doesn't have field '<%=fqfield%>'</div>}*/
+ /*{<div class="alert alert-error"><%=wikitty.getWikittyId()%> doesn't have field '<%=fqfield%>'</div>}*/
}
}
@@ -207,7 +207,7 @@
protected void inputString(JspWriter output, String contextPath, String name,
Wikitty wikitty, FieldType field, String extName , String fieldName)
throws JspException, IOException {
- String id = wikitty.getId() + "-" + extName + "-" + fieldName;
+ String id = wikitty.getWikittyId() + "-" + extName + "-" + fieldName;
String fieldValue = wikitty.getFieldAsString(extName, fieldName);
String value = fieldValue !=null ? fieldValue : "";
if ("monoline".equalsIgnoreCase(field.getSubtype())) {
@@ -233,7 +233,7 @@
protected void inputSelectString(JspWriter output, String contextPath, String name,
Wikitty wikitty, FieldType field, String extName , String fieldName)
throws JspException, IOException {
- String id = wikitty.getId() + "-" + extName + "-" + fieldName;
+ String id = wikitty.getWikittyId() + "-" + extName + "-" + fieldName;
String value = wikitty.getFieldAsString(extName, fieldName);
/*{<select id="text-<%=id%>" name="<%=name%>" <%=getDynamicAttribute()%> }*/
if (field.isCollection()) {
@@ -254,7 +254,7 @@
protected void inputCollectionString(JspWriter output, String contextPath, String name,
Wikitty wikitty, FieldType field, String extName , String fieldName)
throws JspException, IOException {
- String id = wikitty.getId() + "-" + extName + "-" + fieldName;
+ String id = wikitty.getWikittyId() + "-" + extName + "-" + fieldName;
List<String> value = wikitty.getFieldAsList(extName, fieldName, String.class);
if ("monoline".equalsIgnoreCase(field.getSubtype())) {
@@ -280,7 +280,7 @@
protected void inputWikitty(JspWriter output, String contextPath, String name,
Wikitty wikitty, FieldType field, String extName , String fieldName)
throws JspException, IOException {
- String id = wikitty.getId() + "-" + extName + "-" + fieldName;
+ String id = wikitty.getWikittyId() + "-" + extName + "-" + fieldName;
String value = wikitty.getFieldAsWikitty(extName, fieldName);
Wikitty wikittyValue = wikitty.getFieldAsWikitty(extName, fieldName, false);
@@ -324,7 +324,7 @@
protected void inputCollectionWikitty(JspWriter output, String contextPath, String name,
Wikitty wikitty, FieldType field, String extName , String fieldName)
throws JspException, IOException {
- String id = wikitty.getId() + "-" + extName + "-" + fieldName;
+ String id = wikitty.getWikittyId() + "-" + extName + "-" + fieldName;
List<Wikitty> values = wikitty.getFieldAsWikittyList(extName, fieldName, false);
String url = contextPath + "/wikitty-json/search?extension=" + field.getAllowed();
@@ -335,7 +335,7 @@
for (Wikitty w :values) {
if (w != null) {
prePopulate += String.format("%s{id:'%s', label:'%s'}", sep,
- StringEscapeUtils.escapeEcmaScript(w.getId()),
+ StringEscapeUtils.escapeEcmaScript(w.getWikittyId()),
StringEscapeUtils.escapeEcmaScript(w.toString()));
sep = ",";
}
1
0
Author: bpoussin
Date: 2012-08-07 17:55:07 +0200 (Tue, 07 Aug 2012)
New Revision: 230
Url: http://chorem.org/repositories/revision/chorem/230
Log:
- preload de target sur Invoiceable
- tri des Invoices par ordre decroissant des dates
Modified:
trunk/chorem-entities/src/main/xmi/chorem-model.properties
Modified: trunk/chorem-entities/src/main/xmi/chorem-model.properties
===================================================================
--- trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-07 14:05:56 UTC (rev 229)
+++ trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-07 15:55:07 UTC (rev 230)
@@ -107,11 +107,11 @@
org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.help=Pourcentage de r\u00e9ussite du projet
org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.min=0
org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.max=100
-org.chorem.entities.Invoice.class.tagvalue.version=9.0
-org.chorem.entities.Invoice.class.tagvalue.preload=Invoice.target;Invoice.customer;Invoice.supplier
+org.chorem.entities.Invoice.class.tagvalue.version=10.0
+org.chorem.entities.Invoice.class.tagvalue.preload=Invoice.customer;Invoice.supplier
org.chorem.entities.Invoice.class.tagvalue.toString=%Invoice.reference|noref$s %Invoice.amount|noamount$s %Invoice.postedDate$tF %Invoice.expectedDate$tF %Invoice.paymentDate$tF
-org.chorem.entities.Invoice.class.tagvalue.sortOrder=Invoice.postedDate,Invoice.expectedDate,Invoice.paymentDate,Invoice.reference,Invoice.amount
-org.chorem.entities.Invoiceable.class.tagvalue.version=9.0
-org.chorem.entities.Invoiceable.class.tagvalue.preload=Invoiceable.category
+org.chorem.entities.Invoice.class.tagvalue.sortOrder=Invoice.postedDate desc,Invoice.expectedDate,Invoice.paymentDate,Invoice.reference,Invoice.amount
+org.chorem.entities.Invoiceable.class.tagvalue.version=10.0
+org.chorem.entities.Invoiceable.class.tagvalue.preload=Invoiceable.target;Invoiceable.category
org.chorem.entities.Invoiceable.class.tagvalue.toString=%Invoiceable.name|noname$s
org.chorem.entities.Invoiceable.class.tagvalue.sortOrder=Invoiceable.name
1
0
Aug. 7, 2012
Author: bpoussin
Date: 2012-08-07 16:05:56 +0200 (Tue, 07 Aug 2012)
New Revision: 229
Url: http://chorem.org/repositories/revision/chorem/229
Log:
delete old jsp view replaced now by taglib
Removed:
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/wikittyFieldView.jsp
Deleted: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/wikittyFieldView.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/wikittyFieldView.jsp 2012-08-03 16:54:22 UTC (rev 228)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/wikittyFieldView.jsp 2012-08-07 14:05:56 UTC (rev 229)
@@ -1,64 +0,0 @@
-<%--
- #%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 prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-
-<c:choose>
- <c:when test="${ext.getFieldType(fieldName).type == 'BOOLEAN'}">
- ${fieldName}: ${wikitty.getFieldAsBoolean(ext.name, fieldName)}
- </c:when>
- <c:when test="${ext.getFieldType(fieldName).type == 'DATE'}">
- <c:choose>
- <c:when test="${ext.getFieldType(fieldName).hasPattern()}">
- ${fieldName}: <fmt:formatDate value="${wikitty.getFieldAsDate(ext.name, fieldName)}"
- pattern="${ext.getFieldType(fieldName).getPattern()}"/>
- </c:when>
- <c:otherwise>
- ${fieldName}: <fmt:formatDate value="${wikitty.getFieldAsDate(ext.name, fieldName)}"/>
- </c:otherwise>
- </c:choose>
- </c:when>
- <c:when test="${ext.getFieldType(fieldName).type == 'NUMERIC'}">
- <c:choose>
- <c:when test="${ext.getFieldType(fieldName).hasPattern()}">
- ${fieldName}: <fmt:formatNumber value="${wikitty.getFieldAsBigDecimal(ext.name, fieldName)}"
- pattern="${ext.getFieldType(fieldName).getPattern()}"/>
- </c:when>
- <c:otherwise>
- ${fieldName}: ${wikitty.getFieldAsBigDecimal(ext.name, fieldName)}
- </c:otherwise>
- </c:choose>
- </c:when>
- <c:when test="${ext.getFieldType(fieldName).type == 'STRING'}">
- ${fieldName}: <c:out value="${wikitty.getFieldAsString(ext.name, fieldName)}"/>
- </c:when>
- <c:when test="${ext.getFieldType(fieldName).type == 'WIKITTY'}">
- <c:if test="${wikitty.getFieldAsWikitty(ext.name, fieldName, false) != null}">
- ${fieldName}: <a href="<c:url value="/wikitty/view/${wikitty.getFieldAsWikitty(ext.name, fieldName, false).getId()}"/>"><c:out value="${wikitty.getFieldAsWikitty(ext.name, fieldName, false)}"/></a>
- </c:if>
- </c:when>
- <c:otherwise>
- ${fieldName}: ${wikitty.getFieldAsObject(ext.name, fieldName)} (${ext.getFieldType(fieldName).toDefinition("")})
- </c:otherwise>
-</c:choose>
\ No newline at end of file
1
0
Author: bpoussin
Date: 2012-08-03 18:54:22 +0200 (Fri, 03 Aug 2012)
New Revision: 228
Url: http://chorem.org/repositories/revision/chorem/228
Log:
Evolution #737: Change quotation default sorting
Modified:
trunk/chorem-entities/src/main/xmi/chorem-model.properties
Modified: trunk/chorem-entities/src/main/xmi/chorem-model.properties
===================================================================
--- trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-03 16:31:36 UTC (rev 227)
+++ trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-03 16:54:22 UTC (rev 228)
@@ -99,10 +99,10 @@
org.chorem.entities.Note.class.tagvalue.toString=(%Note.date$tF) %Note.title|noname$s
org.chorem.entities.Note.class.tagvalue.sortOrder=Note.date
org.chorem.entities.Note.Attachment.content.tagvalue.subtype=text/rst
-org.chorem.entities.Quotation.class.tagvalue.version=12.0
+org.chorem.entities.Quotation.class.tagvalue.version=13.0
org.chorem.entities.Quotation.class.tagvalue.preload=Quotation.project;Quotation.customer;Quotation.supplier;Quotation.category
org.chorem.entities.Quotation.class.tagvalue.toString=%Interval.beginDate$tF-%Interval.endDate$tF %Quotation.reference|noref$s(%Quotation.category|noCategory$s) %Quotation.description|nodescription$s
-org.chorem.entities.Quotation.class.tagvalue.sortOrder=Interval.beginDate,Interval.endDate,Quotation.reference,Quotation.type,Quotation.description
+org.chorem.entities.Quotation.class.tagvalue.sortOrder=Interval.beginDate desc,Interval.endDate,Quotation.reference,Quotation.type,Quotation.description
org.chorem.entities.Quotation.attribute.status.tagvalue.allowed=LEAD,DRAFT,SENT,REJECTED,ACCEPTED,STARTED,DELIVERED,RSV,WARRANTY,CLOSED
org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.help=Pourcentage de r\u00e9ussite du projet
org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.min=0
1
0
r227 - trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions
by bpoussin@users.chorem.org Aug. 3, 2012
by bpoussin@users.chorem.org Aug. 3, 2012
Aug. 3, 2012
Author: bpoussin
Date: 2012-08-03 18:31:36 +0200 (Fri, 03 Aug 2012)
New Revision: 227
Url: http://chorem.org/repositories/revision/chorem/227
Log:
les attachments sont telechargement directement dans les tableaux
Modified:
trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardAction.java
trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java
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-08-03 15:36:56 UTC (rev 226)
+++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardAction.java 2012-08-03 16:31:36 UTC (rev 227)
@@ -62,6 +62,8 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import javax.servlet.ServletContext;
+import org.apache.commons.lang3.StringUtils;
/**
*
@@ -217,8 +219,29 @@
// }
// };
+ public final class AttachmentLink {
+ protected String contextPath;
+ protected Attachment attachment;
- protected <E> Map<String, List<Attachment>> prepareAttachment(ChoremClient client, Collection<E> ids) {
+ public AttachmentLink(String contextPath, Attachment attachment) {
+ this.contextPath = contextPath;
+ this.attachment = attachment;
+ }
+
+ @Override
+ public String toString() {
+ String id = attachment.getWikittyId();
+ String name = attachment.getName();
+ String url = attachment.getContentUrl();
+ if (StringUtils.isBlank(url)) {
+ url = contextPath + "/wikitty/view/" + id + "/Attachment/content";
+ }
+ return String.format("<a href='%s'>%s</a>", url, name);
+ }
+
+ }
+
+ protected <E> Map<String, List<AttachmentLink>> prepareAttachment(ChoremClient client, Collection<E> ids) {
// recherche des attachments de chaque quotation trouvee
WikittyQuery attachmentQuery = new WikittyQueryMaker().and()
.exteq(Attachment.EXT_ATTACHMENT)
@@ -229,15 +252,17 @@
client.findAllByQuery(Attachment.class, attachmentQuery);
// preparation des attachements pour chaque quotation
- Map<String, List<Attachment>> attachments = new HashMap<String, List<Attachment>>();
+ ServletContext servletContext = getContext().getServletContext();
+ String contextPath = servletContext.getContextPath();
+ Map<String, List<AttachmentLink>> attachments = new HashMap<String, List<AttachmentLink>>();
for (Attachment a : attachmentResult) {
String id = a.getTarget();
- List<Attachment> l = attachments.get(id);
+ List<AttachmentLink> l = attachments.get(id);
if (l == null) {
- l = new LinkedList<Attachment>();
+ l = new LinkedList<AttachmentLink>();
attachments.put(id, l);
}
- l.add(a);
+ l.add(new AttachmentLink(contextPath, a));
}
return attachments;
@@ -311,7 +336,7 @@
client.findAllByQuery(Quotation.class, quotationQuery);
// recherche des attachments de chaque quotation trouvee
- Map<String, List<Attachment>> attachments =
+ Map<String, List<AttachmentLink>> attachments =
prepareAttachment(client, result.getAll());
// TODO poussin 20120523 ajouer la recherche des note sur la quotation
@@ -535,7 +560,7 @@
}
// recherche des attachments de chaque quotation trouvee
- Map<String, List<Attachment>> attachments =
+ Map<String, List<AttachmentLink>> attachments =
prepareAttachment(client, invoices.getAll());
return renderView("dashboardInvoice.jsp",
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-08-03 15:36:56 UTC (rev 226)
+++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java 2012-08-03 16:31:36 UTC (rev 227)
@@ -380,8 +380,10 @@
return map;
}
- public Render view(ChoremClient client, String id, String[] extension,
- Config config, ServletContext servletContext) {
+ public Render view(ChoremClient client, String id, String[] extension) {
+ Config config = getContext().getServerContext().getMapping().getConfig();
+ ServletContext servletContext = getContext().getServletContext();
+
log.debug("view: " + id);
Wikitty w = client.restore(id, ".*");
@@ -422,21 +424,6 @@
return renderView("view.jsp", "wikitty", w, "extensions", exts, "viewActions", viewActions);
}
- public Render extensionView(ChoremClient client, String id, String extension) {
- log.debug("view: " + id);
- Wikitty w = client.restore(id, ".*");
-
- LinkedHashSet<WikittyExtension> exts = new LinkedHashSet<WikittyExtension>();
- if (w != null) {
- // Display the extensions and required ones for them
- List<String> extensionNames = Arrays.asList(extension);
- List<WikittyExtension> wikittyExtensions = client.restoreExtensionAndDependenciesLastVesion(extensionNames);
- exts.addAll(wikittyExtensions);
- }
-
- return renderView(StringUtils.lowerCase(extension) +"/view.jsp", "wikitty", w, "extensions", exts);
- }
-
public Render edit(ChoremClient client, String id, String[] extension, Call call) {
log.debug("edit: " + id);
// on preload rien, le preload sera fait a la fin
@@ -476,47 +463,6 @@
return renderView("edit.jsp", "wikitty", w, "extensions", exts);
}
-
- // A SUPPRIMER, ne sert a rien, pas la bonne methode (pour reordonner les champs)
-// /**
-// * Edit une extension et les extensions requisent de l'objet
-// *
-// * @param client
-// * @param id
-// * @param extension
-// * @param call
-// * @return
-// */
-// public Render extensionEdit(ChoremClient client, String id, String extension, Call call) {
-// log.debug("edit: " + id);
-// Wikitty w = client.restore(id, ".*");
-//
-// if (w == null) {
-// w = new WikittyImpl();
-// }
-//
-// LinkedHashSet<WikittyExtension> exts = new LinkedHashSet<WikittyExtension>();
-//
-// // If extension is not null, load all required extensions too
-// List<String> extensionNames = Arrays.asList(extension);
-// List<WikittyExtension> newExts =
-// client.restoreExtensionAndDependenciesLastVesion(extensionNames);
-// w.addExtension(newExts);
-//
-// // As we want to edit a wikitty by its extensions, we should edit the required extensions too
-// // Add the extension and required ones in the list of extensions to display
-// exts.addAll(newExts);
-//
-// // 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);
-//
-// getContext().addInfoMessage("message", "Warning: Can't put some value in object" + error);
-//
-// return renderView(StringUtils.lowerCase(extension) + "/edit.jsp", "wikitty", w);
-// }
-
public Render save(ChoremClient client, String id, String[] extension, Call call) {
log.debug("save: " + id);
Wikitty w = client.restore(id);
1
0