# HG changeset patch # User ymh # Date 1365019748 -7200 # Node ID f9716d0867444e779b09c162f94e06873b2468ab # Parent 4a2bb15f76cd4be1b6f50b7ed385f5e10ae04a84 Add updated firld to project and sort by this diff -r 4a2bb15f76cd -r f9716d086744 server/src/main/java/org/iri_research/renkan/controller/RenkanRootController.java --- a/server/src/main/java/org/iri_research/renkan/controller/RenkanRootController.java Thu Apr 04 15:42:08 2013 +0200 +++ b/server/src/main/java/org/iri_research/renkan/controller/RenkanRootController.java Wed Apr 03 22:09:08 2013 +0200 @@ -52,7 +52,7 @@ } @RequestMapping(value="/s/{space_id}", method = RequestMethod.GET, produces={"text/html;charset=UTF-8"}) - public ModelAndView spaceIndex(@PathVariable("space_id") String spaceId, @PageableDefaults(sort={"created"}, sortDir=Direction.DESC, pageNumber=0, value=Constants.PAGINATION_SIZE) Pageable p, HttpServletRequest request) { + public ModelAndView spaceIndex(@PathVariable("space_id") String spaceId, @PageableDefaults(sort={"updated","created"}, sortDir=Direction.DESC, pageNumber=0, value=Constants.PAGINATION_SIZE) Pageable p, HttpServletRequest request) { logger.debug("SpaceId : " + (spaceId== null ? "null" : spaceId)); diff -r 4a2bb15f76cd -r f9716d086744 server/src/main/java/org/iri_research/renkan/coweb/event/AbstractSyncEventManager.java --- a/server/src/main/java/org/iri_research/renkan/coweb/event/AbstractSyncEventManager.java Thu Apr 04 15:42:08 2013 +0200 +++ b/server/src/main/java/org/iri_research/renkan/coweb/event/AbstractSyncEventManager.java Wed Apr 03 22:09:08 2013 +0200 @@ -1,6 +1,7 @@ package org.iri_research.renkan.coweb.event; import java.io.Serializable; +import java.util.Date; import java.util.List; import java.util.Map; @@ -89,6 +90,9 @@ return; } + p.setUpdated(new Date()); + this.projectsRepository.save(p); + user_id = (String) values.get("_user_id"); if (user_id == null) { diff -r 4a2bb15f76cd -r f9716d086744 server/src/main/java/org/iri_research/renkan/rest/ProjectsResource.java --- a/server/src/main/java/org/iri_research/renkan/rest/ProjectsResource.java Thu Apr 04 15:42:08 2013 +0200 +++ b/server/src/main/java/org/iri_research/renkan/rest/ProjectsResource.java Wed Apr 03 22:09:08 2013 +0200 @@ -44,6 +44,7 @@ if(obj.getCreated() == null) { obj.setCreated(new Date()); } + obj.setUpdated(new Date()); } @Override diff -r 4a2bb15f76cd -r f9716d086744 server/src/main/webapp/WEB-INF/i18n/messages_en.properties --- a/server/src/main/webapp/WEB-INF/i18n/messages_en.properties Thu Apr 04 15:42:08 2013 +0200 +++ b/server/src/main/webapp/WEB-INF/i18n/messages_en.properties Wed Apr 03 22:09:08 2013 +0200 @@ -7,6 +7,7 @@ renkanIndex.project_list = Renkan list renkanIndex.project_name = Name renkanIndex.project_creation = Creation +renkanIndex.project_updated = Updated renkanIndex.project_edit = Edit renkanIndex.project_copy = Copy renkanIndex.project_delete = Delete diff -r 4a2bb15f76cd -r f9716d086744 server/src/main/webapp/WEB-INF/i18n/messages_fr.properties --- a/server/src/main/webapp/WEB-INF/i18n/messages_fr.properties Thu Apr 04 15:42:08 2013 +0200 +++ b/server/src/main/webapp/WEB-INF/i18n/messages_fr.properties Wed Apr 03 22:09:08 2013 +0200 @@ -8,6 +8,7 @@ renkanIndex.project_list = Liste des projets renkanIndex.project_title = Titre renkanIndex.project_creation = Creation +renkanIndex.project_updated = Date màj. renkanIndex.project_edit = Edition renkanIndex.project_copy = Copier renkanIndex.project_delete = Eff. diff -r 4a2bb15f76cd -r f9716d086744 server/src/main/webapp/WEB-INF/templates/projectIndex.html --- a/server/src/main/webapp/WEB-INF/templates/projectIndex.html Thu Apr 04 15:42:08 2013 +0200 +++ b/server/src/main/webapp/WEB-INF/templates/projectIndex.html Wed Apr 03 22:09:08 2013 +0200 @@ -50,6 +50,7 @@ Name + Updated Creation Edit Copy @@ -60,6 +61,7 @@ title + update date Edit project Copy project