- Timestamp:
- Feb 3, 2011, 12:15:42 AM (14 years ago)
- Location:
- branches/features/taskProcedureRework/grails-app
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/features/taskProcedureRework/grails-app/controllers/TaskProcedureDetailedController.groovy
r770 r772 5 5 6 6 def filterService 7 def authService 7 8 8 9 def index = { redirect(action:list,params:params) } … … 110 111 } 111 112 taskProcedureInstance.properties = params 113 taskProcedureInstance.lastUpdatedBy = authService.currentUser 114 taskProcedureInstance.lastUpdated = new Date() // Required to trigger version increment. 112 115 113 116 // Gaps in the html index's can be created by adding 2 items and removing the first one. … … 173 176 def save = { 174 177 def taskProcedureInstance = new TaskProcedure(params) 178 taskProcedureInstance.createdBy = authService.currentUser 179 taskProcedureInstance.lastUpdatedBy = authService.currentUser 175 180 def taskInstance = Task.get(params.linkedTask.id) 176 181 -
branches/features/taskProcedureRework/grails-app/domain/TaskProcedure.groovy
r762 r772 5 5 6 6 Task linkedTask 7 Person createdBy 8 Person lastUpdatedBy 9 Date dateCreated = new Date() // autoTimestamp 10 Date lastUpdated = new Date() // autoTimestamp 7 11 8 12 def getDescription() { linkedTask.description } -
branches/features/taskProcedureRework/grails-app/services/CreateDataService.groovy
r768 r772 1098 1098 def taskProcedureInstance 1099 1099 def taskInstance 1100 def person = Person.get(3) 1100 1101 1101 1102 taskInstance = Task.get(5) 1102 taskProcedureInstance = new TaskProcedure(linkedTask: taskInstance) 1103 taskProcedureInstance = new TaskProcedure(linkedTask: taskInstance, 1104 createdBy: person, 1105 lastUpdatedBy: person) 1103 1106 saveAndTest(taskProcedureInstance) 1104 1107 taskProcedureInstance.addToTasks(taskInstance) 1105 1108 1106 1109 taskInstance = Task.get(7) 1107 taskProcedureInstance = new TaskProcedure(linkedTask: taskInstance) 1110 taskProcedureInstance = new TaskProcedure(linkedTask: taskInstance, 1111 createdBy: person, 1112 lastUpdatedBy: person) 1108 1113 saveAndTest(taskProcedureInstance) 1109 1114 taskProcedureInstance.addToTasks(taskInstance) -
branches/features/taskProcedureRework/grails-app/views/taskDetailed/show.gsp
r770 r772 543 543 </tr> 544 544 545 <tr class="prop"> 546 <td valign="top" class="name">Last Updated:</td> 547 <td valign="top" class="value"> 548 <g:formatDate date="${taskProcedureInstance.lastUpdated}" 549 format="EEE, dd-MMM-yyyy"/> 550 </td> 551 </tr> 552 545 553 </tbody> 546 554 </table> -
branches/features/taskProcedureRework/grails-app/views/taskProcedureDetailed/_taskProcedure.gsp
r770 r772 31 31 </tr> 32 32 33 <tr class="prop"> 34 <td valign="top" class="name">Version:</td> 35 <td valign="top" class="value"> 36 ${fieldValue(bean:taskProcedureInstance, field:'version') ?: 0} 37 </td> 38 </tr> 33 <g:if test="${taskProcedureInstance.version}"> 34 <tr class="prop"> 35 <td valign="top" class="name">Version:</td> 36 <td valign="top" class="value"> 37 ${fieldValue(bean:taskProcedureInstance, field:'version')} 38 </td> 39 </tr> 40 41 <tr class="prop"> 42 <td valign="top" class="name">Created By:</td> 43 <td valign="top" class="value"> 44 ${fieldValue(bean:taskProcedureInstance, field:'createdBy')} 45 on 46 <g:formatDate date="${taskProcedureInstance.dateCreated}" format="EEE, dd-MMM-yyyy @ HH:mm"/> 47 </td> 48 </tr> 49 50 <tr class="prop"> 51 <td valign="top" class="name">Last Updated By:</td> 52 <td valign="top" class="value"> 53 ${fieldValue(bean:taskProcedureInstance, field:'lastUpdatedBy')} 54 on 55 <g:formatDate date="${taskProcedureInstance.lastUpdated}" format="EEE, dd-MMM-yyyy @ HH:mm"/> 56 </td> 57 </tr> 58 </g:if> 39 59 40 60 </tbody>
Note: See TracChangeset
for help on using the changeset viewer.