Changeset 225 for trunk/grails-app/views/inventoryItemDetailed
- Timestamp:
- Dec 8, 2009, 4:03:29 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/views/inventoryItemDetailed/show.gsp
r182 r225 7 7 <title>Show InventoryItem</title> 8 8 <nav:resources override="true"/> 9 <resource:tabView skin="tabviewCustom" /> 9 10 <g:render template="/shared/pictureHead" /> 10 11 </head> … … 14 15 </div> 15 16 <div class="body"> 17 <g:hasErrors bean="${inventoryMovementInstance}"> 18 <div class="errors"> 19 <g:renderErrors bean="${inventoryMovementInstance}" as="list" /> 20 </div> 21 </g:hasErrors> 16 22 <g:if test="${flash.message}"> 17 <div class="message">${flash.message}</div>23 <div class="message">${flash.message}</div> 18 24 </g:if> 19 <div class="dialog"> 20 <table> 21 <tbody> 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> 38 39 <tr class="prop"> 40 <td valign="top" class="name">Id:</td> 41 42 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'id')}</td> 43 44 </tr> 45 46 <tr class="prop"> 47 <td valign="top" class="name">Name:</td> 48 49 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'name')}</td> 50 51 </tr> 52 53 <tr class="prop"> 54 <td valign="top" class="name">Description:</td> 55 56 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'description')}</td> 57 58 </tr> 59 60 <tr class="prop"> 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> 80 81 <tr class="prop"> 82 <td valign="top" class="name">Reorder Point:</td> 83 84 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'reorderPoint')}</td> 85 86 </tr> 87 88 <tr class="prop"> 89 <td valign="top" class="name">Enable Reorder:</td> 90 91 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'enableReorder')}</td> 92 93 </tr> 94 95 <tr class="prop"> 96 <td valign="top" class="name">Recommended Reorder Point:</td> 97 98 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'recommendedReorderPoint')}</td> 99 100 </tr> 101 102 <tr class="prop"> 103 <td valign="top" class="name">Active:</td> 104 105 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isActive')}</td> 106 107 </tr> 108 109 <tr class="prop"> 110 <td valign="top" class="name">Obsolete:</td> 111 112 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isObsolete')}</td> 113 114 </tr> 115 116 <tr class="prop"> 117 <td valign="top" class="name">Inventory Group:</td> 118 119 <td valign="top" class="value">${inventoryItemInstance?.inventoryGroup?.encodeAsHTML()}</td> 120 121 </tr> 122 123 124 <tr class="prop"> 125 <td valign="top" class="name">Inventory Type:</td> 126 127 <td valign="top" class="value">${inventoryItemInstance?.inventoryType?.encodeAsHTML()}</td> 128 129 </tr> 130 131 <tr class="prop"> 132 <td valign="top" class="name">Manufacturers Part Number:</td> 133 134 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'manufacturersPartNumber')}</td> 135 136 </tr> 137 138 <tr class="prop"> 139 <td valign="top" class="name">Suppliers Part Number:</td> 140 141 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'suppliersPartNumber')}</td> 142 143 </tr> 144 145 <tr class="prop"> 146 <td valign="top" class="name">Recommended Reorder Point:</td> 147 148 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'recommendedReorderPoint')}</td> 149 150 </tr> 151 152 <tr class="prop"> 153 <td valign="top" class="name">Average Delivery Time:</td> 154 155 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryTime')}</td> 156 157 </tr> 158 159 <tr class="prop"> 160 <td valign="top" class="name">Alternate Items:</td> 161 162 <td valign="top" style="text-align:left;" class="value"> 163 <ul> 164 <g:each var="a" in="${inventoryItemInstance.alternateItems}"> 165 <li><g:link controller="inventoryItemDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 166 </g:each> 167 </ul> 168 </td> 169 170 </tr> 171 172 <tr class="prop"> 173 <td valign="top" class="name">Inventory Movements:</td> 174 175 <td valign="top" style="text-align:left;" class="value"> 176 <ul> 177 <g:each var="i" in="${inventoryItemInstance.inventoryMovements}"> 178 <li><g:link controller="inventoryMovementDetailed" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li> 179 </g:each> 180 </ul> 181 </td> 182 183 </tr> 184 185 <tr class="prop"> 186 <td valign="top" class="name">Manufacturers:</td> 187 188 <td valign="top" style="text-align:left;" class="value"> 189 <ul> 190 <g:each var="m" in="${inventoryItemInstance.manufacturers}"> 191 <li><g:link controller="manufacturerDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 192 </g:each> 193 </ul> 194 </td> 195 196 </tr> 197 198 <tr class="prop"> 199 <td valign="top" class="name">Spare For:</td> 200 201 <td valign="top" style="text-align:left;" class="value"> 202 <ul> 203 <g:each var="s" in="${inventoryItemInstance.spareFor}"> 204 <li><g:link controller="assetDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> 205 </g:each> 206 </ul> 207 </td> 208 209 </tr> 210 211 <tr class="prop"> 212 <td valign="top" class="name">Suppliers:</td> 213 214 <td valign="top" style="text-align:left;" class="value"> 215 <ul> 216 <g:each var="s" in="${inventoryItemInstance.suppliers}"> 217 <li><g:link controller="supplierDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> 218 </g:each> 219 </ul> 220 </td> 221 222 </tr> 223 224 </tbody> 225 </table> 25 26 <g:hasErrors bean="${inventoryItemInstance}"> 27 <div class="errors"> 28 <g:renderErrors bean="${inventoryItemInstance}" as="list" /> 226 29 </div> 227 <div class="buttons"> 228 <g:form> 229 <input type="hidden" name="id" value="${inventoryItemInstance?.id}" /> 230 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 231 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> 232 </g:form> 233 </div> 30 </g:hasErrors> 31 32 <richui:tabView id="tabView"> 33 34 <richui:tabLabels> 35 <richui:tabLabel selected="${showTab.inventory}" title="Inventory Item" /> 36 <richui:tabLabel selected="${showTab.detail}" title="Detail" /> 37 <richui:tabLabel selected="${showTab.movement}" title="Movement" /> 38 </richui:tabLabels> 39 40 <richui:tabContents> 41 42 <!-- Start Inventory tab --> 43 <richui:tabContent> 44 45 <g:if test="${inventoryMovementInstance}" > 46 47 <g:form controller="inventoryItemDetailed" method="post" > 48 <div class="dialog"> 49 <table> 50 <tbody> 51 <g:hiddenField name="task.id" value="${inventoryMovementInstance.task.id}"/> 52 <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}"/> 53 <tr class="prop"> 54 <td valign="top" class="name">Use on task:</td> 55 <td valign="top" class="value"> 56 <g:link controller="taskDetailed" action="show" id="${inventoryMovementInstance.task.id}" > 57 ${Task.get(inventoryMovementInstance.task.id).encodeAsHTML()} 58 </g:link> 59 </td> 60 </tr> 61 62 <tr class="prop"> 63 <td valign="top" class="name"> 64 <label for="quantity">Quantity:</label> 65 </td> 66 <td valign="top"> 67 <input class="medium ${hasErrors(bean:inventoryMovementInstance,field:'quantity','errors')}" 68 type="text" id="quantity" name="quantity" 69 value="${fieldValue(bean:inventoryMovementInstance,field:'quantity')}"/> 70 ${inventoryItemInstance.unitOfMeasure?.encodeAsHTML()} 71 72 <span class="buttons"> 73 <g:actionSubmit action="useInventoryItem" class="save" value="${InventoryMovementType.get(1)}" /> 74 </span> 75 76 </td> 77 </tr> 78 79 </tbody> 80 </table> 81 </div> 82 </g:form> 83 84 <br /> 85 86 </g:if> 87 88 <div class="dialog"> 89 <table> 90 <tbody> 91 92 <tr class="prop"> 93 <td valign="top" class="name">Picture:</td> 94 <td valign="top" class="value"> 95 <g:if test="${inventoryItemInstance.picture}" > 96 <span class='gallery'><wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" size="${Image.Medium}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" /></span> 97 </g:if> 98 <g:else> 99 <g:link controller="pictureDetailed" 100 params="['inventoryItem.id':inventoryItemInstance.id]" 101 action="create"> 102 Add Picture 103 </g:link> 104 </g:else> 105 </td> 106 </tr> 107 108 <tr class="prop"> 109 <td valign="top" class="name">Name:</td> 110 111 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'name')}</td> 112 </tr> 113 114 <tr class="prop"> 115 <td valign="top" class="name">Description:</td> 116 117 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'description')}</td> 118 </tr> 119 120 <tr class="prop"> 121 <td valign="top" class="name">In Stock:</td> 122 123 <td valign="top" class="value"> 124 ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')} ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} 125 </td> 126 </tr> 127 128 <tr class="prop"> 129 <td valign="top" class="name">Location:</td> 130 131 <td valign="top" class="value"> 132 <g:link controller="inventoryLocationDetailed" action="show" id="${inventoryItemInstance.inventoryLocation?.id}"> 133 ${inventoryItemInstance.inventoryLocation?.encodeAsHTML()} 134 </g:link> 135 in ${inventoryItemInstance.inventoryLocation?.inventoryStore.encodeAsHTML()} 136 </td> 137 </tr> 138 139 <tr class="prop"> 140 <td valign="top" class="name">Active:</td> 141 142 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isActive')}</td> 143 </tr> 144 145 <tr class="prop"> 146 <td valign="top" class="name">Alternate Items:</td> 147 148 <td valign="top" style="text-align:left;" class="value"> 149 <ul> 150 <g:each var="a" in="${inventoryItemInstance.alternateItems}"> 151 <li><g:link controller="inventoryItemDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 152 </g:each> 153 </ul> 154 </td> 155 </tr> 156 157 <tr class="prop"> 158 <td valign="top" class="name">Spare For:</td> 159 160 <td valign="top" style="text-align:left;" class="value"> 161 <ul> 162 <g:each var="s" in="${inventoryItemInstance.spareFor}"> 163 <li><g:link controller="assetDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> 164 </g:each> 165 </ul> 166 </td> 167 </tr> 168 169 </tbody> 170 </table> 171 </div> 172 <div class="buttons"> 173 <g:form> 174 <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> 175 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 176 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> 177 </g:form> 178 </div> 179 180 <br /> 181 182 </richui:tabContent> 183 <!-- End Inventory tab --> 184 185 <!-- Start Detail tab --> 186 <richui:tabContent> 187 188 <div class="dialog"> 189 <table> 190 <tbody> 191 192 <tr class="prop"> 193 <td valign="top" class="name">Id:</td> 194 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'id')}</td> 195 </tr> 196 197 <tr class="prop"> 198 <td valign="top" class="name">Obsolete:</td> 199 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isObsolete')}</td> 200 </tr> 201 202 <tr class="prop"> 203 <td valign="top" class="name">Inventory Group:</td> 204 <td valign="top" class="value">${inventoryItemInstance.inventoryGroup?.encodeAsHTML()}</td> 205 </tr> 206 207 <tr class="prop"> 208 <td valign="top" class="name">Inventory Type:</td> 209 <td valign="top" class="value">${inventoryItemInstance.inventoryType?.encodeAsHTML()}</td> 210 </tr> 211 212 <tr class="prop"> 213 <td valign="top" class="name">Reorder Point:</td> 214 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'reorderPoint')}</td> 215 </tr> 216 217 <tr class="prop"> 218 <td valign="top" class="name">Enable Reorder:</td> 219 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'enableReorder')}</td> 220 </tr> 221 222 <tr class="prop"> 223 <td valign="top" class="name">Recommended Reorder Point:</td> 224 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'recommendedReorderPoint')}</td> 225 </tr> 226 227 <tr class="prop"> 228 <td valign="top" class="name">Suppliers Part Number:</td> 229 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'suppliersPartNumber')}</td> 230 </tr> 231 232 <tr class="prop"> 233 <td valign="top" class="name">Suppliers:</td> 234 235 <td valign="top" style="text-align:left;" class="value"> 236 <ul> 237 <g:each var="s" in="${inventoryItemInstance.suppliers}"> 238 <li><g:link controller="supplierDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> 239 </g:each> 240 </ul> 241 </td> 242 </tr> 243 244 <tr class="prop"> 245 <td valign="top" class="name">Average Delivery Time:</td> 246 <td valign="top" class="value"> 247 ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryTime')} 248 ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryPeriod')} 249 </td> 250 </tr> 251 252 <tr class="prop"> 253 <td valign="top" class="name">Manufacturers Part Number:</td> 254 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'manufacturersPartNumber')}</td> 255 </tr> 256 257 <tr class="prop"> 258 <td valign="top" class="name">Manufacturers:</td> 259 260 <td valign="top" style="text-align:left;" class="value"> 261 <ul> 262 <g:each var="m" in="${inventoryItemInstance.manufacturers}"> 263 <li><g:link controller="manufacturerDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 264 </g:each> 265 </ul> 266 </td> 267 </tr> 268 269 270 </tbody> 271 </table> 272 </div> 273 <div class="buttons"> 274 <g:form> 275 <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> 276 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 277 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> 278 </g:form> 279 </div> 280 </richui:tabContent> 281 <!-- End Detail tab --> 282 283 <!-- Start Movement tab --> 284 <richui:tabContent> 285 286 <g:if test="${inventoryMovementList.isEmpty()}"> 287 <br /> 288 No Inventory Movements. 289 <br /> 290 <br /> 291 292 <div class="buttons"> 293 <g:form controller="inventoryMovementDetailed"> 294 <g:hiddenField name="id" value="${inventoryItemInstance?.id}" /> 295 <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> 296 </g:form> 297 </div> 298 299 </g:if> 300 <g:else> 301 302 <div class="list"> 303 <table> 304 <thead> 305 <tr> 306 <th>Quantity</th> 307 <th>Movement Type</th> 308 <th>Date</th> 309 <th>Person</th> 310 <th></th> 311 </tr> 312 </thead> 313 <tbody> 314 <g:each in="${inventoryMovementList}" status="i" var="movements"> 315 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'/> 316 317 <td>${fieldValue(bean:movements, field:'quantity')}</td> 318 <td>${fieldValue(bean:movements, field:'inventoryMovementType')}</td> 319 <td><g:formatDate date="${movements.date}" format="EEE, dd-MMM-yyyy"/></td> 320 <td>${fieldValue(bean:movements, field:'person')}</td> 321 <td> 322 <g:link controller="inventoryMovementDetailed" action="show" id="${movements.id}"> 323 <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> 324 </g:link> 325 </td> 326 327 </tr> 328 </g:each> 329 </tbody> 330 </table> 331 </div> 332 333 <div class="buttons"> 334 <g:form controller="inventoryMovementDetailed"> 335 <g:hiddenField name="id" value="${inventoryItemInstance?.id}" /> 336 <g:if test="${inventoryMovementListTotal > inventoryMovementListMax}"> 337 Showing ${inventoryMovementListMax} of ${inventoryMovementListTotal} 338 <br /> 339 </g:if> 340 <g:else> 341 Total ${inventoryMovementListTotal} 342 <br /> 343 </g:else> 344 <span class="button"><g:actionSubmit action="listInventoryMovements" class="table" value="List" /></span> 345 <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> 346 </g:form> 347 </div> 348 349 </g:else> 350 351 </richui:tabContent> 352 <!-- End Movement tab --> 353 354 </richui:tabContents> 355 </richui:tabView> 356 357 234 358 </div> 235 359 </body>
Note: See TracChangeset
for help on using the changeset viewer.