Changeset 552 for trunk/grails-app/controllers
- Timestamp:
- May 31, 2010, 1:29:04 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/TaskDetailedController.groovy
r525 r552 149 149 filterParams.order = params.order ?: "desc" 150 150 151 // Get some associatedProperty values for filterpane. 152 def associatedPropertyValues = [:] 153 def associatedPropertyMax = 10000 154 associatedPropertyValues.taskPriorityList = TaskPriority.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 155 def lastNameQuery = 'select distinct p.lastName from Person p where p.isActive = ? order by p.lastName' 156 associatedPropertyValues.lastNameList = Person.executeQuery(lastNameQuery, [true], [max:associatedPropertyMax]) 157 def firstNameQuery = 'select distinct p.firstName from Person p where p.isActive = ? order by p.firstName' 158 associatedPropertyValues.firstNameList = Person.executeQuery(firstNameQuery, [true], [max:associatedPropertyMax]) 159 associatedPropertyValues.taskGroupList = TaskGroup.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 160 associatedPropertyValues.assetList = Asset.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 161 associatedPropertyValues.taskStatusList = TaskStatus.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 162 associatedPropertyValues.taskTypeList = TaskType.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 163 def startOfYearRange = dateUtilService.getYearFromDate(dateUtilService.plusYear(new Date(), -10)) 164 def endOfYearRange = dateUtilService.getYearFromDate(dateUtilService.plusYear(new Date(), 10)) 165 associatedPropertyValues.yearRange = startOfYearRange..endOfYearRange 166 151 167 return[ taskInstanceList: taskInstanceList, 152 168 taskInstanceTotal: taskInstanceTotal, 153 169 filterParams: filterParams, 154 params: params ] 170 params: params, 171 associatedPropertyValues: associatedPropertyValues] 155 172 156 173 } // search … … 800 817 result.previousMonth.year = dateUtilService.getYearFromDate(result.previousMonth.date) 801 818 result.nextYear = [:] 802 result.nextYear.date = dateUtilService. getNextYear(showDate)819 result.nextYear.date = dateUtilService.plusYear(showDate) 803 820 result.nextYear.month = dateUtilService.getMonthFromDate(result.nextYear.date) 804 821 result.nextYear.year = dateUtilService.getYearFromDate(result.nextYear.date) 805 822 result.previousYear = [:] 806 result.previousYear.date = dateUtilService. getPreviousYear(showDate)823 result.previousYear.date = dateUtilService.plusYear(showDate, -1) 807 824 result.previousYear.month = dateUtilService.getMonthFromDate(result.previousYear.date) 808 825 result.previousYear.year = dateUtilService.getYearFromDate(result.previousYear.date)
Note: See TracChangeset
for help on using the changeset viewer.