1
|
<div class="card-body">
|
2
|
<form name="organizationForm">
|
3
|
<fieldset>
|
4
|
<legend>Official name and type</legend>
|
5
|
|
6
|
<div class="form-group">
|
7
|
<div class="input-group input-group-sm">
|
8
|
<div class="input-group-prepend">
|
9
|
<div class="input-group-text bg-primary text-white">name</div>
|
10
|
</div>
|
11
|
<input name="org_nm" type="text" class="form-control"
|
12
|
placeholder="organization name..." ng-model="org.name"
|
13
|
required="required"
|
14
|
ng-class="{'is-invalid' : organizationForm.org_nm.$error.required}" />
|
15
|
<div class="input-group-append input-group-prepend">
|
16
|
<div class="input-group-text bg-primary text-white">type</div>
|
17
|
</div>
|
18
|
<select name="org_tp" class="custom-select" ng-model="org.type"
|
19
|
required="required"
|
20
|
ng-class="{'is-invalid' : organizationForm.org_tp.$error.required}">
|
21
|
<option disabled="disabled" value=''>type...</option>
|
22
|
<option ng-repeat="t in vocabularies.orgTypes">{{t}}</option>
|
23
|
</select>
|
24
|
</div>
|
25
|
</div>
|
26
|
</fieldset>
|
27
|
<fieldset class="mt-4">
|
28
|
<legend>Geographical location</legend>
|
29
|
|
30
|
<div class="form-group">
|
31
|
<div class="input-group input-group-sm">
|
32
|
<div class="input-group-prepend">
|
33
|
<div class="input-group-text bg-primary text-white">city</div>
|
34
|
</div>
|
35
|
<input name="org_ct" type="text" class="form-control" placeholder=""
|
36
|
ng-model="org.city" />
|
37
|
<div class="input-group-append input-group-prepend">
|
38
|
<div class="input-group-text bg-primary text-white">country</div>
|
39
|
</div>
|
40
|
<select name="org_cntr" class="custom-select" ng-model="org.country"
|
41
|
required="required"
|
42
|
ng-class="{'is-invalid' : organizationForm.org_cntr.$error.required}">
|
43
|
<option disabled="disabled" value=''>country...</option>
|
44
|
<option ng-repeat="c in vocabularies.countries">{{c}}</option>
|
45
|
</select>
|
46
|
<div class="input-group-append input-group-prepend">
|
47
|
<div class="input-group-text bg-primary text-white">lat</div>
|
48
|
</div>
|
49
|
<input name="org_lat" type="text" class="form-control"
|
50
|
placeholder="0.0" ng-model="org.lat" />
|
51
|
<div class="input-group-append input-group-prepend">
|
52
|
<div class="input-group-text bg-primary text-white">lng</div>
|
53
|
</div>
|
54
|
<input name="org_lng" type="text" class="form-control"
|
55
|
placeholder="0.0" ng-model="org.lng" />
|
56
|
</div>
|
57
|
</div>
|
58
|
</fieldset>
|
59
|
|
60
|
<fieldset class="mt-4">
|
61
|
<legend>Other names and identifiers</legend>
|
62
|
|
63
|
<div class="form-group row">
|
64
|
<div class="col-lg-8 mb-2">
|
65
|
<div class="card">
|
66
|
<div class="card-header bg-primary text-white text-center py-1">Acronyms</div>
|
67
|
<table class="table table-sm">
|
68
|
<tbody>
|
69
|
<tr ng-repeat="a in org.acronyms">
|
70
|
<td>{{a}}</td>
|
71
|
<td class="text-right" style="width: 44px">
|
72
|
<button type="button" class="btn btn-sm btn-outline-danger"
|
73
|
ng-click="org.acronyms.splice($index, 1)">
|
74
|
<i class="fa fa-trash"></i>
|
75
|
</button>
|
76
|
</td>
|
77
|
</tr>
|
78
|
</tbody>
|
79
|
<tfoot>
|
80
|
<tr ng-init="newAcronym=''">
|
81
|
<td><input type="text" class="form-control form-control-sm"
|
82
|
placeholder="new acronym..." ng-model='newAcronym' /></td>
|
83
|
<td class="text-right" style="width: 44px">
|
84
|
<button type="button" class="btn btn-sm btn-outline-success"
|
85
|
ng-click="org.acronyms.push(newAcronym); newAcronym=''"
|
86
|
ng-disabled="!newAcronym || org.acronyms.indexOf(newAcronym) !== -1">
|
87
|
<i class="fa fa-plus"></i>
|
88
|
</button>
|
89
|
</td>
|
90
|
</tr>
|
91
|
</tfoot>
|
92
|
</table>
|
93
|
</div>
|
94
|
</div>
|
95
|
</div>
|
96
|
|
97
|
<div class="form-group row">
|
98
|
<div class="col-lg-8 mb-2">
|
99
|
<div class="card">
|
100
|
<div class="card-header bg-primary text-white text-center py-1">Aliases</div>
|
101
|
<table class="table table-sm">
|
102
|
<thead class="thead-light">
|
103
|
<tr>
|
104
|
<th>name</th>
|
105
|
<th style="width: 156px">language</th>
|
106
|
<th style="width: 44px"></th>
|
107
|
</tr>
|
108
|
</thead>
|
109
|
<tbody>
|
110
|
<tr ng-repeat="n in org.otherNames">
|
111
|
<td>{{n.name}}</td>
|
112
|
<td>{{n.lang}}</td>
|
113
|
<td class="text-right">
|
114
|
<button type="button" class="btn btn-sm btn-outline-danger"
|
115
|
ng-click="org.otherNames.splice($index, 1)">
|
116
|
<i class="fa fa-trash"></i>
|
117
|
</button>
|
118
|
</td>
|
119
|
</tr>
|
120
|
</tbody>
|
121
|
<tfoot>
|
122
|
<tr ng-init="newOtherName=newLang=''">
|
123
|
<td><input type="text" class="form-control form-control-sm"
|
124
|
placeholder="new alias..." ng-model="newOtherName" /></td>
|
125
|
<td><select class="custom-select custom-select-sm"
|
126
|
ng-model="newLang">
|
127
|
<option disabled="disabled" value=''>language...</option>
|
128
|
<option ng-repeat="l in vocabularies.languages">{{l}}</option>
|
129
|
</select></td>
|
130
|
<td class="text-right" style="width: 44px">
|
131
|
<button type="button" class="btn btn-sm btn-outline-success"
|
132
|
ng-click="org.otherNames.push({'name': newOtherName, 'lang': newLang}); newOtherName=newLang=''"
|
133
|
ng-disabled="!newOtherName || !newLang">
|
134
|
<i class="fa fa-plus"></i>
|
135
|
</button>
|
136
|
</td>
|
137
|
</tr>
|
138
|
</tfoot>
|
139
|
</table>
|
140
|
</div>
|
141
|
</div>
|
142
|
</div>
|
143
|
|
144
|
<div class="form-group row">
|
145
|
<div class="col-lg-8 mb-2">
|
146
|
<div class="card">
|
147
|
<div class="card-header bg-primary text-white text-center py-1">Identifiers</div>
|
148
|
<table class="table table-sm">
|
149
|
<thead class="thead-light">
|
150
|
<tr>
|
151
|
<th>id</th>
|
152
|
<th style="width: 156px">type</th>
|
153
|
<th style="width: 44px"></th>
|
154
|
</tr>
|
155
|
</thead>
|
156
|
<tbody>
|
157
|
<tr ng-repeat="id in org.otherIdentifiers">
|
158
|
<td>{{id.id}}</td>
|
159
|
<td>{{id.type}}</td>
|
160
|
<td class="text-right" style="width: 44px">
|
161
|
<button type="button" class="btn btn-sm btn-outline-danger"
|
162
|
ng-click="org.otherIdentifiers.splice($index, 1)">
|
163
|
<i class="fa fa-trash"></i>
|
164
|
</button>
|
165
|
</td>
|
166
|
</tr>
|
167
|
</tbody>
|
168
|
<tfoot>
|
169
|
<tr ng-init="newId=newIdType=''">
|
170
|
<td><input type="text" class="form-control form-control-sm"
|
171
|
placeholder="new id..." ng-model="newId" /></td>
|
172
|
<td><select class="custom-select custom-select-sm"
|
173
|
ng-model="newIdType">
|
174
|
<option disabled="disabled" value=''>type...</option>
|
175
|
<option ng-repeat="t in vocabularies.idTypes">{{t}}</option>
|
176
|
</select></td>
|
177
|
<td class="text-right" style="width: 44px">
|
178
|
<button type="button" class="btn btn-sm btn-outline-success"
|
179
|
ng-click="org.otherIdentifiers.push({'id': newId, 'type': newIdType}); newId=newIdType=''"
|
180
|
ng-disabled="!newId || !newIdType">
|
181
|
<i class="fa fa-plus"></i>
|
182
|
</button>
|
183
|
</td>
|
184
|
</tr>
|
185
|
</tfoot>
|
186
|
</table>
|
187
|
</div>
|
188
|
</div>
|
189
|
</div>
|
190
|
|
191
|
<div class="form-group row">
|
192
|
<div class="col-lg-8 mb-2">
|
193
|
<div class="card">
|
194
|
<div class="card-header bg-primary text-white text-center py-1">Urls</div>
|
195
|
<table class="table table-sm">
|
196
|
<tbody>
|
197
|
<tr ng-repeat="u in org.urls">
|
198
|
<td><a href="{{u}}" target="_blank">{{u}}</a></td>
|
199
|
<td class="text-right" style="width: 44px">
|
200
|
<button type="button" class="btn btn-sm btn-outline-danger"
|
201
|
ng-click="org.urls.splice($index, 1)">
|
202
|
<i class="fa fa-trash"></i>
|
203
|
</button>
|
204
|
</td>
|
205
|
</tr>
|
206
|
</tbody>
|
207
|
<tfoot>
|
208
|
<tr ng-init="newUrl=''">
|
209
|
<td><input type="text" class="form-control form-control-sm"
|
210
|
placeholder="http://..." ng-model="newUrl" /></td>
|
211
|
<td class="text-right" style="width: 44px">
|
212
|
<button type="button" class="btn btn-sm btn-outline-success"
|
213
|
ng-click="org.urls.push(newUrl); newUrl=''"
|
214
|
ng-disabled="!newUrl || org.urls.indexOf(newUrl) !== -1">
|
215
|
<i class="fa fa-plus"></i>
|
216
|
</button>
|
217
|
</td>
|
218
|
</tr>
|
219
|
</tfoot>
|
220
|
</table>
|
221
|
</div>
|
222
|
</div>
|
223
|
</div>
|
224
|
</fieldset>
|
225
|
|
226
|
<fieldset class="mt-4">
|
227
|
<legend>Relations</legend>
|
228
|
<div class="form-group row">
|
229
|
<div class="col-lg-8 mb-2">
|
230
|
<div class="card">
|
231
|
<div class="card-header bg-primary text-white text-center py-1">Relations</div>
|
232
|
<table class="table table-sm">
|
233
|
<thead class="thead-light">
|
234
|
<tr>
|
235
|
<th class="pl-3" style="border-top: none;">Related organization</th>
|
236
|
<th style="border-top: none; width: 156px">Type</th>
|
237
|
<th style="border-top: none; width: 44px"></th>
|
238
|
</tr>
|
239
|
</thead>
|
240
|
<tbody>
|
241
|
<tr ng-if="org.relations.length == 0">
|
242
|
<td class="text-center text-muted" colspan="3">No relations</td>
|
243
|
</tr>
|
244
|
<tr ng-repeat="r in org.relations">
|
245
|
<td class="pl-3"><a href="#!/edit/0/{{r.relatedOrgId}}" title="{{r.relatedOrgId}}">{{r.relatedOrgName}}</a></td>
|
246
|
<td>{{r.type}}</td>
|
247
|
<td class="text-right">
|
248
|
<button type="button" class="btn btn-sm btn-outline-danger" ng-click="org.relations.splice($index, 1)"><i class="fa fa-trash"></i></button>
|
249
|
</td>
|
250
|
</tr>
|
251
|
</tbody>
|
252
|
<tfoot>
|
253
|
<tr>
|
254
|
<td>
|
255
|
<input type="text" placeholder="add a related organization..." readonly="readonly"
|
256
|
class="form-control form-control-sm" style="background-color: white; color: #007bff;"
|
257
|
ng-model="newRelation.name" ng-click="resetSelectedRelation()"
|
258
|
data-toggle="modal" data-target="#selectRelatedOrgModal"/>
|
259
|
</td>
|
260
|
<td>
|
261
|
<select class="custom-select custom-select-sm" ng-model="newRelType">
|
262
|
<option disabled="disabled" value=''>rel type...</option>
|
263
|
<option ng-repeat="t in vocabularies.relTypes">{{t}}</option>
|
264
|
</select>
|
265
|
</td>
|
266
|
<td class="text-right">
|
267
|
<button type="button" class="btn btn-sm btn-outline-success" ng-disabled="!newRelType || !newRelation.id" ng-click="addNewRelation()"><i class="fa fa-plus"></i></button>
|
268
|
</td>
|
269
|
</tr>
|
270
|
</tfoot>
|
271
|
</table>
|
272
|
</div>
|
273
|
</div>
|
274
|
</div>
|
275
|
</fieldset>
|
276
|
|
277
|
<button type="submit" class="btn btn-primary" ng-click="save()" ng-disabled="organizationForm.$invalid">save</button>
|
278
|
|
279
|
</form>
|
280
|
</div>
|
281
|
|
282
|
<select-org-modal modal-id="selectRelatedOrgModal" selected-org="newRelation"></select-org-modal>
|