Chorem-commits
Threads by month
- ----- 2026 -----
- 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
August 2012
- 4 participants
- 53 discussions
r242 - trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/injector
by bpoussin@users.chorem.org 20 Aug '12
by bpoussin@users.chorem.org 20 Aug '12
20 Aug '12
Author: bpoussin
Date: 2012-08-20 23:01:48 +0200 (Mon, 20 Aug 2012)
New Revision: 242
Url: http://chorem.org/repositories/revision/chorem/242
Log:
conversion d'une chaine vide en null pour une date
Modified:
trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/injector/InjectorListener.java
Modified: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/injector/InjectorListener.java
===================================================================
--- trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/injector/InjectorListener.java 2012-08-20 20:35:04 UTC (rev 241)
+++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/injector/InjectorListener.java 2012-08-20 21:01:48 UTC (rev 242)
@@ -89,11 +89,11 @@
Object result = null;
if (value != null) {
if (String.class.isAssignableFrom(type)) {
- if (StringUtils.isNotBlank((String)value)) {
result = WikittyUtil.toString(value);
+ } else if (Date.class.isAssignableFrom(type)) {
+ if (!(value instanceof String) || StringUtils.isNotBlank((String)value)) {
+ result = WikittyUtil.toDate(value);
}
- } else if (Date.class.isAssignableFrom(type)) {
- result = WikittyUtil.toDate(value);
} else {
throw new ConversionException(String.format(
"Chorem date converter can't convert '%s' to '%s'",
1
0
20 Aug '12
Author: bpoussin
Date: 2012-08-20 22:35:04 +0200 (Mon, 20 Aug 2012)
New Revision: 241
Url: http://chorem.org/repositories/revision/chorem/241
Log:
meilleurs presentation des formulaires
Modified:
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/edit.jsp
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/edit.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/edit.jsp 2012-08-15 21:37:19 UTC (rev 240)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/edit.jsp 2012-08-20 20:35:04 UTC (rev 241)
@@ -25,8 +25,7 @@
<%@ taglib uri="/WEB-INF/wikitty.tld" prefix="w"%>
<c:if test="${not empty wikitty}">
- <%//FIXME ymartel 2012/07/02 fix the need of iso accept charset ? %>
- <form class="form-inline" method="post" accept-charset="ISO-8859-15" action="<c:url value="/wikitty/save"/>" enctype="multipart/form-data">
+ <form class="form-horizontal" method="post" action="<c:url value="/wikitty/save"/>" enctype="multipart/form-data">
<input type="hidden" name="id" value="${wikitty.id}"/>
<p>
<button class="btn btn-success" type="submit"><i class="icon-ok icon-white"></i> Save</button>
@@ -34,12 +33,18 @@
</p>
<c:forEach var="ext" items="${extensions}">
- <input type="hidden" name="extension" value="${ext.name}">
- <dl><dt>${ext.name}</dt>
+ <fieldset>
+ <legend>${ext.name}</legend>
+ <input type="hidden" name="extension" value="${ext.name}">
<c:forEach var="fieldName" items="${ext.fieldNames}">
- <dd>${fieldName}: <w:input wikitty="${wikitty}" fqfield="${ext.name}.${fieldName}"/><%--@ include file="wikittyFieldEdit.jsp"--%></dd>
+ <div class="control-group">
+ <label class="control-label">${fieldName}</label>
+ <div class="controls">
+ <w:input wikitty="${wikitty}" fqfield="${ext.name}.${fieldName}"/>
+ </div>
+ </div>
</c:forEach>
- </dl>
+ </fieldset>
</c:forEach>
</form>
</c:if>
1
0
r240 - in trunk: chorem-entities/src/main/xmi chorem-webmotion/src/main/java/org/chorem/webmotion/actions chorem-webmotion/src/main/java/org/chorem/webmotion/injector chorem-webmotion/src/main/java/org/wikitty/web/jsptag chorem-webmotion/src/main/webapp/WEB-INF/jsp chorem-webmotion/src/main/webapp/css
by bpoussin@users.chorem.org 15 Aug '12
by bpoussin@users.chorem.org 15 Aug '12
15 Aug '12
Author: bpoussin
Date: 2012-08-15 23:37:19 +0200 (Wed, 15 Aug 2012)
New Revision: 240
Url: http://chorem.org/repositories/revision/chorem/240
Log:
modification pour faire fonctionner le rapport budget.
Il reste une erreur sur l'affichage des categories :(
Modified:
trunk/chorem-entities/src/main/xmi/chorem-model.properties
trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/AdminAction.java
trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardAction.java
trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/injector/InjectorListener.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/dashboardBudget.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/financial.jsp
trunk/chorem-webmotion/src/main/webapp/css/chorem.less
Modified: trunk/chorem-entities/src/main/xmi/chorem-model.properties
===================================================================
--- trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-13 10:51:21 UTC (rev 239)
+++ trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-15 21:37:19 UTC (rev 240)
@@ -89,7 +89,7 @@
#
# Invoice
#
-org.chorem.entities.Invoice.class.tagvalue.version=12.0
+org.chorem.entities.Invoice.class.tagvalue.version=14.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
@@ -103,7 +103,6 @@
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
@@ -161,7 +160,7 @@
#
# Quotation
#
-org.chorem.entities.Quotation.class.tagvalue.version=16.0
+org.chorem.entities.Quotation.class.tagvalue.version=17.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
@@ -187,7 +186,7 @@
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.supplier.tagvalue.allowedQuery=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
Modified: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/AdminAction.java
===================================================================
--- trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/AdminAction.java 2012-08-13 10:51:21 UTC (rev 239)
+++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/AdminAction.java 2012-08-15 21:37:19 UTC (rev 240)
@@ -46,15 +46,18 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(AdminAction.class);
- /**
- * Bilan du nombre de jour travaille sur des projets client depuis le 01/01 par employer de la
- * societe par defaut (Configuration.defaultCompany)
+ /**
+ * affiche les valeurs de configuration d'administration
*/
public Render variables(ChoremClient client) {
Configuration conf = client.getConfiguration();
GenericAction g = new GenericAction();
+ g.setContextable(contextable);
return g.view(client, conf.getWikittyId(), null);
+ // la ligne suivante ne fonctionne pas (probleme de nombre d'argument)
+// return renderAction("GenericAction.view",
+// "client", client, "id", conf.getWikittyId(), "extension", null );
}
}
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-13 10:51:21 UTC (rev 239)
+++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardAction.java 2012-08-15 21:37:19 UTC (rev 240)
@@ -58,12 +58,15 @@
import java.util.Date;
import java.util.EnumSet;
import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.servlet.ServletContext;
import org.apache.commons.lang3.StringUtils;
+import org.nuiton.util.DateUtil;
+import org.nuiton.wikitty.entities.Element;
/**
*
@@ -320,9 +323,20 @@
* (task info not needed for not stated project)
* @return
*/
- protected Render quotationFilter(ChoremClient client, String query,
+ protected Render quotationFilter(ChoremClient client,
+ Date start, Date end, String query,
EnumSet<QuotationStatus> status, String jspRender,
String title, boolean computeTask) {
+
+ if (start == null) {
+ start = new Date();
+ start = DateUtils.setMonths(start, Calendar.JANUARY);
+ }
+
+ if (end == null) {
+ end = DateUtils.setMonths(start, Calendar.DECEMBER);
+ }
+
// recherche de la configuration pour les calcules
Configuration config = client.getConfiguration();
@@ -330,6 +344,9 @@
WikittyQuery quotationQuery = new WikittyQueryMaker().and()
.parse(query)
.containsOne(Quotation.FQ_FIELD_QUOTATION_STATUS, status)
+ .or()
+ .bw(Quotation.FQ_FIELD_QUOTATION_POSTEDDATE, start, end)
+ .isNull(Quotation.FQ_FIELD_QUOTATION_POSTEDDATE)
.end();
WikittyQueryResult<Quotation> result =
@@ -419,25 +436,28 @@
"taskInfos", taskInfos);
}
- public Render quotation(ChoremClient client, String query) {
+ public Render quotation(ChoremClient client,
+ Date start, Date end, String query) {
EnumSet<QuotationStatus> status = EnumSet.range(QuotationStatus.LEAD, QuotationStatus.SENT);
String jsp = "dashboardQuotation.jsp";
String title = "Les propositions en attente de réponse";
- return quotationFilter(client, query, status, jsp, title, false);
+ return quotationFilter(client, start, end, query, status, jsp, title, false);
}
- public Render projectOpen(ChoremClient client, String query) {
+ public Render projectOpen(ChoremClient client,
+ Date start, Date end, String query) {
EnumSet<QuotationStatus> status = EnumSet.range(QuotationStatus.ACCEPTED, QuotationStatus.RSV);
String jsp = "dashboardProject.jsp";
String title = "Les projets en cours";
- return quotationFilter(client, query, status, jsp, title, true);
+ return quotationFilter(client, start, end, query, status, jsp, title, true);
}
- public Render projectClosed(ChoremClient client, String query) {
+ public Render projectClosed(ChoremClient client,
+ Date start, Date end, String query) {
EnumSet<QuotationStatus> status = EnumSet.range(QuotationStatus.WARRANTY, QuotationStatus.CLOSED);
String jsp = "dashboardProject.jsp";
String title = "Les projets clos";
- return quotationFilter(client, query, status, jsp, title, true);
+ return quotationFilter(client, start, end, query, status, jsp, title, true);
}
static public class TaskInfo implements Cloneable {
@@ -535,11 +555,27 @@
//
////////////////////////////////////////////////////////////////////////////
- public Render invoice(ChoremClient client, String query) {
+ protected Render invoiceFilter(ChoremClient client, String title,
+ String filter, Date start, Date end, String query) {
+ if (start == null) {
+ start = new Date();
+ start = DateUtils.setMonths(start, Calendar.JANUARY);
+ }
+
+ if (end == null) {
+ end = DateUtils.setMonths(start, Calendar.DECEMBER);
+ }
+
// recuperation des factures
WikittyQuery invoiceQuery = new WikittyQueryMaker().and()
+ .parse(filter)
.parse(query)
.exteq(Invoice.EXT_INVOICE)
+ .or()
+ .bw(Invoice.FQ_FIELD_INVOICE_POSTEDDATE, start, end)
+ .isNull(Invoice.FQ_FIELD_INVOICE_POSTEDDATE)
+ .bw(Invoice.FQ_FIELD_INVOICE_EXPECTEDDATE, start, end)
+ .bw(Invoice.FQ_FIELD_INVOICE_PAYMENTDATE, start, end)
.end();
WikittyQueryResult<Invoice> invoices =
@@ -564,6 +600,7 @@
prepareAttachment(client, invoices.getAll());
return renderView("dashboardInvoice.jsp",
+ "title", title,
"invoices", invoices.getAll(),
"amount", amount,
"amountPaid", amountPaid,
@@ -572,112 +609,33 @@
);
}
- public Render profitability(ChoremClient client, String query) {
- EnumSet<QuotationStatus> status = EnumSet.range(QuotationStatus.STARTED, QuotationStatus.CLOSED);
- String jsp = "dashboardProfitability.jsp";
- String title = "Profitability";
- return quotationFilter(client, query, status, jsp, title, true);
+ public Render invoiceDebt(ChoremClient client,
+ Date start, Date end, String query) {
+ String title = "Factures à payer par la société";
+ String companyId = client.getConfiguration().getDefaultCompany();
+ String filter = Invoice.FQ_FIELD_INVOICE_CUSTOMER + "={SELECT id WHERE (" +
+ Employee.FQ_FIELD_EMPLOYEE_COMPANY + "=" + companyId+")}";
+ return invoiceFilter(client, title, filter, start, end, query);
}
- ////////////////////////////////////////////////////////////////////////////
- //
- // H R
- //
- ////////////////////////////////////////////////////////////////////////////
-
- 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
- );
-
+ public Render invoiceIncome(ChoremClient client,
+ Date start, Date end, String query) {
+ String title = "Factures émises par la société";
+ String companyId = client.getConfiguration().getDefaultCompany();
+ String filter = Invoice.FQ_FIELD_INVOICE_SUPPLIER + "={SELECT id WHERE (" +
+ Employee.FQ_FIELD_EMPLOYEE_COMPANY + "=" + companyId+")}";
+ return invoiceFilter(client, title, filter, start, end, query);
}
- /**
- * 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));
+ public Render profitability(ChoremClient client,
+ Date start, Date end, String query) {
+ EnumSet<QuotationStatus> status = EnumSet.range(QuotationStatus.STARTED, QuotationStatus.CLOSED);
+ String jsp = "dashboardProfitability.jsp";
+ String title = "Profitability";
+ return quotationFilter(client, start, end, query, status, jsp, title, true);
}
/**
- * 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
- );
- }
-
- /**
* Prévisionnel entre deux dates en fonction des factures
*/
public Render budget(ChoremClient client, Date start, Date end, String filter) {
@@ -687,8 +645,12 @@
start, end, filter));
}
String companyId = client.getConfiguration().getDefaultCompany();
- //TODO ymartel 2012/06/07 : manage when companyId is not defined.
+ if (StringUtils.isBlank(companyId)) {
+ getContext().addInfoMessage("message", "Vous devez définir une société par défaut");
+ return renderURL("/admin/variables");
+ }
+
if (start == null) {
start = new Date();
start = DateUtils.addMonths(start, -1);
@@ -698,11 +660,16 @@
end = DateUtils.addMonths(start, 6);
}
+ start = DateUtil.setFirstDayOfMonth(start);
+ end = DateUtil.setLastDayOfMonth(end);
+
// La somme des factures que la company doit payer jusqu'a la date demandee
WikittyQuery debt = new WikittyQueryMaker()
.select(Invoice.FQ_FIELD_INVOICE_AMOUNT, Aggregate.SUM)
.and()
- .eq(Invoice.FQ_FIELD_INVOICE_CUSTOMER, companyId)
+ .containsOne(Invoice.FQ_FIELD_INVOICE_CUSTOMER)
+ .select(Element.ID).eq(Employee.FQ_FIELD_EMPLOYEE_COMPANY, companyId)
+ .close()
.lt(Invoice.FQ_FIELD_INVOICE_EXPECTEDDATE, start)
.end()
.setLimit(WikittyQuery.MAX);
@@ -711,21 +678,65 @@
WikittyQuery income = new WikittyQueryMaker()
.select(Invoice.FQ_FIELD_INVOICE_AMOUNT, Aggregate.SUM)
.and()
- .eq(Invoice.FQ_FIELD_INVOICE_SUPPLIER, companyId)
+ .containsOne(Invoice.FQ_FIELD_INVOICE_SUPPLIER)
+ .select(Element.ID).eq(Employee.FQ_FIELD_EMPLOYEE_COMPANY, companyId)
+ .close()
.lt(Invoice.FQ_FIELD_INVOICE_EXPECTEDDATE, start)
.end()
.setLimit(WikittyQuery.MAX);
- // La liste des factures entre les deux dates
- WikittyQuery q = new WikittyQueryMaker().and()
+ // La liste des factures entre les deux dates que l'on doit payer
+ WikittyQuery invoiceDebt = new WikittyQueryMaker().and()
.parse(filter)
+ .containsOne(Invoice.FQ_FIELD_INVOICE_CUSTOMER)
+ .select(Element.ID).eq(Employee.FQ_FIELD_EMPLOYEE_COMPANY, companyId)
+ .close()
.bw(Invoice.FQ_FIELD_INVOICE_EXPECTEDDATE, start, end)
.end()
.setLimit(WikittyQuery.MAX);
+ // La liste des factures entre les deux dates que l'on doit payer
+ WikittyQuery invoiceIncome = new WikittyQueryMaker().and()
+ .parse(filter)
+ .containsOne(Invoice.FQ_FIELD_INVOICE_SUPPLIER)
+ .select(Element.ID).eq(Employee.FQ_FIELD_EMPLOYEE_COMPANY, companyId)
+ .close()
+ .bw(Invoice.FQ_FIELD_INVOICE_EXPECTEDDATE, start, end)
+ .end()
+ .setLimit(WikittyQuery.MAX);
+
Double[] amounts = client.findByQuery(Double.class, debt, income);
- WikittyQueryResult<Invoice> invoices = client.findAllByQuery(Invoice.class, q);
+ if (log.isDebugEnabled()) {
+ WikittyQuery debugDebt = new WikittyQueryMaker()
+ .select(Invoice.FQ_FIELD_INVOICE_AMOUNT)
+ .and()
+ .containsOne(Invoice.FQ_FIELD_INVOICE_CUSTOMER)
+ .select(Element.ID).eq(Employee.FQ_FIELD_EMPLOYEE_COMPANY, companyId)
+ .close()
+ .lt(Invoice.FQ_FIELD_INVOICE_EXPECTEDDATE, start)
+ .end()
+ .setLimit(WikittyQuery.MAX);
+ // La somme des factures que la company doit percevoir jusqu'a la date demandee
+ WikittyQuery debugIncome = new WikittyQueryMaker()
+ .select(Invoice.FQ_FIELD_INVOICE_AMOUNT)
+ .and()
+ .containsOne(Invoice.FQ_FIELD_INVOICE_SUPPLIER)
+ .select(Element.ID).eq(Employee.FQ_FIELD_EMPLOYEE_COMPANY, companyId)
+ .close()
+ .lt(Invoice.FQ_FIELD_INVOICE_EXPECTEDDATE, start)
+ .end()
+ .setLimit(WikittyQuery.MAX);
+
+ WikittyQueryResult[] debugResult = client.findAllByQuery(debugDebt, debugIncome);
+ log.debug(String.format("\n\tDebt: %s [%s]\n\t\t(%s)\n\tIncome: %s [%s]\n\t\t(%s)",
+ amounts[0], debugResult[0].getAll(), debugResult[0].getQueryString(),
+ amounts[1], debugResult[1].getAll(), debugResult[1].getQueryString()));
+ }
+
+ WikittyQueryResult<Invoice>[] invoices =
+ client.findAllByQuery(Invoice.class, invoiceDebt, invoiceIncome);
+
WikittyQuery categoriesQuery = new WikittyQueryMaker()
.exteq(Category.EXT_CATEGORY)
.end();
@@ -749,29 +760,73 @@
// key: date as MM/yyyy
- Map<String, Map<Category, Double>> values = new HashMap<String, Map<Category, Double>>();
+ Map<String, Map<Object, Double>> values = new HashMap<String, Map<Object, Double>>();
+ String DEBT_KEY = "debt"; // cle pour les depenses sur le mois
+ String INCOME_KEY = "income"; // cle pour les revenus sur le mois
+ String TOTAL_KEY = "total"; // cle pour la diffence entre revenus et depenses sur le mois
+ String FINANCES_KEY = "finances"; // cle pour la tréso disponible
+
for (String d : dates) {
- Map<Category, Double> catMap = new HashMap<Category, Double>();
+ Map<Object, Double> catMap = new HashMap<Object, Double>();
values.put(d, catMap);
for (Category c: categories[0]) {
catMap.put(c, 0.0);
}
+ catMap.put(DEBT_KEY, 0.0);
+ catMap.put(INCOME_KEY, 0.0);
+ catMap.put(TOTAL_KEY, 0.0);
+ catMap.put(FINANCES_KEY, 0.0);
}
- for (Invoice i : invoices) {
+ // Debt
+ for (Invoice i : invoices[0]) {
String date = DateFormatUtils.format(i.getExpectedDate(), dateFormat);
- Map<Category, Double> catMap = values.get(date);
- System.out.println(String.format("*** date '%s' %s map %s", date, dates, values));
+ Map<Object, Double> catMap = values.get(date);
Category c = i.getCategory(true);
- System.out.println("c: " + c + " catMap: " + catMap);
if (catMap.containsKey(c)) {
double v = catMap.get(c);
v += i.getAmount();
catMap.put(c, v);
+
+ v = catMap.get(DEBT_KEY);
+ v += i.getAmount();
+ catMap.put(DEBT_KEY, v);
+
+ v = catMap.get(TOTAL_KEY);
+ v -= i.getAmount();
+ catMap.put(TOTAL_KEY, v);
}
}
+ // Income
+ for (Invoice i : invoices[1]) {
+ String date = DateFormatUtils.format(i.getExpectedDate(), dateFormat);
+ Map<Object, Double> catMap = values.get(date);
+ Category c = i.getCategory(true);
+ if (catMap.containsKey(c)) {
+ double v = catMap.get(c);
+ v += i.getAmount();
+ catMap.put(c, v);
+
+ v = catMap.get(INCOME_KEY);
+ v += i.getAmount();
+ catMap.put(INCOME_KEY, v);
+
+ v = catMap.get(TOTAL_KEY);
+ v += i.getAmount();
+ catMap.put(TOTAL_KEY, v);
+ }
+ }
+
+ // finances contient l'etat du compte, au depart finances vaut "recette passee" - "depense passee"
+ double finances = amounts[1] - amounts[0];
+ for (String date : dates) {
+ double v = values.get(date).get(TOTAL_KEY);
+ finances += v;
+ values.get(date).put(FINANCES_KEY, finances);
+ }
+
List<WikittyQueryResultTreeNode<Category>> categoriesTree =
new LinkedList<WikittyQueryResultTreeNode<Category>>();
for (Category c : categories[1]) {
@@ -782,11 +837,111 @@
}
}
- System.out.println("DDDD dates: " + dates + " categoriesTree: " + categoriesTree + " values: " + values);
+ if (log.isDebugEnabled()) {
+ log.debug("budget data\n\t dates: " + dates + "\n\t rootTree: " + categories[1] + "\n\t categoriesTree: " + categoriesTree + "\n\t values: " + values);
+ }
return renderView("dashboardBudget.jsp",
"dates", dates,
"categoriesTree", categoriesTree,
"values", values);
}
+ ////////////////////////////////////////////////////////////////////////////
+ //
+ // H R
+ //
+ ////////////////////////////////////////////////////////////////////////////
+
+ 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
+ );
+ }
+
}
Modified: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/injector/InjectorListener.java
===================================================================
--- trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/injector/InjectorListener.java 2012-08-13 10:51:21 UTC (rev 239)
+++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/injector/InjectorListener.java 2012-08-15 21:37:19 UTC (rev 240)
@@ -22,6 +22,7 @@
*/
package org.chorem.webmotion.injector;
+import java.lang.reflect.Array;
import org.chorem.ChoremClient;
import org.debux.webmotion.server.WebMotionServerListener;
import org.debux.webmotion.server.call.Call;
@@ -30,6 +31,12 @@
import org.debux.webmotion.server.mapping.Mapping;
import java.lang.reflect.Type;
+import java.util.Collection;
+import java.util.Date;
+import org.apache.commons.beanutils.ConversionException;
+import org.apache.commons.beanutils.Converter;
+import org.apache.commons.lang3.StringUtils;
+import org.nuiton.wikitty.WikittyUtil;
/**
* @author ymartel <martel(a)codelutin.com>
@@ -38,6 +45,11 @@
@Override
public void onStart(ServerContext context) {
+
+ // FIXME poussin 20120815 il y a un probleme avec l'injection du ChoremClient.
+ // a terme, il doit y avoir un ChoremClient instancier pour chaque requete,
+ // car chaque requete est faite par un utilisateur different (token different)
+
// Get Client
String token = "";
final ChoremClient client = ChoremClient.getClient(null);
@@ -52,6 +64,45 @@
return null;
}
});
+
+
+ // ajout d'un converter pour support tous les formats de date (comme wikitty)
+ context.addConverter(new Converter() {
+ @Override
+ public Object convert(Class type, Object value) {
+ if (value.getClass().isArray()) {
+ if (Array.getLength(value) > 0) {
+ value = Array.get(value, 0);
+ } else {
+ value = null;
+ }
+ }
+ if (value instanceof Collection) {
+ Collection collection = (Collection)value;
+ if (collection.size() > 0) {
+ value = collection.iterator().next();
+ } else {
+ value = null;
+ }
+ }
+
+ Object result = null;
+ if (value != null) {
+ if (String.class.isAssignableFrom(type)) {
+ if (StringUtils.isNotBlank((String)value)) {
+ result = WikittyUtil.toString(value);
+ }
+ } else if (Date.class.isAssignableFrom(type)) {
+ result = WikittyUtil.toDate(value);
+ } else {
+ throw new ConversionException(String.format(
+ "Chorem date converter can't convert '%s' to '%s'",
+ value, type));
+ }
+ }
+ return result;
+ }
+ }, Date.class);
}
@Override
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-13 10:51:21 UTC (rev 239)
+++ trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java 2012-08-15 21:37:19 UTC (rev 240)
@@ -320,17 +320,19 @@
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 (StringUtils.isNotBlank(id)) {
+ 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) {
- if (StringUtils.isNotBlank(toString)) {
- value = WikittyUtil.format(toString, wikittyValue);
- } else {
- value = wikittyValue.toString();
+ if (wikittyValue != null) {
+ if (StringUtils.isNotBlank(toString)) {
+ value = WikittyUtil.format(toString, wikittyValue);
+ } else {
+ value = wikittyValue.toString();
+ }
}
+ /*{<a href="<%=url%>"><%=value%></a>}*/
}
- /*{<a href="<%=url%>"><%=value%></a>}*/
}
/**
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-13 10:51:21 UTC (rev 239)
+++ trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyInput.java 2012-08-15 21:37:19 UTC (rev 240)
@@ -185,7 +185,7 @@
if (date != null) {
value = DateFormatUtils.format(date, "MM/yyyy");
}
- /*{<input class="monthpicker" type="date" name="<%=name%>" value="<%=value%>" <%=getDynamicAttribute()%>/>}*/
+ /*{<input class="monthpicker" type="text" name="<%=name%>" value="<%=value%>" <%=getDynamicAttribute()%>/>}*/
} else if ("time".equals(field.getTagValue("subtype"))) {
if (date != null) {
value = DateFormatUtils.format(date, "HH:mm");
@@ -306,6 +306,8 @@
String url = "";
if (field.hasAllowed()) {
url = contextPath + "/wikitty-json/search?extension=" + field.getAllowed();
+ } else if (field.hasAllowedQuery()) {
+ url = contextPath + "/wikitty-json/search?query=" + field.getAllowedQuery();
} else {
url = contextPath + "/wikitty-json/search?query=";
}
@@ -336,7 +338,15 @@
String id = wikitty.getWikittyId() + "-" + extName + "-" + fieldName;
List<Wikitty> values = wikitty.getFieldAsWikittyList(extName, fieldName, false);
- String url = contextPath + "/wikitty-json/search?extension=" + field.getAllowed();
+// String url = contextPath + "/wikitty-json/search?extension=" + field.getAllowed();
+ String url = "";
+ if (field.hasAllowed()) {
+ url = contextPath + "/wikitty-json/search?extension=" + field.getAllowed();
+ } else if (field.hasAllowedQuery()) {
+ url = contextPath + "/wikitty-json/search?query=" + field.getAllowedQuery();
+ } else {
+ url = contextPath + "/wikitty-json/search?query=";
+ }
String sep = "";
String prePopulate = "[";
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardBudget.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardBudget.jsp 2012-08-13 10:51:21 UTC (rev 239)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardBudget.jsp 2012-08-15 21:37:19 UTC (rev 240)
@@ -27,12 +27,6 @@
<h1>Budget</h1>
-<form>
- date start: <input type="date" name="start"/>
- end: <input type="date" name="end"/>
- <input type="submit"/>
-</form>
-
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
@@ -51,5 +45,29 @@
</c:forEach>
</tr>
</c:forEach>
+ <tr>
+ <th><span>Sorties</span></th>
+ <c:forEach var="d" items="${dates}">
+ <td class="currency"><span><f:formatNumber type="currency" value='${values.get(d).get("debt")}'/></span></td>
+ </c:forEach>
+ </tr>
+ <tr>
+ <th><span>Entrées</span></th>
+ <c:forEach var="d" items="${dates}">
+ <td class="currency"><span><f:formatNumber type="currency" value='${values.get(d).get("income")}'/></span></td>
+ </c:forEach>
+ </tr>
+ <tr>
+ <th><span>Total</span></th>
+ <c:forEach var="d" items="${dates}">
+ <td class="currency"><span><f:formatNumber type="currency" value='${values.get(d).get("total")}'/></span></td>
+ </c:forEach>
+ </tr>
+ <tr>
+ <th><span>Total cumulé</span></th>
+ <c:forEach var="d" items="${dates}">
+ <td class="currency"><span><f:formatNumber type="currency" value='${values.get(d).get("finances")}'/></span></td>
+ </c:forEach>
+ </tr>
</tbody>
</table>
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-13 10:51:21 UTC (rev 239)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp 2012-08-15 21:37:19 UTC (rev 240)
@@ -25,7 +25,7 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<%@ taglib uri="/WEB-INF/wikitty.tld" prefix="w"%>
-<h1>Invoices</h1>
+<h1>${title}</h1>
<table class="table table-striped table-bordered table-condensed">
<thead>
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-13 10:51:21 UTC (rev 239)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/financial.jsp 2012-08-15 21:37:19 UTC (rev 240)
@@ -25,10 +25,13 @@
<h1>Financial</h1>
<form>
- <input type="text" name="query"/>
+ date start: <input class="datepicker" type="text" name="start" value="${start}"/>
+ end: <input class="datepicker" type="text" name="end" value="${end}"/>
+ filtre: <input type="text" name="query"/>
<input type="submit"/>
</form>
-<jsp:include page="/fragment/dashboard/invoice?query=${query}"/>
-<jsp:include page="/fragment/dashboard/profitability?query=${query}"/>
-<jsp:include page="/fragment/dashboard/budget?query=${query}"/>
+<jsp:include page="/fragment/dashboard/invoiceDebt"/>
+<jsp:include page="/fragment/dashboard/invoiceIncome"/>
+<jsp:include page="/fragment/dashboard/profitability"/>
+<jsp:include page="/fragment/dashboard/budget"/>
Modified: trunk/chorem-webmotion/src/main/webapp/css/chorem.less
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/css/chorem.less 2012-08-13 10:51:21 UTC (rev 239)
+++ trunk/chorem-webmotion/src/main/webapp/css/chorem.less 2012-08-15 21:37:19 UTC (rev 240)
@@ -28,9 +28,16 @@
font-weight: bolder;
}
+/* les colonnes de tableau pour certain type ne doivent pas revenir a la ligne*/
td.number, td.currency, td.percent, td.date, td.nowrap {
white-space: nowrap;
}
+
+/* les colonnes de tableau pour certain type doivent etre aligne sur le separateur */
+td.number, td.currency, td.percent {
+ text-align: right;
+}
+
.categorylevel (@level) {
margin-left: @level * 10px;
}
1
0
13 Aug '12
Author: bpoussin
Date: 2012-08-13 12:51:21 +0200 (Mon, 13 Aug 2012)
New Revision: 239
Url: http://chorem.org/repositories/revision/chorem/239
Log:
- correction de champs dans la table des vacances
- amelioration des affichages
Modified:
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationAsked.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationByEmployee.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardWorkingProjectDaysByEmployee.jsp
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp 2012-08-13 10:20:44 UTC (rev 238)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp 2012-08-13 10:51:21 UTC (rev 239)
@@ -44,8 +44,8 @@
<tbody>
<tr>
<td><w:display wikitty="${q.wikitty}" fqfield="Vacation.employee" label=""/></td>
- <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Vacation.beginDate" label=""/></td>
- <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Vacation.endDate" 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 class="number"><w:display wikitty="${q.wikitty}" toString="${days.get(q.wikittyId)}" label=""/></td>
<td><w:display wikitty="${q.wikitty}" fqfield="Vacation.type" label=""/></td>
<td><w:display wikitty="${q.wikitty}" fqfield="Vacation.description" label=""/></td>
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationAsked.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationAsked.jsp 2012-08-13 10:20:44 UTC (rev 238)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationAsked.jsp 2012-08-13 10:51:21 UTC (rev 239)
@@ -42,8 +42,8 @@
<tbody>
<tr>
<td><w:display wikitty="${q.wikitty}" fqfield="Vacation.employee" label=""/></td>
- <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Vacation.beginDate" label=""/></td>
- <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Vacation.endDate" 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 class="number"><w:display wikitty="${q.wikitty}" toString="${days.get(q.wikittyId)}" label=""/></td>
<td><w:display wikitty="${q.wikitty}" fqfield="Vacation.type" label=""/></td>
<td><w:display wikitty="${q.wikitty}" fqfield="Vacation.description" label=""/></td>
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationByEmployee.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationByEmployee.jsp 2012-08-13 10:20:44 UTC (rev 238)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationByEmployee.jsp 2012-08-13 10:51:21 UTC (rev 239)
@@ -22,13 +22,14 @@
--%>
<%@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" %>
<h1>Vacances par employé</h1>
<ul>
<c:forEach var="q" items="${vacationByEmployee.keySet()}">
- <li><strong>${q}:</strong> <span>${vacationByEmployee.get(q)}</span></li>
+ <li><strong>${q}:</strong> <span><f:formatNumber type="number" value="${vacationByEmployee.get(q)}"/></span></li>
</c:forEach>
</ul>
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardWorkingProjectDaysByEmployee.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardWorkingProjectDaysByEmployee.jsp 2012-08-13 10:20:44 UTC (rev 238)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardWorkingProjectDaysByEmployee.jsp 2012-08-13 10:51:21 UTC (rev 239)
@@ -22,11 +22,12 @@
--%>
<%@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" %>
<h1>Jour de travail sur des projets client par employé</h1>
<ul>
<c:forEach var="q" items="${workingProjectDaysByEmployee.keySet()}">
- <li><strong>${q}:</strong> <span>${workingProjectDaysByEmployee.get(q)}</span></li>
+ <li><strong>${q}:</strong> <span><f:formatNumber type="number" value="${workingProjectDaysByEmployee.get(q)}"/></span></li>
</c:forEach>
</ul>
1
0
r238 - in trunk/chorem-webmotion/src/main/webapp: WEB-INF/jsp css
by bpoussin@users.chorem.org 13 Aug '12
by bpoussin@users.chorem.org 13 Aug '12
13 Aug '12
Author: bpoussin
Date: 2012-08-13 12:20:44 +0200 (Mon, 13 Aug 2012)
New Revision: 238
Url: http://chorem.org/repositories/revision/chorem/238
Log:
- formattage de toutes les colonnes des dashboards
Modified:
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardBudget.jsp
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/dashboardVacation.jsp
trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationAsked.jsp
trunk/chorem-webmotion/src/main/webapp/css/chorem.less
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardBudget.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardBudget.jsp 2012-08-12 11:39:19 UTC (rev 237)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardBudget.jsp 2012-08-13 10:20:44 UTC (rev 238)
@@ -22,6 +22,7 @@
--%>
<%@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>Budget</h1>
@@ -46,7 +47,7 @@
<tr>
<td><span class="level level${c.level}" level="${c.level}">${c.userObject}</span></td>
<c:forEach var="d" items="${dates}">
- <td><span>${values.get(d).get(c.userObject)}</span></td>
+ <td class="currency"><span><f:formatNumber type="currency" value="${values.get(d).get(c.userObject)}"/></span></td>
</c:forEach>
</tr>
</c:forEach>
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-12 11:39:19 UTC (rev 237)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp 2012-08-13 10:20:44 UTC (rev 238)
@@ -22,6 +22,7 @@
--%>
<%@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>Invoices</h1>
@@ -49,10 +50,10 @@
<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 class="currency"><w:display wikitty="${q.wikitty}" fqfield="Invoice.amount" label=""/></td>
+ <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Invoice.postedDate" label=""/></td>
+ <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Invoice.expectedDate" label=""/></td>
+ <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Invoice.paymentDate" label=""/></td>
<td>${attachments.get(q.wikittyId)}</td>
</tr>
</tbody>
@@ -61,7 +62,7 @@
<dl class="dl-horizontal">
- <dt>Total</dt><dd>${amount}</dd>
- <dt>Total paid</dt><dd>${amountPaid}</dd>
- <dt>Total expected</dt><dd>${amountExpected}</dd>
+ <dt>Total</dt><dd><f:formatNumber type="currency" value="${amount}"/></dd>
+ <dt>Total paid</dt><dd><f:formatNumber type="currency" value="${amountPaid}"/></dd>
+ <dt>Total expected</dt><dd><f:formatNumber type="currency" value="${amountExpected}"/></dd>
</dl>
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-12 11:39:19 UTC (rev 237)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProfitability.jsp 2012-08-13 10:20:44 UTC (rev 238)
@@ -22,6 +22,8 @@
--%>
<%@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>
@@ -48,14 +50,14 @@
<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><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td>
+ <td class="number"><w:display wikitty="${q.wikitty}" fqfield="Quotation.estimatedDays" label=""/></td>
+ <td class="currency"><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td>
+ <td class="number"><f:formatNumber type="number" value="${taskInfos.get(q.wikittyId).workingDays}"/></td>
+ <td class="currency"><f:formatNumber type="currency" value="${taskInfos.get(q.wikittyId).hopedPriceDay}"/></td>
+ <td class="currency"><f:formatNumber type="currency" value="${taskInfos.get(q.wikittyId).realPriceDay}"/></td>
+ <td class="currency"><f:formatNumber type="currency" value="${taskInfos.get(q.wikittyId).hopedProfit}"/></td>
+ <td class="currency"><f:formatNumber type="currency" value="${taskInfos.get(q.wikittyId).realProfit}"/></td>
+ <td class="nowrap"><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td>
<td>${attachments.get(q.wikittyId)}</td>
</tr>
</tbody>
@@ -63,8 +65,8 @@
</table>
<dl class="dl-horizontal">
- <dt>Total amount</dt><dd>${amount}</dd>
- <dt>Total hoped profit</dt><dd>${hopedProfit}</dd>
- <dt>Total real profit</dt><dd>${realProfit}</dd>
- <dt>Profit discordance</dt><dd>${realProfit - hopedProfit}</dd>
+ <dt>Total amount</dt><dd><f:formatNumber type="currency" value="${amount}"/></dd>
+ <dt>Total hoped profit</dt><dd><f:formatNumber type="currency" value="${hopedProfit}"/></dd>
+ <dt>Total real profit</dt><dd><f:formatNumber type="currency" value="${realProfit}"/></dd>
+ <dt>Profit discordance</dt><dd><f:formatNumber type="currency" value="${realProfit - hopedProfit}"/></dd>
</dl>
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-12 11:39:19 UTC (rev 237)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProject.jsp 2012-08-13 10:20:44 UTC (rev 238)
@@ -22,6 +22,7 @@
--%>
<%@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>
@@ -51,12 +52,12 @@
<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><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td>
- <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td>
+ <td class="number"><w:display wikitty="${q.wikitty}" fqfield="Quotation.estimatedDays" label=""/></td>
+ <td class="number"><f:formatNumber type="number" value="${taskInfos.get(q.wikittyId).workingDays}"/></td>
+ <td class="number"><f:formatNumber type="number" value="${taskInfos.get(q.wikittyId).opened}"/></td>
+ <td class="number"><f:formatNumber type="number" value="${taskInfos.get(q.wikittyId).closed}"/></td>
+ <td class="currency"><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td>
+ <td class="currency"><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td>
<td>${attachments.get(q.wikittyId)}</td>
</tr>
</tbody>
@@ -65,7 +66,7 @@
<dl class="dl-horizontal">
- <dt>Total amount</dt><dd>${amount}</dd>
- <dt>Total task opened</dt><dd>${opened}</dd>
- <dt>Total task closed</dt><dd>${closed}</dd>
+ <dt>Total amount</dt><dd><f:formatNumber type="currency" value="${amount}"/></dd>
+ <dt>Total task opened</dt><dd><f:formatNumber type="number" value="${opened}"/></dd>
+ <dt>Total task closed</dt><dd><f:formatNumber type="number" value="${closed}"/></dd>
</dl>
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-12 11:39:19 UTC (rev 237)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardQuotation.jsp 2012-08-13 10:20:44 UTC (rev 238)
@@ -22,6 +22,7 @@
--%>
<%@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>
@@ -50,11 +51,11 @@
<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><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td>
- <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td>
+ <td class="number"><w:display wikitty="${q.wikitty}" fqfield="Quotation.estimatedDays" label=""/></td>
+ <td class="percent"><w:display wikitty="${q.wikitty}" fqfield="Quotation.conversionHope" label=""/></td>
+ <td class="currency"><f:formatNumber type="currency" value="${q.amount / q.estimatedDays}"/></td>
+ <td class="currency"><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td>
+ <td class="nowrap"><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td>
<td>${attachments.get(q.wikittyId)}</td>
</tr>
</tbody>
@@ -63,6 +64,6 @@
<dl class="dl-horizontal">
- <dt>Total</dt><dd>${amount}</dd>
- <dt>Hope</dt><dd>${amountHope}</dd>
+ <dt>Total</dt><dd><f:formatNumber type="currency" value="${amount}"/></dd>
+ <dt>Hope</dt><dd><f:formatNumber type="currency" value="${amountHope}"/></dd>
</dl>
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp 2012-08-12 11:39:19 UTC (rev 237)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacation.jsp 2012-08-13 10:20:44 UTC (rev 238)
@@ -22,6 +22,8 @@
--%>
<%@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>Vacances</h1>
@@ -41,12 +43,12 @@
<c:forEach var="q" items="${vacations}">
<tbody>
<tr>
- <td><a href="<c:url value="/wikitty/Employee/view/${q.employee}"/>">${q.getEmployee(false)}</a></td>
- <td><a href="<c:url value="/wikitty/Vacation/view/${q.wikittyId}"/>">${q.beginDate}</a></td>
- <td>${q.endDate}</td>
- <td>${days.get(q.wikittyId)}</td>
- <td>${q.type}</td>
- <td>${q.description}</td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Vacation.employee" label=""/></td>
+ <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Vacation.beginDate" label=""/></td>
+ <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Vacation.endDate" label=""/></td>
+ <td class="number"><w:display wikitty="${q.wikitty}" toString="${days.get(q.wikittyId)}" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Vacation.type" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Vacation.description" label=""/></td>
</tr>
</tbody>
</c:forEach>
Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationAsked.jsp
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationAsked.jsp 2012-08-12 11:39:19 UTC (rev 237)
+++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationAsked.jsp 2012-08-13 10:20:44 UTC (rev 238)
@@ -22,6 +22,8 @@
--%>
<%@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>Vacances en attente d'agrément</h1>
@@ -39,12 +41,12 @@
<c:forEach var="q" items="${vacations}">
<tbody>
<tr>
- <td><a href="<c:url value="/wikitty/Employee/view/${q.employee}"/>">${q.getEmployee(false)}</a></td>
- <td><a href="<c:url value="/wikitty/Vacation/view/${q.wikittyId}"/>">${q.beginDate}</a></td>
- <td>${q.endDate}</td>
- <td>${days.get(q.wikittyId)}</td>
- <td>${q.type}</td>
- <td>${q.description}</td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Vacation.employee" label=""/></td>
+ <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Vacation.beginDate" label=""/></td>
+ <td class="date"><w:display wikitty="${q.wikitty}" fqfield="Vacation.endDate" label=""/></td>
+ <td class="number"><w:display wikitty="${q.wikitty}" toString="${days.get(q.wikittyId)}" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Vacation.type" label=""/></td>
+ <td><w:display wikitty="${q.wikitty}" fqfield="Vacation.description" label=""/></td>
</tr>
</tbody>
</c:forEach>
Modified: trunk/chorem-webmotion/src/main/webapp/css/chorem.less
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/css/chorem.less 2012-08-12 11:39:19 UTC (rev 237)
+++ trunk/chorem-webmotion/src/main/webapp/css/chorem.less 2012-08-13 10:20:44 UTC (rev 238)
@@ -28,6 +28,9 @@
font-weight: bolder;
}
+td.number, td.currency, td.percent, td.date, td.nowrap {
+ white-space: nowrap;
+}
.categorylevel (@level) {
margin-left: @level * 10px;
}
@@ -47,4 +50,3 @@
span.level5 {
.categorylevel (5);
}
-
1
0
r237 - 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/css
by bpoussin@users.chorem.org 12 Aug '12
by bpoussin@users.chorem.org 12 Aug '12
12 Aug '12
Author: bpoussin
Date: 2012-08-12 13:39:19 +0200 (Sun, 12 Aug 2012)
New Revision: 237
Url: http://chorem.org/repositories/revision/chorem/237
Log:
- formatage des nombres pour l'edition
- on laisse les % tel que l'utilisateur les ecrits (pas de conversion pour le stockage)
Modified:
trunk/chorem-entities/src/main/xmi/chorem-model.properties
trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/AdminAction.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/css/chorem.less
Modified: trunk/chorem-entities/src/main/xmi/chorem-model.properties
===================================================================
--- trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-08 17:45:19 UTC (rev 236)
+++ trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-12 11:39:19 UTC (rev 237)
@@ -161,7 +161,7 @@
#
# Quotation
#
-org.chorem.entities.Quotation.class.tagvalue.version=15.0
+org.chorem.entities.Quotation.class.tagvalue.version=16.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
@@ -178,7 +178,7 @@
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.conversionHope.tagvalue.max=100
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
Modified: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/AdminAction.java
===================================================================
--- trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/AdminAction.java 2012-08-08 17:45:19 UTC (rev 236)
+++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/AdminAction.java 2012-08-12 11:39:19 UTC (rev 237)
@@ -23,6 +23,7 @@
package org.chorem.webmotion.actions;
+import java.text.NumberFormat;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.ChoremClient;
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 17:45:19 UTC (rev 236)
+++ trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java 2012-08-12 11:39:19 UTC (rev 237)
@@ -225,7 +225,10 @@
if ("currency".equalsIgnoreCase(subtype)) {
formatter = NumberFormat.getCurrencyInstance();
} else if ("percent".equalsIgnoreCase(subtype)) {
- formatter = NumberFormat.getPercentInstance();
+ // on utilise pas NumberFormat.getPercentInstance();
+ // car il divise tout seul par 100, ce qu'on ne souhaite pas
+ // on veut affichage=stockage
+ formatter = new DecimalFormat("#,##0 '%'");
} else if ("integer".equalsIgnoreCase(subtype)) {
formatter = NumberFormat.getIntegerInstance();
} else {
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 17:45:19 UTC (rev 236)
+++ trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyInput.java 2012-08-12 11:39:19 UTC (rev 237)
@@ -40,6 +40,7 @@
import javax.servlet.jsp.tagext.SimpleTagSupport;
import java.io.IOException;
import java.math.BigDecimal;
+import java.text.NumberFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -207,7 +208,9 @@
Wikitty wikitty, FieldType field, String extName , String fieldName)
throws JspException, IOException {
BigDecimal value = wikitty.getFieldAsBigDecimal(extName, fieldName);
- /*{<input type="text" name="<%=name%>" value="<%=value%>"<%=getDynamicAttribute()%>/>}*/
+ NumberFormat formatter = NumberFormat.getNumberInstance();
+ String formattedValue = formatter.format(value);
+ /*{<input type="text" name="<%=name%>" value="<%=formattedValue%>"<%=getDynamicAttribute()%>/>}*/
}
protected void inputString(JspWriter output, String contextPath, String name,
Modified: trunk/chorem-webmotion/src/main/webapp/css/chorem.less
===================================================================
--- trunk/chorem-webmotion/src/main/webapp/css/chorem.less 2012-08-08 17:45:19 UTC (rev 236)
+++ trunk/chorem-webmotion/src/main/webapp/css/chorem.less 2012-08-12 11:39:19 UTC (rev 237)
@@ -13,6 +13,16 @@
padding: 0px;
}
+.ui-autocomplete {
+ max-height: 250px;
+ max-width: 500px;
+ overflow-y: auto;
+ /* prevent horizontal scrollbar */
+ overflow-x: hidden;
+ /* add padding to account for vertical scrollbar */
+ padding-right: 20px;
+}
+
.ui-autocomplete-category {
color: rgba(82, 168, 236, 0.796875);
font-weight: bolder;
1
0
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 08 Aug '12
by bpoussin@users.chorem.org 08 Aug '12
08 Aug '12
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
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