Last change
on this file since 2248 was
1430,
checked in by work@…, 12 years ago
|
|
-
Property svn:keywords set to
Rev Author Date
|
File size:
1.4 KB
|
Line | |
---|
1 | <!-- |
---|
2 | To change this template, choose Tools | Templates |
---|
3 | and open the template in the editor. |
---|
4 | --> |
---|
5 | |
---|
6 | <%@ page contentType="text/html;charset=UTF-8" %> |
---|
7 | |
---|
8 | <html> |
---|
9 | <head> |
---|
10 | <meta name="layout" content="main"/> |
---|
11 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
---|
12 | <title>Export templates</title> |
---|
13 | </head> |
---|
14 | <body> |
---|
15 | <h1>Select template(s) to export </h1> |
---|
16 | <form method="post" action="<g:createLink action="export" />"> |
---|
17 | <input type="hidden" name="type" value="XML" /> |
---|
18 | <select name="templates" multiple="multiple" style="height: 200px;"> |
---|
19 | <% |
---|
20 | def groupedTemplates = [:] |
---|
21 | templates.each { template -> |
---|
22 | if( !groupedTemplates[ template.entity ] ) |
---|
23 | groupedTemplates[ template.entity ] = []; |
---|
24 | |
---|
25 | groupedTemplates[ template.entity ] << template |
---|
26 | } |
---|
27 | %> |
---|
28 | <g:each in="${groupedTemplates.keySet()}" var="entity"> |
---|
29 | <% |
---|
30 | // Remove the package part of the class name |
---|
31 | String FQClassName = entity.name; |
---|
32 | int firstChar; |
---|
33 | firstChar = FQClassName.lastIndexOf ('.') + 1; |
---|
34 | if ( firstChar > 0 ) { |
---|
35 | FQClassName = FQClassName.substring ( firstChar ); |
---|
36 | } |
---|
37 | |
---|
38 | %> |
---|
39 | <optgroup label="${FQClassName}"> |
---|
40 | <g:each in="${groupedTemplates[entity]}" var="template"> |
---|
41 | <option value="${template.id}">${template.name}</option> |
---|
42 | </g:each> |
---|
43 | </optgroup> |
---|
44 | </g:each> |
---|
45 | </select><br /> |
---|
46 | <input type="submit" value="Export" /> |
---|
47 | </form> |
---|
48 | </body> |
---|
49 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.