Author: meynier Date: 2013-07-02 18:04:44 +0200 (Tue, 02 Jul 2013) New Revision: 358 Url: http://chorem.org/projects/chorem/repository/revisions/358 Log: project dashboard filter works differently. started to manage alerts. Added fields with SRP in multi-project dashoard Modified: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/project/DashboardProjectAction.java trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/project/QuotationCalculation.java trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardMultiProject.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardSingleProject.jsp trunk/chorem-webmotion/src/main/webapp/js/chorem.js Modified: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/project/DashboardProjectAction.java =================================================================== --- trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/project/DashboardProjectAction.java 2013-07-01 12:32:53 UTC (rev 357) +++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/project/DashboardProjectAction.java 2013-07-02 16:04:44 UTC (rev 358) @@ -21,6 +21,7 @@ import org.debux.webmotion.server.call.Call; import org.debux.webmotion.server.render.Render; import org.chorem.entities.Closed; +import org.chorem.entities.Configuration; import org.chorem.entities.Interval; import org.chorem.entities.Quotation; import org.chorem.entities.Project; @@ -31,6 +32,8 @@ import org.nuiton.wikitty.query.WikittyQuery; import org.nuiton.wikitty.query.WikittyQueryMaker; import org.nuiton.wikitty.query.WikittyQueryResult; + +import com.google.common.collect.Iterables; import com.google.gson.*; /** * @@ -42,81 +45,166 @@ /** to use log facility, just put in your code: log.info(\"...\"); */ static private Log log = LogFactory.getLog(DashboardProjectAction.class); + /** + * Return the view for a single quotation + * @param client Chorem client + * @param id Project ID (useless here) + * @param quotationFilter Quotation id + * @return + */ + public Render singleQuotationFilter(ChoremClient client, String id, String quotationFilter) { + + //Fetch the quotation from the filter + WikittyQuery quotationQuery = new WikittyQueryMaker().ideq(quotationFilter).end(); + WikittyQueryResult<Quotation> quotationResult = client.findAllByQuery(Quotation.class, quotationQuery); + + //If some quotation has been found + if(quotationResult != null) { + Quotation quotation = quotationResult.get(0); + //Fetch the quotation's project + WikittyQuery projectQuery = new WikittyQueryMaker().ideq(quotation.getProject()).end(); + WikittyQueryResult<Project> projectResult = client.findAllByQuery(Project.class, projectQuery); + + HashMap<Project, List<Quotation>> quotations = new HashMap<Project, List<Quotation>>(); + HashMap<Quotation, List<Task>> taskMap = new HashMap<Quotation, List<Task>>(); + HashMap<Quotation, List<String>> alertsMap = new HashMap<Quotation, List<String>>(); + + quotations.put(projectResult.get(0), quotationResult.getAll()); + + taskMap.put(quotation, fetchTasks(quotation, client)); + alertsMap.put(quotation, getAlerts(client, quotation)); + + return renderView("dashboardSingleProject.jsp", + "title", "Tableau de bord projet", "projects", projectResult.getAll(), + "quotations", quotations, "taskMap", taskMap, "extensions", + Extensions.extensions, "alerts", alertsMap); + + } + else { + return renderView("dashboardSingleProject.jsp"); + } + } + + /** + * Display multiple quotation for one or more projects + * @param client chorem client + * @param id Project id + * @param quotationFilter filter (open quotation or all) + * @return + */ public Render projectFilter(ChoremClient client, String id, String quotationFilter) { WikittyQueryResult<Project> projectResult = null; WikittyQueryResult<Quotation> quotationResult = null; WikittyQueryResult<Task> taskResult = null; + HashMap<Project, List<Quotation>> quotations = new HashMap<Project, List<Quotation>>(); HashMap<Quotation, List<Task>> taskMap = new HashMap<Quotation, List<Task>>(); + HashMap<Quotation, List<String>> alertsMap = new HashMap<Quotation, List<String>>(); + //Fetch the project from the id + WikittyQueryMaker projectQueryMaker = new WikittyQueryMaker(); + if(id != null && !id.equals("")) + projectQueryMaker.ideq(id); + else + projectQueryMaker.exteq("Project"); + WikittyQuery projectQuery = projectQueryMaker.end(); - //HashMap<Quotation, String> extMap = new HashMap<Quotation, String>(); + projectResult = client.findAllByQuery(Project.class, projectQuery); - //Fetch the project form the name (if it has been requested) - if(id != null) { - WikittyQuery projectQuery = new WikittyQueryMaker() - .ideq(id) - .end(); + //Fetch the quotations form the project (if there is one) + if(projectResult.size() != 0) { + for(Project project : projectResult.getAll()) { + WikittyQuery quotationQuery = null; + WikittyQueryMaker wqm = new WikittyQueryMaker(); - projectResult = client.findAllByQuery(Project.class, projectQuery); - //Fetch the quotations form the project (if there is one) - if(projectResult.size() != 0) { - for(Project project : projectResult.getAll()) { - WikittyQuery quotationQuery = null; - WikittyQueryMaker wqm = new WikittyQueryMaker(); + if(quotationFilter.equals("open")) { + wqm.and() + .eq(Quotation.ELEMENT_FIELD_QUOTATION_PROJECT, project) + .extne(Closed.EXT_CLOSED); + } + else if (quotationFilter.equals("all")){ + wqm.eq(Quotation.ELEMENT_FIELD_QUOTATION_PROJECT, project); + } + + quotationQuery = wqm.end(); + quotationQuery.setLimit(20); + quotationQuery.addSortDescending(Quotation.ELEMENT_FIELD_INTERVAL_BEGINDATE); + quotationResult = client.findAllByQuery(Quotation.class, quotationQuery); + quotations.put(project, quotationResult.getAll()); - if(quotationFilter.equals("Devis ouverts")) { - wqm.and() - .eq(Quotation.ELEMENT_FIELD_QUOTATION_PROJECT, project) - .extne(Closed.EXT_CLOSED); + //Fetch the tasks form the quotations (if there are some) + if(quotationResult != null) { + for(Quotation quote : quotationResult.getAll()) { + taskMap.put(quote, fetchTasks(quote, client)); + alertsMap.put(quote, getAlerts(client, quote)); } - else { - wqm.eq(Quotation.ELEMENT_FIELD_QUOTATION_PROJECT, project); - } - quotationQuery = wqm.end(); - - quotationQuery.addSortDescending(Quotation.ELEMENT_FIELD_INTERVAL_BEGINDATE); - quotationResult = client.findAllByQuery(Quotation.class, quotationQuery); - - } } - //Fetch the tasks form the quotations (if there are some) - if(quotationResult != null) { - String customClass = ""; - for(Quotation quote : quotationResult.getAll()) { - WikittyQuery taskQuery = new WikittyQueryMaker() - .eq(Task.ELEMENT_FIELD_TASK_QUOTATION, quote) - .end(); + } - taskResult = client.findAllByQuery(Task.class, taskQuery); - taskMap.put(quote, taskResult.getAll()); + return renderView("dashboardSingleProject.jsp", + "title", "Tableau de bord projet", "projects", projectResult.getAll(), + "quotations", quotations, "taskMap", taskMap, "extensions", + Extensions.extensions, "alerts", alertsMap); + } + + /** + * Fetch the task from the given quotation + * Simple wikitty query + * @param q Quotation + * @param client chorem client + * @return list of task from the quotation + */ + private List<Task> fetchTasks(Quotation q, ChoremClient client) { + WikittyQuery taskQuery = new WikittyQueryMaker() + .eq(Task.ELEMENT_FIELD_TASK_QUOTATION, q) + .end(); + + WikittyQueryResult taskResult = client.findAllByQuery(Task.class, taskQuery); + return taskResult.getAll(); + } + + private List<String> getAlerts(ChoremClient client, Quotation q) { + List<Task> tasks = fetchTasks(q, client); + Calendar now = new GregorianCalendar(); + List<String> messages = new ArrayList<String>(); + for(Task t : tasks) { + + System.out.println("Starting task alerts for " + t.getName()); + System.out.println("Task is " + t.getStatus()); + System.out.println(now.getTime()); + //Test if the statuses are correct + if(t.getStatus().equals("Scheduled")) { + if(t.getBeginDate().before(now.getTime())) { + System.out.println("should be started"); + messages.add( "Task " + t.getName() + " should be started"); } - } - + else if(t.getStatus().equals("Started")) { + if(t.getBeginDate().after(now.getTime())) { + System.out.println("started in advance"); + messages.add( "Task " + t.getName() + " has been started in advance"); + } + else if(t.getEndDate().before(now.getTime())) { + System.out.println("should be ended"); + messages.add( "Task " + t.getName() + " should have ended by now"); + } + } + else if(t.getStatus().equals("Finished")) { + + if(t.getEndDate().after(now.getTime())) { + System.out.println("fnished in advance"); + messages.add( "Task " + t.getName() + " has been finished in advance"); + } + } + } - - if(projectResult == null) { - return renderView("dashboardSingleProject.jsp", - "title", "Tableau de bord projet", "projects", null,"quotations",null); - } - else if(quotationResult == null) { - return renderView("dashboardSingleProject.jsp", - "title", "Tableau de bord projet", "projects", projectResult.getAll(), - "quotations", null); - } - else { - return renderView("dashboardSingleProject.jsp", - "title", "Tableau de bord projet", "projects", projectResult.getAll(), - "quotations", quotationResult.getAll(), "taskMap", taskMap, "extensions", - Extensions.extensions); - } + return messages; } public Render multiProjectFilter(ChoremClient client, Date from, Date to) { @@ -129,38 +217,55 @@ , now.getActualMaximum(Calendar.DAY_OF_MONTH)); from = gFrom.getTime(); to = gTo.getTime(); - + } - WikittyQueryMaker quotationQueryMaker = new WikittyQueryMaker(); - WikittyQuery quotationQuery = quotationQueryMaker.or() - .bw(Interval.FQ_FIELD_INTERVAL_BEGINDATE, from, to) - .bw(Interval.FQ_FIELD_INTERVAL_ENDDATE, from, to) - .end(); - WikittyQueryResult<Quotation> result = - client.findAllByQuery(Quotation.class, quotationQuery); - Collection<Quotation> quotations = result.getAll(); + Configuration config = client.findAllByQuery(Configuration.class, + (new WikittyQueryMaker()).exteq(Configuration.EXT_CONFIGURATION).end() + ).get(0); - HashMap<Quotation, QuotationCalculation> calculations = new HashMap<Quotation, QuotationCalculation>(); - for(Quotation q : quotations) { - QuotationCalculation calc = new QuotationCalculation(q, client); - calc.calculate(); - calculations.put(q, calc); - } - - return renderView("dashboardMultiProject.jsp", - "title", "Tableau de bord projets", - "quotations", quotations, - "calculations", calculations); - + WikittyQueryMaker quotationQueryMaker = new WikittyQueryMaker(); + WikittyQuery quotationQuery = quotationQueryMaker.or() + .bw(Interval.FQ_FIELD_INTERVAL_BEGINDATE, from, to) + .bw(Interval.FQ_FIELD_INTERVAL_ENDDATE, from, to) + .end(); + WikittyQueryResult<Quotation> result = + client.findAllByQuery(Quotation.class, quotationQuery); + + Collection<Quotation> quotations = result.getAll(); + + HashMap<Quotation, QuotationCalculation> calculations = new HashMap<Quotation, QuotationCalculation>(); + for(Quotation q : quotations) { + QuotationCalculation calc = new QuotationCalculation(q, client); + calc.setSrp(config.getDailyReturn()); + calc.calculate(); + calculations.put(q, calc); + } + + + return renderView("dashboardMultiProject.jsp", + "title", "Tableau de bord projets", + "quotations", quotations, + "calculations", calculations); + + } - - - public Render requestProject(ChoremClient client, String project_id, String quotationFilter) { - return projectFilter(client, project_id, quotationFilter); + + + public Render requestProject(ChoremClient client, String project_name, String project_id, String quotationFilter) { + if(quotationFilter == null) + quotationFilter = "open"; + if(project_name == null || project_name.equals("")) + project_id = ""; + if(quotationFilter.equals("open") || quotationFilter.equals("all")) { + return projectFilter(client, project_id, quotationFilter); + } + else { + return singleQuotationFilter(client, project_id, quotationFilter); + } } public Render requestMultiProject(ChoremClient client, Date from, Date to) { return multiProjectFilter(client, from, to); @@ -184,31 +289,33 @@ List<JTask> lTask = new ArrayList<JTask>(); for(Task t : taskResult.getAll()) { - if(t.getStatus().equals("SCHEDULED")) { - customClass = "ganttBlue"; - } - else if(t.getStatus().equals("STARTED")) { - customClass = "ganttGreen"; - } - else if(t.getStatus().equals("FINISHED")) { - customClass = "ganttRed"; - } - else if(t.getStatus().equals("CLOSED")) { - customClass = "ganttGrey"; - } + if(t.getBeginDate() != null && t.getEndDate() != null) { + if(t.getStatus().equals("SCHEDULED")) { + customClass = "ganttBlue"; + } + else if(t.getStatus().equals("STARTED")) { + customClass = "ganttGreen"; + } + else if(t.getStatus().equals("FINISHED")) { + customClass = "ganttRed"; + } + else if(t.getStatus().equals("CLOSED")) { + customClass = "ganttGrey"; + } - Values[] v = null; - //if(t.getReestimatedEnd() != null) - // v= new Values[2]; - //else + Values[] v = null; + //if(t.getReestimatedEnd() != null) + // v= new Values[2]; + //else v = new Values[1]; - v[0] = new Values(t.getBeginDate(), t.getEndDate(), t.getName(), customClass); - //if(t.getReestimatedEnd() != null) - // v[1]= new Values(t.getEndDate(), t.getReestimatedEnd(), "Reestimated end", "ganttOrange"); + v[0] = new Values(t.getBeginDate(), t.getEndDate(), t.getName(), customClass); + //if(t.getReestimatedEnd() != null) + // v[1]= new Values(t.getEndDate(), t.getReestimatedEnd(), "Reestimated end", "ganttOrange"); - JTask jt = new JTask(t.getName(), t.getDescription(), t.getWikittyId(),t.getPrice(), t.getEstimatedDays(), v); + JTask jt = new JTask(t.getName(), t.getDescription(), t.getWikittyId(),t.getPrice(), t.getEstimatedDays(), v); - lTask.add(jt); + lTask.add(jt); + } } Collections.sort(lTask); @@ -232,9 +339,9 @@ while(i.hasNext()) { Map.Entry<String, String> me = (Map.Entry<String, String>)i.next(); if(wikitty.hasExtension(me.getValue())) { - extDate.put( - me.getValue() + " " + me.getKey(), - "/Date(" + ((Date) (wikitty.getFieldAsObject(me.getValue(), me.getKey()))).getTime() +")/"); + Date date = ((Date) (wikitty.getFieldAsObject(me.getValue(), me.getKey()))); + if(date != null) + extDate.put(me.getValue() + " " + me.getKey(), "/Date(" + date.getTime() +")/"); } } Modified: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/project/QuotationCalculation.java =================================================================== --- trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/project/QuotationCalculation.java 2013-07-01 12:32:53 UTC (rev 357) +++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/project/QuotationCalculation.java 2013-07-02 16:04:44 UTC (rev 358) @@ -17,23 +17,33 @@ private Quotation q; private ChoremClient client; - private static final int SEC_PER_HOUR = 3600; - private static final int WORKING_HOURS_PER_DAY = 7; - private Double tjm = null; - private Double realDays = null; - private Double deltaDays = null; - private Double realTjm = null; + private static final int SEC_PER_HOUR = 3600; + private static final int WORKING_HOURS_PER_DAY = 7; + private double srp = 1; + private Double tjm = null; + private Double realDays = null; + private Double deltaDays = null; + private Double realTjm = null; + private Double expectedProfit = null; + private Double lossOrProfit = null; + private Double resultPerDay = null; + + public QuotationCalculation(Quotation q, ChoremClient client) { this.q = q; this.client = client; } + public void calculate() { this.tjm = tjm(); this.realDays = realDays(); this.deltaDays = deltaDays(); this.realTjm = realTjm(); + this.expectedProfit = expectedProfit(); + this.lossOrProfit = lossOrProfit(); + this.resultPerDay = resultPerDay(); } public double tjm() { @@ -51,7 +61,7 @@ public double realDays() { //test if quotation is finished if(q.getExtensionNames().contains("Closed")) { - //TODO calcul grâce aux objets Time + //Calculate the days from the times objects WikittyQuery taskQuery = new WikittyQueryMaker() .eq(Task.ELEMENT_FIELD_TASK_QUOTATION, q) .end(); @@ -75,7 +85,7 @@ return (totalTime / SEC_PER_HOUR) / WORKING_HOURS_PER_DAY; } else { - //nbDays + otherdays + //nbDays + day extensions from tasks WikittyQuery taskQuery = new WikittyQueryMaker() .eq(Task.ELEMENT_FIELD_TASK_QUOTATION, q) .end(); @@ -93,7 +103,7 @@ } public double deltaDays() { - return q.getEstimatedDays() - getRealDays(); + return getRealDays() - q.getEstimatedDays(); } public double realTjm() { @@ -103,6 +113,20 @@ return amount/nbDays; } + public double expectedProfit() { + double nbDays = q.getEstimatedDays(); + return (getTjm() - srp) * nbDays; + } + + public double lossOrProfit() { + double amount = q.getAmount(); + return amount - (getRealDays() * srp); + } + + public double resultPerDay() { + return getLossOrProfit() / getRealDays(); + } + public double getTjm() { if(tjm == null) return tjm(); @@ -127,5 +151,26 @@ else return realTjm; } + public double getExpectedProfit() { + if(expectedProfit == null) + return expectedProfit(); + else + return expectedProfit; + } + public double getLossOrProfit() { + if(lossOrProfit == null) + return lossOrProfit(); + else + return lossOrProfit; + } + public double getResultPerDay() { + if(resultPerDay == null) + return resultPerDay(); + else + return resultPerDay; + } + public void setSrp(double val) { + this.srp = val; + } } Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardMultiProject.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardMultiProject.jsp 2013-07-01 12:32:53 UTC (rev 357) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardMultiProject.jsp 2013-07-02 16:04:44 UTC (rev 358) @@ -33,28 +33,9 @@ <div class="control-group"> <div class="controls" style="display: inline"> -<!-- - <script> - $(function() { - $("#project_text") - .autocompleteByExtension( - { - source : "/chorem/wikitty-json/search?extension=Project", - minLength : 2, - select : function(event, ui) { - $("#project_text").val( - ui.item.label); - $("#project_hidden") - .val(ui.item.id); - $("#project_hidden").change() - return false; - } - }); - }); - </script> - --> - From : <input type="text" name="from" id="from" class="datepicker" value="${fn:escapeXml(from)}" /> - to : <input type="text" name="to" id="to" class="datepicker" value="${fn:escapeXml(to)}" /> + + From : <input type="text" name="from" id="from" class="datepicker" value='${param.from}' /> + to : <input type="text" name="to" id="to" class="datepicker" value="${param.to}" /> <input type="submit"/> </div> </div> @@ -67,17 +48,18 @@ <th>Client</th> <th>Projet</th> <th>Montant</th> - <th>NbJour</th> - <th>TJM</th> - <th>NbJourReel</th> - <th>delta jour</th> - <th>tjm reel</th> - + <th>Nombre de jours estimés</th> + <th><abbr title="Taux journalier moyen">TJM</abbr></th> + <th>Nombre de jours rééls</th> + <th>Différence estimation/réél</th> + <th><abbr title="Taux journalier moyen">TJM</abbr> reel</th> + <th>Gain attendu</th> + <th>Perte/gain</th> </tr> </thead> <c:forEach var="q" items="${quotations}"> <tbody> - <tr> + <tr><f:setLocale value="fr_FR"/> <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.customer" label=""/></td> <td><w:display wikitty="${q.wikitty}" fqfield="Quotation.project" label=""/> <a href="<c:url value="/wikitty/edit/${q.wikittyId}"/>"><i @@ -85,7 +67,7 @@ </td> <td class="currency"><w:display wikitty="${q.wikitty}" fqfield="Quotation.amount" label=""/></td> <td class="number"><w:display wikitty="${q.wikitty}" fqfield="Quotation.estimatedDays" label=""/></td> - <f:setLocale value="en_US"/> + <td class="number"> <f:formatNumber type="number" maxFractionDigits="2" value="${calculations[q].getTjm()}" /></td> <td class="number"> <f:formatNumber type="number" @@ -95,6 +77,11 @@ <td class="number"> <f:formatNumber type="number" maxFractionDigits="2" value="${calculations[q].getRealTjm()}" /></td> + <td class="currency"> <f:formatNumber type="currency" + maxFractionDigits="2" value="${calculations[q].getExpectedProfit()}" /></td> + <td class="currency"> <f:formatNumber type="currency" + maxFractionDigits="2" value="${calculations[q].getLossOrProfit()}" /></td> + </tr> </tbody> </c:forEach> Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardSingleProject.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardSingleProject.jsp 2013-07-01 12:32:53 UTC (rev 357) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardSingleProject.jsp 2013-07-02 16:04:44 UTC (rev 358) @@ -29,12 +29,26 @@ <link rel="stylesheet" href="<c:url value='/css/jquery.fn.gantt.css'/>" /> <h1>${title}</h1> + <form class="well form-inline" method="GET" id="projectSearch"> <div class="control-group"> - Project Name : <div class="controls" style="display: inline"> - + <select class="filterBox" name="quotationFilter" id="quotationFilter"> + <option value="open" + <c:if test='${param.quotationFilter=="open"}'>selected</c:if>>Devis + ouverts</option> + <option value="all" + <c:if test='${param.quotationFilter=="all"}'>selected</c:if>>Tous + les devis</option> + <c:forEach var="p" items="${projects}"> + <c:forEach var="q" items="${quotations[p]}"> + <option value="${q.wikittyId}" + <c:if test='${param.quotationFilter.equals(q.wikittyId)}'>selected</c:if>>${p.name} + - ${q.description}</option> + </c:forEach> + </c:forEach> + </select> <script> $(function() { $("#project_text") @@ -55,33 +69,27 @@ </script> <input type="text" id="project_text" name="project_name" - value="${param.project_name}" placeholder="project name" /> <input - type="hidden" id="project_hidden" name="project_id" - value="${param.project_id}" /> <select class="filterBox" - name="quotationFilter" id="quotationFilter"> - <option name="open">Devis ouverts</option> - <option name="all" - <c:if test='${param.quotationFilter=="Tous les devis" }'>selected</c:if>>Tous - les devis</option> - </select> + value="${param.project_name}" placeholder="project name" /> + <input type="hidden" id="project_hidden" name="project_id" + value='<c:if test='${!param.project_name.equals("") }'>${param.project_id}</c:if>' /> + </div> </div> </form> -<c:choose> - <c:when test="${projects.size() >= 1}"> - <c:forEach var="p" items="${projects}"> - <h2 style="display: inline;">${p.name}</h2> - <a href="<c:url value="/wikitty/edit/${param.project_id}"/>"><i - class="icon-pencil icon-black"></i><small>edit</small></a> - <p>${p.description}</p> - </c:forEach> +<c:forEach var="p" items="${projects}"> + <c:if test="${not empty quotations[p]}"> + <h2 style="display: inline;">${p.name}</h2> + <a href="<c:url value="/wikitty/edit/${param.project_id}"/>"><i + class="icon-pencil icon-black"></i><small>edit</small></a> + <p>${p.description}</p> - <c:forEach var="q" items="${quotations}"> - + + <c:forEach var="q" items="${quotations[p]}"> + <h3 style="display: inline;"> <w:display wikitty="${q.wikitty}" fqfield="Quotation.description" label="" /> @@ -89,17 +97,18 @@ <a href="<c:url value="/wikitty/edit/${q.wikittyId}"/>"><i class="icon-pencil icon-black"></i><small>edit</small></a> <p> - Du <w:display wikitty="${q.wikitty}" fqfield="Interval.beginDate" - label="" pattern="dd/MM/yyyy"/> - au <w:display wikitty="${q.wikitty}" fqfield="Interval.beginDate" + Du + <w:display wikitty="${q.wikitty}" fqfield="Interval.beginDate" label="" pattern="dd/MM/yyyy" /> + au + <w:display wikitty="${q.wikitty}" fqfield="Interval.beginDate" + label="" pattern="dd/MM/yyyy" /> <br />Statut : ${q.wikitty.extensionNames.toArray()[q.wikitty.extensionNames.size() -1]} </p> + - - <table class="table table-striped table-bordered table-condensed"> <thead> <tr> @@ -132,12 +141,11 @@ </tbody> </table> - + ${alerts[q]} + <div class="gantt gantt-${q.wikittyId}" wikittyId="${q.wikittyId}" + data=''>Pas de tâche</div> + <!-- - <div class="gantt gantt-${q.wikittyId}" wikittyId = "${q.wikittyId}" data=''> - Pas de tâche</div> -<!-- - <p>Liste des tâches :</p> <c:forEach items="${taskMap}" var="entry"> <c:if test="${entry.key.equals(q)}"> @@ -173,22 +181,10 @@ --> </c:forEach> - </c:when> + </c:if> +</c:forEach> - <c:otherwise> - <c:if - test="${param.project_id != null && param.projectname.length() != 0 }"> - Projet inexistant - </c:if> - - </c:otherwise> - - -</c:choose> - - - <script src="<c:url value='/js/jquery.fn.gantt.js'/>"></script> Modified: trunk/chorem-webmotion/src/main/webapp/js/chorem.js =================================================================== --- trunk/chorem-webmotion/src/main/webapp/js/chorem.js 2013-07-01 12:32:53 UTC (rev 357) +++ trunk/chorem-webmotion/src/main/webapp/js/chorem.js 2013-07-02 16:04:44 UTC (rev 358) @@ -754,7 +754,6 @@ $("#projectSearch").submit(); }); $("#quotationFilter").change(function() { - if($("#project_hidden").val() != "") $("#projectSearch").submit(); }); function initgantt(id) {