Implement feedback

Change padding into margin
Change 'Create link' to a button
Add placeholder to extension field
Fix pagination
This commit is contained in:
Yana De Pauw
2019-08-16 13:00:04 +02:00
parent 863189b2e5
commit 1d05680126
6 changed files with 16 additions and 12 deletions

View File

@@ -17,6 +17,7 @@
"admin.registries.bitstream-formats.edit.description.label": "Description",
"admin.registries.bitstream-formats.edit.extensions.hint": "Extensions are file extensions that are used to automatically identify the format of uploaded files. You can enter several extensions for each format.",
"admin.registries.bitstream-formats.edit.extensions.label": "File extensions",
"admin.registries.bitstream-formats.edit.extensions.placeholder": "Enter a file extenstion without the dot",
"admin.registries.bitstream-formats.edit.failure.content": "An error occurred while editing the bitstream format.",
"admin.registries.bitstream-formats.edit.failure.head": "Failure",
"admin.registries.bitstream-formats.edit.head": "Bitstream format: {{ format }}",

View File

@@ -1,8 +1,8 @@
<div class="container">
<div class="row">
<div class="col-12 pb-4">
<div class="col-12 mb-4">
<h2 id="sub-header"
class="border-bottom pb-2">{{ 'admin.registries.bitstream-formats.create.new' | translate }}</h2>
class="border-bottom mb-2">{{ 'admin.registries.bitstream-formats.create.new' | translate }}</h2>
<ds-bitstream-format-form (updatedFormat)="createBitstreamFormat($event)"></ds-bitstream-format-form>

View File

@@ -2,10 +2,10 @@
<div class="bitstream-formats row">
<div class="col-12">
<h2 id="header" class="border-bottom pb-2">{{'admin.registries.bitstream-formats.head' | translate}}</h2>
<h2 id="header" class="border-bottom mb-2">{{'admin.registries.bitstream-formats.head' | translate}}</h2>
<p id="description">{{'admin.registries.bitstream-formats.description' | translate}}</p>
<p id="create-new" class="pb-2"><a [routerLink]="'add'">{{'admin.registries.bitstream-formats.create.new' | translate}}</a></p>
<p id="create-new" class="mb-2"><a [routerLink]="'add'" class="btn btn-success">{{'admin.registries.bitstream-formats.create.new' | translate}}</a></p>
<ds-pagination

View File

@@ -36,7 +36,7 @@ export class BitstreamFormatsComponent implements OnInit {
* Currently simply renders all bitstream formats
*/
config: FindAllOptions = Object.assign(new FindAllOptions(), {
elementsPerPage: 10000
elementsPerPage: 20
});
/**
@@ -45,7 +45,7 @@ export class BitstreamFormatsComponent implements OnInit {
*/
pageConfig: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'registry-bitstreamformats-pagination',
pageSize: 10000
pageSize: 20
});
constructor(private notificationsService: NotificationsService,
@@ -142,9 +142,11 @@ export class BitstreamFormatsComponent implements OnInit {
* @param event The page change event
*/
onPageChange(event) {
this.config.currentPage = event;
this.config = Object.assign(new FindAllOptions(), this.config, {
currentPage: event,
});
this.pageConfig.currentPage = event;
this.updateFormats();
this.pageState.next('pageChange');
}
ngOnInit(): void {

View File

@@ -1,8 +1,8 @@
<div class="container">
<div class="row">
<div class="col-12 pb-4">
<div class="col-12 mb-4">
<h2 id="sub-header"
class="border-bottom pb-2">{{'admin.registries.bitstream-formats.edit.head' | translate:{format: (bitstreamFormatRD$ | async)?.payload.shortDescription} }}</h2>
class="border-bottom mb-2">{{'admin.registries.bitstream-formats.edit.head' | translate:{format: (bitstreamFormatRD$ | async)?.payload.shortDescription} }}</h2>
<ds-bitstream-format-form [bitstreamFormat]="(bitstreamFormatRD$ | async)?.payload" (updatedFormat)="updateFormat($event)"></ds-bitstream-format-form>

View File

@@ -4,7 +4,7 @@ import { BitstreamFormatSupportLevel } from '../../../../core/shared/bitstream-f
import {
DynamicCheckboxModel,
DynamicFormArrayModel,
DynamicFormControlLayout,
DynamicFormControlLayout, DynamicFormControlLayoutConfig,
DynamicFormControlModel,
DynamicFormService,
DynamicInputModel,
@@ -49,7 +49,7 @@ export class FormatFormComponent implements OnInit {
arrayElementLayout: DynamicFormControlLayout = {
grid: {
group: 'form-row',
}
},
};
/**
@@ -114,6 +114,7 @@ export class FormatFormComponent implements OnInit {
groupFactory: () => [
new DynamicInputModel({
id: 'extension',
placeholder: 'admin.registries.bitstream-formats.edit.extensions.placeholder',
}, this.arrayInputElementLayout)
]
}, this.arrayElementLayout),