Changeset 1031
- Timestamp:
- Nov 1, 2010, 2:54:35 PM (10 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/StudyController.groovy
r976 r1031 74 74 */ 75 75 def list_extended = { 76 // If nothing has been selected, redirect the user 77 if( !params.id ) 78 redirect( action: 'list' ) 79 80 // Check whether one id has been selected or multiple. 81 def ids = params.id 82 if( ids instanceof String ) 83 redirect( action: 'show', id: ids ) 84 85 // Parse strings to a long 86 def long_ids = [] 87 ids.each { long_ids.add( Long.parseLong( it ) ) } 88 89 println( long_ids ) 90 76 91 def startTime = System.currentTimeMillis() 77 params.max = Math.min(params.max ? params.int('max') : 10, 100) 78 79 def studyList = Study.list(params) 92 def c = Study.createCriteria() 93 94 def studyList = c { 95 maxResults( Math.min(params.max ? params.int('max') : 10, 100) ) 96 'in'( "id", long_ids ) 97 } 80 98 render(view:'show',model:[studyList: studyList, studyInstanceTotal: Study.count(), multipleStudies: ( studyList.size() > 1 ) ] ) 81 99 } -
trunk/grails-app/views/study/list.gsp
r976 r1031 34 34 <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> 35 35 36 <td><input type="checkbox" name=" ${studyInstance.title}" id="${studyInstance.title}"></td>36 <td><input type="checkbox" name="id" value="${studyInstance.id}" id="${studyInstance.title}"></td> 37 37 38 38 <td><g:link action="show" id="${studyInstance.id}">${fieldValue(bean: studyInstance, field: "code")}</g:link></td>
Note: See TracChangeset
for help on using the changeset viewer.