- Timestamp:
- May 8, 2009, 11:51:25 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 11 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/MaintenanceActionDetailedController.groovy
r132 r133 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 class MaintenanceActionDetailedController extends Base AppAdminController {3 class MaintenanceActionDetailedController extends BaseController { 4 4 5 5 def index = { redirect(action:list,params:params) } -
trunk/grails-app/controllers/TaskDetailedController.groovy
r131 r133 20 20 } 21 21 22 // def show = { 23 // def taskInstance = Task.get( params.id ) 24 // 25 // if(!taskInstance) { 26 // flash.message = "Task not found with id ${params.id}" 27 // redirect(action:list) 28 // } 29 // else { 30 // def taskProcedureInstance = TaskProcedure.get(taskInstance?.taskProcedure?.id) 31 // return [ taskInstance : taskInstance, taskProcedureInstance: taskProcedureInstance] 32 // 33 // } 34 // } 35 22 36 def show = { 23 37 def taskInstance = Task.get( params.id ) … … 27 41 redirect(action:list) 28 42 } 29 else { 30 def taskProcedureInstance = TaskProcedure.get(taskInstance?.taskProcedure?.id) 31 return [ taskInstance : taskInstance, taskProcedureInstance: taskProcedureInstance] 43 else { 44 def taskProcedureInstance = TaskProcedure.get(taskInstance.taskProcedure?.id) 45 def taskProcedureExits = new Boolean("true") 46 def showTaskTab = new String("true") 32 47 48 if(!taskProcedureInstance) { 49 taskProcedureExits = false 50 } 51 return [ taskInstance : taskInstance, 52 taskProcedureInstance: taskProcedureInstance, 53 taskProcedureExits: taskProcedureExits, 54 showTaskTab: showTaskTab] 33 55 } 34 56 } … … 114 136 } 115 137 } 138 139 //Generate a new TaskProcedure for a taskInstance. 140 def generateProcedure = { 141 def taskProcedureInstance = new TaskProcedure() 142 taskProcedureInstance.properties = params 143 144 def taskInstance = Task.get(params.taskInstance.id) 145 def taskProcedureExits = new Boolean("true") 146 def showProcedureTab = new String("true") 147 148 if(!taskProcedureInstance.hasErrors() && taskProcedureInstance.save()) { 149 taskProcedureInstance.addToTasks(taskInstance) 150 flash.message = "Procedure created, you can now add steps to the procedure" 151 // redirect(action:show, id:params.taskInstance.id) 152 } 153 else { 154 taskProcedureExits = false 155 } 156 157 render(view:'show',model:[ taskInstance : taskInstance, 158 taskProcedureInstance: taskProcedureInstance, 159 taskProcedureExits: taskProcedureExits, 160 showProcedureTab: showProcedureTab]) 161 } 162 163 def findProcedure = { 164 redirect(controller:"taskProcedureDetailed", action:"list", id:params.taskInstance.id) 165 } 166 116 167 } -
trunk/grails-app/views/entryDetailed/list.gsp
r98 r133 32 32 <g:sortableColumn property="enteredBy" title="Entered By" /> 33 33 34 <th>Edit</th> 35 36 <th>Show</th> 34 <th></th> 37 35 38 36 </tr> … … 40 38 <tbody> 41 39 <g:each in="${entryInstanceList}" status="i" var="entryInstance"> 42 <tr class="${(i % 2) == 0 ? ' odd' : 'even'}">43 40 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/show/${entryInstance.id}"'/> 41 44 42 <td>${fieldValue(bean:entryInstance, field:'id')}</td> 45 43 … … 52 50 <td>${fieldValue(bean:entryInstance, field:'enteredBy')}</td> 53 51 54 <td><g:link action="edit" id="${entryInstance.id}">Edit</g:link></td> 55 56 <td><g:link action="show" id="${entryInstance.id}">Show</g:link></td> 52 <td> 53 <g:link action="show" id="${entryInstance.id}"> 54 <img src="${createLinkTo(dir:'images/skin',file:'database_table.png')}" alt="Show" /> 55 </g:link> 56 </td> 57 57 58 58 </tr> -
trunk/grails-app/views/login/auth.gsp
r124 r133 56 56 <p> 57 57 <label for='j_username'>Login ID</label> 58 <input type='text' class='text_' name='j_username' id='j_username' value=' ${request.remoteUser}' />58 <input type='text' class='text_' name='j_username' id='j_username' value='admin' /> 59 59 </p> 60 60 <p> 61 61 <label for='j_password'>Password</label> 62 <input type='password' class='text_' name='j_password' id='j_password' />62 <input type='password' class='text_' name='j_password' id='j_password' value="pass"/> 63 63 </p> 64 64 -
trunk/grails-app/views/taskDetailed/show.gsp
r131 r133 16 16 <div class="message">${flash.message}</div> 17 17 </g:if> 18 18 <g:hasErrors bean="${taskProcedureInstance}"> 19 <div class="errors"> 20 <g:renderErrors bean="${taskProcedureInstance}" as="list" /> 21 </div> 22 </g:hasErrors> 19 23 20 24 <richui:tabView id="tabView"> 21 25 22 26 <richui:tabLabels> 23 <richui:tabLabel selected=" true" title="Task" />24 <richui:tabLabel title="Procedure" />25 <richui:tabLabel title="Recurrence" />26 <richui:tabLabel title="Inventory" />27 <richui:tabLabel title="Sub Tasks" />27 <richui:tabLabel selected="${showTaskTab}" title="Task #${taskInstance.id}" /> 28 <richui:tabLabel selected="${showProcedureTab}" title="Procedure" /> 29 <richui:tabLabel selected="${showRecurrenceTab}" title="Recurrence" /> 30 <richui:tabLabel selected="${showInventoryTab}" title="Inventory" /> 31 <richui:tabLabel selected="${showSubTasksTab}" title="Sub Tasks" /> 28 32 </richui:tabLabels> 29 33 … … 259 263 <!-- Start Task Procedure tab--> 260 264 <richui:tabContent> 261 262 <div class="list"> 263 <table> 264 <thead> 265 <tr> 266 <th>Step</th> 267 <th>Description</th> 268 <th></th> 269 </tr> 270 </thead> 271 <tbody> 272 <g:each in="${taskProcedureInstance?.maintenanceActions}" status="i" var="maintenanceAction"> 273 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/maintenanceActionDetailed/edit/${maintenanceAction.id}"'/> 274 275 <td valign="top" class="name"> 276 ${maintenanceAction?.procedureStepNumber} 277 </td> 278 279 <td valign="top" style="text-align:left;" class="value"> 280 ${maintenanceAction?.description} 281 </td> 282 283 </tr> 284 </g:each> 285 286 </tbody> 287 </table> 288 </div> 265 <g:if test="${!taskProcedureExits}"> 266 267 <g:form controller="taskDetailed" > 268 <input type="hidden" name="taskInstance.id" value="${taskInstance?.id}" /> 269 270 <div class="dialog"> 271 <table> 272 <tbody> 273 274 <tr class="prop"> 275 <td valign="top" class="name"> 276 <label for="name">Name:</label> 277 </td> 278 <td valign="top" class="value ${hasErrors(bean:taskProcedureInstance,field:'name','errors')}"> 279 <input type="text" maxlength="75" id="name" name="name" value="${fieldValue(bean:taskProcedureInstance,field:'name')}"/> 280 </td> 281 </tr> 282 283 <tr class="prop"> 284 <td valign="top" class="name"> 285 <label for="description">Description:</label> 286 </td> 287 <td valign="top" class="value ${hasErrors(bean:taskProcedureInstance,field:'description','errors')}"> 288 <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:taskProcedureInstance,field:'description')}"/> 289 </td> 290 </tr> 291 </tbody> 292 </table> 293 </div> 294 <div class="buttons"> 295 <span class="button"> 296 <g:actionSubmit value="New" action="generateProcedure" class="save"/> 297 </span> 298 <span class="button"> 299 <g:actionSubmit value="Find" action="findProcedure" class="save"/> 300 </span> 301 </div> 302 <!-- <div class="buttons"> 303 <span class="button"><input class="save" type="submit" value="Create Procedure" /></span> 304 <span class="button"><input class="save" type="submit" value="Find Procedure" /></span> 305 </div>--> 306 </g:form> 307 308 </g:if> 309 <g:else> 310 <div class="dialog"> 311 <table> 312 <tbody> 313 314 315 <tr class="prop"> 316 <td valign="top" class="name">Procedure Id:</td> 317 318 <td valign="top" class="value">${fieldValue(bean:taskProcedureInstance, field:'id')}</td> 319 320 </tr> 321 322 <tr class="prop"> 323 <td valign="top" class="name">Name:</td> 324 325 <td valign="top" class="value">${fieldValue(bean:taskProcedureInstance, field:'name')}</td> 326 327 </tr> 328 329 <tr class="prop"> 330 <td valign="top" class="name">Description:</td> 331 332 <td valign="top" class="value">${fieldValue(bean:taskProcedureInstance, field:'description')}</td> 333 334 </tr> 335 336 <tr class="prop"> 337 <td valign="top" class="name">Is Active:</td> 338 339 <td valign="top" class="value">${fieldValue(bean:taskProcedureInstance, field:'isActive')}</td> 340 341 </tr> 342 343 </tbody> 344 </table> 345 </div> 346 <div class="buttons"> 347 <g:form controller="taskProcedureDetailed"> 348 <input type="hidden" name="id" value="${taskProcedureInstance?.id}" /> 349 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 350 <!-- <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> --> 351 </g:form> 352 </div> 353 354 <div class="list"> 355 <table> 356 <thead> 357 <tr> 358 <th>Step</th> 359 <th>Description</th> 360 <th></th> 361 </tr> 362 </thead> 363 <tbody> 364 <g:each in="${taskProcedureInstance?.maintenanceActions}" status="i" var="maintenanceAction"> 365 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/maintenanceActionDetailed/edit/${maintenanceAction.id}"'/> 366 367 <td valign="top" class="name"> 368 ${maintenanceAction?.procedureStepNumber} 369 </td> 370 371 <td valign="top" style="text-align:left;" class="value"> 372 ${maintenanceAction?.description} 373 </td> 374 375 </tr> 376 </g:each> 377 378 </tbody> 379 </table> 380 </div> 381 382 </g:else> 289 383 290 384 </richui:tabContent> -
trunk/grails-app/views/taskProcedure/create.gsp
r131 r133 22 22 </div> 23 23 </g:hasErrors> 24 <g:form action="save" method="post" >24 <g:form controller="taskProcedureDetailed" action="save" method="post" > 25 25 <div class="dialog"> 26 26 <table>
Note: See TracChangeset
for help on using the changeset viewer.