Changeset 182 for trunk/grails-app/views


Ignore:
Timestamp:
Nov 10, 2009, 1:26:53 PM (14 years ago)
Author:
gav
Message:

Add support for inventory item Pictures and Images.
Add new PersonService, refactor CreateDataService and TaskService to suite.

Location:
trunk/grails-app/views
Files:
8 added
8 edited

Legend:

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

    r151 r182  
    5151                            <td>
    5252                                <g:link action="show" id="${assetInstance.id}">
    53                                     <img  src="${resource(dir:'images/skin',file:'database_table.png')}" alt="Show" />
     53                                    <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
    5454                                </g:link>
    5555                            </td>
  • trunk/grails-app/views/assetDetailed/search.gsp

    r156 r182  
    6464                            <td>
    6565                                <g:link action="show" id="${assetInstance.id}">
    66                                     <img  src="${resource(dir:'images/skin',file:'database_table.png')}" alt="Show" />
     66                                    <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
    6767                                </g:link>
    6868                            </td>
  • trunk/grails-app/views/inventoryItemDetailed/create.gsp

    r175 r182  
    4343                                </td>
    4444                            </tr>
    45 
     45                       
    4646                            <tr class="prop">
    4747                                <td valign="top" class="name">
    48                                     <label for="unitsInStock">In Stock:</label>
     48                                    <label for="inventoryLocation">Inventory Location:</label>
    4949                                </td>
    50                                 <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'unitsInStock','errors')}">
    51                                     <input type="text" id="unitsInStock" name="unitsInStock" value="${fieldValue(bean:inventoryItemInstance,field:'unitsInStock')}" />
    52                                     <g:select optionKey="id" from="${UnitOfMeasure.list()}" name="unitOfMeasure.id" value="${inventoryItemInstance?.unitOfMeasure?.id}" ></g:select>
     50                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryLocation','errors')}">
     51                                    <g:select optionKey="id" from="${InventoryLocation.list()}" name="inventoryLocation.id" value="${inventoryItemInstance?.inventoryLocation?.id}" ></g:select>
    5352                                </td>
    5453                            </tr>
     
    6059                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}">
    6160                                    <input type="text" id="reorderPoint" name="reorderPoint" value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" />
     61                                    <g:select optionKey="id" from="${UnitOfMeasure.list()}" name="unitOfMeasure.id" value="${inventoryItemInstance?.unitOfMeasure?.id}" ></g:select>
    6262                                </td>
    6363                            </tr>
     
    7171                                </td>
    7272                            </tr>
    73                        
    74                             <tr class="prop">
    75                                 <td valign="top" class="name">
    76                                     <label for="recommendedReorderPoint">Recommended Reorder Point:</label>
    77                                 </td>
    78                                 <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'recommendedReorderPoint','errors')}">
    79                                     <input type="text" id="recommendedReorderPoint" name="recommendedReorderPoint" value="${fieldValue(bean:inventoryItemInstance,field:'recommendedReorderPoint')}" />
    80                                 </td>
    81                             </tr>
    82                        
    83                             <tr class="prop">
    84                                 <td valign="top" class="name">
    85                                     <label for="isActive">Active:</label>
    86                                 </td>
    87                                 <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isActive','errors')}">
    88                                     <g:checkBox name="isActive" value="${inventoryItemInstance?.isActive}" ></g:checkBox>
    89                                 </td>
    90                             </tr>
    91                        
    92                             <tr class="prop">
    93                                 <td valign="top" class="name">
    94                                     <label for="isObsolete">Obsolete:</label>
    95                                 </td>
    96                                 <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isObsolete','errors')}">
    97                                     <g:checkBox name="isObsolete" value="${inventoryItemInstance?.isObsolete}" ></g:checkBox>
    98                                 </td>
    99                             </tr>
    10073                       
    10174                            <tr class="prop">
     
    171144                            </tr>
    172145                       
    173                             <tr class="prop">
    174                                 <td valign="top" class="name">
    175                                     <label for="inventoryLocation">Inventory Location:</label>
    176                                 </td>
    177                                 <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryLocation','errors')}">
    178                                     <g:select optionKey="id" from="${InventoryLocation.list()}" name="inventoryLocation.id" value="${inventoryItemInstance?.inventoryLocation?.id}" ></g:select>
    179                                 </td>
    180                             </tr>
    181                        
    182146                        </tbody>
    183147                    </table>
  • trunk/grails-app/views/inventoryItemDetailed/edit.gsp

    r175 r182  
    77        <title>Edit InventoryItem</title>
    88        <nav:resources override="true"/>
     9        <g:render template="/shared/pictureHead" />
    910    </head>
    1011    <body>
     
    2728                    <table>
    2829                        <tbody>
     30                   
     31                            <tr class="prop">
     32                                <td valign="top" class="name">Picture:</td>
     33                                <td valign="top" class="value">
     34                                    <g:if test="${inventoryItemInstance.picture}" >
     35                                        <span class='gallery'>
     36                                            <wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" size="${Image.Medium}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" />
     37                                        </span>
     38                                        <br />
     39                                        <g:link controller="pictureDetailed" action="edit" id="${inventoryItemInstance.picture.id}" >
     40                                            Edit Picture
     41                                        </g:link>
     42                                    </g:if>
     43                                </td>
     44                            </tr>
    2945                       
    3046                            <tr class="prop">
     
    5066                                    <label for="unitsInStock">Units In Stock:</label>
    5167                                </td>
    52                                 <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'unitsInStock','errors')}">
    53                                     <input type="text" id="unitsInStock" name="unitsInStock" value="${fieldValue(bean:inventoryItemInstance,field:'unitsInStock')}" />
    54                                     <g:select optionKey="id" from="${UnitOfMeasure.list()}" name="unitOfMeasure.id" value="${inventoryItemInstance?.unitOfMeasure?.id}" ></g:select>
     68                                <td valign="top" class="value">
     69                                    ${inventoryItemInstance.unitsInStock} ${inventoryItemInstance.unitOfMeasure}
    5570                                </td>
    5671                            </tr>
  • trunk/grails-app/views/inventoryItemDetailed/list.gsp

    r175 r182  
    5252                            <td>
    5353                                <g:link action="show" id="${inventoryItemInstance.id}">
    54                                     <img  src="${resource(dir:'images/skin',file:'database_table.png')}" alt="Show" />
     54                                    <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
    5555                                </g:link>
    5656                            </td>
  • trunk/grails-app/views/inventoryItemDetailed/search.gsp

    r178 r182  
    77        <title>InventoryItem Search</title>
    88        <nav:resources override="true"/>
     9        <g:render template="/shared/pictureHead" />
    910        <filterpane:includes />
    1011    </head>
     
    3334                    <thead>
    3435                        <tr>
    35                        
    36                                 <g:sortableColumn property="id" title="Id" params="${filterParams}" />
     36
     37                            <th>Picture</th>
    3738                       
    3839                                <g:sortableColumn property="name" title="Name" params="${filterParams}" />
     
    5051                    <tbody>
    5152                    <g:each in="${inventoryItemInstanceList}" status="i" var="inventoryItemInstance">
    52                         <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"'/>
     53                        <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" />
     54
     55                            <td class='gallery'>
     56                                <g:if test="${inventoryItemInstance.picture}" >
     57                                    <wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}"
     58                                                                                        size="${Image.Small}"
     59                                                                                        lightboxSize="${Image.Large}"
     60                                                                                        target="_blank"
     61                                                                                        title="Show Original" />
     62                                </g:if>
     63                            </td>
    5364                       
    54                             <td>${fieldValue(bean:inventoryItemInstance, field:'id')}</td>
     65                            <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' >
     66                                ${fieldValue(bean:inventoryItemInstance, field:'name')}
     67                            </td>
    5568                       
    56                             <td>${fieldValue(bean:inventoryItemInstance, field:'name')}</td>
     69                            <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' >
     70                                ${fieldValue(bean:inventoryItemInstance, field:'description')}
     71                            </td>
    5772                       
    58                             <td>${fieldValue(bean:inventoryItemInstance, field:'description')}</td>
     73                            <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' >
     74                                ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')}
     75                            </td>
    5976                       
    60                             <td>${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')}</td>
    61                        
    62                             <td>${fieldValue(bean:inventoryItemInstance, field:'unitOfMeasure')}</td>
     77                            <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' >
     78                                ${fieldValue(bean:inventoryItemInstance, field:'unitOfMeasure')}
     79                            </td>
    6380
    6481                            <td>
    6582                                <g:link action="show" id="${inventoryItemInstance.id}">
    66                                     <img  src="${resource(dir:'images/skin',file:'database_table.png')}" alt="Show" />
     83                                    <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
    6784                                </g:link>
    6885                            </td>
  • trunk/grails-app/views/inventoryItemDetailed/show.gsp

    r175 r182  
    77        <title>Show InventoryItem</title>
    88        <nav:resources override="true"/>
     9        <g:render template="/shared/pictureHead" />
    910    </head>
    1011    <body>
     
    1920                <table>
    2021                    <tbody>
    21 
     22                   
     23                        <tr class="prop">
     24                            <td valign="top" class="name">Picture:</td>
     25                            <td valign="top" class="value">
     26                                <g:if test="${inventoryItemInstance.picture}" >
     27                                    <span class='gallery'><wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" size="${Image.Medium}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" /></span>
     28                                </g:if>
     29                                <g:else>
     30                                    <g:link controller="pictureDetailed"
     31                                                    params="['inventoryItem.id':inventoryItemInstance?.id]"
     32                                                    action="create">
     33                                        Add Picture
     34                                    </g:link>
     35                                </g:else>
     36                            </td>
     37                        </tr>
    2238                   
    2339                        <tr class="prop">
     
    4359                       
    4460                        <tr class="prop">
    45                             <td valign="top" class="name">Units In Stock:</td>
    46                            
    47                             <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')}</td>
    48                            
    49                         </tr>
    50                    
    51                         <tr class="prop">
    52                             <td valign="top" class="name">Unit Of Measure:</td>
    53                            
    54                             <td valign="top" class="value">${inventoryItemInstance?.unitOfMeasure?.encodeAsHTML()}</td>
    55                            
    56                         </tr>
    57 
     61                            <td valign="top" class="name">Location:</td>
     62                           
     63                            <td valign="top" class="value">
     64                                <g:link controller="inventoryLocationDetailed" action="show" id="${inventoryItemInstance?.inventoryLocation?.id}">
     65                                    ${inventoryItemInstance?.inventoryLocation?.encodeAsHTML()}
     66                                </g:link>
     67                                    in ${inventoryItemInstance?.inventoryLocation?.inventoryStore.encodeAsHTML()}
     68                            </td>
     69                           
     70                        </tr>
     71                       
     72                        <tr class="prop">
     73                            <td valign="top" class="name">In Stock:</td>
     74                           
     75                            <td valign="top" class="value">
     76                                ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')} ${inventoryItemInstance?.unitOfMeasure?.encodeAsHTML()}
     77                            </td>
     78                           
     79                        </tr>
    5880                   
    5981                        <tr class="prop">
     
    184206                                </ul>
    185207                            </td>
    186                            
    187                         </tr>
    188                        
    189                         <tr class="prop">
    190                             <td valign="top" class="name">Inventory Location:</td>
    191                            
    192                             <td valign="top" class="value"><g:link controller="inventoryLocationDetailed" action="show" id="${inventoryItemInstance?.inventoryLocation?.id}">${inventoryItemInstance?.inventoryLocation?.encodeAsHTML()}</g:link></td>
    193208                           
    194209                        </tr>
  • trunk/grails-app/views/layouts/main.gsp

    r151 r182  
    99        <nav:resources override="true"/>
    1010        <g:javascript library="application" />
     11        <g:javascript library="prototype/effects" />
    1112    </head>
    1213
Note: See TracChangeset for help on using the changeset viewer.