Index: lams_admin/conf/language/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_admin/conf/language/Attic/ApplicationResources.properties,v diff -u -r1.52 -r1.53 --- lams_admin/conf/language/ApplicationResources.properties 1 Dec 2006 20:25:09 -0000 1.52 +++ lams_admin/conf/language/ApplicationResources.properties 4 Dec 2006 05:13:32 -0000 1.53 @@ -198,6 +198,12 @@ msg.subgroup.organisation_id =The organisation_id of this subgroup is msg.remove.from.subgroups =Removed users will also be removed from subgroups. label.global.roles =Global roles +label.import = Import +label.notes = Notes +msg.import.intro = Use this screen to bulk import users using an Excel spreadsheet. +msg.import.1 = In the spreadsheet, columns marked with a (*) are mandatory (login, password, first name, last name, and email). +msg.import.2 = If you specify an organisation id to import a user into, you must specify at least one role to apply to that group or subgroup. +msg.import.conclusion = Click the help icon above for more information. +label.results.per.page = Results per page - #======= End labels: Exported 192 labels for en AU ===== Index: lams_admin/conf/xdoclet/struts-forms.xml =================================================================== RCS file: /usr/local/cvsroot/lams_admin/conf/xdoclet/struts-forms.xml,v diff -u -r1.21 -r1.22 --- lams_admin/conf/xdoclet/struts-forms.xml 9 Nov 2006 00:05:11 -0000 1.21 +++ lams_admin/conf/xdoclet/struts-forms.xml 4 Dec 2006 05:13:32 -0000 1.22 @@ -56,6 +56,7 @@ + Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSearchAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSearchAction.java,v diff -u -r1.8 -r1.9 --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSearchAction.java 28 Nov 2006 03:31:10 -0000 1.8 +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSearchAction.java 4 Dec 2006 05:13:32 -0000 1.9 @@ -44,6 +44,7 @@ import org.lamsfoundation.lams.usermanagement.Role; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; +import org.lamsfoundation.lams.util.WebUtil; /** * @author jliew @@ -89,7 +90,22 @@ String firstName = ((String)userSearchForm.get("sFirstName")).trim(); String lastName = ((String)userSearchForm.get("sLastName")).trim(); Boolean showAll = (Boolean)userSearchForm.get("showAll"); + Boolean searched = (Boolean)userSearchForm.get("searched"); + String resultsSection = ((String)userSearchForm.get("resultsSection")).trim(); + //Integer sort = WebUtil.readIntParam(request,"sort",true); + Integer start = WebUtil.readIntParam(request,"start",true); + // if start is set, we're returning a subset of a previous set of results; use the old search terms + if (start!=null) { + userId = WebUtil.readStrParam(request, "uid", true); + login = WebUtil.readStrParam(request, "l", true); + firstName = WebUtil.readStrParam(request, "fn", true); + lastName = WebUtil.readStrParam(request, "ln", true); + showAll = WebUtil.readBooleanParam(request, "sa"); + resultsSection = WebUtil.readStrParam(request, "rs", true); + searched = true; + } + log.debug("got userId: '"+userId+"'"); log.debug("got login: '"+login+"'"); log.debug("got firstName: '"+firstName+"'"); @@ -99,13 +115,13 @@ if (showAll) { userList = service.findAll(User.class); } else { - if(userId.length()==0) { + if (userId.length()==0) { Map stringProperties = new HashMap(); if(login.length()>0) stringProperties.put("login","%"+login+"%"); if(firstName.length()>0) stringProperties.put("firstName","%"+firstName+"%"); if(lastName.length()>0) stringProperties.put("lastName","%"+lastName+"%"); if(!stringProperties.isEmpty()) userList = service.searchByStringProperties(User.class,stringProperties); - }else{ + } else { Map objectProperties = new HashMap(); objectProperties.put("userId",userId); if(login.length()>0) objectProperties.put("login",login); @@ -115,17 +131,31 @@ } } - if(userList.isEmpty() && (Boolean)userSearchForm.get("searched")){ - ActionMessages messages = new ActionMessages(); - messages.add("results",new ActionMessage("msg.results.none")); - saveMessages(request,messages); + if (searched) { + if (userList.isEmpty()) { + ActionMessages messages = new ActionMessages(); + messages.add("results",new ActionMessage("msg.results.none")); + saveMessages(request,messages); + } else { + userList = removeDisabledUsers(userList); + /*if (start!=null && start + + + + + 10 + 20 + 30 + 40 + 50 + All + + + + + + + + + - + + users found. + + - + - + - + - + - + "> - + "> - + + + + + + + + + + + + + + + + "> + + + + - - - - - - - \ No newline at end of file