r232 - in trunk: chorem-entities/src/main/xmi chorem-webmotion/src/main/java/org/wikitty/web/jsptag chorem-webmotion/src/main/webapp/WEB-INF chorem-webmotion/src/main/webapp/WEB-INF/jsp
Author: bpoussin Date: 2012-08-07 20:30:03 +0200 (Tue, 07 Aug 2012) New Revision: 232 Url: http://chorem.org/repositories/revision/chorem/232 Log: gros travail sur les tag display et utilisation dans les dashboard Modified: trunk/chorem-entities/src/main/xmi/chorem-model.properties trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProfitability.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProject.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardQuotation.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/financial.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/wikitty.tld Modified: trunk/chorem-entities/src/main/xmi/chorem-model.properties =================================================================== --- trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-07 15:55:35 UTC (rev 231) +++ trunk/chorem-entities/src/main/xmi/chorem-model.properties 2012-08-07 18:30:03 UTC (rev 232) @@ -99,18 +99,21 @@ org.chorem.entities.Note.class.tagvalue.toString=(%Note.date$tF) %Note.title|noname$s org.chorem.entities.Note.class.tagvalue.sortOrder=Note.date org.chorem.entities.Note.Attachment.content.tagvalue.subtype=text/rst -org.chorem.entities.Quotation.class.tagvalue.version=13.0 +org.chorem.entities.Quotation.class.tagvalue.version=14.0 org.chorem.entities.Quotation.class.tagvalue.preload=Quotation.project;Quotation.customer;Quotation.supplier;Quotation.category org.chorem.entities.Quotation.class.tagvalue.toString=%Interval.beginDate$tF-%Interval.endDate$tF %Quotation.reference|noref$s(%Quotation.category|noCategory$s) %Quotation.description|nodescription$s org.chorem.entities.Quotation.class.tagvalue.sortOrder=Interval.beginDate desc,Interval.endDate,Quotation.reference,Quotation.type,Quotation.description org.chorem.entities.Quotation.attribute.status.tagvalue.allowed=LEAD,DRAFT,SENT,REJECTED,ACCEPTED,STARTED,DELIVERED,RSV,WARRANTY,CLOSED org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.help=Pourcentage de r\u00e9ussite du projet +org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.subtype=percent org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.min=0 org.chorem.entities.Quotation.attribute.conversionHope.tagvalue.max=100 -org.chorem.entities.Invoice.class.tagvalue.version=10.0 +org.chorem.entities.Invoice.class.tagvalue.version=11.0 org.chorem.entities.Invoice.class.tagvalue.preload=Invoice.customer;Invoice.supplier org.chorem.entities.Invoice.class.tagvalue.toString=%Invoice.reference|noref$s %Invoice.amount|noamount$s %Invoice.postedDate$tF %Invoice.expectedDate$tF %Invoice.paymentDate$tF org.chorem.entities.Invoice.class.tagvalue.sortOrder=Invoice.postedDate desc,Invoice.expectedDate,Invoice.paymentDate,Invoice.reference,Invoice.amount +org.chorem.entities.Invoice.attribute.amount.tagvalue.subtype=currency +org.chorem.entities.Invoice.attribute.description.tagvalue.subtype=text/rst org.chorem.entities.Invoiceable.class.tagvalue.version=10.0 org.chorem.entities.Invoiceable.class.tagvalue.preload=Invoiceable.target;Invoiceable.category org.chorem.entities.Invoiceable.class.tagvalue.toString=%Invoiceable.name|noname$s Modified: trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java =================================================================== --- trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java 2012-08-07 15:55:35 UTC (rev 231) +++ trunk/chorem-webmotion/src/main/java/org/wikitty/web/jsptag/WikittyDisplay.java 2012-08-07 18:30:03 UTC (rev 232) @@ -43,14 +43,25 @@ /** * Tag Support to display Wikitty fields. * + * attribute: + * <li>wikitty: wikitty object + * <li>fqfield: fully qualified field to display + * <li>label: if not presente use field name, if empty or blank don't show label + * <li>toString: String used to transforme Wikitty to string representation (overwrite default toString) + * <li>pattern: pattern used to display field (Date, Number) (overwrite default format) + * <li>subtype: subtype used for display field (overwrite default subtype) + * * @author ymartel <martel@codelutin.com> * @since 04/26/2012 */ public class WikittyDisplay extends SimpleTagSupport { protected Wikitty wikitty; - protected String fqfield=""; - protected String label=""; + protected String fqfield = ""; + protected String label = null; + protected String toString = null; + protected String pattern = null; + protected String subtype = null; public void setWikitty(Wikitty wikitty) { this.wikitty = wikitty; @@ -64,54 +75,82 @@ this.label = label; } + public void setToString(String toString) { + this.toString = toString; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public void setSubtype(String subtype) { + this.subtype = subtype; + } + @Override public void doTag() throws JspException, IOException { + if (wikitty == null) { + // si pas de wikitty, on a rien a faire + return; + } JspWriter output = getJspContext().getOut(); PageContext pageContext = (PageContext)getJspContext(); ServletContext servletContext = pageContext.getServletContext(); String contextPath = servletContext.getContextPath(); - String extName = WikittyUtil.getExtensionNameFromFQFieldName(fqfield); - String fieldName = WikittyUtil.getFieldNameFromFQFieldName(fqfield); - FieldType field = wikitty.getFieldType(fqfield); + if (StringUtils.isBlank(fqfield)) { + // pas de champs precisse, on doit afficher le wikitty lui meme + if (StringUtils.isNotBlank(label)) { + /*{<%=label%> : }*/ + } + renderWikitty(output, contextPath, wikitty.getWikittyId(), wikitty, toString); + } else { + String extName = WikittyUtil.getExtensionNameFromFQFieldName(fqfield); + String fieldName = WikittyUtil.getFieldNameFromFQFieldName(fqfield); + FieldType field = wikitty.getFieldType(fqfield); - // par defaut si pas de label on utilise le nom du field - if (StringUtils.isBlank(label)) { - label = fieldName; - } + // par defaut si pas de label on utilise le nom du field + if (null == label) { + label = fieldName; + } - if (field != null) { - switch(field.getType()) { - case BINARY: - viewBinary(output, contextPath, label, wikitty, extName, fieldName); - break; - case BOOLEAN: - viewBoolean(output, contextPath, label, wikitty, extName, fieldName); - break; - case DATE: - viewDate(output, contextPath, label, wikitty, field, extName, fieldName); - break; - case NUMERIC: - viewNumeric(output, contextPath, label, wikitty, field, extName, fieldName); - break; - case STRING: - if (field.isCollection()) { - viewCollectionString(output, contextPath, label, wikitty, extName, fieldName); - } else { - viewString(output, label, wikitty, extName, fieldName); - } - break; - case WIKITTY: - if (field.isCollection()) { - viewCollectionWikitty(output, contextPath, label, wikitty, extName, fieldName); - } else { - viewWikitty(output, contextPath, label, wikitty, extName, fieldName); - } - break; + if (field != null) { + if (StringUtils.isNotBlank(label)) { + /*{<%=label%> : }*/ + } + + switch(field.getType()) { + case BINARY: + viewBinary(output, contextPath, label, wikitty, extName, fieldName); + break; + case BOOLEAN: + viewBoolean(output, contextPath, label, wikitty, extName, fieldName); + break; + case DATE: + viewDate(output, contextPath, label, wikitty, field, extName, fieldName); + break; + case NUMERIC: + viewNumeric(output, contextPath, label, wikitty, field, extName, fieldName); + break; + case STRING: + if (field.isCollection()) { + viewCollectionString(output, contextPath, label, wikitty, field, extName, fieldName); + } else { + viewString(output, label, wikitty, field, extName, fieldName); + } + break; + case WIKITTY: + if (field.isCollection()) { + viewCollectionWikitty(output, contextPath, label, wikitty, field, extName, fieldName); + } else { + viewWikitty(output, contextPath, label, wikitty, field, extName, fieldName); + } + break; + } + } else { + /*{<div class="alert alert-error"><%=wikitty.getWikittyId()%> doesn't have field '<%=fqfield%>'</div>}*/ } - } else { - /*{<div class="alert alert-error"><%=wikitty.getWikittyId()%> doesn't have field '<%=fqfield%>'</div>}*/ } } @@ -121,9 +160,9 @@ byte[] fieldAsBytes = wikitty.getFieldAsBytes(extName, fieldName); if (fieldAsBytes != null) { String url = contextPath + "/wikitty/view/" + wikitty.getWikittyId() + "/" + extName + "/" + fieldName; - /*{<%=label%> : <a href="<%=url%>">Download</a>}*/ + /*{<a href="<%=url%>">Download</a>}*/ } else { - /*{<%=label%> : }*/ + // nothing } } @@ -131,7 +170,7 @@ Wikitty wikitty, String extName , String fieldName) throws JspException, IOException { boolean value = wikitty.getFieldAsBoolean(extName, fieldName); - /*{<%=label%> : <%=value%>}*/ + /*{<%=value%>}*/ } protected void viewDate(JspWriter output, String contextPath, String label, @@ -140,22 +179,25 @@ Date date = wikitty.getFieldAsDate(extName, fieldName); String value = ""; + if (date != null) { - if (field.hasPattern() && date != null) { - String pattern = field.getPattern(); + pattern = StringUtils.defaultIfBlank(pattern, field.getPattern()); + + if (StringUtils.isBlank(pattern)) { + subtype = StringUtils.defaultIfBlank(subtype, field.getSubtype()); + if ("month".equalsIgnoreCase(subtype)) { + pattern = "MM/yyyy"; + } else if ("time".equalsIgnoreCase(subtype)) { + pattern = "hh:mm"; + } else if ("datetime".equalsIgnoreCase(subtype)) { + pattern = "dd/MM/yyyy hh:mm"; + } else { + pattern = "dd/MM/yyyy"; + } + } value = DateFormatUtils.format(date, pattern); - } else if (date != null) { - if ("month".equals(field.getTagValue("subtype"))) { - value = DateFormatUtils.format(date, "MM/yyyy"); - } else if ("time".equals(field.getTagValue("subtype"))) { - value = DateFormatUtils.format(date, "hh:mm"); - } else if ("datetime".equals(field.getTagValue("subtype"))) { - value = DateFormatUtils.format(date, "dd/MM/yyyy hh:mm"); - } else { - value = DateFormatUtils.format(date, "dd/MM/yyyy"); - } } - /*{<%=label%> : <%=value%> }*/ + /*{<%=value%> }*/ } protected void viewNumeric(JspWriter output, String contextPath, String label, @@ -163,26 +205,43 @@ throws JspException, IOException { BigDecimal value = wikitty.getFieldAsBigDecimal(extName, fieldName); - NumberFormat formatter; - if (field.hasPattern()) { - String pattern = field.getPattern(); - //TODO ymartel 2012-05-02 : manage localization - formatter = new DecimalFormat(pattern); - } else { - formatter = new DecimalFormat(); + String formattedValue = ""; + if (value != null) { + + pattern = StringUtils.defaultIfBlank(pattern, field.getPattern()); + NumberFormat formatter; + + if (StringUtils.isNotBlank(pattern)) { + formatter = new DecimalFormat(pattern); + } else { + subtype = StringUtils.defaultIfBlank(subtype, field.getSubtype()); + + if ("currency".equalsIgnoreCase(subtype)) { + formatter = NumberFormat.getCurrencyInstance(); + } else if ("percent".equalsIgnoreCase(subtype)) { + formatter = NumberFormat.getPercentInstance(); + } else if ("integer".equalsIgnoreCase(subtype)) { + formatter = NumberFormat.getIntegerInstance(); + } else { + formatter = NumberFormat.getNumberInstance(); + } + } + formattedValue = formatter.format(value); } - String formattedValue = formatter.format(value); - /*{<%=label%> : <%=formattedValue%> }*/ + /*{<%=formattedValue%> }*/ } protected void viewCollectionString(JspWriter output, String contextPath, String label, - Wikitty wikitty, String extName , String fieldName) + Wikitty wikitty, FieldType field, String extName , String fieldName) throws JspException, IOException { List<String> values = wikitty.getFieldAsList(extName, fieldName, String.class); - /*{<%=label%> : <ul>}*/ + subtype = StringUtils.defaultIfBlank(subtype, field.getSubtype()); + + /*{<ul>}*/ if (values != null) { for (String value : values) { if (value != null) { + value = transformString(subtype, value); /*{<li><%=value%></li>}*/ } } @@ -190,23 +249,32 @@ /*{</ul>}*/ } - protected void viewString(JspWriter output, String label, Wikitty wikitty, String extName , String fieldName) + protected void viewString(JspWriter output, String label, Wikitty wikitty, + FieldType field, String extName , String fieldName) throws JspException, IOException { - String fieldAsString = wikitty.getFieldAsString(extName, fieldName); - String value = fieldAsString != null ? fieldAsString : ""; - /*{<%=label%> : <%=value%>}*/ + String value = wikitty.getFieldAsString(extName, fieldName); + subtype = StringUtils.defaultIfBlank(subtype, field.getSubtype()); + + if (StringUtils.isNotBlank(value)) { + value = transformString(subtype, value); + } else { + value = ""; + } + /*{<%=value%>}*/ } protected void viewCollectionWikitty(JspWriter output, String contextPath, String label, - Wikitty wikitty, String extName , String fieldName) + Wikitty wikitty, FieldType field, String extName , String fieldName) throws JspException, IOException { List<Wikitty> values = wikitty.getFieldAsWikittyList(extName, fieldName, false); - /*{<%=label%> : <ul>}*/ + toString = StringUtils.defaultIfBlank(toString, field.getToString()); + + /*{<ul>}*/ if (values != null) { - for (Wikitty value : values) { - if (value != null) { - String url = contextPath + "/wikitty/view/" + value.getWikittyId(); - /*{<li><a href="<%=url%>"><%=value%></a></li>}*/ + for (Wikitty wikittyValue : values) { + if (wikittyValue != null) { + String id = wikittyValue.getWikittyId(); + renderWikitty(output, contextPath, id, wikittyValue, toString); } } } @@ -214,17 +282,63 @@ } + /** + * Si l'objet de ce champs est non preloaded alors utilise l'id comme representation texte. + * Si l'objet est preloaded alors on utilise le toString du tag s'il existe + * sinon le toString du champs et en dernier le toString du wikitty + * + * @param output + * @param contextPath + * @param label + * @param wikitty + * @param field + * @param extName + * @param fieldName + * @throws JspException + * @throws IOException + */ protected void viewWikitty(JspWriter output, String contextPath, String label, - Wikitty wikitty, String extName , String fieldName) + Wikitty wikitty, FieldType field, String extName , String fieldName) throws JspException, IOException { - String value = wikitty.getFieldAsWikitty(extName, fieldName); + String id = wikitty.getFieldAsWikitty(extName, fieldName); Wikitty wikittyValue = wikitty.getFieldAsWikitty(extName, fieldName, false); + String value = id; // par defaut, si on a pas mieux on met l'id de l'objet + toString = StringUtils.defaultIfBlank(toString, field.getToString()); + + renderWikitty(output, contextPath, id, wikittyValue, toString); + } + + protected void renderWikitty(JspWriter output, String contextPath, + String id, Wikitty wikittyValue, String toString) + throws JspException, IOException { + String url = contextPath + "/wikitty/view/" + id; + String value = id; // par defaut, si on a pas mieux on met l'id de l'objet + if (wikittyValue != null) { - String url = contextPath + "/wikitty/view/" + value; - if (wikittyValue != null) { - /*{<%=label%>: <a href="<%=url%>"><%=wikittyValue%></a>}*/ + if (StringUtils.isNotBlank(toString)) { + value = WikittyUtil.format(toString, wikittyValue); + } else { + value = wikittyValue.toString(); } } + /*{<a href="<%=url%>"><%=value%></a>}*/ } + /** + * Transform String in specifique format to other format (ex: HTML). + * + * @param subtype mimetype or other used to choice output format + * @param value value to transform + * @return + */ + protected String transformString(String subtype, String value) { + String result = value; + if ("text/rst".equalsIgnoreCase(subtype)) { + // TODO poussin 20120807 use jrst to transforme string to html + } else if ("text/dbkx".equalsIgnoreCase(subtype)) { + // TODO poussin 20120807 use docbook jrst xsl to transforme string to html + } + return result; + } + }//WikittyDisplay Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp 2012-08-07 15:55:35 UTC (rev 231) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardInvoice.jsp 2012-08-07 18:30:03 UTC (rev 232) @@ -44,15 +44,15 @@ <c:forEach var="q" items="${invoices}"> <tbody> <tr> - <td><a href="<c:url value="/wikitty/view/${q.target}"/>">${q.getTarget(false)}</a></td> - <td><a href="<c:url value="/wikitty/Invoice/view/${q.wikittyId}"/>">${q.reference}</a></td> - <td>${q.description}</td> - <td><a href="<c:url value="/wikitty/Employee/view/${q.customer}"/>">${q.getCustomer(false)}</a></td> - <td><a href="<c:url value="/wikitty/Employee/view/${q.supplier}"/>">${q.getSupplier(false)}</a></td> - <td>${q.amount}</td> - <td>${q.postedDate}</td> - <td>${q.expectedDate}</td> - <td>${q.paymentDate}</td> + <td><w:display wikitty="${q.wikitty}" fqfield="Invoiceable.target" label=""/></td> + <td><w:display wikitty="${q.wikitty}" toString="%Invoice.reference$s" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.description" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.customer" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.supplier" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.amount" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.postedDate" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.expectedDate" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Invoice.paymentDate" label=""/></td> <td>${attachments.get(q.wikittyId)}</td> </tr> </tbody> Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProfitability.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProfitability.jsp 2012-08-07 15:55:35 UTC (rev 231) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProfitability.jsp 2012-08-07 18:30:03 UTC (rev 232) @@ -45,17 +45,17 @@ <c:forEach var="q" items="${quotations}"> <tbody> <tr> - <td><a href="<c:url value="/wikitty/Project/view/${q.project}"/>">${q.getProject(false)}</a></td> - <td>${q.getCategory(false)}</td> - <td><a href="<c:url value="/wikitty/Quotation/view/${q.wikittyId}"/>">${q.description}</a></td> - <td>${q.estimatedDays}</td> - <td>${q.amount}</td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.project" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.category" label=""/></td> + <td><w:display wikitty="${q.wikitty}" toString="%Quotation.description$s" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.estimatedDays" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td> <td>${taskInfos.get(q.wikittyId).workingDays}</td> <td>${taskInfos.get(q.wikittyId).hopedPriceDay}</td> <td>${taskInfos.get(q.wikittyId).realPriceDay}</td> <td>${taskInfos.get(q.wikittyId).hopedProfit}</td> <td>${taskInfos.get(q.wikittyId).realProfit}</td> - <td>${q.status}</td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td> <td>${attachments.get(q.wikittyId)}</td> </tr> </tbody> Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProject.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProject.jsp 2012-08-07 15:55:35 UTC (rev 231) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardProject.jsp 2012-08-07 18:30:03 UTC (rev 232) @@ -22,6 +22,7 @@ --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="/WEB-INF/wikitty.tld" prefix="w"%> <h1>${title}</h1> @@ -45,17 +46,17 @@ <c:forEach var="q" items="${quotations}"> <tbody> <tr> - <td><a href="<c:url value="/wikitty/Project/view/${q.project}"/>">${q.getProject(false).getName()}</a></td> - <td><a href="<c:url value="/wikitty/Category/view/${q.category}"/>">${q.getCategory(false)}</a></td> - <td><a href="<c:url value="/wikitty/Quotation/view/${q.wikittyId}"/>">${q.description}</a></td> - <td><a href="<c:url value="/wikitty/Employee/view/${q.customer}"/>">${q.getCustomer(false)}</a></td> - <td><a href="<c:url value="/wikitty/Employee/view/${q.supplier}"/>">${q.getSupplier(false)}</a></td> - <td>${q.estimatedDays}</td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.project" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.category" label=""/></td> + <td><w:display wikitty="${q.wikitty}" toString="%Quotation.description$s" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.customer" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.supplier" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.estimatedDays" label=""/></td> <td>${taskInfos.get(q.wikittyId).workingDays}</td> <td>${taskInfos.get(q.wikittyId).opened}</td> <td>${taskInfos.get(q.wikittyId).closed}</td> - <td>${q.amount}</td> - <td>${q.status}</td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td> <td>${attachments.get(q.wikittyId)}</td> </tr> </tbody> Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardQuotation.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardQuotation.jsp 2012-08-07 15:55:35 UTC (rev 231) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardQuotation.jsp 2012-08-07 18:30:03 UTC (rev 232) @@ -22,6 +22,7 @@ --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="/WEB-INF/wikitty.tld" prefix="w"%> <h1>${title}</h1> @@ -44,16 +45,16 @@ <c:forEach var="q" items="${quotations}"> <tbody> <tr> - <td><a href="<c:url value="/wikitty/Project/view/${q.project}"/>">${q.getProject(false).getName()}</a></td> - <td><a href="<c:url value="/wikitty/Category/view/${q.category}"/>">${q.getCategory(false)}</a></td> - <td><a href="<c:url value="/wikitty/Quotation/view/${q.wikittyId}"/>">${q.description}</a></td> - <td><a href="<c:url value="/wikitty/Employee/view/${q.customer}"/>">${q.getCustomer(false)}</a></td> - <td><a href="<c:url value="/wikitty/Employee/view/${q.supplier}"/>">${q.getSupplier(false)}</a></td> - <td>${q.estimatedDays}</td> - <td>${q.conversionHope}</td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.project" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.category" label=""/></td> + <td><w:display wikitty="${q.wikitty}" toString="%Quotation.description$s" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.customer" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.supplier" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.estimatedDays" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.conversionHope" label=""/></td> <td>${q.amount / q.estimatedDays}</td> - <td>${q.amount}</td> - <td>${q.status}</td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td> + <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.status" label=""/></td> <td>${attachments.get(q.wikittyId)}</td> </tr> </tbody> Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/financial.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/financial.jsp 2012-08-07 15:55:35 UTC (rev 231) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/financial.jsp 2012-08-07 18:30:03 UTC (rev 232) @@ -22,7 +22,7 @@ --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> -<h1>HR</h1> +<h1>Financial</h1> <form> <input type="text" name="query"/> Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/wikitty.tld =================================================================== (Binary files differ)
participants (1)
-
bpoussin@users.chorem.org