source: trunk/grails-app/views/assetType/edit.gsp @ 118

Last change on this file since 118 was 118, checked in by gav, 15 years ago

First commit of Asset domain, including domain-classes, controllers, views and bootstrap.

File size: 6.0 KB
Line 
1
2
3<html>
4    <head>
5        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6        <meta name="layout" content="main" />
7        <title>Edit AssetType</title>
8    </head>
9    <body>
10        <div class="nav">
11            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
12            <span class="menuButton"><g:link class="list" action="list">AssetType List</g:link></span>
13            <span class="menuButton"><g:link class="create" action="create">New AssetType</g:link></span>
14        </div>
15        <div class="body">
16            <h1>Edit AssetType</h1>
17            <g:if test="${flash.message}">
18            <div class="message">${flash.message}</div>
19            </g:if>
20            <g:hasErrors bean="${assetTypeInstance}">
21            <div class="errors">
22                <g:renderErrors bean="${assetTypeInstance}" as="list" />
23            </div>
24            </g:hasErrors>
25            <g:form method="post" >
26                <input type="hidden" name="id" value="${assetTypeInstance?.id}" />
27                <input type="hidden" name="version" value="${assetTypeInstance?.version}" />
28                <div class="dialog">
29                    <table>
30                        <tbody>
31                       
32                            <tr class="prop">
33                                <td valign="top" class="name">
34                                    <label for="assemblies">Assemblies:</label>
35                                </td>
36                                <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'assemblies','errors')}">
37                                    <g:select name="assemblies"
38from="${Assembly.list()}"
39size="5" multiple="yes" optionKey="id"
40value="${assetTypeInstance?.assemblies}" />
41
42                                </td>
43                            </tr>
44                       
45                            <tr class="prop">
46                                <td valign="top" class="name">
47                                    <label for="assets">Assets:</label>
48                                </td>
49                                <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'assets','errors')}">
50                                   
51<ul>
52<g:each var="a" in="${assetTypeInstance?.assets?}">
53    <li><g:link controller="asset" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
54</g:each>
55</ul>
56<g:link controller="asset" params="['assetType.id':assetTypeInstance?.id]" action="create">Add Asset</g:link>
57
58                                </td>
59                            </tr>
60                       
61                            <tr class="prop">
62                                <td valign="top" class="name">
63                                    <label for="description">Description:</label>
64                                </td>
65                                <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'description','errors')}">
66                                    <input type="text" id="description" name="description" value="${fieldValue(bean:assetTypeInstance,field:'description')}"/>
67                                </td>
68                            </tr>
69                       
70                            <tr class="prop">
71                                <td valign="top" class="name">
72                                    <label for="isActive">Is Active:</label>
73                                </td>
74                                <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'isActive','errors')}">
75                                    <g:checkBox name="isActive" value="${assetTypeInstance?.isActive}" ></g:checkBox>
76                                </td>
77                            </tr>
78                       
79                            <tr class="prop">
80                                <td valign="top" class="name">
81                                    <label for="lifeplan">Lifeplan:</label>
82                                </td>
83                                <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'lifeplan','errors')}">
84                                    <g:select optionKey="id" from="${LifePlan.list()}" name="lifeplan.id" value="${assetTypeInstance?.lifeplan?.id}" ></g:select>
85                                </td>
86                            </tr>
87                       
88                            <tr class="prop">
89                                <td valign="top" class="name">
90                                    <label for="name">Name:</label>
91                                </td>
92                                <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'name','errors')}">
93                                    <input type="text" id="name" name="name" value="${fieldValue(bean:assetTypeInstance,field:'name')}"/>
94                                </td>
95                            </tr>
96                       
97                            <tr class="prop">
98                                <td valign="top" class="name">
99                                    <label for="systemSection">System Section:</label>
100                                </td>
101                                <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'systemSection','errors')}">
102                                    <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${assetTypeInstance?.systemSection?.id}" ></g:select>
103                                </td>
104                            </tr>
105                       
106                        </tbody>
107                    </table>
108                </div>
109                <div class="buttons">
110                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
111                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
112                </div>
113            </g:form>
114        </div>
115    </body>
116</html>
Note: See TracBrowser for help on using the repository browser.