edit.gsp 4.37 KB
Newer Older
Jesper Zedlitz's avatar
Jesper Zedlitz committed
1
<%@ page import="net.genealogy.des.PageStatus; net.genealogy.des.Page" %>
J.Voelker's avatar
J.Voelker committed
2
<html>
Jesper Zedlitz's avatar
Jesper Zedlitz committed
3 4 5 6 7 8
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'page.label', default: 'Page')}"/>
    <title><g:message code="default.edit.label" args="[entityName]"/></title>
</head>
9

Jesper Zedlitz's avatar
Jesper Zedlitz committed
10 11 12 13 14 15 16
<body>
<div class="nav">
    <span class="menuButton"><g:link class="home" controller="admin"><g:message
            code="default.home.label"/></g:link></span>
    <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label"
                                                                           args="[entityName]"/></g:link></span>
</div>
17

Jesper Zedlitz's avatar
Jesper Zedlitz committed
18
<div class="body">
jzedlitz's avatar
jzedlitz committed
19

Jesper Zedlitz's avatar
Jesper Zedlitz committed
20 21 22 23 24 25 26 27 28 29 30
    <g:hasErrors bean="${pageInstance}">
        <div class="errors">
            <g:renderErrors bean="${pageInstance}" as="list"/>
        </div>
    </g:hasErrors>
    <g:form method="post">
        <g:hiddenField name="id" value="${pageInstance?.id}"/>
        <g:hiddenField name="version" value="${pageInstance?.version}"/>
        <div class="dialog">
            <table>
                <tbody>
31

Jesper Zedlitz's avatar
Jesper Zedlitz committed
32
                <tr class="prop">
33
                    <td  class="name">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
34 35
                        <label for="pageName"><g:message code="page.pageName.label"/></label>
                    </td>
36
                    <td  class="value ${hasErrors(bean: pageInstance, field: 'pageName', 'errors')}">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
37 38 39
                        <g:textField name="pageName" value="${pageInstance?.pageName}"/>
                    </td>
                </tr>
40

Jesper Zedlitz's avatar
Jesper Zedlitz committed
41
                <tr class="prop">
42
                    <td  class="name">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
43 44
                        <label for="fileName"><g:message code="page.fileName.label"/></label>
                    </td>
45
                    <td  class="value ${hasErrors(bean: pageInstance, field: 'fileName', 'errors')}">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
46 47 48
                        <g:textField name="fileName" value="${pageInstance?.fileName}"/>
                    </td>
                </tr>
49

Jesper Zedlitz's avatar
Jesper Zedlitz committed
50
                <tr class="prop">
51
                    <td  class="name">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
52 53
                        <label for="reservedForUser"><g:message code="page.reservedForUser.label"/></label>
                    </td>
54
                    <td  class="value ${hasErrors(bean: pageInstance, field: 'reservedForUser', 'errors')}">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
55 56 57 58 59
                        <g:textField name="reservedForUser" value="${pageInstance?.reservedForUser}"/>
                        <g:if test="${pageInstance?.reservedForUser > 0}"><g:userInfo field="displayname"
                                                                                      uid="${pageInstance.reservedForUser}"/></g:if>
                    </td>
                </tr>
J.Voelker's avatar
J.Voelker committed
60

Jesper Zedlitz's avatar
Jesper Zedlitz committed
61
                <tr class="prop">
62
                    <td  class="name">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
63 64
                        <label for="status"><g:message code="page.status.label"/></label>
                    </td>
65
                    <td  class="value ${hasErrors(bean: pageInstance, field: 'status', 'errors')}">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
66 67 68 69 70
                        <g:select name="status"
                                  from="${PageStatus.ALL_STATUSES}"
                                  value="${pageInstance?.status}"/>
                    </td>
                </tr>
jzedlitz's avatar
jzedlitz committed
71

Jesper Zedlitz's avatar
Jesper Zedlitz committed
72
                <tr class="prop">
73
                    <td  class="name">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
74 75
                        <label for="width"><g:message code="page.width.label"/></label>
                    </td>
76
                    <td  class="value ${hasErrors(bean: pageInstance, field: 'width', 'errors')}">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
77 78 79 80
                        <g:textField name="width" value="${pageInstance?.width}"/>
                    </td>
                </tr>
                <tr class="prop">
81
                    <td  class="name">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
82 83
                        <label for="height"><g:message code="page.height.label"/></label>
                    </td>
84
                    <td  class="value ${hasErrors(bean: pageInstance, field: 'height', 'errors')}">
Jesper Zedlitz's avatar
Jesper Zedlitz committed
85 86 87
                        <g:textField name="height" value="${pageInstance?.height}"/>
                    </td>
                </tr>
jzedlitz's avatar
jzedlitz committed
88

Jesper Zedlitz's avatar
Jesper Zedlitz committed
89 90
                </tbody>
            </table>
J.Voelker's avatar
J.Voelker committed
91
        </div>
Jesper Zedlitz's avatar
Jesper Zedlitz committed
92 93 94 95 96 97 98 99 100

        <div class="buttons">
            <span class="button"><g:actionSubmit class="save" action="update"
                                                 value="${message(code: 'default.button.update.label', default: 'Update')}"/></span>
        </div>
    </g:form>

</div>
</body>
J.Voelker's avatar
J.Voelker committed
101
</html>