1 | <%@ page import="org.dbnp.gdt.GdtService" %> |
---|
2 | <% |
---|
3 | /** |
---|
4 | * first wizard page / tab |
---|
5 | * |
---|
6 | * @author Jeroen Wesbeek |
---|
7 | * @since 20101206 |
---|
8 | * |
---|
9 | * Revision information: |
---|
10 | * $Rev: 1675 $ |
---|
11 | * $Author: t.w.abma@umcutrecht.nl $ |
---|
12 | * $Date: 2011-03-28 08:58:49 +0000 (ma, 28 mrt 2011) $ |
---|
13 | */ |
---|
14 | %> |
---|
15 | <af:page> |
---|
16 | <title>Importer wizard (simple)</title> |
---|
17 | <h1>Importer wizard</h1> |
---|
18 | <p>You can import your Excel data to the server by choosing a file from your local harddisk in the form below.</p> |
---|
19 | <table border="0"> |
---|
20 | <tr> |
---|
21 | <td width="100px"> |
---|
22 | Choose your Excel file to import: |
---|
23 | </td> |
---|
24 | <td width="100px"> |
---|
25 | <g:if env="test"> |
---|
26 | <input type="hidden" name="importfile" value="NTC_Experiment_test4.xls"/> |
---|
27 | </g:if> |
---|
28 | <g:else> |
---|
29 | <af:fileFieldElement name="importfile" value="${importer_params?.importfile}"/> |
---|
30 | </g:else> |
---|
31 | |
---|
32 | </td> |
---|
33 | </tr> |
---|
34 | <tr> |
---|
35 | <td width="100px"> |
---|
36 | Use data from sheet: |
---|
37 | </td> |
---|
38 | <td width="100px"> |
---|
39 | <g:select name="sheetindex" from="${1..25}" value="${importer_params?.sheetindex}"/> |
---|
40 | </td> |
---|
41 | </tr> |
---|
42 | <tr> |
---|
43 | <td width="100px"> |
---|
44 | Columnheader starts at row: |
---|
45 | </td> |
---|
46 | <td width="100px"> |
---|
47 | <g:select name="headerrow" from="${1..10}" value="${importer_params?.headerrow}"/> |
---|
48 | </td> |
---|
49 | </tr> |
---|
50 | <tr> |
---|
51 | <td width="100px"> |
---|
52 | Data starts at row: |
---|
53 | </td> |
---|
54 | <td width="100px"> |
---|
55 | <g:select name="datamatrix_start" from="${2..10}" value="${importer_params?.datamatrix_start}"/> |
---|
56 | </td> |
---|
57 | </tr> |
---|
58 | <tr> |
---|
59 | <td> |
---|
60 | Choose type of data: |
---|
61 | </td> |
---|
62 | <td> |
---|
63 | <g:select |
---|
64 | name="entity" |
---|
65 | id="entity" |
---|
66 | from="${GdtService.cachedEntities}" |
---|
67 | value="${importer_params?.entity}" |
---|
68 | optionValue="${{it.name}}" |
---|
69 | optionKey="${{it.encoded}}" |
---|
70 | noSelection="['':'-Choose type of data-']" |
---|
71 | onChange="${remoteFunction( controller: 'importer', |
---|
72 | action:'ajaxGetTemplatesByEntity', |
---|
73 | params: '\'entity=\'+escape(this.value)', |
---|
74 | onSuccess:'updateSelect(\'template_id\',data,false,false,\'default\')')}" /> |
---|
75 | </td> |
---|
76 | </tr> |
---|
77 | <tr id="studyfield"> |
---|
78 | <td> |
---|
79 | Choose your study: |
---|
80 | </td> |
---|
81 | <td> |
---|
82 | <g:select name="study.id" from="${studies}" optionKey="id" optionValue="${{ it.code + ' - ' + it.title }}" value="${importer_params?.study?.id}"/> |
---|
83 | </td> |
---|
84 | </tr> |
---|
85 | <tr> |
---|
86 | <td> |
---|
87 | <div id="datatemplate">Choose type of data template:</div> |
---|
88 | </td> |
---|
89 | <td> |
---|
90 | <g:select rel="template" entity="none" name="template_id" optionKey="id" optionValue="name" from="${importer_datatemplates}" value="${importer_params?.template_id}"/> |
---|
91 | </td> |
---|
92 | </tr> |
---|
93 | </table> |
---|
94 | </af:page> |
---|
95 | |
---|
96 | <g:render template="common/error"/> |
---|