-
Notifications
You must be signed in to change notification settings - Fork 8
/
show.html
executable file
·115 lines (112 loc) · 5.66 KB
/
show.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<notices></notices>
<breadcrumb></breadcrumb>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{{dataset.study}} - {{dataset.name}}</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-4">
<input type="text" class="form-control" placeholder="Search for..." data-ng-model="query">
</div>
</div>
</div>
<table class="table table-double-striped">
<tr>
<th>ID</th>
<th>Name</th>
<th>Label</th>
<th>Type</th>
<th class="admin-min">Actions</th>
</tr>
<tr data-ng-repeat-start="variable in
filteredVariables = (dataset.Variables | filter:query) |
limitTo:pageSize:(currentPage-1)*pageSize"
data-ng-class-odd="'odd'"
data-ng-class="{danger: variable.strand && !variable.strand.good}"
>
<td>{{variable.id}}</td>
<td>{{variable.name}} </td>
<td>{{variable.label}}</td>
<td>{{variable.var_type}}</td>
<td class="admin-min">
</td>
</tr>
<tr data-ng-repeat-end data-ng-class-odd="'odd'" data-ng-class="{danger: variable.errors}">
<td style="border-top:0" data-ng-attr-colspan="{{ is_admin() && 5 || 4 }}">
<div data-ng-if="variable.errors">
<div class="alert alert-danger" role="alert">
{{variable.errors}}
</div>
</div>
<form class="form-inline row">
<div class="form-group col-xs-3">
<label class="control-label">Used by</label>
<div ng-repeat="used_by in variable.used_bys" class="btn btn-primary tag-variable">
<p class="display-inline">{{used_by.name}}</p>
<span class="glyphicon glyphicon-remove-circle delete-icon" aria-hidden="true" ng-click=""></span>
</div>
</div>
<div class="form-group col-xs-4">
<label class="col-xs-3" for="variable-{{variable.id}}-sources">Sources</label>
<div class="col-xs-9" style="background: rgba(0,0,0,0.05); font-size: 16px; margin-bottom: 5px;">
<div ng-repeat="source in variable.sources" class="btn btn-primary tag-variable">
<p class="display-inline">{{variable.var_type == 'Normal' && source.label || source.name}}</p>
<span class="glyphicon glyphicon-remove-circle delete-icon" aria-hidden="true" ng-click="split_mapping(variable, source)"></span>
</div>
</div>
<div class="col-xs-12">
<input
data-ng-if="variable.var_type == 'Normal'"
type="text"
class="form-control editor-min"
id="variable-{{variable.id}}-sources"
placeholder="Questions"
data-ng-model="variable.new_sources"
data-uib-typeahead="question.label for question in dataset.questions | filter:$viewValue | orderBy:'label'"
data-typeahead-show-hint="true"
data-typeahead-min-length="1"
autocomplete="off"
style="width: 100%"
data-ng-keyup="detectKey($event, variable)"
>
<input
data-ng-if="variable.var_type != 'Normal'"
type="text"
class="form-control editor-min"
id="variable-{{variable.id}}-sources"
placeholder="Variables"
data-ng-model="variable.new_sources"
data-uib-typeahead="variable.name for variable in dataset.Variables | filter:$viewValue | orderBy:'label'"
data-typeahead-show-hint="true"
data-typeahead-min-length="1"
autocomplete="off"
style="width: 100%"
data-ng-keyup="detectKey($event, variable)"
>
</div>
</div>
<div class="form-group col-xs-5">
<label class="col-xs-2">Topic</label>
<span>Resolved Topic - {{ variable.resolved_topic.name }}</span>
<div class="col-xs-10">
<a-topics
data-ng-model="variable"
class="editor-min"
data-ng-change="updateModel($viewValue)"
></a-topics>
</div>
</div>
</form>
</td>
</tr>
</table>
<div class="panel-footer">
<ul uib-pagination
total-items="filteredVariables.length"
ng-model="currentPage"
items-per-page="pageSize">
</ul>
</div>
</div>
<div data-ng-include="'partials/datasets/modals/conflict.html'"></div>