~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/exportForm.vm

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
<script type="text/javascript">
 
3
        getExportStatus();
 
4
</script>
 
5
 
 
6
<h3>$i18n.getString( "generate_data_mart" )</h3>
 
7
 
 
8
<form id="exportForm" name="exportForm" method="post" action="export.action">
 
9
 
 
10
<input type="hidden" id="exportId" name="exportId" value="$!id">
 
11
 
 
12
<table width="730">
 
13
        
 
14
        <colgroup>
 
15
                <col style="width:325px">
 
16
                <col style="width:80px">
 
17
                <col style="width:325px">
 
18
        </colgroup>
 
19
 
 
20
        <!-- DataElements -->
 
21
        
 
22
        <tr>
 
23
                <th>$i18n.getString( "available_dataelements" )</th>
 
24
                <td></td>
 
25
                <th>$i18n.getString( "selected_dataelements" )</th>
 
26
        </tr>   
 
27
        <tr>
 
28
                <td>
 
29
                        <select id="dataElementGroupId" name="dataElementGroupId" style="min-width:325px" onchange="getDataElements()">
 
30
                                <option value="$ALL">[ $i18n.getString( "select_dataelementgroup_all" ) ]</option>
 
31
                                #foreach ( $group in $dataElementGroups )
 
32
                                        <option value="$group.id">$group.name</option>
 
33
                                #end
 
34
                        </select><br>
 
35
                        <select multiple size="6" id="availableDataElements" name="availableDataElements" style="min-width:325px" ondblclick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )">                             
 
36
                                #foreach ( $element in $dataElements )
 
37
                                        <option value="$element.id">$element.name</option>
 
38
                                #end                
 
39
                        </select>
 
40
                </td>
 
41
                <td align="center">
 
42
            <input type="button" value="&gt;" title="$i18n.getString('move_selected')" style="width:40px" onclick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )"><br>
 
43
            <input type="button" value="&lt;" title="$i18n.getString('remove_selected')" style="width:40px" onclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )"><br>          
 
44
            <input type="button" value="&gt;&gt;" title="$i18n.getString('move_all')" style="width:40px" onclick="moveAllById( 'availableDataElements', 'selectedDataElements' )"><br>
 
45
            <input type="button" value="&lt;&lt;" title="$i18n.getString('remove_all')" style="width:40px" onclick="moveAllById( 'selectedDataElements', 'availableDataElements' )">
 
46
                </td>
 
47
                <td>
 
48
                    <select multiple id="selectedDataElements" name="selectedDataElements" style="min-width:325px; height:96px" ondblclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )">
 
49
                            #foreach( $element in $selectedDataElements )
 
50
                                    <option value="$element.id">$element.name</option>
 
51
                            #end
 
52
                        </select>
 
53
                </td>
 
54
        </tr>
 
55
        <tr>
 
56
                <td colspan="3" height="5px"></td>
 
57
        </tr>
 
58
        
 
59
        <!-- Indicators -->
 
60
        
 
61
        <tr>
 
62
                <th>$i18n.getString( "available_indicators" )</th>
 
63
                <td></td>
 
64
                <th>$i18n.getString( "selected_indicators" )</th>
 
65
        </tr>
 
66
        <tr>
 
67
                <td>                    
 
68
                        <select id="indicatorGroupId" name="indicatorGroupId" style="min-width:325px" onchange="getIndicators()">
 
69
                                <option value="$ALL">[ $i18n.getString( "select_indicatorgroup_all" ) ]</option>
 
70
                                #foreach ( $group in $indicatorGroups )
 
71
                                        <option value="$group.id">$group.name</option>
 
72
                                #end
 
73
                        </select><br>
 
74
                        <select multiple size="6" id="availableIndicators" name="availableIndicators" style="min-width:325px" ondblclick="moveSelectedById( 'availableIndicators', 'selectedIndicators' )">                             
 
75
                                #foreach ( $indicator in $indicators )
 
76
                                        <option value="$indicator.id">$indicator.name</option>
 
77
                                #end
 
78
                        </select>
 
79
                </td>
 
80
                <td align="center">
 
81
                        <input type="button" value="&gt;" title="$i18n.getString('move_selected')" style="width:40px" onclick="moveSelectedById( 'availableIndicators', 'selectedIndicators' )"><br>
 
82
                        <input type="button" value="&lt;" title="$i18n.getString('remove_selected')" style="width:40px" onclick="moveSelectedById( 'selectedIndicators', 'availableIndicators' )"><br>          
 
83
                        <input type="button" value="&gt;&gt;" title="$i18n.getString('move_all')" style="width:40px" onclick="moveAllById( 'availableIndicators', 'selectedIndicators' )"><br>
 
84
                        <input type="button" value="&lt;&lt;" title="$i18n.getString('remove_all')" style="width:40px" onclick="moveAllById( 'selectedIndicators', 'availableIndicators' )">
 
85
                </td>
 
86
                <td>
 
87
                        <select multiple id="selectedIndicators" name="selectedIndicators" style="min-width:325px; height:96px" ondblclick="moveSelectedById( 'selectedIndicators', 'availableIndicators' )">
 
88
                            #foreach ( $indicator in $selectedIndicators )
 
89
                    <option value="$indicator.id">$indicator.name</option>
 
90
                #end
 
91
                        </select>
 
92
                </td>
 
93
        </tr>
 
94
    <tr>
 
95
        <td colspan="3" height="5px"></td>
 
96
    </tr>
 
97
        
 
98
        <!-- OrganisationUnits -->
 
99
        
 
100
        <tr>
 
101
                <th>$i18n.getString( "available_organisationunits" )</th>
 
102
                <td></td>
 
103
                <th>$i18n.getString( "selected_organisationunits" )</th>
 
104
        </tr>
 
105
        <tr>
 
106
                <td>
 
107
                        <select id="organisationUnitLevel" name="organisationUnitLevel" style="min-width:325px" onchange="getOrganisationUnits()">
 
108
                                <option value="$ALL">[ $i18n.getString( "select_organisationunit_level_all" ) ]</option>
 
109
                                #foreach ( $level in $levels )
 
110
                                        <option value="$level.level">$level.name</option>
 
111
                                #end
 
112
                        </select><br>
 
113
                        <select multiple size="6" id="availableOrganisationUnits" name="availableOrganisationUnits" style="min-width:325px" ondblclick="moveSelectedById( 'availableOrganisationUnits', 'selectedOrganisationUnits' )">
 
114
                                #foreach ( $unit in $organisationUnits )
 
115
                                        <option value="$unit.id">$encoder.htmlEncode( $unit.name )</option>
 
116
                                #end
 
117
                        </select>
 
118
                </td>
 
119
                <td align="center">
 
120
                        <input type="button" value="&gt;" title="$i18n.getString('move_selected')" style="width:40px" onclick="moveSelectedById( 'availableOrganisationUnits', 'selectedOrganisationUnits' )"><br>
 
121
                        <input type="button" value="&lt;" title="$i18n.getString('remove_selected')" style="width:40px" onclick="moveSelectedById( 'selectedOrganisationUnits', 'availableOrganisationUnits' )"><br>            
 
122
                        <input type="button" value="&gt;&gt;" title="$i18n.getString('move_all')" style="width:40px" onclick="moveAllById( 'availableOrganisationUnits', 'selectedOrganisationUnits' )"><br>
 
123
                        <input type="button" value="&lt;&lt;" title="$i18n.getString('remove_all')" style="width:40px" onclick="moveAllById( 'selectedOrganisationUnits', 'availableOrganisationUnits' )"><br>
 
124
                        <input type="button" value="&gt;&gt;&gt;" title="$i18n.getString('move_children')" style="width:40px" onclick="getOrganisationUnitChildren()">
 
125
                </td>
 
126
                <td>
 
127
                        <select multiple id="selectedOrganisationUnits" name="selectedOrganisationUnits" style="min-width:325px; height:96px" ondblclick="moveSelectedById( 'selectedOrganisationUnits', 'availableOrganisationUnits' )">                               
 
128
                            #foreach ( $unit in $selectedOrganisationUnits )
 
129
                    <option value="$unit.id">$unit.name</option>
 
130
                #end
 
131
                        </select>
 
132
                </td>
 
133
        </tr>
 
134
    <tr>
 
135
        <td colspan="3" height="5px"></td>
 
136
    </tr>
 
137
        
 
138
        <!-- Periods -->
 
139
        
 
140
        <tr>
 
141
                <th>$i18n.getString( "available_periods" )</th>
 
142
                <td></td>
 
143
                <th>$i18n.getString( "selected_periods" )</th>
 
144
        </tr>   
 
145
        <tr>
 
146
                <td>
 
147
                        <select id="periodTypeId" name="periodTypeId" style="min-width:325px" onchange="getPeriods()">
 
148
                                <option value="null">[ $i18n.getString( "select_period_type_all" ) ]</option>
 
149
                                #foreach ( $type in $periodTypes )
 
150
                                        <option value="$type.name">$type.name</option>
 
151
                                #end
 
152
                        </select><br>
 
153
                        <select multiple size="6" id="availablePeriods" name="availablePeriods" style="min-width:325px" ondblclick="moveSelectedById( 'availablePeriods', 'selectedPeriods' )">
 
154
                                #foreach ( $period in $periods )
 
155
                                        <option value="$period.id">$period.name</option>
 
156
                                #end
 
157
                        </select>
 
158
                </td>
 
159
                <td align="center">
 
160
                        <input type="button" value="&gt;" title="$i18n.getString('move_selected')" style="width:40px" onclick="moveSelectedById( 'availablePeriods', 'selectedPeriods' )"><br>
 
161
                        <input type="button" value="&lt;" title="$i18n.getString('remove_selected')" style="width:40px" onclick="moveSelectedById( 'selectedPeriods', 'availablePeriods' )"><br>
 
162
                        <input type="button" value="&gt;&gt;" title="$i18n.getString('move_all')" style="width:40px" onclick="moveAllById( 'availablePeriods', 'selectedPeriods' )"><br>
 
163
                        <input type="button" value="&lt;&lt;" title="$i18n.getString('remove_all')" style="width:40px" onclick="moveAllById( 'selectedPeriods', 'availablePeriods' )">
 
164
                </td>
 
165
                <td>
 
166
                        <select multiple id="selectedPeriods" name="selectedPeriods" style="min-width:325px; height:96px" ondblclick="moveSelectedById( 'selectedPeriods', 'availablePeriods' )">                               
 
167
                            #foreach ( $period in $selectedPeriods )
 
168
                    <option value="$period.id">$period.name</option>
 
169
                #end
 
170
                        </select>
 
171
                </td>
 
172
        </tr>
 
173
    <tr>
 
174
        <td colspan="3" height="5px"></td>
 
175
    </tr>
 
176
    
 
177
    <!-- Name -->
 
178
    
 
179
    <tr>
 
180
        <th>$i18n.getString( "name" )</th>
 
181
        <td colspan="2"></td>
 
182
    </tr>
 
183
    <tr>
 
184
        <td><input type="text" id="exportName" name="exportName" style="min-width:325px" value="$!name"></td>
 
185
        <td colspan="2"></td>
 
186
    </tr>
 
187
    
 
188
    <!-- Submit -->
 
189
    
 
190
        <tr>            
 
191
                <td><input type="button" value='$i18n.getString( "export" )' onclick="exportValues()" style="width:25%"><input
 
192
                           type="button" value='$i18n.getString( "cancel" )' onclick="cancelExport()" style="width:25%"><input
 
193
                   type="button" value='$i18n.getString( "save" )' onclick="saveExport()" style="width:25%"><input
 
194
                   type="button" value='$i18n.getString( "back" )' onclick="javascript:window.location.href='getDataMartExports.action'" style="width:25%"></ttd>
 
195
                <td></td>
 
196
                <td></td>
 
197
        </tr>
 
198
        
 
199
</table>
 
200
 
 
201
</form>
 
202
 
 
203
<span id="message"></span>
 
204
 
 
205
<script type="text/javascript">
 
206
    var i18n_hours = '$encoder.jsEscape( $i18n.getString( "hours" ), "'" )';
 
207
    var i18n_minutes = '$encoder.jsEscape( $i18n.getString( "minutes" ), "'" )';
 
208
    var i18n_seconds = '$encoder.jsEscape( $i18n.getString( "seconds" ), "'" )';
 
209
    var i18n_estimated_time = '$encoder.jsEscape( $i18n.getString( "estimated_time" ), "'" )';
 
210
    var i18n_select_min_datatype = '$encoder.jsEscape( $i18n.getString( "select_min_datatype" ), "'" )';
 
211
    var i18n_select_min_level = '$encoder.jsEscape( $i18n.getString( "select_min_level" ), "'" )';
 
212
    var i18n_select_min_period = '$encoder.jsEscape( $i18n.getString( "select_min_period" ), "'" )';
 
213
    var i18n_nr_of_comb = '$encoder.jsEscape( $i18n.getString( "nr_of_comb" ), "'" )';
 
214
    var i18n_completed = '$encoder.jsEscape( $i18n.getString( "completed" ), "'" )';    
 
215
    var i18n_export_process_started = '$encoder.jsEscape( $i18n.getString( "export_process_started" ), "'" )';
 
216
    var i18n_export_saved = '$encoder.jsEscape( $i18n.getString( "export_saved" ), "'" )';
 
217
    var i18n_must_select_at_least_one_dataelement_or_indicator = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_dataelement_or_indicator" ), "'" )';
 
218
    var i18n_must_select_at_least_one_organisation_unit = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_organisation_unit" ), "'" )';
 
219
    var i18n_must_select_at_least_one_period = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_period" ), "'" )';
 
220
</script>