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
- 542 discussions
r96 - in trunk/chorem-web/src/main: resources resources/i18n webapp/WEB-INF webapp/WEB-INF/decorators webapp/WEB-INF/jsp/bonzoms webapp/WEB-INF/jsp/gepeto webapp/css
by vbriand@users.chorem.org 21 Apr '11
by vbriand@users.chorem.org 21 Apr '11
21 Apr '11
Author: vbriand
Date: 2011-04-21 11:31:10 +0200 (Thu, 21 Apr 2011)
New Revision: 96
Url: http://chorem.org/repositories/revision/chorem/96
Log:
Removed home page of both bonzoms and gepeto.
Added a menu for easier access to actions.
Added:
trunk/chorem-web/src/main/webapp/WEB-INF/decorators/billy.jsp
trunk/chorem-web/src/main/webapp/WEB-INF/decorators/bonzoms.jsp
trunk/chorem-web/src/main/webapp/WEB-INF/decorators/cash.jsp
trunk/chorem-web/src/main/webapp/WEB-INF/decorators/gepeto.jsp
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/menu.jsp
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/menu.jsp
Removed:
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/home.jsp
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp
Modified:
trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties
trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties
trunk/chorem-web/src/main/resources/struts.xml
trunk/chorem-web/src/main/webapp/WEB-INF/decorators.xml
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companies.jsp
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsWithoutQuotation.jsp
trunk/chorem-web/src/main/webapp/css/style.css
Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties
===================================================================
--- trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-04-15 15:53:43 UTC (rev 95)
+++ trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-04-21 09:31:10 UTC (rev 96)
@@ -104,7 +104,7 @@
chorem.error.internal=An internal error occurred
chorem.gepeto.home=Home
chorem.gepeto.project=Project {0}
-chorem.gepeto.project.add=Add a new project
+chorem.gepeto.project.add=New project
chorem.gepeto.project.create.error=An error occurred while creating your new project, please try again. If the problem persists, please contact an administrator
chorem.gepeto.project.description=Description
chorem.gepeto.project.description.required=You must describe the project
@@ -147,13 +147,13 @@
chorem.gepeto.projectOrderDetails.tasks=
chorem.gepeto.projectOrderDetails.title=
chorem.gepeto.projectOrderDetails.type=
-chorem.gepeto.projects=Get the projects list
+chorem.gepeto.projects=Projects list
chorem.gepeto.projectsByYear.thead.company=Company
chorem.gepeto.projectsByYear.thead.end=End
chorem.gepeto.projectsByYear.thead.name=Name
chorem.gepeto.projectsByYear.thead.start=Start
chorem.gepeto.projectsByYear.title=Projects of year {0}
-chorem.gepeto.projectsWithoutQuotation=
+chorem.gepeto.projectsWithoutQuotation=Projects list without quotation
chorem.gepeto.projectsWithoutQuotation.title=
chorem.gepeto.results.title=Results by year
chorem.gepeto.task=Task {0}
Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties
===================================================================
--- trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-04-15 15:53:43 UTC (rev 95)
+++ trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-04-21 09:31:10 UTC (rev 96)
@@ -17,10 +17,10 @@
chorem.billy.quotation.reference=R\u00E9f\u00E9rence
chorem.billy.quotation.vta=TVA
chorem.billy.quotationDetails.title=
-chorem.bonzoms.companies=
+chorem.bonzoms.companies=Liste des entreprises
chorem.bonzoms.company=Soci\u00E9t\u00E9
chorem.bonzoms.company.add=Ajouter une nouvelle soci\u00E9t\u00E9
-chorem.bonzoms.company.address=
+chorem.bonzoms.company.address=Adresse
chorem.bonzoms.company.addressLine1=Adresse
chorem.bonzoms.company.addressLine1.required=Vous devez donner l'adresse de l''entreprise
chorem.bonzoms.company.addressLine2=Adresse ligne 2 (opt.)
@@ -29,6 +29,7 @@
chorem.bonzoms.company.country=Pays
chorem.bonzoms.company.country.required=Vous devez indiquer le pays
chorem.bonzoms.company.create.error=Une erreur s''est produite lors de la cr\u00E9ation de votre nouvelle soci\u00E9t\u00E9, merci d''essayer \u00E0 nouveau. Si le probl\u00E8me se reproduit, merci de contacter un administrateur
+chorem.bonzoms.company.employees=Liste des employ\u00E9s
chorem.bonzoms.company.list=Obtenir la liste des soci\u00E9t\u00E9s
chorem.bonzoms.company.name=Nom de la soci\u00E9t\u00E9
chorem.bonzoms.company.name.required=Vous devez entrer le nom de la soci\u00E9t\u00E9
@@ -99,7 +100,7 @@
chorem.error.internal=Une erreur interne s''est produite
chorem.gepeto.home=Accueil
chorem.gepeto.project=Projet {0}
-chorem.gepeto.project.add=Ajouter un nouveau projet
+chorem.gepeto.project.add=Nouveau projet
chorem.gepeto.project.create.error=Une erreur s''est produite lors de la cr\u00E9ation de votre nouveau projet, merci d''essayer \u00E0 nouveau. Si le probl\u00E8me se reproduit, merci de contacter un administrateur
chorem.gepeto.project.description=Description
chorem.gepeto.project.description.required=Vous devez d\u00E9crire le projet
@@ -143,14 +144,16 @@
chorem.gepeto.projectOrderDetails.tasks=T\u00E2ches li\u00E9es au contrat
chorem.gepeto.projectOrderDetails.title=D\u00E9tails du contrat
chorem.gepeto.projectOrderDetails.type=Type de contrat \: {0}
-chorem.gepeto.projects=Obtenir la liste des projets
+chorem.gepeto.projects=Liste des projets
chorem.gepeto.projectsByYear.thead.company=Demandeur
chorem.gepeto.projectsByYear.thead.end=Fin
chorem.gepeto.projectsByYear.thead.name=Nom
chorem.gepeto.projectsByYear.thead.start=D\u00E9but
chorem.gepeto.projectsByYear.title=Projets de l''ann\u00E9e {0}
-chorem.gepeto.projectsWithoutQuotation=Obtenir la liste des projets sans devis
-chorem.gepeto.projectsWithoutQuotation.title=
+chorem.gepeto.projectsByYear.withProjectOrder=Avec contrat
+chorem.gepeto.projectsByYear.withoutProjectOrder=Sans contrat
+chorem.gepeto.projectsWithoutQuotation=Liste des projets sans devis
+chorem.gepeto.projectsWithoutQuotation.title=Liste des projets sans devis
chorem.gepeto.results.title=R\u00E9sultats par ann\u00E0e
chorem.gepeto.task=T\u00E2che {0}
chorem.gepeto.task.add=Ajouter une nouvelle t\u00E2che
Modified: trunk/chorem-web/src/main/resources/struts.xml
===================================================================
--- trunk/chorem-web/src/main/resources/struts.xml 2011-04-15 15:53:43 UTC (rev 95)
+++ trunk/chorem-web/src/main/resources/struts.xml 2011-04-21 09:31:10 UTC (rev 96)
@@ -14,10 +14,7 @@
</package>
<package name="bonzoms" namespace="/bonzoms" extends="struts-default">
- <default-action-ref name="home" />
- <action name="home">
- <result>/WEB-INF/jsp/bonzoms/home.jsp</result>
- </action>
+ <default-action-ref name="companies" />
<action name="addCompanyInput">
<result>/WEB-INF/jsp/bonzoms/addCompany.jsp</result>
</action>
@@ -60,10 +57,7 @@
</package>
<package name="gepeto" namespace="/gepeto" extends="struts-default">
- <default-action-ref name="home" />
- <action name="home">
- <result>/WEB-INF/jsp/gepeto/home.jsp</result>
- </action>
+ <default-action-ref name="projectsWithoutQuotation" />
<action name="addProjectInput">
<result>/WEB-INF/jsp/gepeto/addProject.jsp</result>
</action>
Added: trunk/chorem-web/src/main/webapp/WEB-INF/decorators/billy.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/decorators/billy.jsp (rev 0)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/decorators/billy.jsp 2011-04-21 09:31:10 UTC (rev 96)
@@ -0,0 +1,26 @@
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
+<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %>
+<%@taglib prefix="s" uri="/struts-tags" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:decorator="http://www.opensymphony.com/sitemesh/decorator">
+ <head>
+ <title>Chorem : <decorator:title default="no title" /></title>
+ <decorator:head />
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <meta name="description" content="" />
+ <s:url var="CSS" value="/css/style.css" />
+ <link href="${CSS}" rel="stylesheet" type="text/css" media="all" />
+ </head>
+ <body>
+ <s:include value="/WEB-INF/jsp/common/inc/header.jsp" />
+ <s:include value="/WEB-INF/jsp/billy/menu.jsp" />
+ <div id="content">
+ <decorator:body />
+ </div>
+ <s:include value="/WEB-INF/jsp/common/inc/footer.jsp" />
+ </body>
+</html>
Property changes on: trunk/chorem-web/src/main/webapp/WEB-INF/decorators/billy.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/chorem-web/src/main/webapp/WEB-INF/decorators/bonzoms.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/decorators/bonzoms.jsp (rev 0)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/decorators/bonzoms.jsp 2011-04-21 09:31:10 UTC (rev 96)
@@ -0,0 +1,26 @@
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
+<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %>
+<%@taglib prefix="s" uri="/struts-tags" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:decorator="http://www.opensymphony.com/sitemesh/decorator">
+ <head>
+ <title>Chorem : <decorator:title default="no title" /></title>
+ <decorator:head />
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <meta name="description" content="" />
+ <s:url var="CSS" value="/css/style.css" />
+ <link href="${CSS}" rel="stylesheet" type="text/css" media="all" />
+ </head>
+ <body>
+ <s:include value="/WEB-INF/jsp/common/inc/header.jsp" />
+ <s:include value="/WEB-INF/jsp/bonzoms/menu.jsp" />
+ <div id="content">
+ <decorator:body />
+ </div>
+ <s:include value="/WEB-INF/jsp/common/inc/footer.jsp" />
+ </body>
+</html>
Property changes on: trunk/chorem-web/src/main/webapp/WEB-INF/decorators/bonzoms.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/chorem-web/src/main/webapp/WEB-INF/decorators/cash.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/decorators/cash.jsp (rev 0)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/decorators/cash.jsp 2011-04-21 09:31:10 UTC (rev 96)
@@ -0,0 +1,26 @@
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
+<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %>
+<%@taglib prefix="s" uri="/struts-tags" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:decorator="http://www.opensymphony.com/sitemesh/decorator">
+ <head>
+ <title>Chorem : <decorator:title default="no title" /></title>
+ <decorator:head />
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <meta name="description" content="" />
+ <s:url var="CSS" value="/css/style.css" />
+ <link href="${CSS}" rel="stylesheet" type="text/css" media="all" />
+ </head>
+ <body>
+ <s:include value="/WEB-INF/jsp/common/inc/header.jsp" />
+ <s:include value="/WEB-INF/jsp/cash/menu.jsp" />
+ <div id="content">
+ <decorator:body />
+ </div>
+ <s:include value="/WEB-INF/jsp/common/inc/footer.jsp" />
+ </body>
+</html>
Property changes on: trunk/chorem-web/src/main/webapp/WEB-INF/decorators/cash.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/chorem-web/src/main/webapp/WEB-INF/decorators/gepeto.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/decorators/gepeto.jsp (rev 0)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/decorators/gepeto.jsp 2011-04-21 09:31:10 UTC (rev 96)
@@ -0,0 +1,26 @@
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
+<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %>
+<%@taglib prefix="s" uri="/struts-tags" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:decorator="http://www.opensymphony.com/sitemesh/decorator">
+ <head>
+ <title>Chorem : <decorator:title default="no title" /></title>
+ <decorator:head />
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <meta name="description" content="" />
+ <s:url var="CSS" value="/css/style.css" />
+ <link href="${CSS}" rel="stylesheet" type="text/css" media="all" />
+ </head>
+ <body>
+ <s:include value="/WEB-INF/jsp/common/inc/header.jsp" />
+ <s:include value="/WEB-INF/jsp/gepeto/menu.jsp" />
+ <div id="content">
+ <decorator:body />
+ </div>
+ <s:include value="/WEB-INF/jsp/common/inc/footer.jsp" />
+ </body>
+</html>
Property changes on: trunk/chorem-web/src/main/webapp/WEB-INF/decorators/gepeto.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/chorem-web/src/main/webapp/WEB-INF/decorators.xml
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/decorators.xml 2011-04-15 15:53:43 UTC (rev 95)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/decorators.xml 2011-04-21 09:31:10 UTC (rev 96)
@@ -3,7 +3,23 @@
<excludes>
<pattern>/css/*</pattern>
</excludes>
-
+
+ <decorator name="billy" page="billy.jsp">
+ <pattern>/billy/*</pattern>
+ </decorator>
+
+ <decorator name="bonzoms" page="bonzoms.jsp">
+ <pattern>/bonzoms/*</pattern>
+ </decorator>
+
+ <decorator name="cash" page="cash.jsp">
+ <pattern>/cash/*</pattern>
+ </decorator>
+
+ <decorator name="gepeto" page="gepeto.jsp">
+ <pattern>/gepeto/*</pattern>
+ </decorator>
+
<decorator name="main" page="main.jsp">
<pattern>/*</pattern>
</decorator>
Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companies.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companies.jsp 2011-04-15 15:53:43 UTC (rev 95)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companies.jsp 2011-04-21 09:31:10 UTC (rev 96)
@@ -7,12 +7,11 @@
<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
xmlns:jsp="http://java.sun.com/JSP/Page">
<head>
- <title>
- <s:text name="chorem.bonzoms.companies" />
- </title>
+ <title><s:text name="chorem.bonzoms.companies" /></title>
<s:head />
</head>
<body>
+ <h2><s:text name="chorem.bonzoms.companies" /></h2>
<%
List<Company> companies = CompanyAction.getAction().getAllCompanies();
Deleted: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/home.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/home.jsp 2011-04-15 15:53:43 UTC (rev 95)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/home.jsp 2011-04-21 09:31:10 UTC (rev 96)
@@ -1,17 +0,0 @@
-<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@taglib prefix="s" uri="/struts-tags" %>
-
-<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
- xmlns:jsp="http://java.sun.com/JSP/Page">
- <head>
- <title><s:text name="chorem.bonzoms.home" /></title>
- <s:head />
- </head>
- <body>
- <p>
- <s:a action="addCompanyInput"><s:text name="chorem.bonzoms.company.add" /></s:a><br />
- <s:a action="addPersonInput"><s:text name="chorem.bonzoms.person.add" /></s:a><br />
- <s:a action="companies"><s:text name="chorem.bonzoms.company.list" /></s:a>
- </p>
- </body>
-</html>
Added: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/menu.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/menu.jsp (rev 0)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/menu.jsp 2011-04-21 09:31:10 UTC (rev 96)
@@ -0,0 +1,9 @@
+<%@taglib prefix="s" uri="/struts-tags" %>
+
+<div id="menu">
+ <ul>
+ <li><s:a action="addCompanyInput"><s:text name="chorem.bonzoms.company.add" /></s:a></li>
+ <li><s:a action="addPersonInput"><s:text name="chorem.bonzoms.person.add" /></s:a></li>
+ <li><s:a action="companies"><s:text name="chorem.bonzoms.company.list" /></s:a></li>
+ </ul>
+</div>
Property changes on: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/menu.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp 2011-04-15 15:53:43 UTC (rev 95)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp 2011-04-21 09:31:10 UTC (rev 96)
@@ -1,20 +0,0 @@
-<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@taglib prefix="s" uri="/struts-tags" %>
-
-<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
- xmlns:jsp="http://java.sun.com/JSP/Page">
- <head>
- <title><s:text name="chorem.gepeto.home" /></title>
- <s:head />
- </head>
- <body>
- <p>
- <s:a action="addProjectInput"><s:text name="chorem.gepeto.project.add" /></s:a><br />
- <s:url action="projectsByYear" var="projectsByYear">
- <s:param name="year">2011</s:param>
- </s:url>
- <a href="${projectsByYear}"><s:text name="chorem.gepeto.projects" /></a><br />
- <s:a action="projectsWithoutQuotation"><s:text name="chorem.gepeto.projectsWithoutQuotation" /></s:a><br />
- </p>
- </body>
-</html>
Added: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/menu.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/menu.jsp (rev 0)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/menu.jsp 2011-04-21 09:31:10 UTC (rev 96)
@@ -0,0 +1,12 @@
+<%@taglib prefix="s" uri="/struts-tags" %>
+
+<div id="menu">
+ <ul>
+ <li><s:a action="addProjectInput"><s:text name="chorem.gepeto.project.add" /></s:a></li>
+ <s:url action="projectsByYear" var="projectsByYear">
+ <s:param name="year">2011</s:param>
+ </s:url>
+ <li><a href="${projectsByYear}"><s:text name="chorem.gepeto.projects" /></a></li>
+ <li><s:a action="projectsWithoutQuotation"><s:text name="chorem.gepeto.projectsWithoutQuotation" /></s:a></li>
+ </ul>
+</div>
\ No newline at end of file
Property changes on: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/menu.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsWithoutQuotation.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsWithoutQuotation.jsp 2011-04-15 15:53:43 UTC (rev 95)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsWithoutQuotation.jsp 2011-04-21 09:31:10 UTC (rev 96)
@@ -11,6 +11,7 @@
<s:head />
</head>
<body>
+ <h2><s:text name="chorem.gepeto.projectsWithoutQuotation.title" /></h2>
<p>
<%
List<Project> projects = ProjectAction.getAction().getProjectsWithoutQuotation();
Modified: trunk/chorem-web/src/main/webapp/css/style.css
===================================================================
--- trunk/chorem-web/src/main/webapp/css/style.css 2011-04-15 15:53:43 UTC (rev 95)
+++ trunk/chorem-web/src/main/webapp/css/style.css 2011-04-21 09:31:10 UTC (rev 96)
@@ -4,4 +4,25 @@
border-color: blue;
margin: 3px;
padding: 3px;
+}
+
+#header {
+ margin-bottom:10px;
+}
+
+#content {
+ margin-left:220px;
+ margin-top:20px;
+}
+
+#menu {
+ float:left;
+ width:200px;
+ border:1px solid black;
+ margin-top:15px;
+ margin-bottom:10px;
+}
+
+#footer {
+ clear:left;
}
\ No newline at end of file
1
0
r95 - in trunk/chorem-web/src/main: java/org/chorem/bonzoms/action webapp/WEB-INF/jsp/bonzoms
by vbriand@users.chorem.org 15 Apr '11
by vbriand@users.chorem.org 15 Apr '11
15 Apr '11
Author: vbriand
Date: 2011-04-15 17:53:43 +0200 (Fri, 15 Apr 2011)
New Revision: 95
Url: http://chorem.org/repositories/revision/chorem/95
Log:
Added a succinct list of the company's employees
Modified:
trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companyDetails.jsp
Modified: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java
===================================================================
--- trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java 2011-04-15 15:06:56 UTC (rev 94)
+++ trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java 2011-04-15 15:53:43 UTC (rev 95)
@@ -1,5 +1,6 @@
package org.chorem.bonzoms.action;
+import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@@ -12,6 +13,8 @@
import org.chorem.entities.CompanyImpl;
import org.chorem.entities.ContactDetails;
import org.chorem.entities.ContactDetailsImpl;
+import org.chorem.entities.Employee;
+import org.chorem.entities.Person;
import org.nuiton.wikitty.search.Criteria;
import org.nuiton.wikitty.search.PagedResult;
import org.nuiton.wikitty.search.Search;
@@ -188,6 +191,24 @@
return companies;
}
+ public List<Person> getEmployees() {
+ ChoremProxy proxy = getChoremProxy();
+ Search search = Search.query();
+ Criteria criteria = search.eq(Employee.FQ_FIELD_EMPLOYEE_COMPANY,
+ companyId).criteria();
+ PagedResult<Employee> result = proxy.findAllByCriteria(Employee.class,
+ criteria);
+ List<Employee> employees = result.getAll();
+ List<Person> persons = new ArrayList<Person>();
+ Person person;
+
+ for (Employee employee : employees) {
+ person = proxy.restore(Person.class, employee.getPerson());
+ persons.add(person);
+ }
+ return persons;
+ }
+
/**
* @return the name
*/
Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companyDetails.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companyDetails.jsp 2011-04-15 15:06:56 UTC (rev 94)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companyDetails.jsp 2011-04-15 15:53:43 UTC (rev 95)
@@ -1,4 +1,6 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@page import="java.util.List" %>
+<%@page import="org.chorem.entities.Person" %>
<%@page import="org.chorem.bonzoms.action.CompanyAction" %>
<%@taglib prefix="s" uri="/struts-tags" %>
@@ -27,5 +29,22 @@
<s:textfield key="chorem.bonzoms.company.phoneNb" name="phoneNb" labelSeparator=": " readonly="true" />
<br />
<s:textfield key="chorem.bonzoms.company.website" name="website" labelSeparator=": " readonly="true" />
+ <br />
+ <br />
+ <s:text name="chorem.bonzoms.company.employees" />
+ <br />
+ <br />
+ <%
+ List<Person> employees = CompanyAction.getAction().getEmployees();
+
+ for (Person employee : employees) {
+ %>
+ <%= employee.getFirstName() %> <%= employee.getLastName() %><br />
+ <%= employee.getBirthDate() %><br />
+ <%= employee.getEmail() %><br />
+ <%
+ }
+ %>
+ <br />
</body>
</html>
1
0
r94 - in trunk/chorem-web/src/main: java/org/chorem/bonzoms/action java/org/chorem/gepeto/action resources resources/i18n webapp/WEB-INF/jsp/bonzoms
by vbriand@users.chorem.org 15 Apr '11
by vbriand@users.chorem.org 15 Apr '11
15 Apr '11
Author: vbriand
Date: 2011-04-15 17:06:56 +0200 (Fri, 15 Apr 2011)
New Revision: 94
Url: http://chorem.org/repositories/revision/chorem/94
Log:
Added the choice of the employee's company on the person's page
Modified:
trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java
trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectOrderAction.java
trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties
trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties
trunk/chorem-web/src/main/resources/struts.xml
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addPerson.jsp
Modified: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java
===================================================================
--- trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java 2011-04-15 14:39:32 UTC (rev 93)
+++ trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java 2011-04-15 15:06:56 UTC (rev 94)
@@ -2,16 +2,21 @@
import java.text.ParseException;
import java.text.SimpleDateFormat;
+import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.ChoremProxy;
import org.chorem.ContactDetailsConstants;
import org.chorem.action.BaseAction;
+import org.chorem.entities.Company;
import org.chorem.entities.ContactDetailsImpl;
import org.chorem.entities.EmployeeImpl;
import org.chorem.entities.EmploymentContractImpl;
import org.chorem.entities.PersonImpl;
+import org.nuiton.wikitty.search.Criteria;
+import org.nuiton.wikitty.search.PagedResult;
+import org.nuiton.wikitty.search.Search;
import static org.nuiton.i18n.I18n.n_;
@@ -67,6 +72,7 @@
protected String contractWorkingTime;
protected String contractBeginDate;
protected String contractEndDate;
+ protected String companyId;
/**
* Stores the new person through the proxy
@@ -122,9 +128,11 @@
proxy.store(newContactDetails);
}
- result = storeEmployee(newPerson, result, proxy);
if (result) {
- proxy.store(newPerson);
+ result = storeEmployee(newPerson, result, proxy);
+ if (result) {
+ proxy.store(newPerson);
+ }
}
}
} catch (Exception e) {
@@ -177,9 +185,18 @@
n_("chorem.bonzoms.employee.rtt.wrongFormat")));
}
- result = storeEmploymentContract(newEmployee, result, proxy);
+ if (proxy.restore(Company.class, companyId) != null) {
+ newEmployee.setCompany(companyId);
+ } else { //If the id doesn't exist or is invalid
+ addActionError(getText(n_("chorem.bonzoms.employee.invalidCompany")));
+ result = false;
+ }
+
if (result) {
- proxy.store(newEmployee);
+ result = storeEmploymentContract(newEmployee, result, proxy);
+ if (result) {
+ proxy.store(newEmployee);
+ }
}
} else {
@@ -249,6 +266,20 @@
return result;
}
+ /**
+ * Gets the list of all companies
+ *
+ * @return a list containing all companies
+ */
+ public List<Company> getAllCompanies() {
+ ChoremProxy proxy = getChoremProxy();
+ Search search = Search.query().exteq(Company.EXT_COMPANY);
+ Criteria criteria = search.criteria();
+ PagedResult<Company> result = proxy.findAllByCriteria(Company.class, criteria);
+ List<Company> companies = result.getAll();
+ return companies;
+ }
+
/**
* @return the firstName
*/
@@ -514,4 +545,18 @@
public void setContractEndDate(String contractEndDate) {
this.contractEndDate = contractEndDate;
}
+
+ /**
+ * @return the companyId
+ */
+ public String getCompanyId() {
+ return companyId;
+ }
+
+ /**
+ * @param companyId the companyId to set
+ */
+ public void setCompanyId(String companyId) {
+ this.companyId = companyId;
+ }
}
Modified: trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectOrderAction.java
===================================================================
--- trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectOrderAction.java 2011-04-15 14:39:32 UTC (rev 93)
+++ trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectOrderAction.java 2011-04-15 15:06:56 UTC (rev 94)
@@ -197,7 +197,7 @@
} else { //If the id doesn't exist or is invalid
addActionError(getText(n_("chorem.gepeto.projectOrder.invalidCompany")));
result = false;
- }
+ }
//Lenient mode disabled because results may be very odd
formatter.setLenient(false);
Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties
===================================================================
--- trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-04-15 14:39:32 UTC (rev 93)
+++ trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-04-15 15:06:56 UTC (rev 94)
@@ -52,6 +52,7 @@
chorem.bonzoms.contactDetails.value.required=You must enter the contact details'' value
chorem.bonzoms.employee=
chorem.bonzoms.employee.diploma=
+chorem.bonzoms.employee.invalidCompany=
chorem.bonzoms.employee.paidLeave=
chorem.bonzoms.employee.paidLeave.wrongFormat=
chorem.bonzoms.employee.required=
Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties
===================================================================
--- trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-04-15 14:39:32 UTC (rev 93)
+++ trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-04-15 15:06:56 UTC (rev 94)
@@ -51,6 +51,7 @@
chorem.bonzoms.contactDetails.value.required=Vous devez entrer la valeur de la m\u00E9thode de contact
chorem.bonzoms.employee=Employ\u00E9
chorem.bonzoms.employee.diploma=Dipl\u00F4me (opt.)
+chorem.bonzoms.employee.invalidCompany=
chorem.bonzoms.employee.paidLeave=Cong\u00E9s pay\u00E9s
chorem.bonzoms.employee.paidLeave.wrongFormat=Les cong\u00E9s pay\u00E9s doivent \u00EAtre \u00EAtre un entier positif ou un nombre \u00E0 virgule flottante positif
chorem.bonzoms.employee.required=Vous devez remplir le nombre de cong\u00E9s pay\u00E9s et les RTT
Modified: trunk/chorem-web/src/main/resources/struts.xml
===================================================================
--- trunk/chorem-web/src/main/resources/struts.xml 2011-04-15 14:39:32 UTC (rev 93)
+++ trunk/chorem-web/src/main/resources/struts.xml 2011-04-15 15:06:56 UTC (rev 94)
@@ -33,7 +33,7 @@
<action name="companies" class="org.chorem.bonzoms.action.CompanyAction">
<result>/WEB-INF/jsp/bonzoms/companies.jsp</result>
</action>
- <action name="addPersonInput">
+ <action name="addPersonInput" class="org.chorem.bonzoms.action.PersonAction">
<result>/WEB-INF/jsp/bonzoms/addPerson.jsp</result>
</action>
<action name="addPerson" class="org.chorem.bonzoms.action.PersonAction" method="add">
Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addPerson.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addPerson.jsp 2011-04-15 14:39:32 UTC (rev 93)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addPerson.jsp 2011-04-15 15:06:56 UTC (rev 94)
@@ -1,4 +1,5 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@page import="org.chorem.bonzoms.action.PersonAction" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
@@ -44,6 +45,7 @@
<br />
<s:textfield key="chorem.bonzoms.employee.rtt" name="employeeRtt" labelSeparator=": " />
<br />
+ <s:select label="%{getText('chorem.gepeto.projectOrder.company')}" list="allCompanies" name="companyId" listKey="wikittyId" listValue="name" />
<br />
<fieldset>
<legend><s:text name="chorem.bonzoms.employmentContract" /></legend>
1
0
r93 - in trunk/chorem-web/src/main: java/org/chorem/bonzoms/action resources resources/i18n resources/org/chorem/bonzoms/action webapp/WEB-INF/jsp/bonzoms
by vbriand@users.chorem.org 15 Apr '11
by vbriand@users.chorem.org 15 Apr '11
15 Apr '11
Author: vbriand
Date: 2011-04-15 16:39:32 +0200 (Fri, 15 Apr 2011)
New Revision: 93
Url: http://chorem.org/repositories/revision/chorem/93
Log:
Added a list of companies.
An employee and its contract can now be added (on the person's page)
Added:
trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/PersonAction-addPerson-validation.xml
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companies.jsp
Removed:
trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/PersonAction-validation.xml
Modified:
trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java
trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java
trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties
trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties
trunk/chorem-web/src/main/resources/struts.xml
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addPerson.jsp
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/home.jsp
Modified: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java
===================================================================
--- trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java 2011-04-15 09:57:06 UTC (rev 92)
+++ trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java 2011-04-15 14:39:32 UTC (rev 93)
@@ -12,6 +12,10 @@
import org.chorem.entities.CompanyImpl;
import org.chorem.entities.ContactDetails;
import org.chorem.entities.ContactDetailsImpl;
+import org.nuiton.wikitty.search.Criteria;
+import org.nuiton.wikitty.search.PagedResult;
+import org.nuiton.wikitty.search.Search;
+
import com.opensymphony.xwork2.ActionContext;
import static org.nuiton.i18n.I18n.n_;
@@ -37,15 +41,11 @@
if (name != null && type != null && addressLine1 != null &&
postcode != null && city != null && country != null &&
phoneNb != null && website != null) {
- if (!name.isEmpty() && !type.isEmpty() && !addressLine1.isEmpty() &&
- !postcode.isEmpty() && !city.isEmpty() &&
- !country.isEmpty()) {
- //If the company has been added successfully
- if (addCompany()) {
- result = SUCCESS;
- } else {
- result = ERROR;
- }
+ //If the company has been added successfully
+ if (addCompany()) {
+ result = SUCCESS;
+ } else {
+ result = ERROR;
}
}
return result;
@@ -174,6 +174,21 @@
}
/**
+ * Gets all companies
+ *
+ * @return a list containing all companies
+ */
+ public List<Company> getAllCompanies() {
+ ChoremProxy proxy = getChoremProxy();
+ Search search = Search.query();
+ Criteria criteria = search.exteq(Company.EXT_COMPANY).criteria();
+ PagedResult<Company> result = proxy.findAllByCriteria(Company.class,
+ criteria);
+ List<Company> companies = result.getAll();
+ return companies;
+ }
+
+ /**
* @return the name
*/
public String getName() {
Modified: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java
===================================================================
--- trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java 2011-04-15 09:57:06 UTC (rev 92)
+++ trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java 2011-04-15 14:39:32 UTC (rev 93)
@@ -9,6 +9,8 @@
import org.chorem.ContactDetailsConstants;
import org.chorem.action.BaseAction;
import org.chorem.entities.ContactDetailsImpl;
+import org.chorem.entities.EmployeeImpl;
+import org.chorem.entities.EmploymentContractImpl;
import org.chorem.entities.PersonImpl;
import static org.nuiton.i18n.I18n.n_;
@@ -36,14 +38,11 @@
if (firstName != null && lastName != null && email != null &&
birthDate != null) {
- if (!firstName.isEmpty() && !lastName.isEmpty() &&
- !email.isEmpty() && !birthDate.isEmpty()) {
- //If the person has been added successfully
- if (addPerson()) {
- result = SUCCESS;
- } else {
- result = ERROR;
- }
+ //If the person has been added successfully
+ if (addPerson()) {
+ result = SUCCESS;
+ } else {
+ result = ERROR;
}
}
return result;
@@ -59,6 +58,15 @@
protected String city;
protected String country;
protected String phoneNb;
+ protected String employeeDiploma;
+ protected String employeePaidLeave;
+ protected String employeeRtt;
+ protected String contractType;
+ protected String contractDescription;
+ protected String contractSalary;
+ protected String contractWorkingTime;
+ protected String contractBeginDate;
+ protected String contractEndDate;
/**
* Stores the new person through the proxy
@@ -72,7 +80,6 @@
try {
ChoremProxy proxy = getChoremProxy();
PersonImpl newPerson = new PersonImpl();
- ContactDetailsImpl newContactDetails = new ContactDetailsImpl();
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
newPerson.setFirstName(firstName);
@@ -90,6 +97,7 @@
//If everything went smoothly
if (result) {
+ ContactDetailsImpl newContactDetails = new ContactDetailsImpl();
String address = addressLine1;
if (!addressLine2.isEmpty()) {
@@ -113,7 +121,11 @@
newContactDetails.setTarget(newPerson.getWikittyId());
proxy.store(newContactDetails);
}
- proxy.store(newPerson);
+
+ result = storeEmployee(newPerson, result, proxy);
+ if (result) {
+ proxy.store(newPerson);
+ }
}
} catch (Exception e) {
result = false;
@@ -124,6 +136,120 @@
}
/**
+ * Stores the employee details and links them to the person
+ *
+ * @param newPerson the person to link the employee details with
+ * @param result whether or not the previous operations went smoothly
+ * @param proxy the wikitty proxy
+ * @return true if no errors occurred, false otherwise
+ */
+ protected boolean storeEmployee(PersonImpl newPerson, boolean result,
+ ChoremProxy proxy) {
+ //Filling the employee fields isn't mandatory, but if one of
+ //them is filled, the others (except the diploma) must be
+ //filled as well
+ if (!employeePaidLeave.isEmpty() || !employeeRtt.isEmpty() ||
+ !employeeDiploma.isEmpty()) {
+ if (!employeePaidLeave.isEmpty() && !employeeRtt.isEmpty()) {
+ EmployeeImpl newEmployee = new EmployeeImpl();
+
+ newEmployee.setDiploma(employeeDiploma);
+ newEmployee.setPerson(newPerson.getWikittyId());
+ try {
+ newEmployee.setPaidLeave(
+ Float.parseFloat(employeePaidLeave));
+ if (newEmployee.getPaidLeave() < 0) {
+ throw new NumberFormatException();
+ }
+ } catch (NumberFormatException e) {
+ result = false;
+ addFieldError("employeePaidLeave", getText(
+ n_("chorem.bonzoms.employee.paidLeave.wrongFormat")));
+ }
+ try {
+ newEmployee.setRtt(Float.parseFloat(employeeRtt));
+ if (newEmployee.getRtt() < 0) {
+ throw new NumberFormatException();
+ }
+ } catch (NumberFormatException e) {
+ result = false;
+ addFieldError("employeeRtt", getText(
+ n_("chorem.bonzoms.employee.rtt.wrongFormat")));
+ }
+
+ result = storeEmploymentContract(newEmployee, result, proxy);
+ if (result) {
+ proxy.store(newEmployee);
+ }
+
+ } else {
+ result = false;
+ addActionError(getText(
+ n_("chorem.bonzoms.employee.required")));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Stores an employment contract and links it with the person
+ *
+ * @param employee the employee to link the contract with
+ * @param result whether or not the previous operations went smoothly
+ * @param proxy the wikitty proxy
+ * @return true if no errors occurred, false otherwise
+ */
+ protected boolean storeEmploymentContract(EmployeeImpl employee,
+ boolean result, ChoremProxy proxy) {
+ if (!contractDescription.isEmpty() && !contractSalary.isEmpty() &&
+ !contractType.isEmpty() && !contractWorkingTime.isEmpty()) {
+ EmploymentContractImpl newEmploymentContract =
+ new EmploymentContractImpl();
+ SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
+
+ newEmploymentContract.setDescription(contractDescription);
+ newEmploymentContract.setEmployee(employee.getWikittyId());
+
+ try {
+ newEmploymentContract.setBeginDate(
+ formatter.parse(contractBeginDate));
+ if (!contractEndDate.isEmpty()) {
+ newEmploymentContract.setEndDate(
+ formatter.parse(contractEndDate));
+ }
+ } catch (ParseException e) {
+ addActionError(getText(n_("chorem.date.wrongFormat")));
+ result = false;
+ }
+
+ try {
+ newEmploymentContract.setSalary(Float.parseFloat(contractSalary));
+ } catch (NumberFormatException e) {
+ addFieldError("contractSalary",
+ getText(n_("chorem.bonzoms.employmentContract.salary.wrongFormat")));
+ result = false;
+ }
+ newEmploymentContract.setType(contractType);
+ try {
+ newEmploymentContract.setWorkingTime(
+ Integer.parseInt(contractWorkingTime));
+ } catch (NumberFormatException e) {
+ addFieldError("contractWorkingTime",
+ getText(n_("chorem.bonzoms.employmentContract.workingTime.wrongFormat")));
+ result = false;
+ }
+ if (result) {
+ proxy.store(newEmploymentContract);
+ }
+ } else {
+ addActionError(getText(
+ n_("chorem.bonzoms.employmentContract.allFieldsRequired")));
+ result = false;
+ }
+ return result;
+ }
+
+ /**
* @return the firstName
*/
public String getFirstName() {
@@ -262,4 +388,130 @@
public void setPhoneNb(String phoneNb) {
this.phoneNb = phoneNb;
}
+
+ /**
+ * @return the employeeDiploma
+ */
+ public String getEmployeeDiploma() {
+ return employeeDiploma;
+ }
+
+ /**
+ * @param employeeDiploma the employeeDiploma to set
+ */
+ public void setEmployeeDiploma(String employeeDiploma) {
+ this.employeeDiploma = employeeDiploma;
+ }
+
+ /**
+ * @return the employeePaidLeave
+ */
+ public String getEmployeePaidLeave() {
+ return employeePaidLeave;
+ }
+
+ /**
+ * @param employeePaidLeave the employeePaidLeave to set
+ */
+ public void setEmployeePaidLeave(String employeePaidLeave) {
+ this.employeePaidLeave = employeePaidLeave;
+ }
+
+ /**
+ * @return the employeeRtt
+ */
+ public String getEmployeeRtt() {
+ return employeeRtt;
+ }
+
+ /**
+ * @param employeeRtt the employeeRtt to set
+ */
+ public void setEmployeeRtt(String employeeRtt) {
+ this.employeeRtt = employeeRtt;
+ }
+
+ /**
+ * @return the contractType
+ */
+ public String getContractType() {
+ return contractType;
+ }
+
+ /**
+ * @param contractType the contractType to set
+ */
+ public void setContractType(String contractType) {
+ this.contractType = contractType;
+ }
+
+ /**
+ * @return the contractDescription
+ */
+ public String getContractDescription() {
+ return contractDescription;
+ }
+
+ /**
+ * @param contractDescription the contractDescription to set
+ */
+ public void setContractDescription(String contractDescription) {
+ this.contractDescription = contractDescription;
+ }
+
+ /**
+ * @return the contractSalary
+ */
+ public String getContractSalary() {
+ return contractSalary;
+ }
+
+ /**
+ * @param contractSalary the contractSalary to set
+ */
+ public void setContractSalary(String contractSalary) {
+ this.contractSalary = contractSalary;
+ }
+
+ /**
+ * @return the contractWorkingTime
+ */
+ public String getContractWorkingTime() {
+ return contractWorkingTime;
+ }
+
+ /**
+ * @param contractWorkingTime the contractWorkingTime to set
+ */
+ public void setContractWorkingTime(String contractWorkingTime) {
+ this.contractWorkingTime = contractWorkingTime;
+ }
+
+ /**
+ * @return the contractBeginDate
+ */
+ public String getContractBeginDate() {
+ return contractBeginDate;
+ }
+
+ /**
+ * @param contractBeginDate the contractBeginDate to set
+ */
+ public void setContractBeginDate(String contractBeginDate) {
+ this.contractBeginDate = contractBeginDate;
+ }
+
+ /**
+ * @return the contractEndDate
+ */
+ public String getContractEndDate() {
+ return contractEndDate;
+ }
+
+ /**
+ * @param contractEndDate the contractEndDate to set
+ */
+ public void setContractEndDate(String contractEndDate) {
+ this.contractEndDate = contractEndDate;
+ }
}
Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties
===================================================================
--- trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-04-15 09:57:06 UTC (rev 92)
+++ trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-04-15 14:39:32 UTC (rev 93)
@@ -18,6 +18,7 @@
chorem.billy.quotation.reference=Reference
chorem.billy.quotation.vta=VTA
chorem.billy.quotationDetails.title=
+chorem.bonzoms.companies=
chorem.bonzoms.company=Company {0}
chorem.bonzoms.company.add=Add a new company
chorem.bonzoms.company.address=
@@ -29,6 +30,7 @@
chorem.bonzoms.company.country=Country
chorem.bonzoms.company.country.required=You must enter the country
chorem.bonzoms.company.create.error=An error occurred while creating your new company, please try again. If the problem persists, please contact an administrator
+chorem.bonzoms.company.list=
chorem.bonzoms.company.name=Company''s name
chorem.bonzoms.company.name.required=You must enter the company''s name
chorem.bonzoms.company.phoneNb=Phone number (opt.)
@@ -48,8 +50,16 @@
chorem.bonzoms.contactDetails.type.required=You must enter the contact details'' type
chorem.bonzoms.contactDetails.value=Contact details'' value
chorem.bonzoms.contactDetails.value.required=You must enter the contact details'' value
+chorem.bonzoms.employee=
+chorem.bonzoms.employee.diploma=
+chorem.bonzoms.employee.paidLeave=
+chorem.bonzoms.employee.paidLeave.wrongFormat=
+chorem.bonzoms.employee.required=
+chorem.bonzoms.employee.rtt=
+chorem.bonzoms.employee.rtt.wrongFormat=
chorem.bonzoms.employmentContract=Employment contract
chorem.bonzoms.employmentContract.add=Add a new employment contract
+chorem.bonzoms.employmentContract.allFieldsRequired=
chorem.bonzoms.employmentContract.beginDate=Begin date (dd/mm/yyyy)
chorem.bonzoms.employmentContract.beginDate.required=You must enter the employment contract''s begin date
chorem.bonzoms.employmentContract.create.error=An error occurred while creating your new employment contract, please try again. If the problem persists, please contact an administrator
Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties
===================================================================
--- trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-04-15 09:57:06 UTC (rev 92)
+++ trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-04-15 14:39:32 UTC (rev 93)
@@ -17,6 +17,7 @@
chorem.billy.quotation.reference=R\u00E9f\u00E9rence
chorem.billy.quotation.vta=TVA
chorem.billy.quotationDetails.title=
+chorem.bonzoms.companies=
chorem.bonzoms.company=Soci\u00E9t\u00E9
chorem.bonzoms.company.add=Ajouter une nouvelle soci\u00E9t\u00E9
chorem.bonzoms.company.address=
@@ -28,6 +29,7 @@
chorem.bonzoms.company.country=Pays
chorem.bonzoms.company.country.required=Vous devez indiquer le pays
chorem.bonzoms.company.create.error=Une erreur s''est produite lors de la cr\u00E9ation de votre nouvelle soci\u00E9t\u00E9, merci d''essayer \u00E0 nouveau. Si le probl\u00E8me se reproduit, merci de contacter un administrateur
+chorem.bonzoms.company.list=Obtenir la liste des soci\u00E9t\u00E9s
chorem.bonzoms.company.name=Nom de la soci\u00E9t\u00E9
chorem.bonzoms.company.name.required=Vous devez entrer le nom de la soci\u00E9t\u00E9
chorem.bonzoms.company.phoneNb=Num\u00E9ro de t\u00E9l\u00E9phone (opt.)
@@ -47,8 +49,16 @@
chorem.bonzoms.contactDetails.type.required=Vous devez saisir le type de la m\u00E9thode de contact
chorem.bonzoms.contactDetails.value=Valeur de la m\u00E9thode de contact
chorem.bonzoms.contactDetails.value.required=Vous devez entrer la valeur de la m\u00E9thode de contact
+chorem.bonzoms.employee=Employ\u00E9
+chorem.bonzoms.employee.diploma=Dipl\u00F4me (opt.)
+chorem.bonzoms.employee.paidLeave=Cong\u00E9s pay\u00E9s
+chorem.bonzoms.employee.paidLeave.wrongFormat=Les cong\u00E9s pay\u00E9s doivent \u00EAtre \u00EAtre un entier positif ou un nombre \u00E0 virgule flottante positif
+chorem.bonzoms.employee.required=Vous devez remplir le nombre de cong\u00E9s pay\u00E9s et les RTT
+chorem.bonzoms.employee.rtt=RTT
+chorem.bonzoms.employee.rtt.wrongFormat=Les RTT doivent \u00EAtre \u00EAtre un entier positif ou un nombre \u00E0 virgule flottante positif
chorem.bonzoms.employmentContract=Contrat de travail
chorem.bonzoms.employmentContract.add=Ajouter un nouveau contrat de travail
+chorem.bonzoms.employmentContract.allFieldsRequired=
chorem.bonzoms.employmentContract.beginDate=Date de d\u00E9but
chorem.bonzoms.employmentContract.beginDate.required=Vous devez renseigner la date de d\u00E9but du contrat de travail
chorem.bonzoms.employmentContract.create.error=Une erreur s''est produite lors de la cr\u00E9ation de votre nouveau contrat de travail, merci d''essayer \u00E0 nouveau. Si le probl\u00E8me se reproduit, merci de contacter un administrateur
Copied: trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/PersonAction-addPerson-validation.xml (from rev 92, trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/PersonAction-validation.xml)
===================================================================
--- trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/PersonAction-addPerson-validation.xml (rev 0)
+++ trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/PersonAction-addPerson-validation.xml 2011-04-15 14:39:32 UTC (rev 93)
@@ -0,0 +1,49 @@
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+
+<validators>
+ <field name="firstName">
+ <field-validator type="requiredstring">
+ <message key="chorem.bonzoms.person.firstName.required" />
+ </field-validator>
+ </field>
+ <field name="lastName">
+ <field-validator type="requiredstring">
+ <message key="chorem.bonzoms.person.lastName.required" />
+ </field-validator>
+ </field>
+ <field name="email">
+ <field-validator type="requiredstring">
+ <message key="chorem.bonzoms.person.email.required" />
+ </field-validator>
+ <field-validator type="email">
+ <message key="chorem.bonzoms.person.email.wrongFormat" />
+ </field-validator>
+ </field>
+ <field name="birthDate">
+ <field-validator type="requiredstring">
+ <message key="chorem.bonzoms.person.birthDate.required" />
+ </field-validator>
+ </field>
+ <field name="addressLine1">
+ <field-validator type="requiredstring">
+ <message key="chorem.bonzoms.person.addressLine1.required" />
+ </field-validator>
+ </field>
+ <field name="postcode">
+ <field-validator type="requiredstring">
+ <message key="chorem.bonzoms.person.postcode.required" />
+ </field-validator>
+ </field>
+ <field name="city">
+ <field-validator type="requiredstring">
+ <message key="chorem.bonzoms.person.city.required" />
+ </field-validator>
+ </field>
+ <field name="country">
+ <field-validator type="requiredstring">
+ <message key="chorem.bonzoms.person.country.required" />
+ </field-validator>
+ </field>
+</validators>
Property changes on: trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/PersonAction-addPerson-validation.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/PersonAction-validation.xml
===================================================================
--- trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/PersonAction-validation.xml 2011-04-15 09:57:06 UTC (rev 92)
+++ trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/PersonAction-validation.xml 2011-04-15 14:39:32 UTC (rev 93)
@@ -1,49 +0,0 @@
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-
-<validators>
- <field name="firstName">
- <field-validator type="requiredstring">
- <message key="chorem.bonzoms.person.firstName.required" />
- </field-validator>
- </field>
- <field name="lastName">
- <field-validator type="requiredstring">
- <message key="chorem.bonzoms.person.lastName.required" />
- </field-validator>
- </field>
- <field name="email">
- <field-validator type="requiredstring">
- <message key="chorem.bonzoms.person.email.required" />
- </field-validator>
- <field-validator type="email">
- <message key="chorem.bonzoms.person.email.wrongFormat" />
- </field-validator>
- </field>
- <field name="birthDate">
- <field-validator type="requiredstring">
- <message key="chorem.bonzoms.person.birthDate.required" />
- </field-validator>
- </field>
- <field name="addressLine1">
- <field-validator type="requiredstring">
- <message key="chorem.bonzoms.person.addressLine1.required" />
- </field-validator>
- </field>
- <field name="postcode">
- <field-validator type="postcode">
- <message key="chorem.bonzoms.person.postcode.required" />
- </field-validator>
- </field>
- <field name="city">
- <field-validator type="city">
- <message key="chorem.bonzoms.person.city.required" />
- </field-validator>
- </field>
- <field name="country">
- <field-validator type="country">
- <message key="chorem.bonzoms.person.country.required" />
- </field-validator>
- </field>
-</validators>
Modified: trunk/chorem-web/src/main/resources/struts.xml
===================================================================
--- trunk/chorem-web/src/main/resources/struts.xml 2011-04-15 09:57:06 UTC (rev 92)
+++ trunk/chorem-web/src/main/resources/struts.xml 2011-04-15 14:39:32 UTC (rev 93)
@@ -30,6 +30,9 @@
<result name="error" type="redirectAction">home</result>
<result>/WEB-INF/jsp/bonzoms/companyDetails.jsp</result>
</action>
+ <action name="companies" class="org.chorem.bonzoms.action.CompanyAction">
+ <result>/WEB-INF/jsp/bonzoms/companies.jsp</result>
+ </action>
<action name="addPersonInput">
<result>/WEB-INF/jsp/bonzoms/addPerson.jsp</result>
</action>
Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addPerson.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addPerson.jsp 2011-04-15 09:57:06 UTC (rev 92)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addPerson.jsp 2011-04-15 14:39:32 UTC (rev 93)
@@ -34,9 +34,35 @@
<br />
<br />
<s:textfield key="chorem.bonzoms.person.phoneNb" name="phoneNb" labelSeparator=": " />
+ </fieldset>
+ <br />
+ <fieldset>
+ <legend><s:text name="chorem.bonzoms.employee" /></legend>
+ <s:textfield key="chorem.bonzoms.employee.diploma" name="employeeDiploma" labelSeparator=": " />
<br />
- <s:submit key="chorem.bonzoms.person.add" name="submit" />
+ <s:textfield key="chorem.bonzoms.employee.paidLeave" name="employeePaidLeave" labelSeparator=": " />
+ <br />
+ <s:textfield key="chorem.bonzoms.employee.rtt" name="employeeRtt" labelSeparator=": " />
+ <br />
+ <br />
+ <fieldset>
+ <legend><s:text name="chorem.bonzoms.employmentContract" /></legend>
+ <s:textfield key="chorem.bonzoms.employmentContract.type" name="contractType" labelSeparator=": " />
+ <br />
+ <br />
+ <s:textarea key="chorem.bonzoms.employmentContract.description" name="contractDescription" rows="10" cols="50" labelposition="top" />
+ <br />
+ <s:textfield key="chorem.bonzoms.employmentContract.salary" name="contractSalary" labelSeparator=": " />
+ <br />
+ <s:textfield key="chorem.bonzoms.employmentContract.workingTime" name="contractWorkingTime" labelSeparator=": " />
+ <br />
+ <s:textfield key="chorem.bonzoms.employmentContract.beginDate" name="contractBeginDate" labelSeparator=": " />
+ <br />
+ <s:textfield key="chorem.bonzoms.employmentContract.endDate" name="contractEndDate" labelSeparator=": " />
+ </fieldset>
</fieldset>
+ <br />
+ <s:submit key="chorem.bonzoms.person.add" name="submit" />
</s:form>
</body>
-</html>
+</html>
\ No newline at end of file
Added: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companies.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companies.jsp (rev 0)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companies.jsp 2011-04-15 14:39:32 UTC (rev 93)
@@ -0,0 +1,29 @@
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@page import="java.util.List" %>
+<%@page import="org.chorem.entities.Company" %>
+<%@page import="org.chorem.bonzoms.action.CompanyAction" %>
+<%@taglib prefix="s" uri="/struts-tags" %>
+
+<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page">
+ <head>
+ <title>
+ <s:text name="chorem.bonzoms.companies" />
+ </title>
+ <s:head />
+ </head>
+ <body>
+ <%
+ List<Company> companies = CompanyAction.getAction().getAllCompanies();
+
+ for (Company company : companies) {
+ %>
+ <s:url namespace="/bonzoms" action="companyDetails" var="companyDetails">
+ <s:param name="companyId"><%= company.getWikittyId() %></s:param>
+ </s:url>
+ <a href="${companyDetails}"><%= company.getName() %></a><br />
+ <%
+ }
+ %>
+ </body>
+</html>
Property changes on: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/companies.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/home.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/home.jsp 2011-04-15 09:57:06 UTC (rev 92)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/home.jsp 2011-04-15 14:39:32 UTC (rev 93)
@@ -10,7 +10,8 @@
<body>
<p>
<s:a action="addCompanyInput"><s:text name="chorem.bonzoms.company.add" /></s:a><br />
- <s:a action="addPersonInput"><s:text name="chorem.bonzoms.person.add" /></s:a>
+ <s:a action="addPersonInput"><s:text name="chorem.bonzoms.person.add" /></s:a><br />
+ <s:a action="companies"><s:text name="chorem.bonzoms.company.list" /></s:a>
</p>
</body>
</html>
1
0
r92 - in trunk/chorem-web/src/main: java/org/chorem/gepeto/action resources resources/i18n webapp/WEB-INF/jsp/gepeto
by vbriand@users.chorem.org 15 Apr '11
by vbriand@users.chorem.org 15 Apr '11
15 Apr '11
Author: vbriand
Date: 2011-04-15 11:57:06 +0200 (Fri, 15 Apr 2011)
New Revision: 92
Url: http://chorem.org/repositories/revision/chorem/92
Log:
Added a list of projects without quotation
Added:
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsWithoutQuotation.jsp
Modified:
trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java
trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties
trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties
trunk/chorem-web/src/main/resources/struts.xml
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp
Modified: trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java
===================================================================
--- trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java 2011-04-15 09:41:44 UTC (rev 91)
+++ trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java 2011-04-15 09:57:06 UTC (rev 92)
@@ -396,13 +396,35 @@
endYear = cal.get(Calendar.YEAR);
if (beginYear <= yearInt && yearInt <= endYear) {
company = proxy.restore(Company.class, projectOrder.getCompany());
- customers.add(company);
+ if (!customers.contains(company)) {
+ customers.add(company);
+ }
}
}
return customers;
}
/**
+ * Gets the projects without any quotation
+ *
+ * @return the projects without quotation
+ */
+ public List<Project> getProjectsWithoutQuotation() {
+ ChoremProxy proxy = getChoremProxy();
+ List<Quotation> quotations = getAllQuotations();
+ Collection<Project> projects = new ArrayList<Project>(getAllProjects());
+ List<Project> projectsWithQuotation = new ArrayList<Project>();
+ Project project;
+
+ for (Quotation quotation : quotations) {
+ project = proxy.restore(Project.class, quotation.getProject());
+ projectsWithQuotation.add(project);
+ }
+ projects.removeAll(projectsWithQuotation);
+ return (List<Project>) projects;
+ }
+
+ /**
* @return the name
*/
public String getName() {
Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties
===================================================================
--- trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-04-15 09:41:44 UTC (rev 91)
+++ trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-04-15 09:57:06 UTC (rev 92)
@@ -143,6 +143,7 @@
chorem.gepeto.projectsByYear.thead.start=Start
chorem.gepeto.projectsByYear.title=Projects of year {0}
chorem.gepeto.projectsWithoutQuotation=
+chorem.gepeto.projectsWithoutQuotation.title=
chorem.gepeto.results.title=Results by year
chorem.gepeto.task=Task {0}
chorem.gepeto.task.add=Add a new task
Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties
===================================================================
--- trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-04-15 09:41:44 UTC (rev 91)
+++ trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-04-15 09:57:06 UTC (rev 92)
@@ -138,7 +138,8 @@
chorem.gepeto.projectsByYear.thead.name=Nom
chorem.gepeto.projectsByYear.thead.start=D\u00E9but
chorem.gepeto.projectsByYear.title=Projets de l''ann\u00E9e {0}
-chorem.gepeto.projectsWithoutQuotation=
+chorem.gepeto.projectsWithoutQuotation=Obtenir la liste des projets sans devis
+chorem.gepeto.projectsWithoutQuotation.title=
chorem.gepeto.results.title=R\u00E9sultats par ann\u00E0e
chorem.gepeto.task=T\u00E2che {0}
chorem.gepeto.task.add=Ajouter une nouvelle t\u00E2che
Modified: trunk/chorem-web/src/main/resources/struts.xml
===================================================================
--- trunk/chorem-web/src/main/resources/struts.xml 2011-04-15 09:41:44 UTC (rev 91)
+++ trunk/chorem-web/src/main/resources/struts.xml 2011-04-15 09:57:06 UTC (rev 92)
@@ -106,10 +106,13 @@
<result name="error" type="redirectAction">home</result>
<result>/WEB-INF/jsp/gepeto/projectOrderDetails.jsp</result>
</action>
- <action name="getProjectsByYear" class="org.chorem.gepeto.action.ProjectAction" method="projectsByYear">
+ <action name="projectsByYear" class="org.chorem.gepeto.action.ProjectAction" method="projectsByYear">
<result name="error" type="redirectAction">home</result>
<result>/WEB-INF/jsp/gepeto/projectsByYear.jsp</result>
</action>
+ <action name="projectsWithoutQuotation" class="org.chorem.gepeto.action.ProjectAction">
+ <result>/WEB-INF/jsp/gepeto/projectsWithoutQuotation.jsp</result>
+ </action>
<action name="projectDetails" class="org.chorem.gepeto.action.ProjectAction" method="projectDetails">
<result name="error" type="redirectAction">home</result>
<result>/WEB-INF/jsp/gepeto/projectDetails.jsp</result>
Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp 2011-04-15 09:41:44 UTC (rev 91)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp 2011-04-15 09:57:06 UTC (rev 92)
@@ -10,11 +10,11 @@
<body>
<p>
<s:a action="addProjectInput"><s:text name="chorem.gepeto.project.add" /></s:a><br />
- <s:url action="getProjectsByYear" var="getProjectsByYear">
+ <s:url action="projectsByYear" var="projectsByYear">
<s:param name="year">2011</s:param>
</s:url>
- <a href="${getProjectsByYear}"><s:text name="chorem.gepeto.projects" /></a><br />
- <s:a action="getProjectsWithoutQuotation"><s:text name="chorem.gepeto.projectsWithoutQuotation" /></s:a><br />
+ <a href="${projectsByYear}"><s:text name="chorem.gepeto.projects" /></a><br />
+ <s:a action="projectsWithoutQuotation"><s:text name="chorem.gepeto.projectsWithoutQuotation" /></s:a><br />
</p>
</body>
</html>
Added: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsWithoutQuotation.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsWithoutQuotation.jsp (rev 0)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsWithoutQuotation.jsp 2011-04-15 09:57:06 UTC (rev 92)
@@ -0,0 +1,27 @@
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@page import="java.util.List" %>
+<%@page import="org.chorem.entities.Project" %>
+<%@page import="org.chorem.gepeto.action.ProjectAction" %>
+<%@taglib prefix="s" uri="/struts-tags" %>
+
+<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page">
+ <head>
+ <title><s:text name="chorem.gepeto.projectsWithoutQuotation.title" /></title>
+ <s:head />
+ </head>
+ <body>
+ <p>
+ <%
+ List<Project> projects = ProjectAction.getAction().getProjectsWithoutQuotation();
+
+ for (Project project : projects) {
+ %>
+ <s:url action="projectDetails" var="projectDetails">
+ <s:param name="projectId"><%= project.getWikittyId() %></s:param>
+ </s:url>
+ <a href="${projectDetails}"><%= project.getName() %></a><br />
+ <% } %>
+ </p>
+ </body>
+</html>
Property changes on: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsWithoutQuotation.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
1
0
Author: bpoussin
Date: 2011-04-15 11:41:44 +0200 (Fri, 15 Apr 2011)
New Revision: 91
Url: http://chorem.org/repositories/revision/chorem/91
Log:
ajout dependance pour junit
Modified:
trunk/chorem-entities/pom.xml
trunk/chorem-web/pom.xml
Modified: trunk/chorem-entities/pom.xml
===================================================================
--- trunk/chorem-entities/pom.xml 2011-04-15 09:28:58 UTC (rev 90)
+++ trunk/chorem-entities/pom.xml 2011-04-15 09:41:44 UTC (rev 91)
@@ -94,8 +94,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.8.2</version>
- <scope>test</scope>
</dependency>
</dependencies>
Modified: trunk/chorem-web/pom.xml
===================================================================
--- trunk/chorem-web/pom.xml 2011-04-15 09:28:58 UTC (rev 90)
+++ trunk/chorem-web/pom.xml 2011-04-15 09:41:44 UTC (rev 91)
@@ -153,6 +153,10 @@
<artifactId>h2</artifactId>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
</dependencies>
<build>
1
0
r90 - trunk/chorem-entities/src/test/java/org/chorem/entities
by bpoussin@users.chorem.org 15 Apr '11
by bpoussin@users.chorem.org 15 Apr '11
15 Apr '11
Author: bpoussin
Date: 2011-04-15 11:28:58 +0200 (Fri, 15 Apr 2011)
New Revision: 90
Url: http://chorem.org/repositories/revision/chorem/90
Log:
remove unused import
Modified:
trunk/chorem-entities/src/test/java/org/chorem/entities/InvoiceableUtilTest.java
Modified: trunk/chorem-entities/src/test/java/org/chorem/entities/InvoiceableUtilTest.java
===================================================================
--- trunk/chorem-entities/src/test/java/org/chorem/entities/InvoiceableUtilTest.java 2011-04-15 09:22:37 UTC (rev 89)
+++ trunk/chorem-entities/src/test/java/org/chorem/entities/InvoiceableUtilTest.java 2011-04-15 09:28:58 UTC (rev 90)
@@ -1,7 +1,5 @@
package org.chorem.entities;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import org.nuiton.wikitty.WikittyProxy;
1
0
r89 - in trunk/chorem-entities: . src src/test src/test/java src/test/java/org src/test/java/org/chorem src/test/java/org/chorem/entities
by bpoussin@users.chorem.org 15 Apr '11
by bpoussin@users.chorem.org 15 Apr '11
15 Apr '11
Author: bpoussin
Date: 2011-04-15 11:22:37 +0200 (Fri, 15 Apr 2011)
New Revision: 89
Url: http://chorem.org/repositories/revision/chorem/89
Log:
add test for IncoiceableUtil
Added:
trunk/chorem-entities/src/test/
trunk/chorem-entities/src/test/java/
trunk/chorem-entities/src/test/java/org/
trunk/chorem-entities/src/test/java/org/chorem/
trunk/chorem-entities/src/test/java/org/chorem/entities/
trunk/chorem-entities/src/test/java/org/chorem/entities/InvoiceableUtilTest.java
Modified:
trunk/chorem-entities/pom.xml
Modified: trunk/chorem-entities/pom.xml
===================================================================
--- trunk/chorem-entities/pom.xml 2011-04-15 08:54:28 UTC (rev 88)
+++ trunk/chorem-entities/pom.xml 2011-04-15 09:22:37 UTC (rev 89)
@@ -91,7 +91,12 @@
<artifactId>commons-io</artifactId>
<scope>compile</scope>
</dependency>
-
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.2</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
Added: trunk/chorem-entities/src/test/java/org/chorem/entities/InvoiceableUtilTest.java
===================================================================
--- trunk/chorem-entities/src/test/java/org/chorem/entities/InvoiceableUtilTest.java (rev 0)
+++ trunk/chorem-entities/src/test/java/org/chorem/entities/InvoiceableUtilTest.java 2011-04-15 09:22:37 UTC (rev 89)
@@ -0,0 +1,57 @@
+package org.chorem.entities;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.nuiton.wikitty.WikittyProxy;
+
+/**
+ *
+ * @author poussin
+ */
+public class InvoiceableUtilTest {
+
+ /**
+ * Test of evalCondition method, of class InvoiceableUtil.
+ */
+ @Test
+ public void testEvalCondition() {
+ System.out.println("evalCondition");
+
+ WikittyProxy proxy = null;
+ Invoiceable invoiceable = new InvoiceableImpl();
+ invoiceable.setMimetype("application/javascript");
+ invoiceable.setCondition("'coucou'.equals(invoiceable.getName())");
+
+ {
+ invoiceable.setName("coucou");
+ boolean expResult = true;
+ boolean result = InvoiceableUtil.evalCondition(proxy, invoiceable);
+ assertEquals(expResult, result);
+ }
+ {
+ invoiceable.setName("not coucou");
+ boolean expResult = false;
+ boolean result = InvoiceableUtil.evalCondition(proxy, invoiceable);
+ assertEquals(expResult, result);
+ }
+ }
+
+ /**
+ * Test of evalValue method, of class InvoiceableUtil.
+ */
+ @Test
+ public void testEvalValue() {
+ System.out.println("evalValue");
+
+ WikittyProxy proxy = null;
+ Invoiceable invoiceable = new InvoiceableImpl();
+ invoiceable.setMimetype("application/javascript");
+ invoiceable.setValue("10*10");
+
+ double expResult = 100;
+ double result = InvoiceableUtil.evalValue(proxy, invoiceable);
+ assertEquals(expResult, result, 0.0);
+ }
+}
1
0
r88 - in trunk/chorem-web/src/main: java/org/chorem/gepeto/action resources/i18n webapp/WEB-INF/jsp/gepeto
by vbriand@users.chorem.org 15 Apr '11
by vbriand@users.chorem.org 15 Apr '11
15 Apr '11
Author: vbriand
Date: 2011-04-15 10:54:28 +0200 (Fri, 15 Apr 2011)
New Revision: 88
Url: http://chorem.org/repositories/revision/chorem/88
Log:
Added a list of projects with quotation but without project order on the page listing the projects by year
Modified:
trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java
trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties
trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsByYear.jsp
Modified: trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java
===================================================================
--- trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java 2011-04-14 16:08:29 UTC (rev 87)
+++ trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java 2011-04-15 08:54:28 UTC (rev 88)
@@ -203,6 +203,74 @@
}
/**
+ * Gets the projects without project order but with quotation by year
+ *
+ * @return the list of projects
+ */
+ public List<Project> getProjectsWithoutProjectOrderByYear() {
+ ChoremProxy proxy = getChoremProxy();
+ Calendar cal = Calendar.getInstance();
+ Collection<Quotation> allQuotations = new ArrayList<Quotation>(
+ getAllQuotations());
+
+ allQuotations.removeAll(getQuotationsWithProjectOrder());
+ List<Project> projects = new ArrayList<Project>();
+ Project project;
+ int quotationYear;
+
+ for (Quotation quotation : allQuotations) {
+ cal.setTime(quotation.getPostedDate());
+ quotationYear = cal.get(Calendar.YEAR);
+ if (yearInt == quotationYear) {
+ project = proxy.restore(Project.class, quotation.getProject());
+ //If the project isn't already in the list
+ if (!projects.contains(project)) {
+ projects.add(project);
+ }
+ }
+ }
+ return projects;
+ }
+
+ /**
+ * Gets all quotations with project order
+ *
+ * @return all quotations with project order
+ */
+ public List<Quotation> getQuotationsWithProjectOrder() {
+ ChoremProxy proxy = getChoremProxy();
+ Search search = Search.query();
+ Criteria criteria = search.exteq(ProjectOrder.EXT_PROJECTORDER).criteria();
+ PagedResult<ProjectOrder> result = proxy.
+ findAllByCriteria(ProjectOrder.class, criteria);
+ List<ProjectOrder> projectOrders = result.getAll();
+ List<Quotation> quotations = new ArrayList<Quotation>();
+ Quotation quotation;
+
+ for (ProjectOrder projectOrder : projectOrders) {
+ quotation = proxy.restore(Quotation.class,
+ projectOrder.getQuotation());
+ quotations.add(quotation);
+ }
+ return quotations;
+ }
+
+ /**
+ * Gets all quotations, whether they have a project order or not
+ *
+ * @return all quotations
+ */
+ public List<Quotation> getAllQuotations() {
+ ChoremProxy proxy = getChoremProxy();
+ Search search = Search.query();
+ Criteria criteria = search.exteq(Quotation.EXT_QUOTATION).criteria();
+ PagedResult<Quotation> result = proxy.findAllByCriteria(Quotation.class,
+ criteria);
+ List<Quotation> quotations = result.getAll();
+ return quotations;
+ }
+
+ /**
* Gets the quotations attached with this project
*
* @return the quotations linked with this project
@@ -241,7 +309,8 @@
* @return the quotations without a project order
*/
public List<Quotation> getAttachedQuotationsWithoutProjectOrder() {
- Collection<Quotation> allQuotations = new ArrayList<Quotation>(getAttachedQuotations());
+ Collection<Quotation> allQuotations = new ArrayList<Quotation>(
+ getAttachedQuotations());
//Gets all quotations and removes the ones with a project order
allQuotations.removeAll(getAttachedQuotationsWithProjectOrder());
@@ -261,8 +330,8 @@
Criteria criteria = search.exteq(ProjectOrder.EXT_PROJECTORDER).
associated(ProjectOrder.FQ_FIELD_PROJECTORDER_QUOTATION).
eq(Quotation.FQ_FIELD_QUOTATION_PROJECT, projectId).criteria();
- PagedResult<ProjectOrder> result = proxy.findAllByCriteria(ProjectOrder.class,
- criteria);
+ PagedResult<ProjectOrder> result = proxy.
+ findAllByCriteria(ProjectOrder.class, criteria);
List<ProjectOrder> projectOrders = result.getAll();
return projectOrders;
@@ -280,8 +349,8 @@
Criteria criteria = search.exteq(ProjectOrder.EXT_PROJECTORDER).
associated(ProjectOrder.FQ_FIELD_PROJECTORDER_QUOTATION).
eq(Quotation.FQ_FIELD_QUOTATION_PROJECT, projectId).criteria();
- PagedResult<ProjectOrder> result = proxy.findAllByCriteria(ProjectOrder.class,
- criteria);
+ PagedResult<ProjectOrder> result = proxy.
+ findAllByCriteria(ProjectOrder.class, criteria);
List<ProjectOrder> projectOrders = result.getAll();
return projectOrders;
Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties
===================================================================
--- trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-04-14 16:08:29 UTC (rev 87)
+++ trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-04-15 08:54:28 UTC (rev 88)
@@ -142,6 +142,7 @@
chorem.gepeto.projectsByYear.thead.name=Name
chorem.gepeto.projectsByYear.thead.start=Start
chorem.gepeto.projectsByYear.title=Projects of year {0}
+chorem.gepeto.projectsWithoutQuotation=
chorem.gepeto.results.title=Results by year
chorem.gepeto.task=Task {0}
chorem.gepeto.task.add=Add a new task
Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties
===================================================================
--- trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-04-14 16:08:29 UTC (rev 87)
+++ trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-04-15 08:54:28 UTC (rev 88)
@@ -138,6 +138,7 @@
chorem.gepeto.projectsByYear.thead.name=Nom
chorem.gepeto.projectsByYear.thead.start=D\u00E9but
chorem.gepeto.projectsByYear.title=Projets de l''ann\u00E9e {0}
+chorem.gepeto.projectsWithoutQuotation=
chorem.gepeto.results.title=R\u00E9sultats par ann\u00E0e
chorem.gepeto.task=T\u00E2che {0}
chorem.gepeto.task.add=Ajouter une nouvelle t\u00E2che
Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp 2011-04-14 16:08:29 UTC (rev 87)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/home.jsp 2011-04-15 08:54:28 UTC (rev 88)
@@ -14,6 +14,7 @@
<s:param name="year">2011</s:param>
</s:url>
<a href="${getProjectsByYear}"><s:text name="chorem.gepeto.projects" /></a><br />
+ <s:a action="getProjectsWithoutQuotation"><s:text name="chorem.gepeto.projectsWithoutQuotation" /></s:a><br />
</p>
</body>
</html>
Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsByYear.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsByYear.jsp 2011-04-14 16:08:29 UTC (rev 87)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsByYear.jsp 2011-04-15 08:54:28 UTC (rev 88)
@@ -22,6 +22,9 @@
</s:text>
</h2>
<table>
+ <caption>
+ <s:text name="chorem.gepeto.projectsByYear.withProjectOrder" />
+ </caption>
<thead>
<tr>
<th><s:text name="chorem.gepeto.projectsByYear.thead.name" /></th>
@@ -61,5 +64,50 @@
<% } %>
</tbody>
</table>
+ <br />
+ <table>
+ <caption>
+ <s:text name="chorem.gepeto.projectsByYear.withoutProjectOrder" />
+ </caption>
+ <thead>
+ <tr>
+ <th><s:text name="chorem.gepeto.projectsByYear.thead.name" /></th>
+ <th><s:text name="chorem.gepeto.projectsByYear.thead.company" /></th>
+ <th><s:text name="chorem.gepeto.projectsByYear.thead.start" /></th>
+ <th><s:text name="chorem.gepeto.projectsByYear.thead.end" /></th>
+ </tr>
+ </thead>
+ <tbody>
+ <%
+ projects = ProjectAction.getAction().getProjectsWithoutProjectOrderByYear();
+
+ for (Project project : projects) {
+ %>
+ <tr>
+ <s:url action="projectDetails" var="projectDetails">
+ <s:param name="projectId"><%= project.getWikittyId() %></s:param>
+ </s:url>
+ <td><a href="${projectDetails}"><%= project.getName() %></a></td>
+ <td>
+ <%
+ List<Company> customers = ProjectAction.getAction().getCustomersByYear(project.getWikittyId());
+
+ for (Company customer : customers) {
+ %>
+ <s:url namespace="/bonzoms" action="companyDetails" var="companyDetails">
+ <s:param name="companyId"><%= customer.getWikittyId() %></s:param>
+ </s:url>
+ <a href="${companyDetails}"><%= customer.getName() %></a>
+ <%
+ }
+ %>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <% } %>
+ </tbody>
+ </table>
+ <br />
</body>
</html>
1
0
r87 - in trunk/chorem-web/src/main: java/org/chorem/gepeto/action webapp/WEB-INF/jsp/gepeto
by vbriand@users.chorem.org 14 Apr '11
by vbriand@users.chorem.org 14 Apr '11
14 Apr '11
Author: vbriand
Date: 2011-04-14 18:08:29 +0200 (Thu, 14 Apr 2011)
New Revision: 87
Url: http://chorem.org/repositories/revision/chorem/87
Log:
The customers are now displayed by year on the projects list
Modified:
trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java
trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsByYear.jsp
Modified: trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java
===================================================================
--- trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java 2011-04-14 15:51:02 UTC (rev 86)
+++ trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java 2011-04-14 16:08:29 UTC (rev 87)
@@ -307,6 +307,33 @@
}
/**
+ * Gets the customers of a project by year
+ *
+ * @param projectId the project's id
+ * @return the customers
+ */
+ public List<Company> getCustomersByYear(String projectId) {
+ ChoremProxy proxy = getChoremProxy();
+ Calendar cal = Calendar.getInstance();
+ List<ProjectOrder> projectOrders = getProjectOrders(projectId);
+ List<Company> customers = new ArrayList<Company>();
+ Company company;
+ int beginYear, endYear;
+
+ for (ProjectOrder projectOrder : projectOrders) {
+ cal.setTime(projectOrder.getBeginDate());
+ beginYear = cal.get(Calendar.YEAR);
+ cal.setTime(projectOrder.getEndDate());
+ endYear = cal.get(Calendar.YEAR);
+ if (beginYear <= yearInt && yearInt <= endYear) {
+ company = proxy.restore(Company.class, projectOrder.getCompany());
+ customers.add(company);
+ }
+ }
+ return customers;
+ }
+
+ /**
* @return the name
*/
public String getName() {
Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsByYear.jsp
===================================================================
--- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsByYear.jsp 2011-04-14 15:51:02 UTC (rev 86)
+++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectsByYear.jsp 2011-04-14 16:08:29 UTC (rev 87)
@@ -43,7 +43,7 @@
<td><a href="${projectDetails}"><%= project.getName() %></a></td>
<td>
<%
- List<Company> customers = ProjectAction.getAction().getCustomers(project.getWikittyId());
+ List<Company> customers = ProjectAction.getAction().getCustomersByYear(project.getWikittyId());
for (Company customer : customers) {
%>
1
0