Index: lams_admin/conf/language/ApplicationResources.properties =================================================================== diff -u -r2d231698a30fe5fb470d417cdc64a288ad016a66 -r336014c7cec33723726010231bde33206bda4cb1 --- lams_admin/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 2d231698a30fe5fb470d417cdc64a288ad016a66) +++ lams_admin/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 336014c7cec33723726010231bde33206bda4cb1) @@ -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 =================================================================== diff -u -r8ffa8e9a03c0d185ac035fa6e014e9cc542ca11a -r336014c7cec33723726010231bde33206bda4cb1 --- lams_admin/conf/xdoclet/struts-forms.xml (.../struts-forms.xml) (revision 8ffa8e9a03c0d185ac035fa6e014e9cc542ca11a) +++ lams_admin/conf/xdoclet/struts-forms.xml (.../struts-forms.xml) (revision 336014c7cec33723726010231bde33206bda4cb1) @@ -56,6 +56,7 @@ + Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSearchAction.java =================================================================== diff -u -r4c272618da715b9f814eb81630e92abf2ef1a736 -r336014c7cec33723726010231bde33206bda4cb1 --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSearchAction.java (.../UserSearchAction.java) (revision 4c272618da715b9f814eb81630e92abf2ef1a736) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSearchAction.java (.../UserSearchAction.java) (revision 336014c7cec33723726010231bde33206bda4cb1) @@ -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