Ignore:
Timestamp:
Jan 21, 2011, 3:19:01 PM (13 years ago)
Author:
gav
Message:

New task type 'Parent PM', display these tasks as 'Life Plan' in asset views.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/assetDetailed/show.gsp

    r704 r749  
    110110                           
    111111                            <tr class="prop">
    112                                 <td valign="top" class="groupHeader">Maintenance Actions</td>
     112                                <td valign="top" class="groupHeader">Life Plan</td>
    113113                               
    114114                                <td  valign="top" style="text-align:left;" class="value">
     
    117117                            </tr>
    118118
    119                            
    120                             <g:each var="m" in="${assetInstance.maintenanceActions}">
     119                            <g:each var="t" in="${parentPMs}">
    121120                                <tr class="prop">
    122121                                    <td valign="top" class="name"></td>
    123122                                   
    124123                                    <td  valign="top" style="text-align:left;" class="value">
    125                                         <g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">
    126                                             ${m?.encodeAsHTML()}
     124                                        <g:link controller="taskDetailed" action="show" id="${t.id}">
     125                                            Task #${t.id}
    127126                                        </g:link>
     127                                        <g:if test="${t.approved}" >
     128                                            <img  src="${resource(dir:'images/skin',file:'cog.png')}" alt="Approved" title="Approved" />
     129                                        </g:if>
     130                                        <g:if test="${t.taskRecurringSchedule?.enabled}" >
     131                                            <img  src="${resource(dir:'images/skin',file:'arrow_refresh.png')}" alt="Recurrence Enabled" title="Recurrence Enabled" />
     132                                        </g:if>
     133                                        <g:if test="${t.taskStatus.id == 2}" >
     134                                            <img  src="${resource(dir:'images/skin',file:'arrow_right.png')}" alt="In Progress" title="In Progress" />
     135                                        </g:if>
     136                                        <g:if test="${t.attentionFlag}" >
     137                                            <img  src="${resource(dir:'images/skin',file:'flag_red.png')}" alt="Attention Flag" title="Attention Flag" />
     138                                        </g:if>
     139                                        <g:if test="${t.taskStatus.id == 3}" >
     140                                            <img  src="${resource(dir:'images/skin',file:'tick.png')}" alt="Complete" title="Complete" />
     141                                        </g:if>
     142                                        <br />
     143                                        ${fieldValue(bean:t, field:'description')}
     144                                        <br />
     145                                        <g:if test="${t.safetyRequirement}" >
     146                                            <img  src="${resource(dir:'images/skin',file:'lightning.png')}" alt="Safety Requirement" title="Safety Requirement" />
     147                                            Safety
     148                                        </g:if>
     149                                        <g:if test="${t.regulatoryRequirement}" >
     150                                            <img  src="${resource(dir:'images/skin',file:'script_lightning.png')}" alt="Regulatory Requirement" title="Regulatory Requirement" />
     151                                            Regulatory
     152                                        </g:if>
     153                                        <g:if test="${t.mandatoryRequirement}" >
     154                                            <img  src="${resource(dir:'images/skin',file:'script.png')}" alt="Mandatory Requirement" title="Mandatory Requirement" />
     155                                            Mandatory
     156                                        </g:if>
    128157                                    </td>
    129158                                   
Note: See TracChangeset for help on using the changeset viewer.