Ignore:
Timestamp:
Feb 21, 2011, 8:57:41 PM (8 years ago)
Author:
gav
Message:

Display the machines assigned to a tasks procedure, on both the task show and asset life plan views.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/CustomTagLib.groovy

    r808 r817  
    278278
    279279    /**
     280    * Get a list of the machines assigned on a taskProcedureRevision.
     281    *
     282    * Fields:
     283    *  taskProcedureRevision - TaskProcedureRevision to use.
     284    *
     285    * Example:
     286    * <!--
     287    * <custom:taskProcedureMachines taskProcedureRevision="${taskInstance.taskProcedureRevision}" />
     288    * -->
     289    */
     290    def taskProcedureMachines = {attrs ->
     291        def taskProcedureRevision = attrs.taskProcedureRevision
     292        def machines = taskProcedureRevision.maintenanceActions.collect {it.assetSubItem.parentItem}.unique()
     293        out << machines.encodeAsHTML()
     294    }
     295
     296    /**
    280297    * Determine if a supplied string is considered a url or not.
    281298    * The scheme/protocol can be adjusted, file:// has been excluded here.
Note: See TracChangeset for help on using the changeset viewer.