- Timestamp:
- Mar 31, 2010, 1:42:00 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/TaskDetailedController.groovy
r473 r474 122 122 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_TaskManager', 'ROLE_TaskUser']) 123 123 def searchCalendar = { 124 params.max = 30 124 125 if(session.taskSearchParamsMax) 126 params.max = session.taskSearchParamsMax 127 128 // Protect filterPane. 129 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 130 131 // Set the month to show. 132 def showMonth = new Date() 133 if(session.taskSearchCalendarShowMonth) 134 showMonth = session.taskSearchCalendarShowMonth 135 136 if(params.nextMonth) 137 showMonth = dateUtilService.getNextMonth(showMonth) 138 else if(params.previousMonth) 139 showMonth = dateUtilService.getPreviousMonth(showMonth) 140 session.taskSearchCalendarShowMonth = showMonth 125 141 126 142 // Quick Search: … … 155 171 params.quickSearch = "searchTodays" 156 172 } 157 return[taskInstanceList: taskInstanceList, taskInstanceTotal: taskInstanceList.totalCount, filterParams: params]173 return[taskInstanceList: taskInstanceList, taskInstanceTotal: taskInstanceList.totalCount, showMonth: showMonth, filterParams: params] 158 174 } 159 175 // filterPane: … … 163 179 taskInstanceTotal: taskInstanceTotal, 164 180 filterParams: com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params), 181 showMonth: showMonth, 165 182 params:params ] 166 183 } -
trunk/grails-app/services/DateUtilService.groovy
r214 r474 77 77 78 78 /** 79 * Get the date one month in the future. 80 * @param date The Date object to start with. 81 * @returns A Date object one month in the future. 82 */ 83 public static Date getNextMonth(Date date) { 84 use(TimeCategory) { 85 date + 1.months 86 } 87 } 88 89 /** 90 * Get the date one month ago. 91 * @param date The Date object to start with. 92 * @returns A Date object one month ago. 93 */ 94 public static Date getPreviousMonth(Date date) { 95 use(TimeCategory) { 96 date - 1.months 97 } 98 } 99 100 /** 79 101 * Make a date object from supplied year, month, day values. 80 102 * The Calendar.getInstance() or Calendar.instance factory returns a new calendar instance, usually -
trunk/grails-app/views/taskDetailed/searchCalendar.gsp
r467 r474 40 40 </span> 41 41 </div> 42 43 <br /> 44 <g:link action="searchCalendar" params="[previousMonth:'true']"> 45 < Previous 46 </g:link> 47 <span style="font-size: 17px; font-weight: bold;"> 48 <g:formatDate date="${showMonth}" format="MMMM"/> 49 </span> 50 <g:link action="searchCalendar" params="[nextMonth:'true']"> 51 Next > 52 </g:link> 53 <br /> 54 <br /> 55 42 56 <g:if test="${taskInstanceList.size() > 0}"> 43 57 <richui:calendarMonthView items="${taskInstanceList}" 44 58 createLink="true" 45 59 constraintDateFields="['targetStartDate']" 46 month="${ new Date()}"60 month="${showMonth}" 47 61 controller="taskDetailed" 48 62 action="show" -
trunk/grails-app/views/taskDetailed/show.gsp
r445 r474 503 503 <th>Step</th> 504 504 <th>Description</th> 505 <th>Reasoning</th> 506 <th>Asset</th> 507 <th>Sub Item</th> 505 508 </tr> 506 509 </thead> … … 515 518 <td valign="top" style="text-align:left;" class="value"> 516 519 ${maintenanceAction?.description} 520 </td> 521 522 <td valign="top" style="text-align:left;" class="value"> 523 ${maintenanceAction?.reasoning} 524 </td> 525 526 <td valign="top" style="text-align:left;" class="value"> 527 ${maintenanceAction?.asset} 528 </td> 529 530 <td valign="top" style="text-align:left;" class="value"> 531 ${maintenanceAction?.assetSubItem} 517 532 </td> 518 533
Note: See TracChangeset
for help on using the changeset viewer.