search.component.html 13 KB
Newer Older
philippelke's avatar
philippelke committed
1 2
<div
	[ngClass]="{'float-left':true, 'sidecontainerleft':true,'ausgeblendet':this.state=='hidden'}">
3
	<div class="containerSearch float-left">
4
		<!-- 
philippelke's avatar
philippelke committed
5
		<ngb-tabset type="pills"> <ngb-tab id="freesearchtab"
6 7 8
			title="Mache deinen Ort des guten Lebens sichtbar">
			 <ng-template ngbTabContent>
			 -->
9
		<div class="tabContent">
philippelke's avatar
philippelke committed
10

11
			<!--<ngx-spinner bdColor="rgba(51, 51, 51, 0.8)" size="large" color="#fff" type="ball-spin-clockwise"></ngx-spinner>-->
12 13
			<div class="searchtitle">Mache deinen Ort des guten Lebens
				sichtbar</div>
Sebastian Bruch's avatar
Sebastian Bruch committed
14
			<form [formGroup]="searchForm" class="searchForm">
15 16 17 18 19 20 21 22 23 24
				<!-- 
				<div class="form-check">
					<input type="checkbox" class="form-check-input" /> <label
						class="form-check-label"><i class="fa fa-map-marker fa-lg" aria-hidden="true"></i>Alle Orte sehen</label>
				</div>-->
				<div class="list-group-item list-group-item-action">
					<i aria-hidden="true" class="fa fa-map-marker fa-lg"></i> Alle Orte
					sehen <label class="switch"><input type="checkbox"><span
						class="slider round"></span> </label>
				</div>
25 26
				<div class="">
					<input type="text" formControlName="searchPattern"
27
						class="form-control searchinput" placeholder="Wie heißt dein Ort?" />
28 29 30 31 32 33 34
					<!--  old search button
					<div class="input-group-append">
						<button (click)="search()"
							class="btn btn-outline-secondary search-button" type="submit">
							<i class="fa fa-search" aria-hidden="true"></i>
						</button>
					-->
35 36 37 38 39 40 41
				</div>
				<div class="searchbutton float-right">
					<div *ngIf="state=='visible'" class="searchbuttonPrepend">
						<button (click)="search()" class="btn  search-button"
							type="submit">
							<i class="fa fa-search" aria-hidden="true"></i>
						</button>
42 43
					</div>
				</div>
44
				<!--  
philippelke's avatar
philippelke committed
45 46
				<div class="form-check">
					<input type="checkbox" formControlName="searchInDescription"
47 48
						class="form-check-input" /> <label class="form-check-label"
						for="searchInDescription">Beschreibung einschließen</label>
philippelke's avatar
philippelke committed
49 50 51 52
				</div>
				<div class="form-check">
					<input type="checkbox" class="form-check-input" /> <label
						class="form-check-label">Themen filtern</label>
53
				</div>
54
				-->
55
			</form>
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
			<div class="search-results-wrap">
				<div class="" *ngIf="searched && this.osmNodes.length == 0">
					<div class="searchbox-heading">Orte des guten Lebens</div>
					<div class="searchbox-text-only">
						<i class="fa fa-exclamation-triangle fa-lg" aria-hidden="true"></i>
						Zu deinem Suchbegriff konnten wir leider kein Ort des guten Lebens
						finden.<br>
					</div>
				</div>
				<div class="list-group search-results"
					*ngIf="this.osmNodes.length > 0">
					<div class="searchbox-heading">Orte des guten Lebens</div>
					<div *ngIf="osmNodes.length > 0">
						<div *ngFor="let elem of osmNodes">
							<div
								[ngClass]="{'list-group-item':true,'list-group-item-action':true,'selected-item':isCurrentElement(elem) }"
								(click)="show(elem)">
								<i class="fa fa-map-marker fa-lg" aria-hidden="true"></i>
								{{elem.name}}
							</div>
philippelke's avatar
philippelke committed
76
						</div>
Sebastian Bruch's avatar
Sebastian Bruch committed
77
					</div>
philippelke's avatar
philippelke committed
78 79
				</div>
				<div div *ngIf="nominatimNodes.length > 0">
80 81
					<div class="searchbox-subheading">Noch nicht als Orte des
						guten Lebens markiert</div>
Sebastian Bruch's avatar
Sebastian Bruch committed
82
					<div *ngFor="let elem of nominatimNodes">
philippelke's avatar
philippelke committed
83 84 85 86 87 88 89 90 91 92
						<div
							[ngClass]="{'list-group-item':true,'list-group-item-action':true,'selected-item':isCurrentElement(elem) }"
							(click)="show(elem)">
							<i class="fa fa-map-marker fa-lg" aria-hidden="true"></i>
							{{elem.name}}
							<div *ngIf="elem.id" class="elemexists">
								<i class="fa fa-check fa-1" aria-hidden="true"></i>Im GeoPortal
								vorhanden
							</div>
						</div>
93
					</div>
94 95 96 97 98 99 100 101
					<div class="list-group"
						*ngIf="searched && this.nominatimNodes.length == 0">
						<div class="searchbox-text-only">
							Zu deinem Sucherbegriff konnten wir keinen Ort finden. Mehr
							Informationen zu unserer Quelle findest du hier:
							https://www.openstreetmap.de/.<br>
						</div>
					</div>
102 103
				</div>
				<div *ngIf="dataGroups.length > 0">
philippelke's avatar
philippelke committed
104
					<br> <label>Daten-Gruppen</label>
105 106 107
					<div class="list-group-item list-group-item-action"
						*ngFor="let group of dataGroups">{{group.name}}</div>
				</div>
108 109 110 111


				<!--
			<div class="list-group search-results" *ngIf="searched && !hasResults">
philippelke's avatar
philippelke committed
112 113 114
				<div class="searchbox-text-only">
					keine Suchergebnisse.<br>
				</div>
115
			</div>
116
			-->
philippelke's avatar
philippelke committed
117

118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
				<div class="list-group"
					*ngIf="searched && this.nominatimNodes.length == 0">
					<div class="searchbox-subheading">Noch nicht als Orte des
						guten Lebens markiert</div>
					<div class="searchbox-text-only">
						<i class="fa fa-exclamation-triangle fa-lg" aria-hidden="true"></i>
						Zu deinem Sucherbegriff konnten wir keinen Ort finden. Mehr
						Informationen zu unserer Quelle findest du hier:
						https://www.openstreetmap.de/.<br>
					</div>
				</div>
				<div class="list-group" *ngIf="hasResults">
					<div class="searchreset">
						<button class="btn btn-outline-secondary  "
							(click)="clearResults()">Suche zurücksetzen</button>
					</div>
				</div>
			</div>
136
		</div>
137 138
		<!-- </ng-template> </ngb-tab>  -->
		<!-- 
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
		<ngb-tab id="topictab">
			<ng-template ngbTabTitle>Nach Themen</ng-template>
			<ng-template ngbTabContent>
				<div class="tabContent">
					<div class="row">
						<div class="col">
			       			<h4 class="searchreset">BLI-Dimensionen</h4>
			        		<app-bli [displayType]="'checkboxesArray_icons'" [dimensions]="dimensionsFilterArray" (changed)="filterChanged($event)"></app-bli>
						</div>
					</div>
						<br>
					<div class="row">
						<div class="col">
							<div class="form-group">
								<button type="submit" class="btn btn-primary" (click)="showbli()">Filter anwenden</button>
							</div>
						</div>
					</div>
						<br>
158
				</div>
159 160
			</ng-template>
		</ngb-tab>
161 162
		-->
		<!--  </ngb-tabset> -->
163 164 165
	</div>

	<div class="ToggleSearch float-right">
philippelke's avatar
philippelke committed
166 167 168 169 170 171 172 173 174 175 176 177 178 179
		<div *ngIf="state=='visible'" class="searchetogglePrepend">
			<div (click)="toggleVisibility();"
				class="form-group item-detail name">
				<label for="elementOsmid" class="col-sm-1 col-form-label"><i
					class="fa fa-angle-double-left" aria-hidden="true"></i></label>
			</div>
		</div>
		<div *ngIf="state=='hidden'" class="searchetogglePrepend">
			<div (click)="toggleVisibility();"
				class="form-group item-detail name">
				<label for="elementOsmid" class="col-sm-1 col-form-label"><i
					class="fa fa-angle-double-right" aria-hidden="true"></i></label>
			</div>
		</div>
180 181 182 183
	</div>

</div>

philippelke's avatar
philippelke committed
184 185
<div class="float-right sidecontainerright"
	*ngIf="nodeService.detailView">
186
<!-- 	<div *ngIf="authService.loggedIn" class="searcheditPrepend"
philippelke's avatar
philippelke committed
187 188 189 190 191 192
		(click)="edit(nodeService.detailView)">
		<div class="form-group item-detail name">
			<button class="btn  search-button" type="submit">
				<i class="fa fa-pencil fa-lg" aria-hidden="true"></i>
			</button>
		</div>
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
	</div> -->
	<div class="searcheditPrepend">
		<div *ngIf="state=='visible'" class="searchedetailstogglePrepend">
			<div (click)="toggleVisibilityDetails();"
				class="form-group item-detail name">
				<label for="elementSearchDetails"
					class="col-sm-1 col-form-label"><i
					class="fa fa-angle-double-right" aria-hidden="true"></i></label>
			</div>
		</div>
		<div *ngIf="state=='hidden'" class="searchedetailstogglePrepend">
			<div (click)="toggleVisibilityDetails();"
				class="form-group item-detail name">
				<label for="elementSearchDetails"
					class="col-sm-1 col-form-label"><i
					class="fa fa-angle-double-left" aria-hidden="true"></i></label>
			</div>
		</div>
philippelke's avatar
philippelke committed
211
	</div>
212 213 214 215 216 217 218 219
	<div class="searchdetails">
	<div class="elementdetails">
				<div class="form-group row item-detail name">
					<label for="elementOsmid" class="col-sm-1 col-form-label"><i
						class="fa fa-map-marker fa-lg" aria-hidden="true"></i></label>
					<div class="col">
						<input type="text" readonly class="form-control-plaintext"
							id="elementName" value="{{nodeService.detailView.name}}">
philippelke's avatar
philippelke committed
220
					</div>
221 222 223
					<div class="col">
						<input type="text" readonly class="form-control-plaintext"
							id="elementName" value="{{nodeService.detailView.getDate()}}">
philippelke's avatar
philippelke committed
224
					</div>
225 226
				</div>
			</div>
227 228 229 230
		<div class="elementwrap">
			

			<div class="elementinfo">
philippelke's avatar
philippelke committed
231 232 233 234 235

				<div class="form-group">
					<div (click)="isCollapsed = !isCollapsed"
						[attr.aria-expanded]="!isCollapsed" aria-controls="collapseInfo"
						class="collapseInfo">
236 237 238
						<i class="fa fa-undo fa-lg" aria-hidden="true">&nbsp;</i>Allgemeine
						Informationen<i class="fa fa-angle-down fa-lg fa-right"
							aria-hidden="true">&nbsp;</i>
philippelke's avatar
philippelke committed
239
					</div>
240
				</div>
philippelke's avatar
philippelke committed
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
				<div id="collapseInfo" [ngbCollapse]="isCollapsed">
					<div class="card">
						<div class="card-body">
							<div class="form-group row item-detail">
								<label for="elementOsmid" class="col-sm-4 col-form-label">
									<strong>OSM-ID</strong>
								</label>
								<div class="col">
									<input type="text" readonly class="form-control-plaintext"
										id="elementOsmid" value="{{nodeService.detailView.osmId}}">
								</div>
							</div>
							<div class="form-group row item-detail">
								<label for="elementTyp" class="col-sm-4 col-form-label">
									<strong>Typ</strong>
								</label>
								<div class="col">
									<input type="text" readonly class="form-control-plaintext"
										id="elementTyp" value="{{nodeService.detailView.osmType}}">
								</div>
							</div>
							<div *ngFor="let tag of nodeService.detailView.tags"
								class="form-group row item-detail">
								<label for="elementKey" class="col-sm-4 col-form-label">
									<strong>{{translateTagKey(tag.key)}}</strong>
								</label>
								<div class="col">
									<input type="text" readonly class="form-control-plaintext"
										id="elementKey" value="{{tag.value}}">
								</div>
							</div>
						</div>
					</div>
274
				</div>
275

276
			</div>
277 278 279 280 281 282 283 284 285 286 287 288 289
			<div class="elementtitle">
				<strong>Ein Ort des guten Lebens in den Kategorien...</strong>
			</div>
			<div class="elementdiscription">
				<div class="">
					<div class="form-group">
						<div (click)="isCollapsed = !isCollapsed"
							[attr.aria-expanded]="!isCollapsed"
							aria-controls="collapseDescription" class="collapseDescription">
							<i class="fa fa-undo fa-lg" aria-hidden="true">&nbsp;</i>Akteure
							& Austausch<i class="fa fa-angle-down fa-lg fa-right"
								aria-hidden="true">&nbsp;</i>
						</div>
philippelke's avatar
philippelke committed
290
					</div>
291 292 293 294 295 296
					<div id="collapseDescription" [ngbCollapse]="isCollapsed">
						<div class="card ">
							<div class="card-body">
								<div *ngIf="!authService.loggedIn"
									class="form-group row item-detail">
									<div class="col">{{nodeService.detailView.description}}</div>
philippelke's avatar
philippelke committed
297
								</div>
298 299 300 301 302 303 304 305 306 307 308 309
								<div *ngIf="authService.loggedIn" class="form-group">
									<textarea class="form-control" id="descriptionTextarea"
										rows="15">{{nodeService.detailView.description}}</textarea>
								</div>
								<div class="elementbli">
									<div class="form-group row item-detail">
										<label for="elementBli" class="col-sm col-form-label">
											<strong>BLI-Dimensionen</strong>
										</label>

									</div>
									<!--<div *ngFor="let dimension of nodeService.detailView.dimensions"
310
				class="list-group">
Sebastian Bruch's avatar
Sebastian Bruch committed
311
				<div class="list-group-item list-group-item-action" title="{{dimension.description}}">{{dimension.name}}</div>
Jacob's avatar
Jacob committed
312
			</div>-->
313 314
									<app-bli class="bli-app" [node]="nodeService.detailView"
										[displayType]="checkboxes_non_icons"></app-bli>
philippelke's avatar
philippelke committed
315
								</div>
316 317 318 319 320 321 322 323 324 325 326 327 328 329
								<div class="elementpartner">
									<div class="form-group row item-detail">
										<label for="elementPartner" class="col-sm col-form-label">
											Netzwerkpartner </label>
									</div>
									<div *ngFor="let partner of nodeService.detailView.peers"
										class="list-group">
										<div class="list-group-item list-group-item-action">
											<i class="fa fa-map-marker" aria-hidden="true"></i>{{partner.name}}<label
												class="switch"><input type="checkbox"
												[checked]="mapService.hasNode(partner)"
												(change)="togglePeerVisibility(partner)"><span
												class="slider round"></span></label>
										</div>
philippelke's avatar
philippelke committed
330 331 332
									</div>
								</div>

333
							</div>
philippelke's avatar
philippelke committed
334 335 336
						</div>
					</div>
				</div>
337
			</div>
338 339 340
			<div class="elementSharing">
				<div class="">
					<div class="form-group ">
philippelke's avatar
philippelke committed
341

342 343 344 345 346 347 348
						<div (click)="isCollapsed = !isCollapsed"
							[attr.aria-expanded]="isCollapsed" aria-controls="collapseInfo"
							class="collapseSharing">
							<i class="fa fa-undo fa-lg" aria-hidden="true">&nbsp;</i>Teilen
							und Schenken<i class="fa fa-angle-down fa-lg fa-right"
								aria-hidden="true">&nbsp;</i>
						</div>
philippelke's avatar
philippelke committed
349
					</div>
350 351 352 353
					<div id="collapseSharing" [ngbCollapse]="isCollapsed">
						<div class="card container">
							<div class="card-body"></div>
						</div>
philippelke's avatar
philippelke committed
354
					</div>
355 356
				</div>
			</div>
philippelke's avatar
philippelke committed
357

358 359 360 361 362 363 364 365 366 367 368 369 370
			<br>
		</div>
	
		<div class="elementfooter">
			<div class="elementedit">
				<div class="elementeditbuttonwrap">
					<button (click)="search()" class="btn  elementeditbutton"
						type="submit">Diesen Ort bearbeiten</button>
				</div>
	
			</div>
			<div class="elementlastedit">Letzte Änderung</div>
		</div>
371 372
	</div>
</div>
373