<commit_before><script type="text/ng-template" id="section_template.html">

	<li ng-if="!section.value" ng-class="{'thumbnail' : section.contextEntity}">
		<b>{{section.label}}</b>
		<ul ng-repeat="section in (section.content || section.contextEntity)" ng-include="'section_template.html'"></ul>
	</li>

	<li ng-if="section.value" ng-switch="isArray(section.value)">
		<span ng-switch-when="false" ng-bind-html="section.value"></span>
		<div ng-switch-when="true">
			<div class="section-item" ng-repeat="valueItem in section.value" ng-bind-html="valueItem"></div>
		</div>
	</li>

</script>
<div class="row" style="margin-top:0px;"  ng-controller="EntityCtrl as entityCtrl">
	<div ng-hide="entity.entityId || entity.error" class="loading"></div>
	<div class="alert alert-danger" ng-if="entity.error" >{{ entity.error | errorMessage }}</div>
	<div class="col-md-3" style="background-color:#fbfbfb; height:100%">
		<div class="page-header">
			<h2>&nbsp;<br><small>&nbsp;</small></h2>
		</div>

<!-- CURRENT QUERY STATUS -->
		<div >
			<div class="page-header">
				<h5 class="text-muted uppercase"><strong>Navigation durch Suchergebnisse</strong></h5>
			</div>
			<div ng-if="currentQueryParameters.q" class="panel panel-default">
				<div class="panel-heading">
					Aktuelle Suche <button ng-click="entityCtrl.goToResults()" class="btn btn-xs pull-right btn-primary">anzeigen</button>
				</div>
				<ul class="list-group" style="overflow:hidden">
					<li class="list-group-item">
						<b class="text-muted uppercase small">Suchbegriff</b><br>
						{{currentQueryParameters.q}}
					</li>

					<li class="list-group-item">
						<b class="text-muted uppercase small">Ergebnisse insgesamt</b><br>
						{{nextEntitySearch.size}} &nbsp;
					</li>

					<li class="list-group-item" ng-hide="nextEntitySearch.size < 2" >
						<b class="text-muted uppercase small">Ergebnisnummer</b>

						<form class="form-inline" action="{{ 'entity/' + entity.entityId }}" method="GET" role="search">
							<input style="display:none" name="q"  class="form-control" value="{{currentQueryParameters.q}}">
							<input style="display:none" name="fq" value="{{currentQueryParameters.fq}}">
							<input style="display:none" id="resultIndexInput" name="resultIndex" value="{{currentQueryParameters.resultIndex}}">
							<div class="input-group">
						    	<input type="number" size="4" id="humanizedResultIndex" onchange="document.getElementById('resultIndexInput').value = this.value-1" value="{{currentQueryParameters.resultIndex+1}}" style="width:50%" class="form-control input-sm">
						    	<span class="input-group-btn" style="display:block">
						    		<button type="submit" class="btn btn-default btn-sm" type="button">springe</button>
						    	</span>
						    </div>
						</form>
					</li>

					<li ng-if="activeFacets.length" class="list-group-item">
						<b class="text-muted uppercase small">Facetten</b>
						<ul>
							<li ng-repeat="facet in activeFacets"><small><i>{{facet.name | i18n}}</i><b style="text-transform:capitalize;"> &nbsp; {{facet.value}}</b></small></li>
						</ul>
					</li>

					<a style="height:66px; overflow:hidden" href="" class="list-group-item" ng-show="previousEntitySearch.entities.length" ng-click="entityCtrl.goToPreviousResult()">
						<b class="text-muted uppercase small"><span class="glyphicon glyphicon-chevron-up" style="color:black" ></span> &nbsp; vorheriges Ergebnis</b><br>
						<small>{{previousEntitySearch.entities[0].title}}</small>
						<small ng-if="previousEntitySearch.entities[0].title.length==0">Objekt der Kat.: {{previousEntitySearch.entities[0].type}}<br>{{previousEntitySearch.entities[0].subtitle}}</small>
						
					</a>
					<li class="list-group-item" style="background: #f5f5f5;" ng-hide="nextEntitySearch.size < 2" >
						<b class="text-muted uppercase small"><span class="glyphicon glyphicon-minus" style="color:black" ></span> &nbsp; aktuelles Ergebnis</b>
					</li>
					<a style="height:66px; overflow:hidden" class="list-group-item" href="" ng-show="nextEntitySearch.entities.length" ng-click="entityCtrl.goToNextResult()" >
						<b class="text-muted uppercase small"><span class="glyphicon glyphicon-chevron-down" style="color:black" ></span> &nbsp; nächstes Ergebnis</b><br>
						<small>{{nextEntitySearch.entities[0].title}}</small>
						<small ng-if="nextEntitySearch.entities[0].title.length==0">Objekt der Kat.: {{nextEntitySearch.entities[0].type}}<br>{{nextEntitySearch.entities[0].subtitle}}</small>
					</a>
				</ul>
			</div>
			<div ng-hide="currentQueryParameters.q">
				<p> Keine vorherige Suche vorhanden!</p>
			</div>
		</div>

<!-- RESULT NAVIGATION -->
		<!-- <div class="btn-group-vertical btn-block" ng-if="previousEntitySearch.entities[0] || nextEntitySearch.entities[0]">
				<button ng-click="entityCtrl.goToPreviousResult()" class="btn btn-default" style="text-align:left; overflow:hidden;" ng-if="previousEntitySearch.entities[0]">
				<span class="glyphicon glyphicon-arrow-up" ></span> &nbsp; <small>{{previousEntitySearch.entities[0].title}}</small>
			</button>
				<button ng-click="entityCtrl.goToNextResult()"  class="btn btn-default" style="text-align:left; overflow:hidden;" ng-if="nextEntitySearch.entities[0]">
				<span class="glyphicon glyphicon-arrow-down" ></span> &nbsp; <small>{{nextEntitySearch.entities[0].title}}</small>
			</button>
		</div> -->



<!-- NOTES -->
		<div ng-if="user.username" ng-init="queryBookmarListsForEntityId()">
			<div class="page-header">
				<h5 class="text-muted uppercase"><strong>Lesezeichen & Notiz</strong></h5>
			</div>
			<div ng-repeat="bookmarklist in bookmarklists">
				<div ng-repeat="bookmark in bookmarklist.bookmarks" class="panel panel-warning">
					<div class="panel-heading">
						{{ bookmarklist.name }}: 
						<div class="btn-group pull-right">
							<button class="btn btn-sm"  ng-click="updateBookmark(bookmark)" data-dismiss="alert" >
								<span class="glyphicon glyphicon-pencil"></span>
							</button>
							<button class="btn btn-sm"  ng-click="deleteBookmark(bookmark.id)" class="close" data-dismiss="alert" >
								<span class="glyphicon glyphicon-remove"></span>
							</button>
							
						</div>
					</div>
					<div class="panel-body small">
						{{ bookmark.commentary }}<br>
					</div>
				</div>
			</div>

			<button type="button" class="btn btn-warning btn-sm" ng-click="createBookmark()"><span class="glyphicon glyphicon-plus"></span> Notiz als Lesezeichen</button>
		</div>

	</div>
	<div class="col-md-6" ng-show="entity.entityId">
		<div class="page-header">
			<h2>
				{{ entity.title }} <span ng-if="!entity.title" class="capitalized">{{entity.type }}</span><br>
				<small>{{ entity.subtitle }}</small>
			</h2>
		</div>
		<div class="row">
			<div class="col-md-3">
				<b>Entity-ID:</b><br>{{ entity.entityId }}
			</div>
			<div class="col-md-3">
				<b>Kategorie:</b><br>{{ entity.type }}
			</div>
			<div class="col-md-3">
				<b>Seriennummer:</b><br>{{ entity.internalId }}
			</div>
			<div class="col-md-3">
				
				<div class="btn-group-vertical">
					<button style="text-align:left" ng-click="permaLink=!permaLink" class="btn btn-default btn-xs"><span ng-hide="permaLink" class="glyphicon glyphicon-resize-full"></span><span ng-hide="!permaLink" class="glyphicon glyphicon-resize-small"></span> &nbsp;Perma-Link </button>
					<button style="text-align:left" ng-show="entity.facet_aufbewahrungsort || entity.facet_fundort" ng-init="karteAnzeigen=false" ng-click="karteAnzeigen=!karteAnzeigen" class="btn btn-default btn-xs"><span ng-hide="karteAnzeigen" class="glyphicon glyphicon-resize-full"></span><span ng-hide="!karteAnzeigen" class="glyphicon glyphicon-resize-small"></span> &nbsp;Karte
					</button>
				</div>
			</div>
		</div>
		<div class="row" ng-hide="!permaLink">
			<div class="col-md-12">
				<hr>
				<b>Perma-Link: </b><a href="{{ serverUri }}entity/{{entity.entityId}}">{{ serverUri }}entity/{{entity.entityId}}</a>
			</div>
		</div>	
		<div class="row" ng-if="karteAnzeigen">
			<div class="col-md-12">
				<hr>
				<div ng-if="entity.facet_fundort" entities="[entity]" style="height:300px" locationfacetname="locationfacetname = 'facet_fundort'"  map id="map1"></div>
				<div ng-if="entity.facet_aufbewahrungsort" entities="[entity]" style="height:300px; margin-top:16px" locationfacetname="locationfacetname = 'facet_aufbewahrungsort'" map id="map2"></div>
			</div>
		</div>		  
		<hr/>
			<div class="sections" ng-repeat="section in entity.sections.content" ng-include="'section_template.html'">
			</div>
		<div ng-if="entity.additionalContent.ocrText">
			<div class="page-header"><h4>OCR Text-Analyse</h4></div>
			<ul>{{entity.additionalContent.ocrText}}</ul>
		</div>
		
		
	</div>
	<div class="col-md-3" ng-show="entity.entityId">
		<div class="page-header">
			<h2>&nbsp;<br><small>&nbsp;</small></h2>
		</div>

		<div class="row">
			<div class="col-md-12">
				<div ng-if="entity.thumbnailId">
					<a href="entity/{{entity.entityId}}/images"><img  class="img-thumbnail" ng-src="{{dataserviceUri}}/image/height/{{ entity.thumbnailId }}?height=300"></img></a>
				</div>
				<div ng-if="entity.images.length > 0">
					<h3 class="text-justify">
						<a href="entity/{{entity.entityId}}/images?showingInitialImagesGrid=true" class="btn btn-default btn-sm btn-default btn-block" ng-show="entity.images.length > 1"><span class="glyphicon glyphicon-chevron-down"></span> &nbsp; {{ 'Verbundene Bilder' | i18n }} anzeigen ({{entity.images.length}}) </a>
					</h3>
				</div>
			</div>
		</div>

		<div class="row"  ng-if="specialNavigations.specialNavigationElements">
			<div class="col-md-12">
				<div class="page-header">
					<h3>Andere Ansichten</h3>			
				</div>
				<div class="btn-group">
					<a target="_blank" ng-repeat="navigation in specialNavigations.specialNavigationElements" href="{{ navigation.link }}" type="button" class="btn btn-info btn-sm">{{ navigation.title}} </a>
				</div>
			</div>
		</div>
		
		<div class="row">
			<div class="col-md-12">
				<div class="page-header">
					<h3>Verknüpfte Objekte</h3>
				</div>

				<accordion class="accordion-with-list" close-others="true">
					<accordion-group is-open="" ng-repeat="facetValue in context" ng-click="loadFacetValueForContextEntities(facetValue)">
						<accordion-heading>
							<span class="capitalized">{{facetValue.value}}</span> <span class="badge pull-right">{{facetValue.count}}</span>
						</accordion-heading>
						<div>
							<span class="list-group-item" ng-hide="facetValue.entities.length || facetValue.count > 15 ">Lädt... </span>
							<a class="list-group-item" href="entity/{{entity.entityId}}" ng-repeat="entity in facetValue.entities">
								{{entity.title}}
							</a>
						</div>
						</accordion-group>
				</accordion>
			</div>
		</div>
	</div>
	
</div>
<commit_msg>hides search navigation if there was no search<commit_after><script type="text/ng-template" id="section_template.html">

	<li ng-if="!section.value" ng-class="{'thumbnail' : section.contextEntity}">
		<b>{{section.label}}</b>
		<ul ng-repeat="section in (section.content || section.contextEntity)" ng-include="'section_template.html'"></ul>
	</li>

	<li ng-if="section.value" ng-switch="isArray(section.value)">
		<span ng-switch-when="false" ng-bind-html="section.value"></span>
		<div ng-switch-when="true">
			<div class="section-item" ng-repeat="valueItem in section.value" ng-bind-html="valueItem"></div>
		</div>
	</li>

</script>
<div class="row" style="margin-top:0px;"  ng-controller="EntityCtrl as entityCtrl">
	<div ng-hide="entity.entityId || entity.error" class="loading"></div>
	<div class="alert alert-danger" ng-if="entity.error" >{{ entity.error | errorMessage }}</div>
	<div class="col-md-3" ng-if="currentQueryParameters.q">
		<div class="page-header">
			<h2>&nbsp;<br><small>&nbsp;</small></h2>
		</div>

<!-- CURRENT QUERY STATUS -->
		<div >
			<div class="page-header">
				<h5 class="text-muted uppercase"><strong>Navigation durch Suchergebnisse</strong></h5>
			</div>
			<div ng-if="currentQueryParameters.q" class="panel panel-default">
				<div class="panel-heading">
					Aktuelle Suche <button ng-click="entityCtrl.goToResults()" class="btn btn-xs pull-right btn-primary">anzeigen</button>
				</div>
				<ul class="list-group" style="overflow:hidden">
					<li class="list-group-item">
						<b class="text-muted uppercase small">Suchbegriff</b><br>
						{{currentQueryParameters.q}}
					</li>

					<li class="list-group-item">
						<b class="text-muted uppercase small">Ergebnisse insgesamt</b><br>
						{{nextEntitySearch.size}} &nbsp;
					</li>

					<li class="list-group-item" ng-hide="nextEntitySearch.size < 2" >
						<b class="text-muted uppercase small">Ergebnisnummer</b>

						<form class="form-inline" action="{{ 'entity/' + entity.entityId }}" method="GET" role="search">
							<input style="display:none" name="q"  class="form-control" value="{{currentQueryParameters.q}}">
							<input style="display:none" name="fq" value="{{currentQueryParameters.fq}}">
							<input style="display:none" id="resultIndexInput" name="resultIndex" value="{{currentQueryParameters.resultIndex}}">
							<div class="input-group">
						    	<input type="number" size="4" id="humanizedResultIndex" onchange="document.getElementById('resultIndexInput').value = this.value-1" value="{{currentQueryParameters.resultIndex+1}}" style="width:50%" class="form-control input-sm">
						    	<span class="input-group-btn" style="display:block">
						    		<button type="submit" class="btn btn-default btn-sm" type="button">springe</button>
						    	</span>
						    </div>
						</form>
					</li>

					<li ng-if="activeFacets.length" class="list-group-item">
						<b class="text-muted uppercase small">Facetten</b>
						<ul>
							<li ng-repeat="facet in activeFacets"><small><i>{{facet.name | i18n}}</i><b style="text-transform:capitalize;"> &nbsp; {{facet.value}}</b></small></li>
						</ul>
					</li>

					<a style="height:66px; overflow:hidden" href="" class="list-group-item" ng-show="previousEntitySearch.entities.length" ng-click="entityCtrl.goToPreviousResult()">
						<b class="text-muted uppercase small"><span class="glyphicon glyphicon-chevron-up" style="color:black" ></span> &nbsp; vorheriges Ergebnis</b><br>
						<small>{{previousEntitySearch.entities[0].title}}</small>
						<small ng-if="previousEntitySearch.entities[0].title.length==0">Objekt der Kat.: {{previousEntitySearch.entities[0].type}}<br>{{previousEntitySearch.entities[0].subtitle}}</small>
						
					</a>
					<li class="list-group-item" style="background: #f5f5f5;" ng-hide="nextEntitySearch.size < 2" >
						<b class="text-muted uppercase small"><span class="glyphicon glyphicon-minus" style="color:black" ></span> &nbsp; aktuelles Ergebnis</b>
					</li>
					<a style="height:66px; overflow:hidden" class="list-group-item" href="" ng-show="nextEntitySearch.entities.length" ng-click="entityCtrl.goToNextResult()" >
						<b class="text-muted uppercase small"><span class="glyphicon glyphicon-chevron-down" style="color:black" ></span> &nbsp; nächstes Ergebnis</b><br>
						<small>{{nextEntitySearch.entities[0].title}}</small>
						<small ng-if="nextEntitySearch.entities[0].title.length==0">Objekt der Kat.: {{nextEntitySearch.entities[0].type}}<br>{{nextEntitySearch.entities[0].subtitle}}</small>
					</a>
				</ul>
			</div>
		</div>


<!-- NOTES -->
		<div ng-if="user.username" ng-init="queryBookmarListsForEntityId()">
			<div class="page-header">
				<h5 class="text-muted uppercase"><strong>Lesezeichen & Notiz</strong></h5>
			</div>
			<div ng-repeat="bookmarklist in bookmarklists">
				<div ng-repeat="bookmark in bookmarklist.bookmarks" class="panel panel-warning">
					<div class="panel-heading">
						{{ bookmarklist.name }}: 
						<div class="btn-group pull-right">
							<button class="btn btn-sm"  ng-click="updateBookmark(bookmark)" data-dismiss="alert" >
								<span class="glyphicon glyphicon-pencil"></span>
							</button>
							<button class="btn btn-sm"  ng-click="deleteBookmark(bookmark.id)" class="close" data-dismiss="alert" >
								<span class="glyphicon glyphicon-remove"></span>
							</button>
							
						</div>
					</div>
					<div class="panel-body small">
						{{ bookmark.commentary }}<br>
					</div>
				</div>
			</div>

			<button type="button" class="btn btn-warning btn-sm" ng-click="createBookmark()"><span class="glyphicon glyphicon-plus"></span> Notiz als Lesezeichen</button>
		</div>

	</div>
	<div  ng-class="{'col-md-offset-2 col-md-5' : !currentQueryParameters.q }" class="col-md-6"  ng-show="entity.entityId">
		<div class="page-header">
			<h2>
				{{ entity.title }} <span ng-if="!entity.title" class="capitalized">{{entity.type }}</span><br>
				<small>{{ entity.subtitle }}</small>
			</h2>
		</div>
		<div class="row">
			<div class="col-md-3">
				<b>Entity-ID:</b><br>{{ entity.entityId }}
			</div>
			<div class="col-md-3">
				<b>Kategorie:</b><br>{{ entity.type }}
			</div>
			<div class="col-md-3">
				<b>Seriennummer:</b><br>{{ entity.internalId }}
			</div>
			<div class="col-md-3">
				
				<div class="btn-group-vertical">
					<button style="text-align:left" ng-click="permaLink=!permaLink" class="btn btn-default btn-xs"><span ng-hide="permaLink" class="glyphicon glyphicon-resize-full"></span><span ng-hide="!permaLink" class="glyphicon glyphicon-resize-small"></span> &nbsp;Perma-Link </button>
					<button style="text-align:left" ng-show="entity.facet_aufbewahrungsort || entity.facet_fundort" ng-init="karteAnzeigen=false" ng-click="karteAnzeigen=!karteAnzeigen" class="btn btn-default btn-xs"><span ng-hide="karteAnzeigen" class="glyphicon glyphicon-resize-full"></span><span ng-hide="!karteAnzeigen" class="glyphicon glyphicon-resize-small"></span> &nbsp;Karte
					</button>
				</div>
			</div>
		</div>
		<div class="row" ng-hide="!permaLink">
			<div class="col-md-12">
				<hr>
				<b>Perma-Link: </b><a href="{{ serverUri }}entity/{{entity.entityId}}">{{ serverUri }}entity/{{entity.entityId}}</a>
			</div>
		</div>	
		<div class="row" ng-if="karteAnzeigen">
			<div class="col-md-12">
				<hr>
				<div ng-if="entity.facet_fundort" entities="[entity]" style="height:300px" locationfacetname="locationfacetname = 'facet_fundort'"  map id="map1"></div>
				<div ng-if="entity.facet_aufbewahrungsort" entities="[entity]" style="height:300px; margin-top:16px" locationfacetname="locationfacetname = 'facet_aufbewahrungsort'" map id="map2"></div>
			</div>
		</div>		  
		<hr/>
			<div class="sections" ng-repeat="section in entity.sections.content" ng-include="'section_template.html'">
			</div>
		<div ng-if="entity.additionalContent.ocrText">
			<div class="page-header"><h4>OCR Text-Analyse</h4></div>
			<ul>{{entity.additionalContent.ocrText}}</ul>
		</div>
		
		
	</div>
	<div class="col-md-3" ng-show="entity.entityId">
		<div class="page-header">
			<h2>&nbsp;<br><small>&nbsp;</small></h2>
		</div>

		<div class="row">
			<div class="col-md-12">
				<div ng-if="entity.thumbnailId">
					<a href="entity/{{entity.entityId}}/images"><img  class="img-thumbnail" ng-src="{{dataserviceUri}}/image/height/{{ entity.thumbnailId }}?height=300"></img></a>
				</div>
				<div ng-if="entity.images.length > 0">
					<h3 class="text-justify">
						<a href="entity/{{entity.entityId}}/images?showingInitialImagesGrid=true" class="btn btn-default btn-sm btn-default btn-block" ng-show="entity.images.length > 1"><span class="glyphicon glyphicon-chevron-down"></span> &nbsp; {{ 'Verbundene Bilder' | i18n }} anzeigen ({{entity.images.length}}) </a>
					</h3>
				</div>
			</div>
		</div>

		<div class="row"  ng-if="specialNavigations.specialNavigationElements">
			<div class="col-md-12">
				<div class="page-header">
					<h3>Andere Ansichten</h3>			
				</div>
				<div class="btn-group">
					<a target="_blank" ng-repeat="navigation in specialNavigations.specialNavigationElements" href="{{ navigation.link }}" type="button" class="btn btn-info btn-sm">{{ navigation.title}} </a>
				</div>
			</div>
		</div>
		
		<div class="row">
			<div class="col-md-12">
				<div class="page-header">
					<h3>Verknüpfte Objekte</h3>
				</div>

				<accordion class="accordion-with-list" close-others="true">
					<accordion-group is-open="" ng-repeat="facetValue in context" ng-click="loadFacetValueForContextEntities(facetValue)">
						<accordion-heading>
							<span class="capitalized">{{facetValue.value}}</span> <span class="badge pull-right">{{facetValue.count}}</span>
						</accordion-heading>
						<div>
							<span class="list-group-item" ng-hide="facetValue.entities.length || facetValue.count > 15 ">Lädt... </span>
							<a class="list-group-item" href="entity/{{entity.entityId}}" ng-repeat="entity in facetValue.entities">
								{{entity.title}}
							</a>
						</div>
						</accordion-group>
				</accordion>
			</div>
		</div>
	</div>
	
</div>

{'fraction_non_alphanumeric': 0.20000953561552398, 'fraction_numerical': 0.008248307428244494, 'mean_word_length': 4.237203495630462, 'pattern_counts': {'":': 0, '<': 599, '<?xml version=': 0, '>': 601, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5590323', 'n_tokens_mistral': 8618, 'n_tokens_neox': 7182, 'n_words': 1187}