entity-browser-frontend/app/pages/database.html (59 lines of code) (raw):
<div class="container-fluid">
<div ng-controller="DatabaseController as databaseCtrl">
<div ng-if="databaseCtrl.loaded">
<div ng-if="databaseCtrl.found">
<div class="row database-title-container">
<div class="col-md-8">
<h2 class="database-description">{{databaseCtrl.fullDatabase.description}}</h2>
<div class="database-location">{{databaseCtrl.fullDatabase.location}}</div>
<span class="badge badge-warning" ng-if="databaseCtrl.fullDatabase.readonly">readonly</span>
</div>
<div class="col-md-4">
</div>
</div>
<div ng-if="databaseCtrl.fullDatabase.types.length">
<search></search>
<type-view></type-view>
</div>
<div ng-if="!databaseCtrl.fullDatabase.types.length">
<h4>Database is empty - you can add
<button ng-if="!databaseCtrl.fullDatabase.readonly" class="btn btn-default js-close-popover"
uib-popover-template="'add-new-entity-type.html'"
popover-title="New entity type"
popover-placement="bottom">Entity type
</button>
</h4>
</div>
</div>
<div ng-if="!databaseCtrl.found">
<h4>
There is no such database. Try to <a href="databases">lookup</a> another database
</h4>
</div>
</div>
<div ng-if="!databaseCtrl.loaded">
<h3>loading data...</h3>
</div>
<script type="text/ng-template" id="add-new-entity-type.html">
<div ng-controller="AddTypeController as addTypeCtrl">
<form id="addType" novalidate ng-submit="addTypeCtrl.addNewEntityType()">
<div class="form horizontal-form">
<div class="form-group input-group" data-ng-class="{'has-error': addTypeCtrl.error}">
<input
data-ng-required="true"
name="newTypeName"
type="text"
ng-model="addTypeCtrl.newTypeName"
data-uib-tooltip="{{addTypeCtrl.error}}"
data-uib-tooltip-trigger="mouseenter"
class="form-control">
<div class="input-group-btn">
<button class="btn btn-primary" type="button" ng-click="addTypeCtrl.addNewEntityType()">Add</button>
</div>
</div>
</div>
</form>
</div>
</script>
</div>
</div>