| 1 | <% import org.codehaus.groovy.grails.orm.hibernate.support.ClosureEventTriggeringInterceptor as Events %> | 
|---|
| 2 | <%=packageName%> | 
|---|
| 3 | <html> | 
|---|
| 4 |     <head> | 
|---|
| 5 |         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | 
|---|
| 6 |         <meta name="layout" content="main" /> | 
|---|
| 7 |         <title>Show ${className}</title> | 
|---|
| 8 |     </head> | 
|---|
| 9 |     <body> | 
|---|
| 10 |         <div class="nav"> | 
|---|
| 11 |             <span class="menuButton"><g:link class="list" action="list">${className} List</g:link></span> | 
|---|
| 12 |             <span class="menuButton"><g:link class="create" action="create">New ${className}</g:link></span> | 
|---|
| 13 |         </div> | 
|---|
| 14 |         <div class="body"> | 
|---|
| 15 |             <h1>Show ${className}</h1> | 
|---|
| 16 |             <g:render template="/shared/messages" /> | 
|---|
| 17 |             <div class="dialog"> | 
|---|
| 18 |                 <table> | 
|---|
| 19 |                     <tbody> | 
|---|
| 20 |  | 
|---|
| 21 |                     <% | 
|---|
| 22 |                         excludedProps = ['version', | 
|---|
| 23 |                                            Events.ONLOAD_EVENT, | 
|---|
| 24 |                                            Events.BEFORE_DELETE_EVENT, | 
|---|
| 25 |                                            Events.BEFORE_INSERT_EVENT, | 
|---|
| 26 |                                            Events.BEFORE_UPDATE_EVENT] | 
|---|
| 27 |                         props = domainClass.properties.findAll { !excludedProps.contains(it.name) } | 
|---|
| 28 |                         Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[])) | 
|---|
| 29 |                         props.each { p -> %> | 
|---|
| 30 |                         <tr class="prop"> | 
|---|
| 31 |                             <td valign="top" class="name">${p.naturalName}:</td> | 
|---|
| 32 |                             <% if(p.isEnum()) { %> | 
|---|
| 33 |                             <td valign="top" class="value">\${${propertyName}?.${p.name}?.encodeAsHTML()}</td> | 
|---|
| 34 |                             <% } else if(p.oneToMany || p.manyToMany) { %> | 
|---|
| 35 |                             <td  valign="top" style="text-align:left;" class="value"> | 
|---|
| 36 |                                 <ul> | 
|---|
| 37 |                                 <g:each var="${p.name[0]}" in="\${${propertyName}.${p.name}}"> | 
|---|
| 38 |                                     <li><g:link controller="${p.referencedDomainClass?.propertyName}" action="show" id="\${${p.name[0]}.id}">\${${p.name[0]}?.encodeAsHTML()}</g:link></li> | 
|---|
| 39 |                                 </g:each> | 
|---|
| 40 |                                 </ul> | 
|---|
| 41 |                             </td> | 
|---|
| 42 |                             <%  } else if(p.manyToOne || p.oneToOne) { %> | 
|---|
| 43 |                             <td valign="top" class="value"><g:link controller="${p.referencedDomainClass?.propertyName}" action="show" id="\${${propertyName}?.${p.name}?.id}">\${${propertyName}?.${p.name}?.encodeAsHTML()}</g:link></td> | 
|---|
| 44 |                             <%  } else  { %> | 
|---|
| 45 |                             <td valign="top" class="value">\${fieldValue(bean:${propertyName}, field:'${p.name}')}</td> | 
|---|
| 46 |                             <%  } %> | 
|---|
| 47 |                         </tr> | 
|---|
| 48 |                     <%  } %> | 
|---|
| 49 |                     </tbody> | 
|---|
| 50 |                 </table> | 
|---|
| 51 |             </div> | 
|---|
| 52 |             <div class="buttons"> | 
|---|
| 53 |                 <g:form> | 
|---|
| 54 |                     <input type="hidden" name="id" value="\${${propertyName}?.id}" /> | 
|---|
| 55 |                     <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> | 
|---|
| 56 |                     <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> | 
|---|
| 57 |                 </g:form> | 
|---|
| 58 |             </div> | 
|---|
| 59 |         </div> | 
|---|
| 60 |     </body> | 
|---|
| 61 | </html> | 
|---|