<commit_before><script type="text/ng-template" id="section_template.html">
	<li ng-if="section.value">
		<div ng-switch="isArray(section.value)">
			<span ng-switch-when="false" ng-bind-html="section.value"></span>
			<ul ng-switch-when="true">
				<li style="list-style:disc" ng-repeat="valueItem in section.value" ng-bind-html="valueItem"></li>
			</ul>
		</div>
	</li>
	<div ng-if="!section.value">
		<b>{{section.label}}</b>
		<ul ng-repeat="section in section.content" ng-include="'section_template.html'"></ul>
	</div>
</script>

<div class="row" style="margin-top:0px;"  ng-controller="EntityCtrl as entityCtrl">
	<div ng-hide="entity.entityId" class="loading"></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 ng-if="currentQueryParameters.q">
			<div class="page-header">
				<h5 class="text-muted uppercase"><strong>Navigation durch Suchergebnisse</strong></h5>
			</div>
			<div 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}}
					</li>

					<li class="list-group-item" >
						<b class="text-muted uppercase small">Ergebnisnummer</b>
						<form class="form-inline" role="form">

							<div class="input-group">
								
						    	<input type="number" size="4" ng-model="currentQueryParameters.resultIndex" style="width:50%" class="form-control input-sm">
						    	<span class="input-group-btn" style="display:block" ng-init="oldResultIndex = currentQueryParameters.resultIndex" >
						        	<button ng-click="entityCtrl.goToResultNr(currentQueryParameters.resultIndex)" class="btn btn-default btn-sm" ng-class="{ 'disabled' : currentQueryParameters.resultIndex==oldResultIndex }" 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 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>
					</a>
					<li class="list-group-item" style="background: #f5f5f5;">
						<b class="text-muted uppercase small"><span class="glyphicon glyphicon-minus" style="color:black" ></span> &nbsp; aktuelles Ergebnis</b>
					</li>
					<a 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>
					</a>



					
				</ul>
			</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> {{ entity.entityId }}
			</div>
			<div class="col-md-3">
				<b>Kategorie:</b> {{ entity.type }}
			</div>
			<div class="col-md-3">
				<b>Seriennummer:</b> {{ entity.internalId }}
			</div>
			<div class="col-md-3">
				<div class="btn-group">
					<button ng-click="permaLink=!permaLink" class="btn btn-default btn-xs">Perma-Link</button>
					<button ng-init="karteAnzeigen=false" ng-click="karteAnzeigen=!karteAnzeigen" class="btn btn-default btn-xs">Karte</button>
				</div>
			</div>
		</div>
		<div class="row" ng-hide="!permaLink">
			<div class="col-md-12">
				<hr>
				<b>Perma-Link: </b>{{ serverUri }}entity/{{entity.entityId}}
			</div>
		</div>	
		<div class="row" ng-if="karteAnzeigen">
			<div class="col-md-12">
				<hr>
				<div ng-if="entity.title" entities="[entity]" style="height:300px" map id="map"></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" ng-init="showConnectedImages=false">
						<button class="btn btn-default btn-sm btn-default btn-block" ng-click="showConnectedImages = true"  ng-hide="showConnectedImages == true || entity.images.length < 2 || entity.images.length > 8"><span class="glyphicon glyphicon-chevron-down"></span> &nbsp; {{ 'Verbundene Bilder' | i18n }} anzeigen ({{entity.images.length}}) </button>
						<a href="entity/{{entity.entityId}}/images?showingInitialImagesGrid=true" class="btn btn-default btn-sm btn-default btn-block" ng-show="entity.images.length > 8"><span class="glyphicon glyphicon-chevron-down"></span> &nbsp; {{ 'Verbundene Bilder' | i18n }} anzeigen ({{entity.images.length}}) </a>
					</h3>
					<div ng-if="showConnectedImages == true">
						<div class="page-header">
							<h3>{{ 'Verbundene Bilder' | i18n }}</h3>
						</div>

						<div ng-if="entity.images.length" ng-repeat="image in entity.images">
							<div ng-if=" $index % 3 == 0" imagesrow class="imagesrow clearfix">
								<div arachneImageRequest="height" arachneImageHeight="200" is-placeholder-if-empty="{{entity.images[$index]}}" imageid="{{entity.images[$index].imageId}}" link="entity/{{entity.entityId}}/images?imageIndex={{$index}}" ></div>
								<div arachneImageRequest="height" arachneImageHeight="200" is-placeholder-if-empty="{{entity.images[$index+1]}}" imageid="{{entity.images[$index+1].imageId}}" link="entity/{{entity.entityId}}/images?imageIndex={{$index+1}}" ></div>
								<div arachneImageRequest="height" arachneImageHeight="200" is-placeholder-if-empty="{{entity.images[$index+2]}}" imageid="{{entity.images[$index+2].imageId}}" link="entity/{{entity.entityId}}/images?imageIndex={{$index+2}}" ></div>
							</div>
						</div>
					</div>
				</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 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><commit_msg>specialNavigation Links for entity, like TEI-Viewer, opens in sperate window<commit_after><script type="text/ng-template" id="section_template.html">
	<li ng-if="section.value">
		<div ng-switch="isArray(section.value)">
			<span ng-switch-when="false" ng-bind-html="section.value"></span>
			<ul ng-switch-when="true">
				<li style="list-style:disc" ng-repeat="valueItem in section.value" ng-bind-html="valueItem"></li>
			</ul>
		</div>
	</li>
	<div ng-if="!section.value">
		<b>{{section.label}}</b>
		<ul ng-repeat="section in section.content" ng-include="'section_template.html'"></ul>
	</div>
</script>

<div class="row" style="margin-top:0px;"  ng-controller="EntityCtrl as entityCtrl">
	<div ng-hide="entity.entityId" class="loading"></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 ng-if="currentQueryParameters.q">
			<div class="page-header">
				<h5 class="text-muted uppercase"><strong>Navigation durch Suchergebnisse</strong></h5>
			</div>
			<div 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}}
					</li>

					<li class="list-group-item" >
						<b class="text-muted uppercase small">Ergebnisnummer</b>
						<form class="form-inline" role="form">

							<div class="input-group">
								
						    	<input type="number" size="4" ng-model="currentQueryParameters.resultIndex" style="width:50%" class="form-control input-sm">
						    	<span class="input-group-btn" style="display:block" ng-init="oldResultIndex = currentQueryParameters.resultIndex" >
						        	<button ng-click="entityCtrl.goToResultNr(currentQueryParameters.resultIndex)" class="btn btn-default btn-sm" ng-class="{ 'disabled' : currentQueryParameters.resultIndex==oldResultIndex }" 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 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>
					</a>
					<li class="list-group-item" style="background: #f5f5f5;">
						<b class="text-muted uppercase small"><span class="glyphicon glyphicon-minus" style="color:black" ></span> &nbsp; aktuelles Ergebnis</b>
					</li>
					<a 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>
					</a>



					
				</ul>
			</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> {{ entity.entityId }}
			</div>
			<div class="col-md-3">
				<b>Kategorie:</b> {{ entity.type }}
			</div>
			<div class="col-md-3">
				<b>Seriennummer:</b> {{ entity.internalId }}
			</div>
			<div class="col-md-3">
				<div class="btn-group">
					<button ng-click="permaLink=!permaLink" class="btn btn-default btn-xs">Perma-Link</button>
					<button ng-init="karteAnzeigen=false" ng-click="karteAnzeigen=!karteAnzeigen" class="btn btn-default btn-xs">Karte</button>
				</div>
			</div>
		</div>
		<div class="row" ng-hide="!permaLink">
			<div class="col-md-12">
				<hr>
				<b>Perma-Link: </b>{{ serverUri }}entity/{{entity.entityId}}
			</div>
		</div>	
		<div class="row" ng-if="karteAnzeigen">
			<div class="col-md-12">
				<hr>
				<div ng-if="entity.title" entities="[entity]" style="height:300px" map id="map"></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" ng-init="showConnectedImages=false">
						<button class="btn btn-default btn-sm btn-default btn-block" ng-click="showConnectedImages = true"  ng-hide="showConnectedImages == true || entity.images.length < 2 || entity.images.length > 8"><span class="glyphicon glyphicon-chevron-down"></span> &nbsp; {{ 'Verbundene Bilder' | i18n }} anzeigen ({{entity.images.length}}) </button>
						<a href="entity/{{entity.entityId}}/images?showingInitialImagesGrid=true" class="btn btn-default btn-sm btn-default btn-block" ng-show="entity.images.length > 8"><span class="glyphicon glyphicon-chevron-down"></span> &nbsp; {{ 'Verbundene Bilder' | i18n }} anzeigen ({{entity.images.length}}) </a>
					</h3>
					<div ng-if="showConnectedImages == true">
						<div class="page-header">
							<h3>{{ 'Verbundene Bilder' | i18n }}</h3>
						</div>

						<div ng-if="entity.images.length" ng-repeat="image in entity.images">
							<div ng-if=" $index % 3 == 0" imagesrow class="imagesrow clearfix">
								<div arachneImageRequest="height" arachneImageHeight="200" is-placeholder-if-empty="{{entity.images[$index]}}" imageid="{{entity.images[$index].imageId}}" link="entity/{{entity.entityId}}/images?imageIndex={{$index}}" ></div>
								<div arachneImageRequest="height" arachneImageHeight="200" is-placeholder-if-empty="{{entity.images[$index+1]}}" imageid="{{entity.images[$index+1].imageId}}" link="entity/{{entity.entityId}}/images?imageIndex={{$index+1}}" ></div>
								<div arachneImageRequest="height" arachneImageHeight="200" is-placeholder-if-empty="{{entity.images[$index+2]}}" imageid="{{entity.images[$index+2].imageId}}" link="entity/{{entity.entityId}}/images?imageIndex={{$index+2}}" ></div>
							</div>
						</div>
					</div>
				</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>
{'fraction_non_alphanumeric': 0.20125065635591197, 'fraction_numerical': 0.00878323547663373, 'mean_word_length': 4.0312199807877045, 'pattern_counts': {'":': 0, '<': 597, '<?xml version=': 0, '>': 603, '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': '6233396', 'n_tokens_mistral': 8723, 'n_tokens_neox': 7170, 'n_words': 1195}