<div class="panel panel-default projectspace lt-module-page__content-panel position-relative">
	<div class="saveConfigurationButton abs-position">
		<button ng-hide="saving" type="button" ng-click="openNewMetadataPopup();" class="btn btn-primary">{{'Add metadata' | translate}}</button>
	</div>
	<div style="position:relative;">
		<wizdom365-spinner class="spinner" loading="loading"></wizdom365-spinner>
	</div>
	<div class="panel-heading">{{'Metadata' | translate}}</div>

	<ul class="list-group lt-list">
		<li class="list-group-item lt-list__item lt-flextable__table">
			<div class="lt-flextable__row lt-flextable__row-heading col5">Name</div>
			<div class="lt-flextable__row lt-flextable__row-heading col5"></div>
			<div class="lt-flextable__row lt-flextable__row-heading col5">Type</div>
			<div class="lt-flextable__row lt-flextable__row-heading col5">Required</div>
			<div class="lt-flextable__row lt-flextable__row-heading col5"></div>
		</li>
	</ul>

	<ul class="list-group lt-list" ng-show="!loading">
		<li class="list-group-item lt-list__item lt-flextable__table" ng-repeat="def in metadataDefinitionsDto">
			<div class="lt-list-item__title lt-list-item__title lt-flextable__row col5">
				{{settings.getDisplayName(def)}}
				<span class="streamline icon-question-circle" style="cursor: pointer" data-placement="right" bs-popover template="BusinessApps/Templates/CommonMetadataHelp.html" auto-close="true"></span>
			</div>
			<div class="lt-flextable__row col5"></div>
			<div class="lt-flextable__row col5">{{def.type}}</div>
			<div class="lt-flextable__row col5">
				<div class="checkbox">
					<label>
						<input type="checkbox" ng-model="def.required" ng-change="updateMetadataDefinition(def)" ng-disabled="!settings.canBeModified(def) || true" />
					</label>
				</div>
			</div>
			<div class="lt-list-item__actions lt-flextable__row col5">
				<span class="streamline icon-pencil-1" aria-hidden="true" ng-click="openNewMetadataPopup(def)"></span>
				<span class="streamline icon-bin-1" aria-hidden="true" ng-show="settings.canBeDeleted(def)" href="" ng-click="deleteInstanceMetadata(def)"></span>
				<span class="streamline icon-bin-1" aria-hidden="true" ng-show="!settings.canBeDeleted(def)" ng-click="showCanDeleteMessage();"></span>
			</div>

		</li>
	</ul>

</div>