Changeset 799


Ignore:
Timestamp:
Feb 9, 2011, 6:11:00 PM (13 years ago)
Author:
gav
Message:

Change Task.toString() and display primaryAsset.name in front of description.

Location:
trunk/grails-app
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/Task.groovy

    r728 r799  
    6161    }
    6262
    63     String toString() {"${this.id} - ${this.description}"}
     63    String toString() {
     64        def s = "#${this.id} - "
     65        if(this.primaryAsset)
     66            s += "${primaryAsset.name}: "
     67        s += "${this.description}"
     68    }
     69
    6470}
  • trunk/grails-app/views/taskDetailed/search.gsp

    r736 r799  
    145145
    146146                                    <b>
     147                                    <g:if test="${taskInstance.primaryAsset}">
     148                                        ${fieldValue(bean:taskInstance, field:'primaryAsset')}:
     149                                    </g:if>
    147150                                    ${fieldValue(bean:taskInstance, field:'description')}
    148151                                    </b>
     
    164167                                    <br />
    165168                                    <br />
    166                                     <g:if test="${taskInstance.primaryAsset}">
    167                                         ${fieldValue(bean:taskInstance, field:'primaryAsset')}<br />
    168                                     </g:if>
    169169                                    <g:each in="${taskInstance.assignedGroups}" status="j" var="assignedGroup">
    170170                                        ${assignedGroup.encodeAsHTML()}<br />
  • trunk/grails-app/views/taskDetailed/show.gsp

    r798 r799  
    4444                    </g:if>
    4545                </h1>
     46                <g:if test="${taskInstance.primaryAsset}" >
     47                    ${fieldValue(bean:taskInstance, field:'primaryAsset')}:
     48                </g:if>
    4649                ${fieldValue(bean:taskInstance, field:'description')}
    4750                <g:if test="${taskInstance.safetyRequirement}" >
Note: See TracChangeset for help on using the changeset viewer.