~stian-sandvold/dhis2/UserSettingFallback

« back to all changes in this revision

Viewing changes to dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html

  • Committer: Stian Sandvold
  • Date: 2016-03-14 12:16:33 UTC
  • mfrom: (21871.1.422 dhis2)
  • Revision ID: stian.sandvold@gmail.com-20160314121633-ojggeaoszdunzltj
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<script type="text/ng-template" id="dataelement-details.html">
 
2
    <table class="table table-bordered">
 
3
        <tr>
 
4
            <td class="bold">{{'description' | translate}}</td>
 
5
            <td>{{content.description ? content.description : 'not_available' | translate}}</td>
 
6
        </tr>
 
7
        <tr>
 
8
            <td class="bold">{{'url' | translate}}</td>
 
9
            <td>
 
10
                <span ng-if="content.url">
 
11
                    <a href="{{content.url}}" target="_blank">{{content.url}}</a>
 
12
                </span>
 
13
                <span ng-if="!content.url">
 
14
                    {{'not_available' | translate}}
 
15
                </span>
 
16
            </td>
 
17
        </tr>
 
18
    </table>
 
19
</script>
1
20
<div  ng-if='!selectedProgramStage.programStageSections.length'>
2
21
    <div ng-include="'views/event-details.html'"></div>
3
22
    <table class="dhis2-list-table-striped table-with-fixed-layout">
9
28
                <th>
10
29
                    {{'value'| translate}}                    
11
30
                </th>
12
 
                <th class="hideInPrint audit-icon-column" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
13
 
                </th>
14
 
            </tr>                        
 
31
            </tr>
15
32
        </thead>
16
33
        <tbody>
17
34
            <tr ng-repeat="eventGridColumn in eventGridColumns" ng-if="eventGridColumn.id !== 'comment' && eventGridColumn.id !== 'uid' && eventGridColumn.id !== 'eventDate' && !hiddenFields[eventGridColumn.id]">
18
 
                <td >
19
 
                    {{eventGridColumn.name}}
 
35
                <td>
 
36
                    <span d2-pop-over 
 
37
                        details="{{'details'| translate}}"
 
38
                        content="prStDes[eventGridColumn.id].dataElement"
 
39
                        template="dataelement-details.html"
 
40
                        trigger="click"
 
41
                        placement="right">
 
42
                        <a href title="{{'details'| translate}}">{{eventGridColumn.displayName}}</a>
 
43
                    </span>
20
44
                    <span ng-if="eventGridColumn.compulsory" class="required">*</span>                    
21
 
                </td>
22
 
                <td >
 
45
                </td>                
 
46
                <td>
23
47
                    <ng-form name="innerForm">
24
48
                        <div ng-if="prStDes[eventGridColumn.id].dataElement.optionSetValue">
25
49
                            <div ng-if="!selectedProgram.dataEntryMethod || optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options.length >= 7">
31
55
                                           ng-disabled="assignedFields[eventGridColumn.id]"
32
56
                                           on-select="saveDatavalue()"
33
57
                                           style="width:100%;">
34
 
                                    <ui-select-match allow-clear="true" class="form-control-ui-select" placeholder="{{'select_or_search' | translate}}">{{$select.selected.name  || $select.selected}}</ui-select-match>
35
 
                                    <ui-select-choices  repeat="option.name as option in optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options | filter: $select.search | limitTo:maxOptionSize">
36
 
                                        <span ng-bind-html="option.name | highlight: $select.search"></span>
 
58
                                    <ui-select-match allow-clear="true" class="form-control-ui-select" placeholder="{{'select_or_search' | translate}}">{{$select.selected.displayName  || $select.selected}}</ui-select-match>
 
59
                                    <ui-select-choices  repeat="option.displayName as option in optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options | filter: $select.search | limitTo:maxOptionSize">
 
60
                                        <span ng-bind-html="option.displayName | highlight: $select.search"></span>
37
61
                                    </ui-select-choices>
38
62
                                </ui-select>
39
63
                            </div>
57
81
                                           ng-required={{eventGridColumn.compulsory}}
58
82
                                           ng-disabled="assignedFields[eventGridColumn.id]"
59
83
                                           ng-model="currentEvent[eventGridColumn.id]"
60
 
                                           value={{option.name}}> {{option.name}}<br>
 
84
                                           value={{option.displayName}}> {{option.displayName}}<br>
61
85
                                </label>
62
86
                            </div>
63
87
                        </div>
237
261
                        </div>
238
262
                    </ng-form>
239
263
                </td>
240
 
                <td ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
241
 
                    <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}"  current-event="{{currentEvent.event}}"></d2-audit>
242
 
                </td>
243
 
            </tr>        
 
264
            </tr>
244
265
        </tbody>
245
266
    </table>
246
267
    
250
271
    <div ng-include="'views/event-details.html'"></div>
251
272
    <div ng-repeat='section in selectedProgramStage.programStageSections' ng-if="section.id === selectedSection.id || selectedSection.id === 'ALL' && !hiddenSections[section.id] ">
252
273
        <div class="vertical-spacing section-label">
253
 
           {{section.name}}
 
274
           {{section.displayName}}
254
275
        </div>
255
276
        
256
277
        <div class="vertical-spacing" ng-if="!section.programStageDataElements || section.programStageDataElements.length === 0">
257
 
            <div class="alert alert-warning">{{'section'| translate}} {{section.name}} {{'has_no_dataelements'| translate}}</div>
 
278
            <div class="alert alert-warning">{{'section'| translate}} {{section.displayName}} {{'has_no_dataelements'| translate}}</div>
258
279
        </div>  
259
280
        <table class="dhis2-list-table-striped">
260
281
            <thead>                        
265
286
                    <th>
266
287
                        {{'value'| translate}}                    
267
288
                    </th>
268
 
                    <th class="hideInPrint audit-icon-column" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
269
 
                    </th>
270
 
                </tr>                        
 
289
                </tr>
271
290
            </thead>
272
 
            <tbody>       
 
291
            <tbody>
273
292
                <tr ng-repeat="de in section.programStageDataElements" ng-if="!hiddenFields[de.dataElement.id]">
274
 
                    <td >
275
 
                        {{prStDes[de.dataElement.id].dataElement.formName ? prStDes[de.dataElement.id].dataElement.formName : prStDes[de.dataElement.id].dataElement.name}}                         
 
293
                    <td>
 
294
                        <span d2-pop-over 
 
295
                            details="{{'details'| translate}}"
 
296
                            content="prStDes[de.dataElement.id].dataElement"
 
297
                            template="dataelement-details.html"
 
298
                            trigger="click"
 
299
                            placement="right">
 
300
                            <a href title="{{'details'| translate}}">{{prStDes[de.dataElement.id].dataElement.formName ? prStDes[de.dataElement.id].dataElement.formName : prStDes[de.dataElement.id].dataElement.displayName}}</a>
 
301
                        </span>
276
302
                        <span ng-if="prStDes[de.dataElement.id].compulsory" class="required">*</span>                        
277
 
                    </td>
 
303
                    </td>                    
278
304
                    <td>
279
305
                        <ng-form name="innerForm">
280
306
                            <div ng-if="prStDes[de.dataElement.id].dataElement.optionSetValue">
288
314
                                               input-field-id={{de.dataElement.id}} 
289
315
                                               on-select="saveDatavalue()"
290
316
                                               style="width:100%;">
291
 
                                            <ui-select-match allow-clear="true" class="form-control-ui-select" placeholder="{{'select_or_search' | translate}}">{{$select.selected.name || $select.selected}}</ui-select-match>
292
 
                                            <ui-select-choices  repeat="option.name as option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options | filter: $select.search | limitTo:maxOptionSize">
293
 
                                                <span ng-bind-html="option.name | highlight: $select.search"></span>
 
317
                                            <ui-select-match allow-clear="true" class="form-control-ui-select" placeholder="{{'select_or_search' | translate}}">{{$select.selected.displayName || $select.selected}}</ui-select-match>
 
318
                                            <ui-select-choices  repeat="option.displayName as option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options | filter: $select.search | limitTo:maxOptionSize">
 
319
                                                <span ng-bind-html="option.displayName | highlight: $select.search"></span>
294
320
                                            </ui-select-choices>
295
321
                                        </ui-select>
296
322
                                    </span>
316
342
                                                   ng-required={{prStDes[de.dataElement.id].compulsory}}
317
343
                                                   ng-disabled="assignedFields[de.dataElement.id]"
318
344
                                                   ng-model="currentEvent[de.dataElement.id]"
319
 
                                                   value={{option.name}}> {{option.name}}
 
345
                                                   value={{option.displayName}}> {{option.displayName}}
320
346
                                                <br>
321
347
                                        </label><br>
322
348
                                    </span>                                    
500
526
                                {{warningMessages[de.dataElement.id]}}
501
527
                            </div>
502
528
                        </ng-form>
503
 
                        <!--<span class="hideInPrint audit-icon" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
504
 
                            <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}"  current-event="{{currentEvent.event}}"></d2-audit>
505
 
                        </span>-->
506
 
                    </td>
507
 
                    <td ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
508
 
                        <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}"  current-event="{{currentEvent.event}}"></d2-audit>
509
529
                    </td>
510
530
                </tr>
511
531
            </tbody>