Project

General

Profile

1
<div class="row" style="height: 5em">
2
	<div class="col-xl-8 col-lg-10">
3
		<div class="alert alert-success" ng-if="message">{{message}}</div>
4
		<p class="text-muted" ng-if="orgId && !message">
5
			<b>ID: </b>{{orgId}}<br />
6
			<b>Created at</b> {{org.creationDate | date:'MMMM d, y HH:mm:ss'}} <b>by</b> {{org.createdBy}}<br />
7
			<b>Modified at</b> {{org.modificationDate | date:'MMMM d, y HH:mm:ss'}} <b>by</b> {{org.modifiedBy}}
8
		</p>
9
	</div>
10
</div>
11

    
12
<div class="row">
13
	<div class="col-xl-8 col-lg-10">
14
		<div class="card">
15
			<div class="card-header">
16
				<ul class="nav nav-tabs card-header-tabs">
17
					<li class="nav-item">
18
						<a href="javascript:void(0)" class="nav-link active">Metadata</a>
19
					</li>
20
					<li class="nav-item" ng-if="orgId">
21
						<a href="#!/relations/{{orgId}}" class="nav-link">Relations</a>
22
					</li>
23
					<li class="nav-item" ng-if="orgId">
24
						<a href="#!/similarities/{{orgId}}" class="nav-link">Similarities</a>
25
					</li>
26
				</ul>
27
			</div>
28
			<div class="card-body">
29
				<form name="organizationForm">
30
					<fieldset>
31
						<legend>Official name and type</legend>
32
				
33
						<div class="form-group">
34
							<div class="input-group input-group-sm">
35
								<div class="input-group-prepend">
36
									<div class="input-group-text bg-primary text-white">name</div>
37
								</div>
38
								<input name="org_nm" type="text" class="form-control" placeholder="organization name..." ng-model="org.name" required="required" ng-class="{'is-invalid' : organizationForm.org_nm.$error.required}"/>
39
								<div class="input-group-append input-group-prepend">
40
									<div class="input-group-text bg-primary text-white">type</div>
41
								</div>
42
								<select name="org_tp" class="custom-select" ng-model="org.type" required="required" ng-class="{'is-invalid' : organizationForm.org_tp.$error.required}">
43
									<option disabled="disabled" value=''>type...</option>
44
									<option ng-repeat="t in vocabularies.orgTypes">{{t}}</option>
45
								</select>
46
							</div>
47
						</div>
48
					</fieldset>
49
					<fieldset class="mt-4">
50
						<legend>Geographical location</legend>
51
					
52
						<div class="form-group">
53
							<div class="input-group input-group-sm">
54
								<div class="input-group-prepend">
55
									<div class="input-group-text bg-primary text-white">city</div>
56
								</div>
57
								<input name="org_ct" type="text" class="form-control" placeholder="" ng-model="org.city" />
58
								<div class="input-group-append input-group-prepend">
59
									<div class="input-group-text bg-primary text-white">country</div>
60
								</div>
61
								<select name="org_cntr" class="custom-select" ng-model="org.country" required="required" ng-class="{'is-invalid' : organizationForm.org_cntr.$error.required}">
62
									<option disabled="disabled" value=''>country...</option>
63
									<option ng-repeat="c in vocabularies.countries">{{c}}</option>
64
								</select>
65
								<div class="input-group-append input-group-prepend">
66
									<div class="input-group-text bg-primary text-white">lat</div>
67
								</div>
68
								<input name="org_lat" type="text" class="form-control" placeholder="0.0" ng-model="org.lat" />
69
								<div class="input-group-append input-group-prepend">
70
									<div class="input-group-text bg-primary text-white">lng</div>
71
								</div>
72
								<input name="org_lng" type="text" class="form-control" placeholder="0.0" ng-model="org.lng" />
73
							</div>
74
						</div>
75
					</fieldset>
76
					
77
					<fieldset class="mt-4">
78
						<legend>Other names and identifiers</legend>
79
						
80
						<div class="form-group row">
81
							<div class="col-lg-8 mb-2">
82
								<div class="card">
83
									<div class="card-header bg-primary text-white text-center py-1">Acronyms</div>
84
									<table class="table table-sm">
85
										<tbody>
86
											<tr ng-repeat="a in org.acronyms">
87
												<td>{{a}}</td>
88
												<td class="text-right" style="width: 44px">
89
													<button type="button" class="btn btn-sm  btn-outline-danger" ng-click="org.acronyms.splice($index, 1)"><i class="fa fa-trash"></i></button>
90
												</td>
91
											</tr>
92
										</tbody>
93
										<tfoot>
94
											<tr ng-init="newAcronym=''">
95
												<td>
96
													<input type="text" class="form-control form-control-sm" placeholder="new acronym..." ng-model='newAcronym'/>
97
												</td>
98
												<td class="text-right"  style="width: 44px">
99
													<button type="button" class="btn btn-sm btn-outline-success" ng-click="org.acronyms.push(newAcronym); newAcronym=''" ng-disabled="!newAcronym || org.acronyms.indexOf(newAcronym) !== -1" ><i class="fa fa-plus"></i></button>
100
												</td>
101
											</tr>
102
										</tfoot>
103
									</table>
104
								</div>
105
							</div>
106
						</div>
107

    
108
						<div class="form-group row">
109
							<div class="col-lg-8 mb-2">
110
								<div class="card">
111
									<div class="card-header bg-primary text-white text-center py-1">Aliases</div>
112
									<table class="table table-sm">
113
										<thead class="thead-light">
114
											<tr>
115
												<th>name</th>
116
												<th style="width: 156px">language</th>
117
												<th style="width: 44px"></th>
118
											</tr>
119
										</thead>
120
										<tbody>
121
											<tr ng-repeat="n in org.otherNames">
122
												<td>{{n.name}}</td>
123
												<td>{{n.lang}}</td>
124
												<td class="text-right">
125
													<button type="button" class="btn btn-sm  btn-outline-danger" ng-click="org.otherNames.splice($index, 1)"><i class="fa fa-trash"></i></button>
126
												</td>
127
											</tr>
128
										</tbody>
129
										<tfoot>
130
											<tr ng-init="newOtherName=newLang=''">
131
												<td>
132
													<input type="text" class="form-control form-control-sm" placeholder="new alias..." ng-model="newOtherName" />
133
												</td>
134
												<td>
135
													<select class="custom-select custom-select-sm" ng-model="newLang">
136
														<option disabled="disabled" value=''>language...</option>
137
														<option ng-repeat="l in vocabularies.languages">{{l}}</option>
138
													</select>
139
												</td>
140
												<td class="text-right" style="width: 44px">
141
													<button type="button" class="btn btn-sm btn-outline-success" ng-click="org.otherNames.push({'name': newOtherName, 'lang': newLang}); newOtherName=newLang=''" ng-disabled="!newOtherName || !newLang"><i class="fa fa-plus"></i></button>
142
												</td>
143
											</tr>
144
										</tfoot>
145
									</table>
146
								</div>
147
							</div>
148
						</div>
149

    
150
						<div class="form-group row">
151
							<div class="col-lg-8 mb-2">
152
								<div class="card">
153
									<div class="card-header bg-primary text-white text-center py-1">Identifiers</div>
154
									<table class="table table-sm">
155
										<thead class="thead-light">
156
											<tr>
157
												<th>id</th>
158
												<th style="width: 156px">type</th>
159
												<th style="width: 44px"></th>
160
											</tr>
161
										</thead>
162
										<tbody>
163
											<tr ng-repeat="id in org.otherIdentifiers">
164
												<td>{{id.id}}</td>
165
												<td>{{id.type}}</td>
166
												<td class="text-right" style="width: 44px">
167
													<button type="button" class="btn btn-sm  btn-outline-danger" ng-click="org.otherIdentifiers.splice($index, 1)"><i class="fa fa-trash"></i></button>
168
												</td>
169
											</tr>
170
										</tbody>
171
										<tfoot>
172
											<tr ng-init="newId=newIdType=''">
173
												<td>
174
													<input type="text" class="form-control form-control-sm" placeholder="new id..." ng-model="newId" />
175
												</td>
176
												<td>
177
													<select class="custom-select custom-select-sm" ng-model="newIdType">
178
														<option disabled="disabled" value=''>type...</option>
179
														<option ng-repeat="t in vocabularies.idTypes">{{t}}</option>
180
													</select>
181
												</td>
182
												<td class="text-right" style="width: 44px">
183
													<button type="button" class="btn btn-sm btn-outline-success" ng-click="org.otherIdentifiers.push({'id': newId, 'type': newIdType}); newId=newIdType=''" ng-disabled="!newId || !newIdType"><i class="fa fa-plus"></i></button>
184
												</td>
185
											</tr>
186
										</tfoot>
187
									</table>
188
								</div>
189
							</div>
190
						</div>
191

    
192
						<div class="form-group row">
193
							<div class="col-lg-8 mb-2">
194
								<div class="card">
195
									<div class="card-header bg-primary text-white text-center py-1">Urls</div>
196
									<table class="table table-sm">
197
										<tbody>
198
											<tr ng-repeat="u in org.urls">
199
												<td><a href="{{u}}" target="_blank">{{u}}</a></td>
200
												<td class="text-right" style="width: 44px">
201
													<button type="button" class="btn btn-sm  btn-outline-danger" ng-click="org.urls.splice($index, 1)"><i class="fa fa-trash"></i></button>
202
												</td>
203
											</tr>
204
										</tbody>
205
										<tfoot>
206
											<tr ng-init="newUrl=''">
207
												<td>
208
													<input type="text" class="form-control form-control-sm" placeholder="http://..." ng-model="newUrl" />
209
												</td>
210
												<td class="text-right" style="width: 44px">
211
													<button type="button" class="btn btn-sm btn-outline-success" ng-click="org.urls.push(newUrl); newUrl=''" ng-disabled="!newUrl || org.urls.indexOf(newUrl) !== -1" ><i class="fa fa-plus"></i></button>
212
												</td>
213
											</tr>
214
										</tfoot>
215
									</table>
216
								</div>
217
							</div>
218
						</div>
219
					</fieldset>
220
					
221
					<button type="submit" class="btn btn-primary" ng-click="save()" ng-disabled="organizationForm.$invalid">save</button>
222
				</form>
223
			</div>
224
		</div>
225
	</div>
226
</div>
(2-2/8)