Closes #136 #138: ui fixes

This commit is contained in:
Benjamin Gamard 2017-11-02 23:14:00 +01:00
parent 1856ccc3aa
commit 1b4eb70d8d

View File

@ -2,6 +2,16 @@
<div ng-show="document || !isEdit()">
<form name="documentForm" class="form-horizontal">
<div class="pull-right btn-group">
<button type="submit" class="btn btn-primary" ng-disabled="!documentForm.$valid || fileIsUploading" ng-click="edit()">
<span class="glyphicon glyphicon-floppy-disk"></span>
{{ 'save' | translate }}
</button>
</div>
<div class="page-header">
<h1>{{ document.title }}&nbsp;</h1>
</div>
<fieldset>
<legend>{{ 'document.edit.primary_metadata' | translate }}</legend>
<div class="form-group" ng-class="{ 'has-error': !documentForm.title.$valid }">
@ -68,8 +78,12 @@
</div>
</fieldset>
<fieldset>
<legend>{{ 'document.edit.additional_metadata' | translate }}</legend>
<fieldset ng-init="additionalMetadataCollapsed = true">
<legend class="pointer" ng-click="additionalMetadataCollapsed = !additionalMetadataCollapsed">
{{ 'document.edit.additional_metadata' | translate }}
<span class="pull-right glyphicon glyphicon-plus"></span>
</legend>
<div ng-show="!additionalMetadataCollapsed">
<div class="form-group" ng-class="{ 'has-error': !documentForm.subject.$valid }">
<label class="col-sm-2 control-label" for="inputSubject">{{ 'document.subject' | translate }}</label>
<div class="col-sm-10">
@ -139,11 +153,15 @@
<select-relation relations="document.relations" ref="inputRelations" ng-disabled="fileIsUploading"></select-relation>
</div>
</div>
</div>
</fieldset>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary" ng-disabled="!documentForm.$valid || fileIsUploading" ng-click="edit()">{{ 'save' | translate }}</button>
<button type="submit" class="btn btn-primary" ng-disabled="!documentForm.$valid || fileIsUploading" ng-click="edit()">
<span class="glyphicon glyphicon-floppy-disk"></span>
{{ 'save' | translate }}
</button>
<button type="submit" class="btn btn-default" ng-click="cancel()" ng-disabled="fileIsUploading">{{ 'cancel' | translate }}</button>
</div>
</div>