Changeset 589 for trunk/grails-app
- Timestamp:
- Jun 9, 2010, 12:51:59 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/TaskDetailedController.groovy
r588 r589 234 234 if(isFilterApplied) { 235 235 // filterPane: 236 params.sort = params.sort ?: "id" 237 params.order = params.order ?: "desc" 236 238 if(params.sort == "attentionFlag") // See ticket #64 in Trac. 237 239 params.sort = "id" … … 298 300 filterParams.max = params.max 299 301 filterParams.offset = params.offset?.toInteger() ?: 0 302 filterParams.sort = params.sort ?: "id" 303 filterParams.order = params.order ?: "desc" 304 305 // Get some associatedProperty values for filterpane. 306 def associatedPropertyValues = [:] 307 def associatedPropertyMax = 10000 308 associatedPropertyValues.taskPriorityList = TaskPriority.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 309 def lastNameQuery = 'select distinct p.lastName from Person p where p.isActive = ? order by p.lastName' 310 associatedPropertyValues.lastNameList = Person.executeQuery(lastNameQuery, [true], [max:associatedPropertyMax]) 311 def firstNameQuery = 'select distinct p.firstName from Person p where p.isActive = ? order by p.firstName' 312 associatedPropertyValues.firstNameList = Person.executeQuery(firstNameQuery, [true], [max:associatedPropertyMax]) 313 associatedPropertyValues.taskGroupList = TaskGroup.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 314 associatedPropertyValues.assetList = Asset.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 315 associatedPropertyValues.taskStatusList = TaskStatus.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 316 associatedPropertyValues.taskTypeList = TaskType.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 317 def startOfYearRange = dateUtilService.getYearFromDate(dateUtilService.plusYear(new Date(), -10)) 318 def endOfYearRange = dateUtilService.getYearFromDate(dateUtilService.plusYear(new Date(), 10)) 319 associatedPropertyValues.yearRange = startOfYearRange..endOfYearRange 300 320 301 321 return[taskInstanceList: taskInstanceList, … … 303 323 filterParams: filterParams, 304 324 params: params, 325 associatedPropertyValues: associatedPropertyValues, 305 326 showDate: showDate, 306 327 today: calendarMonthControls.today, -
trunk/grails-app/views/taskDetailed/searchCalendar.gsp
r588 r589 115 115 class="overlayPane" 116 116 additionalProperties="id" 117 excludeProperties="trash, comment, targetCompletionDate" 118 associatedProperties="leadPerson.lastName, leadPerson.firstName, taskPriority.name" 119 filterPropertyValues="${['taskPriority.name':[values:TaskPriority.list()], 120 'leadPerson.lastName':[values:Person.executeQuery('select t.lastName from Person t')], 121 'leadPerson.firstName':[values:Person.executeQuery('select distinct t.firstName from Person t')], 122 targetStartDate:[years:2020..2000,precision:'day']]}"/> 117 excludeProperties="trash, targetCompletionDate" 118 associatedProperties="taskPriority.name, 119 leadPerson.lastName, 120 leadPerson.firstName, 121 taskGroup.name, 122 associatedAssets.name, 123 primaryAsset.name, 124 taskStatus.name, 125 taskType.name" 126 filterPropertyValues="${['taskPriority.name':[values: associatedPropertyValues.taskPriorityList], 127 'leadPerson.lastName':[values: associatedPropertyValues.lastNameList], 128 'leadPerson.firstName':[values: associatedPropertyValues.firstNameList], 129 'taskGroup.name':[values: associatedPropertyValues.taskGroupList], 130 'associatedAssets.name':[values: associatedPropertyValues.assetList], 131 'primaryAsset.name':[values: associatedPropertyValues.assetList], 132 'taskStatus.name':[values: associatedPropertyValues.taskStatusList], 133 'taskType.name':[values: associatedPropertyValues.taskTypeList], 134 targetCompletionDate:[years: associatedPropertyValues.yearRange,precision:'day'], 135 targetStartDate:[years: associatedPropertyValues.yearRange,precision:'day'] 136 ]}"/> 123 137 124 138 <g:render template="quickSearchPane" />
Note: See TracChangeset
for help on using the changeset viewer.