Merge branch 'master' into w2p-63669_Edit-Col/Com-Tabs

Conflicts:
	resources/i18n/en.json
	src/app/shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.spec.ts
	src/app/shared/shared.module.ts
This commit is contained in:
Kristof De Langhe
2019-10-03 13:46:11 +02:00
691 changed files with 13384 additions and 6009 deletions

2
.gitignore vendored
View File

@@ -5,6 +5,8 @@
/tsd_typings/
npm-debug.log
/build/
/config/environment.dev.js
/config/environment.prod.js

View File

@@ -1,26 +1,58 @@
sudo: required
dist: trusty
env:
# Install the latest docker-compose version for ci testing.
# The default installation in travis is not compatible with the latest docker-compose file version.
COMPOSE_VERSION: 1.24.1
# The ci step will test the dspace-angular code against DSpace REST.
# Direct that step to utilize a DSpace REST service that has been started in docker.
DSPACE_REST_HOST: localhost
DSPACE_REST_PORT: 8080
DSPACE_REST_NAMESPACE: '/server/api'
DSPACE_REST_SSL: false
before_install:
# Docker Compose Install
- curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- git clone https://github.com/DSpace-Labs/DSpace-Docker-Images.git
install:
# Start up DSpace 7 using the entities database dump
- docker-compose -f DSpace-Docker-Images/docker-compose-files/dspace-compose-v2/d7.travis.ci.yml up -d
# Use the dspace-cli image to populate the assetstore. Trigger a discovery and oai update
- docker-compose -f DSpace-Docker-Images/docker-compose-files/dspace-compose-v2/d7.cli.yml -f DSpace-Docker-Images/docker-compose-files/dspace-compose-v2/d7.cli.assetstore.yml run --rm dspace-cli
- travis_retry yarn install
before_script:
# The following line could be enabled to verify that the rest server is responding.
# Currently, "yarn run build" takes enough time to run to allow the service to be available
#- curl http://localhost:8080/
after_script:
- docker-compose -f DSpace-Docker-Images/docker-compose-files/dspace-compose-v2/d7.travis.ci.yml down
addons:
apt:
sources:
- google-chrome
packages:
- dpkg
- google-chrome-stable
language: node_js
node_js:
- "8"
- "9"
- "10"
cache:
yarn: true
bundler_args: --retry 5
install:
- travis_retry yarn install
script:
# Use Chromium instead of Chrome.
- export CHROME_BIN=chromium-browser

View File

@@ -14,7 +14,7 @@ If you're looking for the 2016 Angular 2 DSpace UI prototype, you can find it [h
Quick start
-----------
**Ensure you're running [Node](https://nodejs.org) >= `v8.0.x`, [npm](https://www.npmjs.com/) >= `v5.x` and [yarn](https://yarnpkg.com) >= `v1.x`**
**Ensure you're running [Node](https://nodejs.org) `v8.0.x` or `v10.0.x`, [npm](https://www.npmjs.com/) >= `v5.x` and [yarn](https://yarnpkg.com) >= `v1.x`**
```bash
# clone the repo
@@ -65,7 +65,7 @@ Requirements
------------
- [Node.js](https://nodejs.org), [npm](https://www.npmjs.com/), and [yarn](https://yarnpkg.com)
- Ensure you're running node >= `v8.x`, npm >= `v5.x` and yarn >= `v1.x`
- Ensure you're running node `v8.x` or `v10.x`, npm >= `v5.x` and yarn >= `v1.x`
If you have [`nvm`](https://github.com/creationix/nvm#install-script) or [`nvm-windows`](https://github.com/coreybutler/nvm-windows) installed, which is highly recommended, you can run `nvm install --lts && nvm use` to install and start using the latest Node LTS.

View File

@@ -13,7 +13,7 @@ module.exports = {
host: 'dspace7.4science.cloud',
port: 443,
// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: '/dspace-spring-rest/api'
nameSpace: '/server/api'
},
// Caching settings
cache: {
@@ -149,11 +149,39 @@ module.exports = {
// Limit for years to display using jumps of five years (current year - fiveYearLimit)
fiveYearLimit: 30,
// The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items)
defaultLowerLimit: 1900
defaultLowerLimit: 1900,
// List of all the active Browse-By types
// Adding a type will activate their Browse-By page and add them to the global navigation menu, as well as community and collection pages
// Allowed fields and their purpose:
// id: The browse id to use for fetching info from the rest api
// type: The type of Browse-By page to display
// metadataField: The metadata-field used to create starts-with options (only necessary when the type is set to 'date')
types: [
{
id: 'title',
type: 'title'
},
{
id: 'dateissued',
type: 'date',
metadataField: 'dc.date.issued'
},
{
id: 'author',
type: 'metadata'
},
{
id: 'subject',
type: 'metadata'
}
]
},
item: {
edit: {
undoTimeout: 10000 // 10 seconds
}
},
theme: {
name: 'default',
}
};

View File

@@ -1,3 +1,4 @@
// This configuration is currently only being used for unit tests, end-to-end tests use environment.dev.ts
module.exports = {
};

View File

@@ -8,7 +8,10 @@
},
"license": "BSD-2-Clause",
"engines": {
"node": ">=8.0.0"
"node": "8.* || >= 10.*"
},
"resolutions": {
"set-value": ">= 2.0.1"
},
"scripts": {
"global": "npm install -g @angular/cli marked node-gyp nodemon node-nightly npm-check-updates npm-run-all rimraf typescript ts-node typedoc webpack webpack-bundle-analyzer pm2 rollup",
@@ -17,15 +20,16 @@
"clean:doc": "rimraf doc",
"clean:log": "rimraf *.log*",
"clean:json": "rimraf *.records.json",
"clean:bld": "rimraf build",
"clean:node": "rimraf node_modules",
"clean:prod": "yarn run clean:coverage && yarn run clean:doc && yarn run clean:dist && yarn run clean:log && yarn run clean:json",
"clean:prod": "yarn run clean:coverage && yarn run clean:doc && yarn run clean:dist && yarn run clean:log && yarn run clean:json && yarn run clean:bld",
"clean": "yarn run clean:prod && yarn run clean:node",
"prebuild": "yarn run clean:dist",
"prebuild:aot": "yarn run prebuild",
"prebuild": "yarn run clean:bld && yarn run clean:dist",
"prebuild:ci": "yarn run prebuild",
"prebuild:prod": "yarn run prebuild",
"build": "node ./webpack/run-webpack.js --progress --mode development",
"build:aot": "node ./webpack/run-webpack.js --env.aot --env.server --mode development && node ./webpack/run-webpack.js --env.aot --env.client --mode development",
"build:prod": "node ./webpack/run-webpack.js --env.aot --env.server --mode production && node ./webpack/run-webpack.js --env.aot --env.client --mode production",
"build": "node ./scripts/webpack.js --progress --mode development",
"build:ci": "yarn run syncbuilddir && node ./scripts/webpack.js --env.aot --env.server --mode development && node ./scripts/webpack.js --env.aot --env.client --mode development",
"build:prod": "yarn run syncbuilddir && node ./scripts/webpack.js --env.aot --env.server --mode production && node ./scripts/webpack.js --env.aot --env.client --mode production",
"postbuild:prod": "yarn run rollup",
"rollup": "rollup -c rollup.config.js",
"prestart": "yarn run build:prod",
@@ -40,7 +44,8 @@
"server": "node dist/server.js",
"server:watch": "nodemon dist/server.js",
"server:watch:debug": "nodemon --debug dist/server.js",
"webpack:watch": "node ./webpack/run-webpack.js -w --mode development",
"syncbuilddir": "node ./scripts/sync-build-dir.js",
"webpack:watch": "node ./scripts/webpack.js -w --mode development",
"watch": "yarn run build && npm-run-all -p webpack:watch server:watch",
"watch:debug": "yarn run build && npm-run-all -p webpack:watch server:watch:debug",
"predebug": "yarn run build",
@@ -49,10 +54,13 @@
"debug:server": "node-nightly --inspect --debug-brk dist/server.js",
"debug:build": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --mode development",
"debug:build:prod": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --env.aot --env.client --env.server --mode production",
"ci": "yarn run lint && yarn run build:aot && yarn run test:headless && npm-run-all -p -r server e2e",
"ci": "yarn run lint && yarn run build:ci && yarn run test:headless && npm-run-all -p -r server e2e",
"protractor": "node node_modules/protractor/bin/protractor",
"pree2e": "yarn run webdriver:update",
"e2e": "yarn run protractor",
"pretest": "yarn run clean:bld",
"pretest:headless": "yarn run pretest",
"pretest:watch": "yarn run pretest",
"test": "karma start --single-run",
"test:headless": "karma start --single-run --browsers ChromeHeadless",
"test:watch": "karma start --no-single-run --auto-watch",
@@ -60,7 +68,9 @@
"webdriver:update": "node node_modules/protractor/bin/webdriver-manager update --standalone --gecko false",
"lint": "tslint \"src/**/*.ts\" && tslint \"e2e/**/*.ts\"",
"docs": "typedoc --options typedoc.json ./src/",
"coverage": "http-server -c-1 -o -p 9875 ./coverage"
"coverage": "http-server -c-1 -o -p 9875 ./coverage",
"postinstall": "yarn run patch-protractor",
"patch-protractor": "ncp node_modules/webdriver-manager node_modules/protractor/node_modules/webdriver-manager"
},
"dependencies": {
"@angular/animations": "^6.1.4",
@@ -94,6 +104,7 @@
"compression": "1.7.1",
"cookie-parser": "1.4.3",
"core-js": "^2.5.7",
"debug-loader": "^0.0.1",
"express": "4.16.2",
"express-session": "1.15.6",
"fast-json-patch": "^2.0.7",
@@ -104,6 +115,7 @@
"https": "1.0.0",
"js-cookie": "2.2.0",
"js.clone": "0.0.3",
"json5": "^2.1.0",
"jsonschema": "1.2.2",
"jwt-decode": "^2.2.0",
"methods": "1.1.2",
@@ -117,10 +129,11 @@
"ngx-moment": "^3.1.0",
"ngx-pagination": "3.0.3",
"nouislider": "^11.0.0",
"pem": "1.12.3",
"pem": "1.13.2",
"reflect-metadata": "0.1.12",
"rxjs": "6.2.2",
"rxjs-spy": "^7.5.1",
"sass-resources-loader": "^2.0.0",
"sortablejs": "1.7.0",
"text-mask-core": "5.0.1",
"ts-loader": "^5.2.1",
@@ -148,6 +161,7 @@
"@types/hammerjs": "2.0.35",
"@types/jasmine": "^2.8.6",
"@types/js-cookie": "2.1.0",
"@types/json5": "^0.0.30",
"@types/lodash": "^4.14.110",
"@types/memory-cache": "0.2.0",
"@types/mime": "2.0.0",
@@ -163,6 +177,7 @@
"codelyzer": "^4.4.4",
"compression-webpack-plugin": "^1.1.6",
"copy-webpack-plugin": "^4.4.1",
"copyfiles": "^2.1.1",
"coveralls": "3.0.0",
"css-loader": "1.0.0",
"cssnano": "^4.1.10",
@@ -185,8 +200,9 @@
"karma-remap-coverage": "^0.1.5",
"karma-remap-istanbul": "0.6.0",
"karma-sourcemap-loader": "0.3.7",
"karma-webdriver-launcher": "1.0.5",
"karma-webdriver-launcher": "^1.0.7",
"karma-webpack": "3.0.0",
"ncp": "^2.0.0",
"ngrx-store-freeze": "^0.2.4",
"node-sass": "^4.11.0",
"nodemon": "^1.15.0",
@@ -199,7 +215,7 @@
"postcss-loader": "^3.0.0",
"postcss-responsive-type": "1.0.0",
"postcss-smart-import": "0.7.6",
"protractor": "^5.3.0",
"protractor": "^5.4.2",
"protractor-istanbul-plugin": "2.0.0",
"raw-loader": "0.5.1",
"resolve-url-loader": "^2.3.0",
@@ -213,17 +229,19 @@
"script-ext-html-webpack-plugin": "2.0.1",
"source-map": "0.7.3",
"source-map-loader": "0.2.4",
"string-replace-loader": "2.1.1",
"string-replace-loader": "^2.1.1",
"to-string-loader": "1.1.5",
"ts-helpers": "1.1.2",
"ts-node": "4.1.0",
"tslint": "5.11.0",
"typedoc": "^0.9.0",
"typescript": "^2.9.1",
"webdriver-manager": "^12.1.6",
"webpack": "^4.17.1",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-dev-middleware": "3.2.0",
"webpack-dev-server": "^3.1.5",
"webpack-dev-server": "^3.1.11",
"webpack-import-glob-loader": "^1.6.3",
"webpack-merge": "4.1.4",
"webpack-node-externals": "1.7.2"
}

View File

@@ -1,277 +0,0 @@
{
"footer": {
"copyright": "copyright © 2002-{{ year }}",
"link.dspace": "software DSpace",
"link.duraspace": "DuraSpace"
},
"collection": {
"page": {
"news": "Novinky",
"license": "Licence",
"browse": {
"recent": {
"head": "Poslední příspěvky"
}
}
}
},
"community": {
"page": {
"news": "Novinky",
"license": "Licence"
},
"sub-collection-list": {
"head": "Kolekce v této komunitě"
}
},
"item": {
"page": {
"author": "Autor",
"abstract": "Abstract",
"date": "Datum",
"uri": "URI",
"files": "Soubory",
"collections": "Kolekce",
"filesection": {
"download": "Stáhnout",
"name": "Název:",
"format": "Formát:",
"size": "Velikost:",
"description": "Popis:"
},
"link": {
"simple": "Minimální záznam",
"full": "Úplný záznam"
}
}
},
"nav": {
"home": "Domů",
"login": "Přihlásit se",
"logout": "Odhlásit se"
},
"pagination": {
"results-per-page": "Výsledků na stránku",
"sort-direction": "Seřazení",
"showing": {
"label": "Zobrazují se záznamy ",
"detail": "{{ range }} z {{ total }}"
}
},
"sorting": {
"score": {
"DESC": "Relevance"
},
"dc.title": {
"ASC": "Název vzestupně",
"DESC": "Název sestupně"
}
},
"title": "DSpace",
"404": {
"help": "Nepodařilo se najít stránku, kterou hledáte. Je možné, že stránka byla přesunuta nebo smazána. Pomocí tlačítka níže můžete přejít na domovskou stránku. ",
"page-not-found": "stránka nenalezena",
"link": {
"home-page": "Přejít na domovskou stránku"
}
},
"home": {
"title": "DSpace Angular :: Domů",
"description": "",
"top-level-communities": {
"head": "Komunity v DSpace",
"help": "Vybráním komunity můžete prohlížet její kolekce."
}
},
"search": {
"title": "DSpace Angular :: Hledat",
"description": "",
"form": {
"search": "Hledat",
"search_dspace": "Hledat v DSpace"
},
"results": {
"head": "Výsledky hledání",
"no-results": "Nebyli nalezeny žádné výsledky"
},
"sidebar": {
"close": "Zpět na výsledky",
"open": "Vyhledávací nástroje",
"results": "výsledky",
"filters": {
"title": "Filtry"
},
"settings": {
"title": "Nastavení",
"sort-by": "Řadit dle",
"rpp": "Výsledků na stránku"
}
},
"view-switch": {
"show-list": "Zobrazit seznam",
"show-grid": "Zobrazit mřížku"
},
"filters": {
"head": "Filtry",
"reset": "Obnovit filtry",
"applied": {
"f.author": "Autor",
"f.dateIssued.min": "Od data",
"f.dateIssued.max": "Do data",
"f.subject": "Předmět",
"f.has_content_in_original_bundle": "Má soubory"
},
"filter": {
"show-more": "Zobrazit více",
"show-less": "Sbalit",
"author": {
"placeholder": "Jméno autora",
"head": "Autor"
},
"scope": {
"placeholder": "Filtr rozsahu",
"head": "Rozsah"
},
"subject": {
"placeholder": "Předmět",
"head": "Předmět"
},
"dateIssued": {
"max": {
"placeholder": "Datum od"
},
"min": {
"placeholder": "Datum do"
},
"head": "Datum"
},
"has_content_in_original_bundle": {
"head": "Má soubory"
}
}
}
},
"browse": {
"title": "Prohlížíte {{ collection }} dle {{ field }} {{ value }}"
},
"admin": {
"registries": {
"metadata": {
"title": "DSpace Angular :: Registr metadat",
"head": "Registr metadat",
"description": "Registr metadat je seznam všech metadatových polí dostupných v repozitáři. Tyto pole mohou být rozdělena do více schémat. DSpace však vyžaduje použití schématu kvalifikový Dublin Core.",
"schemas": {
"table": {
"id": "ID",
"namespace": "Jmenný prostor",
"name": "Název"
},
"no-items": "Žádná schémata metadat."
}
},
"schema": {
"title": "DSpace Angular :: Registr schémat metadat",
"head": "Metadata Schema",
"description": "Toto je schéma metadat pro „{{namespace}}“.",
"fields": {
"head": "Pole schématu metadat",
"table": {
"field": "Pole",
"scopenote": "Poznámka o rozsahu"
},
"no-items": "Žádná metadatová pole."
}
},
"bitstream-formats": {
"title": "DSpace Angular :: Registr formátů souborů",
"head": "Registr formátů souborů",
"description": "Tento seznam formátů souborů poskytuje informace o známých formátech a o úrovni jejich podpory.",
"formats": {
"table": {
"name": "Název",
"mimetype": "Typ MIME",
"supportLevel": {
"head": "Úroveň podpory",
"0": "Neznámá",
"1": "Známá",
"2": "Podpora"
},
"internal": "interní"
},
"no-items": "Žádné formáty souborů."
}
}
}
},
"loading": {
"default": "Načítá se...",
"top-level-communities": "Načítají se komunity nejvyšší úrovně...",
"community": "Načítá se komunita...",
"collection": "Načítá se kolekce...",
"sub-collections": "Načítají se subkolekce...",
"recent-submissions": "Načítají se poslední příspěvky...",
"item": "Načítá se záznam...",
"objects": "Načítá se...",
"search-results": "Načítají se výsledky hledání...",
"browse-by": "Načítají se záznamy..."
},
"error": {
"default": "Chyba",
"top-level-communities": "Chyba během stahování komunit nejvyšší úrovně",
"community": "Chyba během stahování komunity",
"collection": "Chyba během stahování kolekce",
"sub-collections": "Chyba během stahování subkolekcí",
"recent-submissions": "Chyba během stahování posledních příspěvků",
"item": "Chyba během stahování záznamu",
"objects": "Chyba během stahování objektů",
"search-results": "Chyba během stahování výsledků hledání",
"browse-by": "Chyba během stahování záznamů",
"validation": {
"pattern": "Tento vstup je omezen dle vzoru: {{ pattern }}.",
"license": {
"notgranted": "Pro dokončení zaslání Musíte udělit licenci. Pokud v tuto chvíli tuto licenci nemůžete udělit, můžete svou práci uložit a později se k svému příspěveku vrátit nebo jej smazat."
}
}
},
"form": {
"submit": "Odeslat",
"cancel": "Zrušit",
"search": "Hledat",
"remove": "Smazat",
"first-name": "Křestní jméno",
"last-name": "Příjmení",
"loading": "Načítá se...",
"no-results": "Nebyli nalezeny žádné výsledky",
"no-value": "Nebyla zadána hodnota",
"group-collapse": "Sbalit",
"group-expand": "Rozbalit",
"group-collapse-help": "Kliknutím sem sbalíte",
"group-expand-help": "Kliknutím sem rozbalíte a přidáte další prvky"
},
"login": {
"title": "Přihlásit se",
"form": {
"header": "Prosím, přihlaste se do DSpace",
"email": "E-mailová adresa",
"forgot-password": "Zapomněli jste své heslo?",
"new-user": "Nový uživatel? Zaregistrujte se kliknutím sem.",
"password": "Heslo",
"submit": "Přihlásit se"
}
},
"logout": {
"title": "Odhlásit se",
"form": {
"header": "Odhlásit se z DSpace",
"submit": "Odhlásit se"
}
},
"auth": {
"messages": {
"expired": "Vaše relace vypršela. Prosím, znova se přihlaste."
},
"errors": {
"invalid-user": "Neplatná e-mailová adresa nebo heslo."
}
}
}

176
resources/i18n/cs.json5 Normal file
View File

@@ -0,0 +1,176 @@
{
"404.help": "Nepodařilo se najít stránku, kterou hledáte. Je možné, že stránka byla přesunuta nebo smazána. Pomocí tlačítka níže můžete přejít na domovskou stránku. ",
"404.link.home-page": "Přejít na domovskou stránku",
"404.page-not-found": "stránka nenalezena",
"admin.registries.bitstream-formats.description": "Tento seznam formátů souborů poskytuje informace o známých formátech a o úrovni jejich podpory.",
"admin.registries.bitstream-formats.formats.no-items": "Žádné formáty souborů.",
"admin.registries.bitstream-formats.formats.table.internal": "interní",
"admin.registries.bitstream-formats.formats.table.mimetype": "Typ MIME",
"admin.registries.bitstream-formats.formats.table.name": "Název",
"admin.registries.bitstream-formats.formats.table.supportLevel.0": "Neznámá",
"admin.registries.bitstream-formats.formats.table.supportLevel.1": "Známá",
"admin.registries.bitstream-formats.formats.table.supportLevel.2": "Podpora",
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Úroveň podpory",
"admin.registries.bitstream-formats.head": "Registr formátů souborů",
"admin.registries.bitstream-formats.title": "DSpace Angular :: Registr formátů souborů",
"admin.registries.metadata.description": "Registr metadat je seznam všech metadatových polí dostupných v repozitáři. Tyto pole mohou být rozdělena do více schémat. DSpace však vyžaduje použití schématu Kvalifikovaný Dublin Core.",
"admin.registries.metadata.head": "Registr metadat",
"admin.registries.metadata.schemas.no-items": "Žádná schémata metadat.",
"admin.registries.metadata.schemas.table.id": "ID",
"admin.registries.metadata.schemas.table.name": "Název",
"admin.registries.metadata.schemas.table.namespace": "Jmenný prostor",
"admin.registries.metadata.title": "DSpace Angular :: Registr metadat",
"admin.registries.schema.description": "Toto je schéma metadat pro „{{namespace}}“.",
"admin.registries.schema.fields.head": "Pole schématu metadat",
"admin.registries.schema.fields.no-items": "Žádná metadatová pole.",
"admin.registries.schema.fields.table.field": "Pole",
"admin.registries.schema.fields.table.scopenote": "Poznámka o rozsahu",
"admin.registries.schema.head": "Schéma metadat",
"admin.registries.schema.title": "DSpace Angular :: Registr schémat metadat",
"auth.errors.invalid-user": "Neplatná e-mailová adresa nebo heslo.",
"auth.messages.expired": "Vaše relace vypršela. Prosím, znova se přihlaste.",
"browse.title": "Prohlížíte {{ collection }} dle {{ field }} {{ value }}",
"collection.page.browse.recent.head": "Poslední příspěvky",
"collection.page.license": "Licence",
"collection.page.news": "Novinky",
"community.page.license": "Licence",
"community.page.news": "Novinky",
"community.sub-collection-list.head": "Kolekce v této komunitě",
"error.browse-by": "Chyba během stahování záznamů",
"error.collection": "Chyba během stahování kolekce",
"error.community": "Chyba během stahování komunity",
"error.default": "Chyba",
"error.item": "Chyba během stahování záznamu",
"error.objects": "Chyba během stahování objektů",
"error.recent-submissions": "Chyba během stahování posledních příspěvků",
"error.search-results": "Chyba během stahování výsledků hledání",
"error.sub-collections": "Chyba během stahování subkolekcí",
"error.top-level-communities": "Chyba během stahování komunit nejvyšší úrovně",
"error.validation.license.notgranted": "Pro dokončení zaslání Musíte udělit licenci. Pokud v tuto chvíli tuto licenci nemůžete udělit, můžete svou práci uložit a později se k svému příspěveku vrátit nebo jej smazat.",
"error.validation.pattern": "Tento vstup je omezen dle vzoru: {{ pattern }}.",
"footer.copyright": "copyright © 2002-{{ year }}",
"footer.link.dspace": "software DSpace",
"footer.link.duraspace": "DuraSpace",
"form.cancel": "Zrušit",
"form.first-name": "Křestní jméno",
"form.group-collapse": "Sbalit",
"form.group-collapse-help": "Kliknutím sem sbalíte",
"form.group-expand": "Rozbalit",
"form.group-expand-help": "Kliknutím sem rozbalíte a přidáte další prvky",
"form.last-name": "Příjmení",
"form.loading": "Načítá se...",
"form.no-results": "Nebyli nalezeny žádné výsledky",
"form.no-value": "Nebyla zadána hodnota",
"form.remove": "Smazat",
"form.search": "Hledat",
"form.submit": "Odeslat",
"home.description": "",
"home.title": "DSpace Angular :: Domů",
"home.top-level-communities.head": "Komunity v DSpace",
"home.top-level-communities.help": "Vybráním komunity můžete prohlížet její kolekce.",
"item.page.abstract": "Abstrakt",
"item.page.author": "Autor",
"item.page.collections": "Kolekce",
"item.page.date": "Datum",
"item.page.files": "Soubory",
"item.page.filesection.description": "Popis:",
"item.page.filesection.download": "Stáhnout",
"item.page.filesection.format": "Formát:",
"item.page.filesection.name": "Název:",
"item.page.filesection.size": "Velikost:",
"item.page.link.full": "Úplný záznam",
"item.page.link.simple": "Minimální záznam",
"item.page.uri": "URI",
"loading.browse-by": "Načítají se záznamy...",
"loading.collection": "Načítá se kolekce...",
"loading.community": "Načítá se komunita...",
"loading.default": "Načítá se...",
"loading.item": "Načítá se záznam...",
"loading.objects": "Načítá se...",
"loading.recent-submissions": "Načítají se poslední příspěvky...",
"loading.search-results": "Načítají se výsledky hledání...",
"loading.sub-collections": "Načítají se subkolekce...",
"loading.top-level-communities": "Načítají se komunity nejvyšší úrovně...",
"login.form.email": "E-mailová adresa",
"login.form.forgot-password": "Zapomněli jste své heslo?",
"login.form.header": "Prosím, přihlaste se do DSpace",
"login.form.new-user": "Nový uživatel? Zaregistrujte se kliknutím sem.",
"login.form.password": "Heslo",
"login.form.submit": "Přihlásit se",
"login.title": "Přihlásit se",
"logout.form.header": "Odhlásit se z DSpace",
"logout.form.submit": "Odhlásit se",
"logout.title": "Odhlásit se",
"nav.home": "Domů",
"nav.login": "Přihlásit se",
"nav.logout": "Odhlásit se",
"pagination.results-per-page": "Výsledků na stránku",
"pagination.showing.detail": "{{ range }} z {{ total }}",
"pagination.showing.label": "Zobrazují se záznamy ",
"pagination.sort-direction": "Seřazení",
"search.description": "",
"search.title": "DSpace Angular :: Hledat",
"search.filters.applied.f.author": "Autor",
"search.filters.applied.f.dateIssued.max": "Do data",
"search.filters.applied.f.dateIssued.min": "Od data",
"search.filters.applied.f.has_content_in_original_bundle": "Má soubory",
"search.filters.applied.f.subject": "Předmět",
"search.filters.filter.author.head": "Autor",
"search.filters.filter.author.placeholder": "Jméno autora",
"search.filters.filter.dateIssued.head": "Datum",
"search.filters.filter.dateIssued.max.placeholder": "Datum od",
"search.filters.filter.dateIssued.min.placeholder": "Datum do",
"search.filters.filter.has_content_in_original_bundle.head": "Má soubory",
"search.filters.filter.scope.head": "Rozsah",
"search.filters.filter.scope.placeholder": "Filtr rozsahu",
"search.filters.filter.show-less": "Sbalit",
"search.filters.filter.show-more": "Zobrazit více",
"search.filters.filter.subject.head": "Předmět",
"search.filters.filter.subject.placeholder": "Předmět",
"search.filters.head": "Filtry",
"search.filters.reset": "Obnovit filtry",
"search.form.search": "Hledat",
"search.form.search_dspace": "Hledat v DSpace",
"search.results.head": "Výsledky hledání",
"search.results.no-results": "Nebyli nalezeny žádné výsledky",
"search.sidebar.close": "Zpět na výsledky",
"search.sidebar.filters.title": "Filtry",
"search.sidebar.open": "Vyhledávací nástroje",
"search.sidebar.results": "výsledky",
"search.sidebar.settings.rpp": "Výsledků na stránku",
"search.sidebar.settings.sort-by": "Řadit dle",
"search.sidebar.settings.title": "Nastavení",
"search.view-switch.show-grid": "Zobrazit mřížku",
"search.view-switch.show-list": "Zobrazit seznam",
"sorting.dc.title.ASC": "Název vzestupně",
"sorting.dc.title.DESC": "Název sestupně",
"sorting.score.DESC": "Relevance",
"title": "DSpace",
}

View File

@@ -1,277 +0,0 @@
{
"footer": {
"copyright": "Copyright © 2002-{{ year }}",
"link.dspace": "DSpace Software",
"link.duraspace": "DuraSpace"
},
"collection": {
"page": {
"news": "Neuigkeiten",
"license": "Lizenz",
"browse": {
"recent": {
"head": "Aktuellste Veröffentlichungen"
}
}
}
},
"community": {
"page": {
"news": "Neuigkeiten",
"license": "Lizenz"
},
"sub-collection-list": {
"head": "Sammlungen in diesem Bereich"
}
},
"item": {
"page": {
"author": "Autor",
"abstract": "Kurzfassung",
"date": "Datum",
"uri": "URI",
"files": "Dateien",
"collections": "Sammlungen",
"filesection": {
"download": "Herunterladen",
"name": "Name:",
"format": "Format:",
"size": "Größe:",
"description": "Beschreibung:"
},
"link": {
"simple": "Kurzanzeige",
"full": "Vollanzeige"
}
}
},
"nav": {
"home": "Zur Startseite",
"login": "Anmelden",
"logout": "Abmelden"
},
"pagination": {
"results-per-page": "Ergebnisse pro Seite",
"sort-direction": "Sortiermöglichkeiten",
"showing": {
"label": "Anzeige der Treffer ",
"detail": "{{ range }} bis {{ total }}"
}
},
"sorting": {
"score": {
"DESC": "Relevanz"
},
"dc.title": {
"ASC": "Titel aufsteigend",
"DESC": "Titel absteigend"
}
},
"title": "DSpace",
"404": {
"help": "Die Seite, die Sie aufrufen wollten, konnte nicht gefunden werden. Sie könnte verschoben oder gelöscht worden sein. Mit dem Link unten kommen Sie zurück zur Startseite. ",
"page-not-found": "Seite nicht gefunden",
"link": {
"home-page": "Zurück zur Startseite"
}
},
"home": {
"title": "DSpace Angular :: Startseite",
"description": "",
"top-level-communities": {
"head": "Bereiche in DSpace",
"help": "Wählen Sie einen Bereich, um seine Sammlungen einzusehen."
}
},
"search": {
"title": "DSpace Angular :: Suche",
"description": "",
"form": {
"search": "Suche",
"search_dspace": "DSpace durchsuchen"
},
"results": {
"head": "Suchergebnisse",
"no-results": "Zu dieser Suche gibt es keine Treffer."
},
"sidebar": {
"close": "Zurück zu den Ergebnissen",
"open": "Suchwerkzeuge",
"results": "Ergebnisse",
"filters": {
"title": "Filter"
},
"settings": {
"title": "Einstellungen",
"sort-by": "Sortiere nach",
"rpp": "Treffer pro Seite"
}
},
"view-switch": {
"show-list": "Zeige als Liste",
"show-grid": "Zeige als Raster"
},
"filters": {
"head": "Filter",
"reset": "Filter zurücksetzen",
"applied": {
"f.author": "Autor",
"f.dateIssued.min": "Anfangsdatum",
"f.dateIssued.max": "Enddatum",
"f.subject": "Thema",
"f.has_content_in_original_bundle": "Besitzt Dateien"
},
"filter": {
"show-more": "Zeige mehr",
"show-less": "Zeige weniger",
"author": {
"placeholder": "Autor",
"head": "Autor"
},
"scope": {
"placeholder": "Bereichsfilter",
"head": "Bereich"
},
"subject": {
"placeholder": "Schlagwort",
"head": "Schlagwort"
},
"dateIssued": {
"max": {
"placeholder": "Frühestes Datum"
},
"min": {
"placeholder": "Ältestes Datum"
},
"head": "Datum"
},
"has_content_in_original_bundle": {
"head": "Besitzt Dateien"
}
}
}
},
"browse": {
"title": "Anzeige {{ collection }} nach {{ field }} {{ value }}"
},
"admin": {
"registries": {
"metadata": {
"title": "DSpace Angular :: Metadatenreferenzliste",
"head": "Metadatenreferenzliste",
"description": "Die Metadatenreferenzliste beinhaltet alle Metadatenfelder, die zur Verfügung stehen. Die Felder können in unterschiedlichen Schemata enthalten sein. Nichtsdestotrotz benötigt DSpace mindestens qualifiziertes Dublin Core.",
"schemas": {
"table": {
"id": "ID",
"namespace": "Namensraum",
"name": "Name"
},
"no-items": "Es gbit keine Metadatenschemata."
}
},
"schema": {
"title": "DSpace Angular :: Referenzliste der Metadatenschemata",
"head": "Metadatenschemata",
"description": "Dies ist das Metadatenschema für \"{{namespace}}\".",
"fields": {
"head": "Felder in diesem Schema",
"table": {
"field": "Feld",
"scopenote": "Gültigkeitsbereich"
},
"no-items": "Es gibt keine Felder in diesem Schema."
}
},
"bitstream-formats": {
"title": "DSpace Angular :: Referenzliste der Dateiformate",
"head": "Referenzliste der Dateiformate",
"description": "Diese Liste enhtält die in diesem Repositorium zulässigen Dateiformate und den jeweiligen Unterstützungsgrad.",
"formats": {
"table": {
"name": "Name",
"mimetype": "MIME Type",
"supportLevel": {
"head": "Unterstützungsgrad",
"0": "Unbekannt",
"1": "Bekannt",
"2": "Unterstützt"
},
"internal": "intern"
},
"no-items": "Es gibt keine Formate in dieser Referenzliste."
}
}
}
},
"loading": {
"default": "Am Laden ...",
"top-level-communities": "Die Hauptbereiche werden geladen ...",
"community": "Der Bereich wird geladen ...",
"collection": "Die Sammlung wird geladen ...",
"sub-collections": "Die untergeordneten Sammlungen werden geladen ...",
"recent-submissions": "Die aktuellsten Veröffentlichungen werden geladen ...",
"item": "Die Ressource wird geladen ...",
"objects": "Am Laden ...",
"search-results": "Die Suchergebnisse werden geladen ...",
"browse-by": "Die Ressourcen werden geladen ..."
},
"error": {
"default": "Fehler",
"top-level-communities": "Fehler beim Laden der Hauptbereiche.",
"community": "Fehler beim Laden des Bereiches.",
"collection": "Fehler beim Laden der Sammlung.",
"sub-collections": "Fehler beim Laden der untergeordneten Sammlungen.",
"recent-submissions": "Fehler beim Laden der aktuellsten Veröffentlichungen.",
"item": "Fehler beim Laden der Ressource.",
"objects": "Fehler beim Laden der Objekte.",
"search-results": "Fehler beim Laden der Suchergebnisse.",
"browse-by": "Fehler beim Laden der Ressourcen",
"validation": {
"pattern": "Die Eingabe kann nur folgendes Muster haben: {{ pattern }}.",
"license": {
"notgranted": "Sie müssen der Lizenz zustimmen, um die Ressource einzureichen. Wenn dies zur Zeit nicht geht, können Sie die Einreichung speichern und später wiederaufnehmen oder löschen."
}
}
},
"form": {
"submit": "Los",
"cancel": "Abbrechen",
"search": "Suchen",
"remove": "Löschen",
"first-name": "Vorname",
"last-name": "Nachname",
"loading": "Am Laden ...",
"no-results": "Keine Ergebnisse gefunden",
"no-value": "Kein Wert eingegeben",
"group-collapse": "Weniger",
"group-expand": "Mehr",
"group-collapse-help": "Hier klicken, um die Anzeige zu reduzieren",
"group-expand-help": "Hier klicken, um mehr Elemente anzuzeigen"
},
"login": {
"title": "Einloggen",
"form": {
"header": "Bitte Loggen Sie sich ein.",
"email": "E-Mail-Adresse",
"forgot-password": "Haben Sie Ihr Passwort vergessen?",
"new-user": "Sind Sie neu hier? Klicken Sie hier, um sich zu registrieren.",
"password": "Passwort",
"submit": "Einloggen"
}
},
"logout": {
"title": "Ausloggen",
"form": {
"header": "Ausloggen aus DSpace",
"submit": "Ausloggen"
}
},
"auth": {
"messages": {
"expired": "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an."
},
"errors": {
"invalid-user": "Ungültige E-Mail-Adresse oder Passwort."
}
}
}

175
resources/i18n/de.json5 Normal file
View File

@@ -0,0 +1,175 @@
{
"404.help": "Die Seite, die Sie aufrufen wollten, konnte nicht gefunden werden. Sie könnte verschoben oder gelöscht worden sein. Mit dem Link unten kommen Sie zurück zur Startseite. ",
"404.link.home-page": "Zurück zur Startseite",
"404.page-not-found": "Seite nicht gefunden",
"admin.registries.bitstream-formats.description": "Diese Liste enhtält die in diesem Repositorium zulässigen Dateiformate und den jeweiligen Unterstützungsgrad.",
"admin.registries.bitstream-formats.formats.no-items": "Es gibt keine Formate in dieser Referenzliste.",
"admin.registries.bitstream-formats.formats.table.internal": "intern",
"admin.registries.bitstream-formats.formats.table.mimetype": "MIME Type",
"admin.registries.bitstream-formats.formats.table.name": "Name",
"admin.registries.bitstream-formats.formats.table.supportLevel.0": "Unbekannt",
"admin.registries.bitstream-formats.formats.table.supportLevel.1": "Bekannt",
"admin.registries.bitstream-formats.formats.table.supportLevel.2": "Unterstützt",
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Unterstützungsgrad",
"admin.registries.bitstream-formats.head": "Referenzliste der Dateiformate",
"admin.registries.bitstream-formats.title": "DSpace Angular :: Referenzliste der Dateiformate",
"admin.registries.metadata.description": "Die Metadatenreferenzliste beinhaltet alle Metadatenfelder, die zur Verfügung stehen. Die Felder können in unterschiedlichen Schemata enthalten sein. Nichtsdestotrotz benötigt DSpace mindestens qualifiziertes Dublin Core.",
"admin.registries.metadata.head": "Metadatenreferenzliste",
"admin.registries.metadata.schemas.no-items": "Es gbit keine Metadatenschemata.",
"admin.registries.metadata.schemas.table.id": "ID",
"admin.registries.metadata.schemas.table.name": "Name",
"admin.registries.metadata.schemas.table.namespace": "Namensraum",
"admin.registries.metadata.title": "DSpace Angular :: Metadatenreferenzliste",
"admin.registries.schema.description": "Dies ist das Metadatenschema für \"{{namespace}}\".",
"admin.registries.schema.fields.head": "Felder in diesem Schema",
"admin.registries.schema.fields.no-items": "Es gibt keine Felder in diesem Schema.",
"admin.registries.schema.fields.table.field": "Feld",
"admin.registries.schema.fields.table.scopenote": "Gültigkeitsbereich",
"admin.registries.schema.head": "Metadatenschemata",
"admin.registries.schema.title": "DSpace Angular :: Referenzliste der Metadatenschemata",
"auth.errors.invalid-user": "Ungültige E-Mail-Adresse oder Passwort.",
"auth.messages.expired": "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an.",
"browse.title": "Anzeige {{ collection }} nach {{ field }} {{ value }}",
"collection.page.browse.recent.head": "Aktuellste Veröffentlichungen",
"collection.page.license": "Lizenz",
"collection.page.news": "Neuigkeiten",
"community.page.license": "Lizenz",
"community.page.news": "Neuigkeiten",
"community.sub-collection-list.head": "Sammlungen in diesem Bereich",
"error.browse-by": "Fehler beim Laden der Ressourcen",
"error.collection": "Fehler beim Laden der Sammlung.",
"error.community": "Fehler beim Laden des Bereiches.",
"error.default": "Fehler",
"error.item": "Fehler beim Laden der Ressource.",
"error.objects": "Fehler beim Laden der Objekte.",
"error.recent-submissions": "Fehler beim Laden der aktuellsten Veröffentlichungen.",
"error.search-results": "Fehler beim Laden der Suchergebnisse.",
"error.sub-collections": "Fehler beim Laden der untergeordneten Sammlungen.",
"error.top-level-communities": "Fehler beim Laden der Hauptbereiche.",
"error.validation.license.notgranted": "Sie müssen der Lizenz zustimmen, um die Ressource einzureichen. Wenn dies zur Zeit nicht geht, können Sie die Einreichung speichern und später wiederaufnehmen oder löschen.",
"error.validation.pattern": "Die Eingabe kann nur folgendes Muster haben: {{ pattern }}.",
"footer.copyright": "Copyright © 2002-{{ year }}",
"footer.link.dspace": "DSpace Software",
"footer.link.duraspace": "DuraSpace",
"form.cancel": "Abbrechen",
"form.first-name": "Vorname",
"form.group-collapse": "Weniger",
"form.group-collapse-help": "Hier klicken, um die Anzeige zu reduzieren",
"form.group-expand": "Mehr",
"form.group-expand-help": "Hier klicken, um mehr Elemente anzuzeigen",
"form.last-name": "Nachname",
"form.loading": "Am Laden ...",
"form.no-results": "Keine Ergebnisse gefunden",
"form.no-value": "Kein Wert eingegeben",
"form.remove": "Löschen",
"form.search": "Suchen",
"form.submit": "Los",
"home.description": "",
"home.title": "DSpace Angular :: Startseite",
"home.top-level-communities.head": "Bereiche in DSpace",
"home.top-level-communities.help": "Wählen Sie einen Bereich, um seine Sammlungen einzusehen.",
"item.page.abstract": "Kurzfassung",
"item.page.author": "Autor",
"item.page.collections": "Sammlungen",
"item.page.date": "Datum",
"item.page.files": "Dateien",
"item.page.filesection.description": "Beschreibung:",
"item.page.filesection.download": "Herunterladen",
"item.page.filesection.format": "Format:",
"item.page.filesection.name": "Name:",
"item.page.filesection.size": "Größe:",
"item.page.link.full": "Vollanzeige",
"item.page.link.simple": "Kurzanzeige",
"item.page.uri": "URI",
"loading.browse-by": "Die Ressourcen werden geladen ...",
"loading.collection": "Die Sammlung wird geladen ...",
"loading.community": "Der Bereich wird geladen ...",
"loading.default": "Am Laden ...",
"loading.item": "Die Ressource wird geladen ...",
"loading.objects": "Am Laden ...",
"loading.recent-submissions": "Die aktuellsten Veröffentlichungen werden geladen ...",
"loading.search-results": "Die Suchergebnisse werden geladen ...",
"loading.sub-collections": "Die untergeordneten Sammlungen werden geladen ...",
"loading.top-level-communities": "Die Hauptbereiche werden geladen ...",
"login.form.email": "E-Mail-Adresse",
"login.form.forgot-password": "Haben Sie Ihr Passwort vergessen?",
"login.form.header": "Bitte Loggen Sie sich ein.",
"login.form.new-user": "Sind Sie neu hier? Klicken Sie hier, um sich zu registrieren.",
"login.form.password": "Passwort",
"login.form.submit": "Einloggen",
"login.title": "Einloggen",
"logout.form.header": "Ausloggen aus DSpace",
"logout.form.submit": "Ausloggen",
"logout.title": "Ausloggen",
"nav.home": "Zur Startseite",
"nav.login": "Anmelden",
"nav.logout": "Abmelden",
"pagination.results-per-page": "Ergebnisse pro Seite",
"pagination.showing.detail": "{{ range }} bis {{ total }}",
"pagination.showing.label": "Anzeige der Treffer ",
"pagination.sort-direction": "Sortiermöglichkeiten",
"search.description": "",
"search.title": "DSpace Angular :: Suche",
"search.filters.applied.f.author": "Autor",
"search.filters.applied.f.dateIssued.max": "Enddatum",
"search.filters.applied.f.dateIssued.min": "Anfangsdatum",
"search.filters.applied.f.has_content_in_original_bundle": "Besitzt Dateien",
"search.filters.applied.f.subject": "Thema",
"search.filters.filter.author.head": "Autor",
"search.filters.filter.author.placeholder": "Autor",
"search.filters.filter.dateIssued.head": "Datum",
"search.filters.filter.dateIssued.max.placeholder": "Frühestes Datum",
"search.filters.filter.dateIssued.min.placeholder": "Ältestes Datum",
"search.filters.filter.has_content_in_original_bundle.head": "Besitzt Dateien",
"search.filters.filter.scope.head": "Bereich",
"search.filters.filter.scope.placeholder": "Bereichsfilter",
"search.filters.filter.show-less": "Zeige weniger",
"search.filters.filter.show-more": "Zeige mehr",
"search.filters.filter.subject.head": "Schlagwort",
"search.filters.filter.subject.placeholder": "Schlagwort",
"search.filters.head": "Filter",
"search.filters.reset": "Filter zurücksetzen",
"search.form.search": "Suche",
"search.form.search_dspace": "DSpace durchsuchen",
"search.results.head": "Suchergebnisse",
"search.results.no-results": "Zu dieser Suche gibt es keine Treffer.",
"search.sidebar.close": "Zurück zu den Ergebnissen",
"search.sidebar.filters.title": "Filter",
"search.sidebar.open": "Suchwerkzeuge",
"search.sidebar.results": "Ergebnisse",
"search.sidebar.settings.rpp": "Treffer pro Seite",
"search.sidebar.settings.sort-by": "Sortiere nach",
"search.sidebar.settings.title": "Einstellungen",
"search.view-switch.show-grid": "Zeige als Raster",
"search.view-switch.show-list": "Zeige als Liste",
"sorting.dc.title.ASC": "Titel aufsteigend",
"sorting.dc.title.DESC": "Titel absteigend",
"sorting.score.DESC": "Relevanz",
"title": "DSpace",
}

File diff suppressed because it is too large Load Diff

807
resources/i18n/en.json5 Normal file
View File

@@ -0,0 +1,807 @@
{
"404.help": "We can't find the page you're looking for. The page may have been moved or deleted. You can use the button below to get back to the home page. ",
"404.link.home-page": "Take me to the home page",
"404.page-not-found": "page not found",
"admin.registries.bitstream-formats.create.failure.content": "An error occurred while creating the new bitstream format.",
"admin.registries.bitstream-formats.create.failure.head": "Failure",
"admin.registries.bitstream-formats.create.head": "Create Bitstream format",
"admin.registries.bitstream-formats.create.new": "Add a new bitstream format",
"admin.registries.bitstream-formats.create.success.content": "The new bitstream format was successfully created.",
"admin.registries.bitstream-formats.create.success.head": "Success",
"admin.registries.bitstream-formats.delete.failure.amount": "Failed to remove {{ amount }} format(s)",
"admin.registries.bitstream-formats.delete.failure.head": "Failure",
"admin.registries.bitstream-formats.delete.success.amount": "Successfully removed {{ amount }} format(s)",
"admin.registries.bitstream-formats.delete.success.head": "Success",
"admin.registries.bitstream-formats.description": "This list of bitstream formats provides information about known formats and their support level.",
"admin.registries.bitstream-formats.edit.description.hint": "",
"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 }}",
"admin.registries.bitstream-formats.edit.internal.hint": "Formats marked as internal are are hidden from the user, and used for administrative purposes.",
"admin.registries.bitstream-formats.edit.internal.label": "Internal",
"admin.registries.bitstream-formats.edit.mimetype.hint": "The MIME type associated with this format, does not have to be unique.",
"admin.registries.bitstream-formats.edit.mimetype.label": "MIME Type",
"admin.registries.bitstream-formats.edit.shortDescription.hint": "A unique name for this format, (e.g. Microsoft Word XP or Microsoft Word 2000)",
"admin.registries.bitstream-formats.edit.shortDescription.label": "Name",
"admin.registries.bitstream-formats.edit.success.content": "The bitstream format was successfully edited.",
"admin.registries.bitstream-formats.edit.success.head": "Success",
"admin.registries.bitstream-formats.edit.supportLevel.hint": "The level of support your institution pledges for this format.",
"admin.registries.bitstream-formats.edit.supportLevel.label": "Support level",
"admin.registries.bitstream-formats.head": "Bitstream Format Registry",
"admin.registries.bitstream-formats.no-items": "No bitstream formats to show.",
"admin.registries.bitstream-formats.table.delete": "Delete selected",
"admin.registries.bitstream-formats.table.deselect-all": "Deselect all",
"admin.registries.bitstream-formats.table.internal": "internal",
"admin.registries.bitstream-formats.table.mimetype": "MIME Type",
"admin.registries.bitstream-formats.table.name": "Name",
"admin.registries.bitstream-formats.table.return": "Return",
"admin.registries.bitstream-formats.table.supportLevel.KNOWN": "Known",
"admin.registries.bitstream-formats.table.supportLevel.SUPPORTED": "Supported",
"admin.registries.bitstream-formats.table.supportLevel.UNKNOWN": "Unknown",
"admin.registries.bitstream-formats.table.supportLevel.head": "Support Level",
"admin.registries.bitstream-formats.title": "DSpace Angular :: Bitstream Format Registry",
"admin.registries.metadata.description": "The metadata registry maintains a list of all metadata fields available in the repository. These fields may be divided amongst multiple schemas. However, DSpace requires the qualified Dublin Core schema.",
"admin.registries.metadata.form.create": "Create metadata schema",
"admin.registries.metadata.form.edit": "Edit metadata schema",
"admin.registries.metadata.form.name": "Name",
"admin.registries.metadata.form.namespace": "Namespace",
"admin.registries.metadata.head": "Metadata Registry",
"admin.registries.metadata.schemas.no-items": "No metadata schemas to show.",
"admin.registries.metadata.schemas.table.delete": "Delete selected",
"admin.registries.metadata.schemas.table.id": "ID",
"admin.registries.metadata.schemas.table.name": "Name",
"admin.registries.metadata.schemas.table.namespace": "Namespace",
"admin.registries.metadata.title": "DSpace Angular :: Metadata Registry",
"admin.registries.schema.description": "This is the metadata schema for \"{{namespace}}\".",
"admin.registries.schema.fields.head": "Schema metadata fields",
"admin.registries.schema.fields.no-items": "No metadata fields to show.",
"admin.registries.schema.fields.table.delete": "Delete selected",
"admin.registries.schema.fields.table.field": "Field",
"admin.registries.schema.fields.table.scopenote": "Scope Note",
"admin.registries.schema.form.create": "Create metadata field",
"admin.registries.schema.form.edit": "Edit metadata field",
"admin.registries.schema.form.element": "Element",
"admin.registries.schema.form.qualifier": "Qualifier",
"admin.registries.schema.form.scopenote": "Scope Note",
"admin.registries.schema.head": "Metadata Schema",
"admin.registries.schema.notification.created": "Successfully created metadata schema \"{{prefix}}\"",
"admin.registries.schema.notification.deleted.failure": "Failed to delete {{amount}} metadata schemas",
"admin.registries.schema.notification.deleted.success": "Successfully deleted {{amount}} metadata schemas",
"admin.registries.schema.notification.edited": "Successfully edited metadata schema \"{{prefix}}\"",
"admin.registries.schema.notification.failure": "Error",
"admin.registries.schema.notification.field.created": "Successfully created metadata field \"{{field}}\"",
"admin.registries.schema.notification.field.deleted.failure": "Failed to delete {{amount}} metadata fields",
"admin.registries.schema.notification.field.deleted.success": "Successfully deleted {{amount}} metadata fields",
"admin.registries.schema.notification.field.edited": "Successfully edited metadata field \"{{field}}\"",
"admin.registries.schema.notification.success": "Success",
"admin.registries.schema.return": "Return",
"admin.registries.schema.title": "DSpace Angular :: Metadata Schema Registry",
"auth.errors.invalid-user": "Invalid email address or password.",
"auth.messages.expired": "Your session has expired. Please log in again.",
"browse.comcol.by.author": "By Author",
"browse.comcol.by.dateissued": "By Issue Date",
"browse.comcol.by.subject": "By Subject",
"browse.comcol.by.title": "By Title",
"browse.comcol.head": "Browse",
"browse.empty": "No items to show.",
"browse.metadata.author": "Author",
"browse.metadata.dateissued": "Issue Date",
"browse.metadata.subject": "Subject",
"browse.metadata.title": "Title",
"browse.startsWith.choose_start": "(Choose start)",
"browse.startsWith.choose_year": "(Choose year)",
"browse.startsWith.jump": "Jump to a point in the index:",
"browse.startsWith.months.april": "April",
"browse.startsWith.months.august": "August",
"browse.startsWith.months.december": "December",
"browse.startsWith.months.february": "February",
"browse.startsWith.months.january": "January",
"browse.startsWith.months.july": "July",
"browse.startsWith.months.june": "June",
"browse.startsWith.months.march": "March",
"browse.startsWith.months.may": "May",
"browse.startsWith.months.none": "(Choose month)",
"browse.startsWith.months.november": "November",
"browse.startsWith.months.october": "October",
"browse.startsWith.months.september": "September",
"browse.startsWith.submit": "Go",
"browse.startsWith.type_date": "Or type in a date (year-month):",
"browse.startsWith.type_text": "Or enter first few letters:",
"browse.title": "Browsing {{ collection }} by {{ field }} {{ value }}",
"chips.remove": "Remove chip",
"collection.create.head": "Create a Collection",
"collection.create.sub-head": "Create a Collection for Community {{ parent }}",
"collection.delete.cancel": "Cancel",
"collection.delete.confirm": "Confirm",
"collection.delete.head": "Delete Collection",
"collection.delete.notification.fail": "Collection could not be deleted",
"collection.delete.notification.success": "Successfully deleted collection",
"collection.delete.text": "Are you sure you want to delete collection \"{{ dso }}\"",
"collection.edit.delete": "Delete this collection",
"collection.edit.head": "Edit Collection",
"collection.edit.return": "Return",
"collection.edit.tabs.curate.head": "Curate",
"collection.edit.tabs.curate.title": "Collection Edit - Curate",
"collection.edit.tabs.metadata.head": "Edit Metadata",
"collection.edit.tabs.metadata.title": "Collection Edit - Metadata",
"collection.edit.tabs.roles.head": "Assign Roles",
"collection.edit.tabs.roles.title": "Collection Edit - Roles",
"collection.edit.tabs.source.head": "Content Source",
"collection.edit.tabs.source.title": "Collection Edit - Content Source",
"collection.form.abstract": "Short Description",
"collection.form.description": "Introductory text (HTML)",
"collection.form.errors.title.required": "Please enter a collection name",
"collection.form.license": "License",
"collection.form.provenance": "Provenance",
"collection.form.rights": "Copyright text (HTML)",
"collection.form.tableofcontents": "News (HTML)",
"collection.form.title": "Name",
"collection.page.browse.recent.head": "Recent Submissions",
"collection.page.browse.recent.empty": "No items to show",
"collection.page.license": "License",
"collection.page.news": "News",
"community.create.head": "Create a Community",
"community.create.sub-head": "Create a Sub-Community for Community {{ parent }}",
"community.delete.cancel": "Cancel",
"community.delete.confirm": "Confirm",
"community.delete.head": "Delete Community",
"community.delete.notification.fail": "Community could not be deleted",
"community.delete.notification.success": "Successfully deleted community",
"community.delete.text": "Are you sure you want to delete community \"{{ dso }}\"",
"community.edit.delete": "Delete this community",
"community.edit.head": "Edit Community",
"community.edit.return": "Return",
"community.edit.tabs.curate.head": "Curate",
"community.edit.tabs.curate.title": "Community Edit - Curate",
"community.edit.tabs.metadata.head": "Edit Metadata",
"community.edit.tabs.metadata.title": "Community Edit - Metadata",
"community.edit.tabs.roles.head": "Assign Roles",
"community.edit.tabs.roles.title": "Community Edit - Roles",
"community.form.abstract": "Short Description",
"community.form.description": "Introductory text (HTML)",
"community.form.errors.title.required": "Please enter a community name",
"community.form.rights": "Copyright text (HTML)",
"community.form.tableofcontents": "News (HTML)",
"community.form.title": "Name",
"community.page.license": "License",
"community.page.news": "News",
"community.sub-collection-list.head": "Collections of this Community",
"community.sub-community-list.head": "Communities of this Community",
"dso-selector.create.collection.head": "New collection",
"dso-selector.create.community.head": "New community",
"dso-selector.create.community.sub-level": "Create a new community in",
"dso-selector.create.community.top-level": "Create a new top-level community",
"dso-selector.create.item.head": "New item",
"dso-selector.edit.collection.head": "Edit collection",
"dso-selector.edit.community.head": "Edit community",
"dso-selector.edit.item.head": "Edit item",
"dso-selector.no-results": "No {{ type }} found",
"dso-selector.placeholder": "Search for a {{ type }}",
"error.browse-by": "Error fetching items",
"error.collection": "Error fetching collection",
"error.community": "Error fetching community",
"error.default": "Error",
"error.item": "Error fetching item",
"error.objects": "Error fetching objects",
"error.recent-submissions": "Error fetching recent submissions",
"error.search-results": "Error fetching search results",
"error.sub-collections": "Error fetching sub-collections",
"error.sub-communities": "Error fetching sub-communities",
"error.submission.sections.init-form-error": "An error occurred during section initialize, please check your input-form configuration. Details are below : <br> <br>",
"error.top-level-communities": "Error fetching top-level communities",
"error.validation.license.notgranted": "You must grant this license to complete your submission. If you are unable to grant this license at this time you may save your work and return later or remove the submission.",
"error.validation.pattern": "This input is restricted by the current pattern: {{ pattern }}.",
"footer.copyright": "copyright © 2002-{{ year }}",
"footer.link.dspace": "DSpace software",
"footer.link.duraspace": "DuraSpace",
"form.cancel": "Cancel",
"form.clear": "Clear",
"form.clear-help": "Click here to remove the selected value",
"form.edit": "Edit",
"form.edit-help": "Click here to edit the selected value",
"form.first-name": "First name",
"form.group-collapse": "Collapse",
"form.group-collapse-help": "Click here to collapse",
"form.group-expand": "Expand",
"form.group-expand-help": "Click here to expand and add more elements",
"form.last-name": "Last name",
"form.loading": "Loading...",
"form.no-results": "No results found",
"form.no-value": "No value entered",
"form.other-information": {},
"form.remove": "Remove",
"form.save": "Save",
"form.save-help": "Save changes",
"form.search": "Search",
"form.search-help": "Click here to looking for an existing correspondence",
"form.submit": "Submit",
"home.description": "",
"home.title": "DSpace Angular :: Home",
"home.top-level-communities.head": "Communities in DSpace",
"home.top-level-communities.help": "Select a community to browse its collections.",
"item.edit.delete.cancel": "Cancel",
"item.edit.delete.confirm": "Delete",
"item.edit.delete.description": "Are you sure this item should be completely deleted? Caution: At present, no tombstone would be left.",
"item.edit.delete.error": "An error occurred while deleting the item",
"item.edit.delete.header": "Delete item: {{ id }}",
"item.edit.delete.success": "The item has been deleted",
"item.edit.head": "Edit Item",
"item.edit.metadata.add-button": "Add",
"item.edit.metadata.discard-button": "Discard",
"item.edit.metadata.edit.buttons.edit": "Edit",
"item.edit.metadata.edit.buttons.remove": "Remove",
"item.edit.metadata.edit.buttons.undo": "Undo changes",
"item.edit.metadata.edit.buttons.unedit": "Stop editing",
"item.edit.metadata.headers.edit": "Edit",
"item.edit.metadata.headers.field": "Field",
"item.edit.metadata.headers.language": "Lang",
"item.edit.metadata.headers.value": "Value",
"item.edit.metadata.metadatafield.invalid": "Please choose a valid metadata field",
"item.edit.metadata.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button",
"item.edit.metadata.notifications.discarded.title": "Changed discarded",
"item.edit.metadata.notifications.invalid.content": "Your changes were not saved. Please make sure all fields are valid before you save.",
"item.edit.metadata.notifications.invalid.title": "Metadata invalid",
"item.edit.metadata.notifications.outdated.content": "The item you're currently working on has been changed by another user. Your current changes are discarded to prevent conflicts",
"item.edit.metadata.notifications.outdated.title": "Changed outdated",
"item.edit.metadata.notifications.saved.content": "Your changes to this item's metadata were saved.",
"item.edit.metadata.notifications.saved.title": "Metadata saved",
"item.edit.metadata.reinstate-button": "Undo",
"item.edit.metadata.save-button": "Save",
"item.edit.modify.overview.field": "Field",
"item.edit.modify.overview.language": "Language",
"item.edit.modify.overview.value": "Value",
"item.edit.move.cancel": "Cancel",
"item.edit.move.description": "Select the collection you wish to move this item to. To narrow down the list of displayed collections, you can enter a search query in the box.",
"item.edit.move.error": "An error occured when attempting to move the item",
"item.edit.move.head": "Move item: {{id}}",
"item.edit.move.inheritpolicies.checkbox": "Inherit policies",
"item.edit.move.inheritpolicies.description": "Inherit the default policies of the destination collection",
"item.edit.move.move": "Move",
"item.edit.move.processing": "Moving...",
"item.edit.move.search.placeholder": "Enter a search query to look for collections",
"item.edit.move.success": "The item has been moved succesfully",
"item.edit.move.title": "Move item",
"item.edit.private.cancel": "Cancel",
"item.edit.private.confirm": "Make it Private",
"item.edit.private.description": "Are you sure this item should be made private in the archive?",
"item.edit.private.error": "An error occurred while making the item private",
"item.edit.private.header": "Make item private: {{ id }}",
"item.edit.private.success": "The item is now private",
"item.edit.public.cancel": "Cancel",
"item.edit.public.confirm": "Make it Public",
"item.edit.public.description": "Are you sure this item should be made public in the archive?",
"item.edit.public.error": "An error occurred while making the item public",
"item.edit.public.header": "Make item public: {{ id }}",
"item.edit.public.success": "The item is now public",
"item.edit.reinstate.cancel": "Cancel",
"item.edit.reinstate.confirm": "Reinstate",
"item.edit.reinstate.description": "Are you sure this item should be reinstated to the archive?",
"item.edit.reinstate.error": "An error occurred while reinstating the item",
"item.edit.reinstate.header": "Reinstate item: {{ id }}",
"item.edit.reinstate.success": "The item was reinstated successfully",
"item.edit.relationships.discard-button": "Discard",
"item.edit.relationships.edit.buttons.remove": "Remove",
"item.edit.relationships.edit.buttons.undo": "Undo changes",
"item.edit.relationships.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button",
"item.edit.relationships.notifications.discarded.title": "Changes discarded",
"item.edit.relationships.notifications.failed.title": "Error deleting relationship",
"item.edit.relationships.notifications.outdated.content": "The item you're currently working on has been changed by another user. Your current changes are discarded to prevent conflicts",
"item.edit.relationships.notifications.outdated.title": "Changes outdated",
"item.edit.relationships.notifications.saved.content": "Your changes to this item's relationships were saved.",
"item.edit.relationships.notifications.saved.title": "Relationships saved",
"item.edit.relationships.reinstate-button": "Undo",
"item.edit.relationships.save-button": "Save",
"item.edit.tabs.bitstreams.head": "Item Bitstreams",
"item.edit.tabs.bitstreams.title": "Item Edit - Bitstreams",
"item.edit.tabs.curate.head": "Curate",
"item.edit.tabs.curate.title": "Item Edit - Curate",
"item.edit.tabs.metadata.head": "Item Metadata",
"item.edit.tabs.metadata.title": "Item Edit - Metadata",
"item.edit.tabs.relationships.head": "Item Relationships",
"item.edit.tabs.relationships.title": "Item Edit - Relationships",
"item.edit.tabs.status.buttons.authorizations.button": "Authorizations...",
"item.edit.tabs.status.buttons.authorizations.label": "Edit item's authorization policies",
"item.edit.tabs.status.buttons.delete.button": "Permanently delete",
"item.edit.tabs.status.buttons.delete.label": "Completely expunge item",
"item.edit.tabs.status.buttons.mappedCollections.button": "Mapped collections",
"item.edit.tabs.status.buttons.mappedCollections.label": "Manage mapped collections",
"item.edit.tabs.status.buttons.move.button": "Move...",
"item.edit.tabs.status.buttons.move.label": "Move item to another collection",
"item.edit.tabs.status.buttons.private.button": "Make it private...",
"item.edit.tabs.status.buttons.private.label": "Make item private",
"item.edit.tabs.status.buttons.public.button": "Make it public...",
"item.edit.tabs.status.buttons.public.label": "Make item public",
"item.edit.tabs.status.buttons.reinstate.button": "Reinstate...",
"item.edit.tabs.status.buttons.reinstate.label": "Reinstate item into the repository",
"item.edit.tabs.status.buttons.withdraw.button": "Withdraw...",
"item.edit.tabs.status.buttons.withdraw.label": "Withdraw item from the repository",
"item.edit.tabs.status.description": "Welcome to the item management page. From here you can withdraw, reinstate, move or delete the item. You may also update or add new metadata / bitstreams on the other tabs.",
"item.edit.tabs.status.head": "Item Status",
"item.edit.tabs.status.labels.handle": "Handle",
"item.edit.tabs.status.labels.id": "Item Internal ID",
"item.edit.tabs.status.labels.itemPage": "Item Page",
"item.edit.tabs.status.labels.lastModified": "Last Modified",
"item.edit.tabs.status.title": "Item Edit - Status",
"item.edit.tabs.view.head": "View Item",
"item.edit.tabs.view.title": "Item Edit - View",
"item.edit.withdraw.cancel": "Cancel",
"item.edit.withdraw.confirm": "Withdraw",
"item.edit.withdraw.description": "Are you sure this item should be withdrawn from the archive?",
"item.edit.withdraw.error": "An error occurred while withdrawing the item",
"item.edit.withdraw.header": "Withdraw item: {{ id }}",
"item.edit.withdraw.success": "The item was withdrawn successfully",
"item.page.abstract": "Abstract",
"item.page.author": "Authors",
"item.page.citation": "Citation",
"item.page.collections": "Collections",
"item.page.date": "Date",
"item.page.files": "Files",
"item.page.filesection.description": "Description:",
"item.page.filesection.download": "Download",
"item.page.filesection.format": "Format:",
"item.page.filesection.name": "Name:",
"item.page.filesection.size": "Size:",
"item.page.journal.search.title": "Articles in this journal",
"item.page.link.full": "Full item page",
"item.page.link.simple": "Simple item page",
"item.page.person.search.title": "Articles by this author",
"item.page.subject": "Keywords",
"item.page.uri": "URI",
"item.select.confirm": "Confirm selected",
"item.select.table.author": "Author",
"item.select.table.collection": "Collection",
"item.select.table.title": "Title",
"journal.listelement.badge": "Journal",
"journal.page.description": "Description",
"journal.page.editor": "Editor-in-Chief",
"journal.page.issn": "ISSN",
"journal.page.publisher": "Publisher",
"journal.page.titleprefix": "Journal: ",
"journal.search.results.head": "Journal Search Results",
"journal.search.title": "DSpace Angular :: Journal Search",
"journalissue.listelement.badge": "Journal Issue",
"journalissue.page.description": "Description",
"journalissue.page.issuedate": "Issue Date",
"journalissue.page.journal-issn": "Journal ISSN",
"journalissue.page.journal-title": "Journal Title",
"journalissue.page.keyword": "Keywords",
"journalissue.page.number": "Number",
"journalissue.page.titleprefix": "Journal Issue: ",
"journalvolume.listelement.badge": "Journal Volume",
"journalvolume.page.description": "Description",
"journalvolume.page.issuedate": "Issue Date",
"journalvolume.page.titleprefix": "Journal Volume: ",
"journalvolume.page.volume": "Volume",
"loading.browse-by": "Loading items...",
"loading.browse-by-page": "Loading page...",
"loading.collection": "Loading collection...",
"loading.community": "Loading community...",
"loading.default": "Loading...",
"loading.item": "Loading item...",
"loading.mydspace-results": "Loading items...",
"loading.objects": "Loading...",
"loading.recent-submissions": "Loading recent submissions...",
"loading.search-results": "Loading search results...",
"loading.sub-collections": "Loading sub-collections...",
"loading.sub-communities": "Loading sub-communities...",
"loading.top-level-communities": "Loading top-level communities...",
"login.form.email": "Email address",
"login.form.forgot-password": "Have you forgotten your password?",
"login.form.header": "Please log in to DSpace",
"login.form.new-user": "New user? Click here to register.",
"login.form.password": "Password",
"login.form.submit": "Log in",
"login.title": "Login",
"logout.form.header": "Log out from DSpace",
"logout.form.submit": "Log out",
"logout.title": "Logout",
"menu.header.admin": "Admin",
"menu.header.image.logo": "Repository logo",
"menu.section.access_control": "Access Control",
"menu.section.access_control_authorizations": "Authorizations",
"menu.section.access_control_groups": "Groups",
"menu.section.access_control_people": "People",
"menu.section.browse_community": "This Community",
"menu.section.browse_community_by_author": "By Author",
"menu.section.browse_community_by_issue_date": "By Issue Date",
"menu.section.browse_community_by_title": "By Title",
"menu.section.browse_global": "All of DSpace",
"menu.section.browse_global_by_author": "By Author",
"menu.section.browse_global_by_dateissued": "By Issue Date",
"menu.section.browse_global_by_subject": "By Subject",
"menu.section.browse_global_by_title": "By Title",
"menu.section.browse_global_communities_and_collections": "Communities & Collections",
"menu.section.control_panel": "Control Panel",
"menu.section.curation_task": "Curation Task",
"menu.section.edit": "Edit",
"menu.section.edit_collection": "Collection",
"menu.section.edit_community": "Community",
"menu.section.edit_item": "Item",
"menu.section.export": "Export",
"menu.section.export_collection": "Collection",
"menu.section.export_community": "Community",
"menu.section.export_item": "Item",
"menu.section.export_metadata": "Metadata",
"menu.section.find": "Find",
"menu.section.find_items": "Items",
"menu.section.find_private_items": "Private Items",
"menu.section.find_withdrawn_items": "Withdrawn Items",
"menu.section.icon.access_control": "Access Control menu section",
"menu.section.icon.control_panel": "Control Panel menu section",
"menu.section.icon.curation_task": "Curation Task menu section",
"menu.section.icon.edit": "Edit menu section",
"menu.section.icon.export": "Export menu section",
"menu.section.icon.find": "Find menu section",
"menu.section.icon.import": "Import menu section",
"menu.section.icon.new": "New menu section",
"menu.section.icon.pin": "Pin sidebar",
"menu.section.icon.registries": "Registries menu section",
"menu.section.icon.statistics_task": "Statistics Task menu section",
"menu.section.icon.unpin": "Unpin sidebar",
"menu.section.import": "Import",
"menu.section.import_batch": "Batch Import (ZIP)",
"menu.section.import_metadata": "Metadata",
"menu.section.new": "New",
"menu.section.new_collection": "Collection",
"menu.section.new_community": "Community",
"menu.section.new_item": "Item",
"menu.section.new_item_version": "Item Version",
"menu.section.pin": "Pin sidebar",
"menu.section.unpin": "Unpin sidebar",
"menu.section.registries": "Registries",
"menu.section.registries_format": "Format",
"menu.section.registries_metadata": "Metadata",
"menu.section.statistics": "Statistics",
"menu.section.statistics_task": "Statistics Task",
"menu.section.toggle.access_control": "Toggle Access Control section",
"menu.section.toggle.control_panel": "Toggle Control Panel section",
"menu.section.toggle.curation_task": "Toggle Curation Task section",
"menu.section.toggle.edit": "Toggle Edit section",
"menu.section.toggle.export": "Toggle Export section",
"menu.section.toggle.find": "Toggle Find section",
"menu.section.toggle.import": "Toggle Import section",
"menu.section.toggle.new": "Toggle New section",
"menu.section.toggle.registries": "Toggle Registries section",
"menu.section.toggle.statistics_task": "Toggle Statistics Task section",
"mydspace.description": "",
"mydspace.general.text-here": "HERE",
"mydspace.messages.controller-help": "Select this option to send a message to item's submitter.",
"mydspace.messages.description-placeholder": "Insert your message here...",
"mydspace.messages.hide-msg": "Hide message",
"mydspace.messages.mark-as-read": "Mark as read",
"mydspace.messages.mark-as-unread": "Mark as unread",
"mydspace.messages.no-content": "No content.",
"mydspace.messages.no-messages": "No messages yet.",
"mydspace.messages.send-btn": "Send",
"mydspace.messages.show-msg": "Show message",
"mydspace.messages.subject-placeholder": "Subject...",
"mydspace.messages.submitter-help": "Select this option to send a message to controller.",
"mydspace.messages.title": "Messages",
"mydspace.messages.to": "To",
"mydspace.new-submission": "New submission",
"mydspace.results.head": "Your submissions",
"mydspace.results.no-abstract": "No Abstract",
"mydspace.results.no-authors": "No Authors",
"mydspace.results.no-collections": "No Collections",
"mydspace.results.no-date": "No Date",
"mydspace.results.no-files": "No Files",
"mydspace.results.no-results": "There were no items to show",
"mydspace.results.no-title": "No title",
"mydspace.results.no-uri": "No Uri",
"mydspace.show.workflow": "All tasks",
"mydspace.show.workspace": "Your Submissions",
"mydspace.status.archived": "Archived",
"mydspace.status.validation": "Validation",
"mydspace.status.waiting-for-controller": "Waiting for controller",
"mydspace.status.workflow": "Workflow",
"mydspace.status.workspace": "Workspace",
"mydspace.title": "MyDSpace",
"mydspace.upload.upload-failed": "Error creating new workspace. Please verify the content uploaded before retry.",
"mydspace.upload.upload-multiple-successful": "{{qty}} new workspace items created.",
"mydspace.upload.upload-successful": "New workspace item created. Click {{here}} for edit it.",
"mydspace.view-btn": "View",
"nav.browse.header": "All of DSpace",
"nav.community-browse.header": "By Community",
"nav.language": "Language switch",
"nav.login": "Log In",
"nav.logout": "Log Out",
"nav.mydspace": "MyDSpace",
"nav.search": "Search",
"nav.statistics.header": "Statistics",
"orgunit.listelement.badge": "Organizational Unit",
"orgunit.page.city": "City",
"orgunit.page.country": "Country",
"orgunit.page.dateestablished": "Date established",
"orgunit.page.description": "Description",
"orgunit.page.id": "ID",
"orgunit.page.titleprefix": "Organizational Unit: ",
"pagination.results-per-page": "Results Per Page",
"pagination.showing.detail": "{{ range }} of {{ total }}",
"pagination.showing.label": "Now showing ",
"pagination.sort-direction": "Sort Options",
"person.listelement.badge": "Person",
"person.page.birthdate": "Birth Date",
"person.page.email": "Email Address",
"person.page.firstname": "First Name",
"person.page.jobtitle": "Job Title",
"person.page.lastname": "Last Name",
"person.page.link.full": "Show all metadata",
"person.page.orcid": "ORCID",
"person.page.staffid": "Staff ID",
"person.page.titleprefix": "Person: ",
"person.search.results.head": "Person Search Results",
"person.search.title": "DSpace Angular :: Person Search",
"project.listelement.badge": "Research Project",
"project.page.contributor": "Contributors",
"project.page.description": "Description",
"project.page.expectedcompletion": "Expected Completion",
"project.page.funder": "Funders",
"project.page.id": "ID",
"project.page.keyword": "Keywords",
"project.page.status": "Status",
"project.page.titleprefix": "Research Project: ",
"publication.listelement.badge": "Publication",
"publication.page.description": "Description",
"publication.page.journal-issn": "Journal ISSN",
"publication.page.journal-title": "Journal Title",
"publication.page.publisher": "Publisher",
"publication.page.titleprefix": "Publication: ",
"publication.page.volume-title": "Volume Title",
"publication.search.results.head": "Publication Search Results",
"publication.search.title": "DSpace Angular :: Publication Search",
"relationships.isAuthorOf": "Authors",
"relationships.isIssueOf": "Journal Issues",
"relationships.isJournalIssueOf": "Journal Issue",
"relationships.isJournalOf": "Journals",
"relationships.isOrgUnitOf": "Organizational Units",
"relationships.isPersonOf": "Authors",
"relationships.isProjectOf": "Research Projects",
"relationships.isPublicationOf": "Publications",
"relationships.isPublicationOfJournalIssue": "Articles",
"relationships.isSingleJournalOf": "Journal",
"relationships.isSingleVolumeOf": "Journal Volume",
"relationships.isVolumeOf": "Journal Volumes",
"search.description": "",
"search.switch-configuration.title": "Show",
"search.title": "DSpace Angular :: Search",
"search.filters.applied.f.author": "Author",
"search.filters.applied.f.dateIssued.max": "End date",
"search.filters.applied.f.dateIssued.min": "Start date",
"search.filters.applied.f.dateSubmitted": "Date submitted",
"search.filters.applied.f.entityType": "Item Type",
"search.filters.applied.f.has_content_in_original_bundle": "Has files",
"search.filters.applied.f.itemtype": "Type",
"search.filters.applied.f.namedresourcetype": "Status",
"search.filters.applied.f.subject": "Subject",
"search.filters.applied.f.submitter": "Submitter",
"search.filters.filter.author.head": "Author",
"search.filters.filter.author.placeholder": "Author name",
"search.filters.filter.birthDate.head": "Birth Date",
"search.filters.filter.birthDate.placeholder": "Birth Date",
"search.filters.filter.creativeDatePublished.head": "Date Published",
"search.filters.filter.creativeDatePublished.placeholder": "Date Published",
"search.filters.filter.creativeWorkEditor.head": "Editor",
"search.filters.filter.creativeWorkEditor.placeholder": "Editor",
"search.filters.filter.creativeWorkKeywords.head": "Subject",
"search.filters.filter.creativeWorkKeywords.placeholder": "Subject",
"search.filters.filter.creativeWorkPublisher.head": "Publisher",
"search.filters.filter.creativeWorkPublisher.placeholder": "Publisher",
"search.filters.filter.dateIssued.head": "Date",
"search.filters.filter.dateIssued.max.placeholder": "Minimum Date",
"search.filters.filter.dateIssued.min.placeholder": "Maximum Date",
"search.filters.filter.dateSubmitted.head": "Date submitted",
"search.filters.filter.dateSubmitted.placeholder": "Date submitted",
"search.filters.filter.entityType.head": "Item Type",
"search.filters.filter.entityType.placeholder": "Item Type",
"search.filters.filter.has_content_in_original_bundle.head": "Has files",
"search.filters.filter.itemtype.head": "Type",
"search.filters.filter.itemtype.placeholder": "Type",
"search.filters.filter.jobTitle.head": "Job Title",
"search.filters.filter.jobTitle.placeholder": "Job Title",
"search.filters.filter.knowsLanguage.head": "Known language",
"search.filters.filter.knowsLanguage.placeholder": "Known language",
"search.filters.filter.namedresourcetype.head": "Status",
"search.filters.filter.namedresourcetype.placeholder": "Status",
"search.filters.filter.objectpeople.head": "People",
"search.filters.filter.objectpeople.placeholder": "People",
"search.filters.filter.organizationAddressCountry.head": "Country",
"search.filters.filter.organizationAddressCountry.placeholder": "Country",
"search.filters.filter.organizationAddressLocality.head": "City",
"search.filters.filter.organizationAddressLocality.placeholder": "City",
"search.filters.filter.organizationFoundingDate.head": "Date Founded",
"search.filters.filter.organizationFoundingDate.placeholder": "Date Founded",
"search.filters.filter.scope.head": "Scope",
"search.filters.filter.scope.placeholder": "Scope filter",
"search.filters.filter.show-less": "Collapse",
"search.filters.filter.show-more": "Show more",
"search.filters.filter.subject.head": "Subject",
"search.filters.filter.subject.placeholder": "Subject",
"search.filters.filter.submitter.head": "Submitter",
"search.filters.filter.submitter.placeholder": "Submitter",
"search.filters.head": "Filters",
"search.filters.reset": "Reset filters",
"search.form.search": "Search",
"search.form.search_dspace": "Search DSpace",
"search.form.search_mydspace": "Search MyDSpace",
"search.results.head": "Search Results",
"search.results.no-results": "Your search returned no results. Having trouble finding what you're looking for? Try putting",
"search.results.no-results-link": "quotes around it",
"search.sidebar.close": "Back to results",
"search.sidebar.filters.title": "Filters",
"search.sidebar.open": "Search Tools",
"search.sidebar.results": "results",
"search.sidebar.settings.rpp": "Results per page",
"search.sidebar.settings.sort-by": "Sort By",
"search.sidebar.settings.title": "Settings",
"search.view-switch.show-detail": "Show detail",
"search.view-switch.show-grid": "Show as grid",
"search.view-switch.show-list": "Show as list",
"sorting.dc.title.ASC": "Title Ascending",
"sorting.dc.title.DESC": "Title Descending",
"sorting.score.DESC": "Relevance",
"submission.edit.title": "Edit Submission",
"submission.general.cannot_submit": "You have not the privilege to make a new submission.",
"submission.general.deposit": "Deposit",
"submission.general.discard.confirm.cancel": "Cancel",
"submission.general.discard.confirm.info": "This operation can't be undone. Are you sure?",
"submission.general.discard.confirm.submit": "Yes, I'm sure",
"submission.general.discard.confirm.title": "Discard submission",
"submission.general.discard.submit": "Discard",
"submission.general.save": "Save",
"submission.general.save-later": "Save for later",
"submission.sections.general.add-more": "Add more",
"submission.sections.general.collection": "Collection",
"submission.sections.general.deposit_error_notice": "There was an issue when submitting the item, please try again later.",
"submission.sections.general.deposit_success_notice": "Submission deposited successfully.",
"submission.sections.general.discard_error_notice": "There was an issue when discarding the item, please try again later.",
"submission.sections.general.discard_success_notice": "Submission discarded successfully.",
"submission.sections.general.metadata-extracted": "New metadata have been extracted and added to the <strong>{{sectionId}}</strong> section.",
"submission.sections.general.metadata-extracted-new-section": "New <strong>{{sectionId}}</strong> section has been added to submission.",
"submission.sections.general.no-collection": "No collection found",
"submission.sections.general.no-sections": "No options available",
"submission.sections.general.save_error_notice": "There was an issue when saving the item, please try again later.",
"submission.sections.general.save_success_notice": "Submission saved successfully.",
"submission.sections.general.search-collection": "Search for a collection",
"submission.sections.general.sections_not_valid": "There are incomplete sections.",
"submission.sections.submit.progressbar.cclicense": "Creative commons license",
"submission.sections.submit.progressbar.describe.recycle": "Recycle",
"submission.sections.submit.progressbar.describe.stepcustom": "Describe",
"submission.sections.submit.progressbar.describe.stepone": "Describe",
"submission.sections.submit.progressbar.describe.steptwo": "Describe",
"submission.sections.submit.progressbar.detect-duplicate": "Potential duplicates",
"submission.sections.submit.progressbar.license": "Deposit license",
"submission.sections.submit.progressbar.upload": "Upload files",
"submission.sections.upload.delete.confirm.cancel": "Cancel",
"submission.sections.upload.delete.confirm.info": "This operation can't be undone. Are you sure?",
"submission.sections.upload.delete.confirm.submit": "Yes, I'm sure",
"submission.sections.upload.delete.confirm.title": "Delete bitstream",
"submission.sections.upload.delete.submit": "Delete",
"submission.sections.upload.drop-message": "Drop files to attach them to the item",
"submission.sections.upload.form.access-condition-label": "Access condition type",
"submission.sections.upload.form.date-required": "Date is required.",
"submission.sections.upload.form.from-label": "Access grant from",
"submission.sections.upload.form.from-placeholder": "From",
"submission.sections.upload.form.group-label": "Group",
"submission.sections.upload.form.group-required": "Group is required.",
"submission.sections.upload.form.until-label": "Access grant until",
"submission.sections.upload.form.until-placeholder": "Until",
"submission.sections.upload.header.policy.default.nolist": "Uploaded files in the {{collectionName}} collection will be accessible according to the following group(s):",
"submission.sections.upload.header.policy.default.withlist": "Please note that uploaded files in the {{collectionName}} collection will be accessible, in addition to what is explicitly decided for the single file, with the following group(s):",
"submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or <strong>upload additional files just dragging & dropping them everywhere in the page</strong>",
"submission.sections.upload.no-entry": "No",
"submission.sections.upload.no-file-uploaded": "No file uploaded yet.",
"submission.sections.upload.save-metadata": "Save metadata",
"submission.sections.upload.undo": "Cancel",
"submission.sections.upload.upload-failed": "Upload failed",
"submission.sections.upload.upload-successful": "Upload successful",
"submission.submit.title": "Submission",
"submission.workflow.generic.delete": "Delete",
"submission.workflow.generic.delete-help": "If you would to discard this item, select \"Delete\". You will then be asked to confirm it.",
"submission.workflow.generic.edit": "Edit",
"submission.workflow.generic.edit-help": "Select this option to change the item's metadata.",
"submission.workflow.generic.view": "View",
"submission.workflow.generic.view-help": "Select this option to view the item's metadata.",
"submission.workflow.tasks.claimed.approve": "Approve",
"submission.workflow.tasks.claimed.approve_help": "If you have reviewed the item and it is suitable for inclusion in the collection, select \"Approve\".",
"submission.workflow.tasks.claimed.edit": "Edit",
"submission.workflow.tasks.claimed.edit_help": "Select this option to change the item's metadata.",
"submission.workflow.tasks.claimed.reject.reason.info": "Please enter your reason for rejecting the submission into the box below, indicating whether the submitter may fix a problem and resubmit.",
"submission.workflow.tasks.claimed.reject.reason.placeholder": "Describe the reason of reject",
"submission.workflow.tasks.claimed.reject.reason.submit": "Reject item",
"submission.workflow.tasks.claimed.reject.reason.title": "Reason",
"submission.workflow.tasks.claimed.reject.submit": "Reject",
"submission.workflow.tasks.claimed.reject_help": "If you have reviewed the item and found it is <strong>not</strong> suitable for inclusion in the collection, select \"Reject\". You will then be asked to enter a message indicating why the item is unsuitable, and whether the submitter should change something and resubmit.",
"submission.workflow.tasks.claimed.return": "Return to pool",
"submission.workflow.tasks.claimed.return_help": "Return the task to the pool so that another user may perform the task.",
"submission.workflow.tasks.generic.error": "Error occurred during operation...",
"submission.workflow.tasks.generic.processing": "Processing...",
"submission.workflow.tasks.generic.submitter": "Submitter",
"submission.workflow.tasks.generic.success": "Operation successful",
"submission.workflow.tasks.pool.claim": "Claim",
"submission.workflow.tasks.pool.claim_help": "Assign this task to yourself.",
"submission.workflow.tasks.pool.hide-detail": "Hide detail",
"submission.workflow.tasks.pool.show-detail": "Show detail",
"title": "DSpace",
"uploader.browse": "browse",
"uploader.drag-message": "Drag & Drop your files here",
"uploader.or": ", or",
"uploader.processing": "Processing",
"uploader.queue-length": "Queue length",
}

View File

@@ -1,277 +0,0 @@
{
"footer": {
"copyright": "copyright © 2002-{{ year }}",
"link.dspace": "DSpace software",
"link.duraspace": "DuraSpace"
},
"collection": {
"page": {
"news": "Nieuws",
"license": "Licentie",
"browse": {
"recent": {
"head": "Recent toegevoegd"
}
}
}
},
"community": {
"page": {
"news": "Nieuws",
"license": "Licentie"
},
"sub-collection-list": {
"head": "Collecties in deze Community"
}
},
"item": {
"page": {
"author": "Auteur",
"abstract": "Abstract",
"date": "Datum",
"uri": "URI",
"files": "Bestanden",
"collections": "Collecties",
"filesection": {
"download": "Download",
"name": "Naam:",
"format": "Formaat:",
"size": "Grootte:",
"description": "Beschrijving:"
},
"link": {
"simple": "Eenvoudige itemweergave",
"full": "Volledige itemweergave"
}
}
},
"nav": {
"home": "Home",
"login": "Log In",
"logout": "Log Uit"
},
"pagination": {
"results-per-page": "Resultaten per pagina",
"sort-direction": "Sorteermogelijkheden",
"showing": {
"label": "Resultaten ",
"detail": "{{ range }} van {{ total }}"
}
},
"sorting": {
"score": {
"DESC": "Relevantie"
},
"dc.title": {
"ASC": "Oplopend op titel",
"DESC": "Aflopend op titel"
}
},
"title": "DSpace",
"404": {
"help": "De pagina die u zoekt kan niet gevonden worden. De pagina werd mogelijk verplaatst of verwijderd. U kan onderstaande knop gebruiken om terug naar de homepagina te gaan. ",
"page-not-found": "Pagina niet gevonden",
"link": {
"home-page": "Terug naar de homepagina"
}
},
"home": {
"title": "DSpace Angular :: Home",
"description": "",
"top-level-communities": {
"head": "Communities in DSpace",
"help": "Selecteer een community om diens collecties te verkennen."
}
},
"search": {
"title": "DSpace Angular :: Zoek",
"description": "",
"form": {
"search": "Zoek",
"search_dspace": "Zoek in DSpace"
},
"results": {
"head": "Zoekresultaten",
"no-results": "Er waren geen resultaten voor deze zoekopdracht"
},
"sidebar": {
"close": "Terug naar de resultaten",
"open": "Zoek Tools",
"results": "resultaten",
"filters": {
"title": "Filters"
},
"settings": {
"title": "Instellingen",
"sort-by": "Sorteer volgens",
"rpp": "Resultaten per pagina"
}
},
"view-switch": {
"show-list": "Toon als lijst",
"show-grid": "Toon in raster"
},
"filters": {
"head": "Filters",
"reset": "Filters verwijderen",
"applied": {
"f.author": "Auteur",
"f.dateIssued.min": "Startdatum",
"f.dateIssued.max": "Einddatum",
"f.subject": "Sleutelwoord",
"f.has_content_in_original_bundle": "Heeft bestanden"
},
"filter": {
"show-more": "Toon meer",
"show-less": "Inklappen",
"author": {
"placeholder": "Auteursnaam",
"head": "Auteur"
},
"scope": {
"placeholder": "Bereikfilter",
"head": "Bereik"
},
"subject": {
"placeholder": "Onderwerp",
"head": "Onderwerp"
},
"dateIssued": {
"max": {
"placeholder": "Vroegste Datum"
},
"min": {
"placeholder": "Laatste Datum"
},
"head": "Datum"
},
"has_content_in_original_bundle": {
"head": "Heeft bestanden"
}
}
}
},
"browse": {
"title": "Verken {{ collection }} volgens {{ field }} {{ value }}"
},
"admin": {
"registries": {
"metadata": {
"title": "DSpace Angular :: Metadata Register",
"head": "Metadata Register",
"description": "Het metadataregister omvat de lijst van alle metadatavelden die beschikbaar zijn in het systeem. Deze velden kunnen verspreid zijn over verschillende metadataschema's. Het qualified Dublin Core schema (dc) is een verplicht schema en kan niet worden verwijderd.",
"schemas": {
"table": {
"id": "ID",
"namespace": "Naamruimte",
"name": "Naam"
},
"no-items": "Er kunnen geen metadataschema's getoond worden."
}
},
"schema": {
"title": "DSpace Angular :: Metadata Schema Register",
"head": "Metadata Schema",
"description": "Dit is het metadataschema voor \"{{namespace}}\".",
"fields": {
"head": "Schema metadatavelden",
"table": {
"field": "Veld",
"scopenote": "Opmerking over bereik"
},
"no-items": "Er kunnen geen metadatavelden getoond worden."
}
},
"bitstream-formats": {
"title": "DSpace Angular :: Bitstream Formaat Register",
"head": "Bitstream Formaat Register",
"description": "Deze lijst van Bitstream formaten biedt informatie over de formaten die in deze repository zijn toegelaten en op welke manier ze ondersteund worden. De term Bitstream wordt in DSpace gebruikt om een bestand aan te duiden dat samen met metadata onderdeel uitmaakt van een item. De naam bitstream duidt op het feit dat het bestand achterliggend wordt opgeslaan zonder bestandsextensie.",
"formats": {
"table": {
"name": "Naam",
"mimetype": "MIME Type",
"supportLevel": {
"head": "Ondersteuning",
"0": "Onbekend",
"1": "Gekend",
"2": "Ondersteund"
},
"internal": "intern"
},
"no-items": "Er kunnen geen bitstreamformaten getoond worden."
}
}
}
},
"loading": {
"default": "Laden...",
"top-level-communities": "Inladen van de Communities op het hoogste niveau...",
"community": "Community wordt ingeladen...",
"collection": "Collectie wordt ingeladen...",
"sub-collections": "De sub-collecties worden ingeladen...",
"recent-submissions": "Recent toegevoegde items worden ingeladen...",
"item": "Item wordt ingeladen...",
"objects": "Laden...",
"search-results": "Zoekresultaten worden ingeladen...",
"browse-by": "Items worden ingeladen..."
},
"error": {
"default": "Fout",
"top-level-communities": "Fout bij het inladen van communities op het hoogste niveau",
"community": "Fout bij het ophalen van een community",
"collection": "Fout bij het ophalen van een collectie",
"sub-collections": "Fout bij het ophalen van sub-collecties",
"recent-submissions": "Fout bij het ophalen van recent toegevoegde items",
"item": "Fout bij het ophalen van items",
"objects": "Fout bij het ophalen van objecten",
"search-results": "Fout bij het ophalen van zoekresultaten",
"browse-by": "Fout bij het ophalen van items",
"validation": {
"pattern": "Deze invoer is niet toegelaten volgens dit patroon: {{ pattern }}.",
"license": {
"notgranted": "U moet de invoerlicentie goedkeuren om de invoer af te werken. Indien u deze licentie momenteel niet kan of mag goedkeuren, kan u uw werk opslaan en de invoer later afwerken. U kunt dit nieuwe item ook verwijderen indien u niet voldoet aan de vereisten van de invoerlicentie."
}
}
},
"form": {
"submit": "Verstuur",
"cancel": "Annuleer",
"search": "Zoek",
"remove": "Verwijder",
"first-name": "Voornaam",
"last-name": "Achternaam",
"loading": "Inladen...",
"no-results": "Geen resultaten gevonden",
"no-value": "Geen waarde ingevoerd",
"group-collapse": "Inklappen",
"group-expand": "Uitklappen",
"group-collapse-help": "Klik hier op in te klappen",
"group-expand-help": "Klik hier om uit te klappen en om meer onderdelen toe te voegen"
},
"login": {
"title": "Aanmelden",
"form": {
"header": "Gelieve in te loggen in DSpace",
"email": "Email adres",
"forgot-password": "Bent u uw wachtwoord vergeten?",
"new-user": "Nieuwe gebruiker? Gelieve u hier te registreren",
"password": "Wachtwoord",
"submit": "Aanmelden"
}
},
"logout": {
"title": "Afmelden",
"form": {
"header": "Afmelden in DSpace",
"submit": "Afmelden"
}
},
"auth": {
"messages": {
"expired": "Uw sessie is vervallen. Gelieve opnieuw aan te melden."
},
"errors": {
"invalid-user": "Ongeldig e-mailadres of wachtwoord."
}
}
}

175
resources/i18n/nl.json5 Normal file
View File

@@ -0,0 +1,175 @@
{
"404.help": "De pagina die u zoekt kan niet gevonden worden. De pagina werd mogelijk verplaatst of verwijderd. U kan onderstaande knop gebruiken om terug naar de homepagina te gaan. ",
"404.link.home-page": "Terug naar de homepagina",
"404.page-not-found": "Pagina niet gevonden",
"admin.registries.bitstream-formats.description": "Deze lijst van Bitstream formaten biedt informatie over de formaten die in deze repository zijn toegelaten en op welke manier ze ondersteund worden. De term Bitstream wordt in DSpace gebruikt om een bestand aan te duiden dat samen met metadata onderdeel uitmaakt van een item. De naam bitstream duidt op het feit dat het bestand achterliggend wordt opgeslaan zonder bestandsextensie.",
"admin.registries.bitstream-formats.formats.no-items": "Er kunnen geen bitstreamformaten getoond worden.",
"admin.registries.bitstream-formats.formats.table.internal": "intern",
"admin.registries.bitstream-formats.formats.table.mimetype": "MIME Type",
"admin.registries.bitstream-formats.formats.table.name": "Naam",
"admin.registries.bitstream-formats.formats.table.supportLevel.0": "Onbekend",
"admin.registries.bitstream-formats.formats.table.supportLevel.1": "Gekend",
"admin.registries.bitstream-formats.formats.table.supportLevel.2": "Ondersteund",
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Ondersteuning",
"admin.registries.bitstream-formats.head": "Bitstream Formaat Register",
"admin.registries.bitstream-formats.title": "DSpace Angular :: Bitstream Formaat Register",
"admin.registries.metadata.description": "Het metadataregister omvat de lijst van alle metadatavelden die beschikbaar zijn in het systeem. Deze velden kunnen verspreid zijn over verschillende metadataschema's. Het qualified Dublin Core schema (dc) is een verplicht schema en kan niet worden verwijderd.",
"admin.registries.metadata.head": "Metadata Register",
"admin.registries.metadata.schemas.no-items": "Er kunnen geen metadataschema's getoond worden.",
"admin.registries.metadata.schemas.table.id": "ID",
"admin.registries.metadata.schemas.table.name": "Naam",
"admin.registries.metadata.schemas.table.namespace": "Naamruimte",
"admin.registries.metadata.title": "DSpace Angular :: Metadata Register",
"admin.registries.schema.description": "Dit is het metadataschema voor \"{{namespace}}\".",
"admin.registries.schema.fields.head": "Schema metadatavelden",
"admin.registries.schema.fields.no-items": "Er kunnen geen metadatavelden getoond worden.",
"admin.registries.schema.fields.table.field": "Veld",
"admin.registries.schema.fields.table.scopenote": "Opmerking over bereik",
"admin.registries.schema.head": "Metadata Schema",
"admin.registries.schema.title": "DSpace Angular :: Metadata Schema Register",
"auth.errors.invalid-user": "Ongeldig e-mailadres of wachtwoord.",
"auth.messages.expired": "Uw sessie is vervallen. Gelieve opnieuw aan te melden.",
"browse.title": "Verken {{ collection }} volgens {{ field }} {{ value }}",
"collection.page.browse.recent.head": "Recent toegevoegd",
"collection.page.license": "Licentie",
"collection.page.news": "Nieuws",
"community.page.license": "Licentie",
"community.page.news": "Nieuws",
"community.sub-collection-list.head": "Collecties in deze Community",
"error.browse-by": "Fout bij het ophalen van items",
"error.collection": "Fout bij het ophalen van een collectie",
"error.community": "Fout bij het ophalen van een community",
"error.default": "Fout",
"error.item": "Fout bij het ophalen van items",
"error.objects": "Fout bij het ophalen van objecten",
"error.recent-submissions": "Fout bij het ophalen van recent toegevoegde items",
"error.search-results": "Fout bij het ophalen van zoekresultaten",
"error.sub-collections": "Fout bij het ophalen van sub-collecties",
"error.top-level-communities": "Fout bij het inladen van communities op het hoogste niveau",
"error.validation.license.notgranted": "U moet de invoerlicentie goedkeuren om de invoer af te werken. Indien u deze licentie momenteel niet kan of mag goedkeuren, kan u uw werk opslaan en de invoer later afwerken. U kunt dit nieuwe item ook verwijderen indien u niet voldoet aan de vereisten van de invoerlicentie.",
"error.validation.pattern": "Deze invoer is niet toegelaten volgens dit patroon: {{ pattern }}.",
"footer.copyright": "copyright © 2002-{{ year }}",
"footer.link.dspace": "DSpace software",
"footer.link.duraspace": "DuraSpace",
"form.cancel": "Annuleer",
"form.first-name": "Voornaam",
"form.group-collapse": "Inklappen",
"form.group-collapse-help": "Klik hier op in te klappen",
"form.group-expand": "Uitklappen",
"form.group-expand-help": "Klik hier om uit te klappen en om meer onderdelen toe te voegen",
"form.last-name": "Achternaam",
"form.loading": "Inladen...",
"form.no-results": "Geen resultaten gevonden",
"form.no-value": "Geen waarde ingevoerd",
"form.remove": "Verwijder",
"form.search": "Zoek",
"form.submit": "Verstuur",
"home.description": "",
"home.title": "DSpace Angular :: Home",
"home.top-level-communities.head": "Communities in DSpace",
"home.top-level-communities.help": "Selecteer een community om diens collecties te verkennen.",
"item.page.abstract": "Abstract",
"item.page.author": "Auteur",
"item.page.collections": "Collecties",
"item.page.date": "Datum",
"item.page.files": "Bestanden",
"item.page.filesection.description": "Beschrijving:",
"item.page.filesection.download": "Download",
"item.page.filesection.format": "Formaat:",
"item.page.filesection.name": "Naam:",
"item.page.filesection.size": "Grootte:",
"item.page.link.full": "Volledige itemweergave",
"item.page.link.simple": "Eenvoudige itemweergave",
"item.page.uri": "URI",
"loading.browse-by": "Items worden ingeladen...",
"loading.collection": "Collectie wordt ingeladen...",
"loading.community": "Community wordt ingeladen...",
"loading.default": "Laden...",
"loading.item": "Item wordt ingeladen...",
"loading.objects": "Laden...",
"loading.recent-submissions": "Recent toegevoegde items worden ingeladen...",
"loading.search-results": "Zoekresultaten worden ingeladen...",
"loading.sub-collections": "De sub-collecties worden ingeladen...",
"loading.top-level-communities": "Inladen van de Communities op het hoogste niveau...",
"login.form.email": "Email adres",
"login.form.forgot-password": "Bent u uw wachtwoord vergeten?",
"login.form.header": "Gelieve in te loggen in DSpace",
"login.form.new-user": "Nieuwe gebruiker? Gelieve u hier te registreren",
"login.form.password": "Wachtwoord",
"login.form.submit": "Aanmelden",
"login.title": "Aanmelden",
"logout.form.header": "Afmelden in DSpace",
"logout.form.submit": "Afmelden",
"logout.title": "Afmelden",
"nav.home": "Home",
"nav.login": "Log In",
"nav.logout": "Log Uit",
"pagination.results-per-page": "Resultaten per pagina",
"pagination.showing.detail": "{{ range }} van {{ total }}",
"pagination.showing.label": "Resultaten ",
"pagination.sort-direction": "Sorteermogelijkheden",
"search.description": "",
"search.title": "DSpace Angular :: Zoek",
"search.filters.applied.f.author": "Auteur",
"search.filters.applied.f.dateIssued.max": "Einddatum",
"search.filters.applied.f.dateIssued.min": "Startdatum",
"search.filters.applied.f.has_content_in_original_bundle": "Heeft bestanden",
"search.filters.applied.f.subject": "Sleutelwoord",
"search.filters.filter.author.head": "Auteur",
"search.filters.filter.author.placeholder": "Auteursnaam",
"search.filters.filter.dateIssued.head": "Datum",
"search.filters.filter.dateIssued.max.placeholder": "Vroegste Datum",
"search.filters.filter.dateIssued.min.placeholder": "Laatste Datum",
"search.filters.filter.has_content_in_original_bundle.head": "Heeft bestanden",
"search.filters.filter.scope.head": "Bereik",
"search.filters.filter.scope.placeholder": "Bereikfilter",
"search.filters.filter.show-less": "Inklappen",
"search.filters.filter.show-more": "Toon meer",
"search.filters.filter.subject.head": "Onderwerp",
"search.filters.filter.subject.placeholder": "Onderwerp",
"search.filters.head": "Filters",
"search.filters.reset": "Filters verwijderen",
"search.form.search": "Zoek",
"search.form.search_dspace": "Zoek in DSpace",
"search.results.head": "Zoekresultaten",
"search.results.no-results": "Er waren geen resultaten voor deze zoekopdracht",
"search.sidebar.close": "Terug naar de resultaten",
"search.sidebar.filters.title": "Filters",
"search.sidebar.open": "Zoek Tools",
"search.sidebar.results": "resultaten",
"search.sidebar.settings.rpp": "Resultaten per pagina",
"search.sidebar.settings.sort-by": "Sorteer volgens",
"search.sidebar.settings.title": "Instellingen",
"search.view-switch.show-grid": "Toon in raster",
"search.view-switch.show-list": "Toon als lijst",
"sorting.dc.title.ASC": "Oplopend op titel",
"sorting.dc.title.DESC": "Aflopend op titel",
"sorting.score.DESC": "Relevantie",
"title": "DSpace",
}

BIN
resources/images/banner.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="231.893px" height="167.458px" viewBox="0 0 231.893 167.458" enable-background="new 0 0 231.893 167.458"
xml:space="preserve">
<path fill="#43515F" d="M51.733,143.32c0-1.94,1.65-3.202,4.562-3.202c3.303,0,6.798,1.115,9.419,3.543l3.835-5.146
c-3.202-2.963-7.476-4.516-12.621-4.516c-7.622,0-12.284,4.467-12.284,9.855c0,12.188,18.644,8.254,18.644,13.887
c0,1.893-1.797,3.592-5.632,3.592c-4.466,0-8.011-2.039-10.292-4.418l-3.787,5.39c3.058,3.059,7.525,5.153,13.788,5.153
c8.691,0,12.964-4.474,12.964-10.396C70.329,144.971,51.733,148.418,51.733,143.32z M100.682,134.484H85.534v32.386h6.895v-11.557
h8.254c6.99,0,10.875-4.759,10.875-10.391C111.558,139.243,107.722,134.484,100.682,134.484z M99.71,149.245h-7.283v-8.69h7.283
c2.72,0,4.808,1.651,4.808,4.368C104.518,147.592,102.43,149.245,99.71,149.245z M180.759,140.067c3.302,0,6.215,2.09,7.573,4.71
l5.923-2.913c-2.28-4.078-6.407-7.914-13.496-7.914c-9.759,0-17.283,6.75-17.283,16.75c0,9.954,7.524,16.76,17.283,16.76
c7.089,0,11.216-3.94,13.496-7.971l-5.923-2.865c-1.358,2.623-4.271,4.711-7.573,4.711c-5.924,0-10.194-4.517-10.194-10.635
C170.564,144.583,174.835,140.067,180.759,140.067z M131.958,134.484l-12.485,32.386h7.823l2.04-5.486h13.887l2.038,5.486h7.816
l-12.479-32.386H131.958z M131.228,155.313l5.05-13.936l5.05,13.936H131.228z M231.892,140.553v-6.069h-22.916v32.386h22.916v-6.07
H215.87v-7.379h15.684v-6.069H215.87v-6.797L231.892,140.553L231.892,140.553z"/>
<path fill="#43515F" d="M29.956,150.652c0-9.71-7.04-16.168-17.187-16.168H0v32.386h12.817
C22.916,166.87,29.956,160.458,29.956,150.652z M12.769,160.799H6.894v-20.246h5.924c6.603,0,10.098,4.418,10.098,10.099
C22.916,156.187,19.177,160.799,12.769,160.799z"/>
<path fill="#43515F" d="M120.726,58.569l0.109-0.006l0.116-0.01l0.106-0.013l0.11-0.01l0.11-0.023l0.109-0.019l0.106-0.023
l0.106-0.029l0.105-0.023l0.106-0.033l0.103-0.034l0.097-0.035l0.104-0.04l0.101-0.042l0.1-0.042v-0.001l0.096-0.045l0,0
l0.095-0.044l0.097-0.049l0.091-0.056v-0.001l0.094-0.05v-0.002l0.09-0.056v-0.001l0.093-0.06l0.083-0.056v-0.001l0.085-0.063
l0.088-0.065v-0.002l0.087-0.062v-0.001c0.816-0.683,1.393-1.646,1.561-2.738l0.013-0.104V54.72l0.014-0.101v-0.011l0.009-0.098
v-0.012l0.009-0.101V54.38l0.005-0.095v-0.016l0.002-0.105v-16.46l-0.002-0.105v-0.016l-0.005-0.095v-0.013l-0.009-0.101v-0.012
l-0.009-0.098v-0.011l-0.014-0.1v-0.01l-0.013-0.104c-0.167-1.092-0.744-2.057-1.561-2.738V34.3l-0.087-0.063v-0.002l-0.088-0.065
l-0.085-0.063v-0.001l-0.083-0.056l-0.093-0.061l0,0l-0.09-0.056V33.93l-0.094-0.05v-0.001l-0.091-0.056l-0.097-0.049l-0.095-0.043
V33.73l-0.096-0.045v-0.001l-0.1-0.043l-0.101-0.042l-0.104-0.04l-0.097-0.035l-0.103-0.031l-0.106-0.036l-0.105-0.023l-0.106-0.028
l-0.106-0.024l-0.109-0.019l-0.11-0.023l-0.11-0.009l-0.106-0.014l-0.116-0.01l-0.109-0.006l-0.114-0.005h-7.89
c-9.716,0-15.858-7.838-15.858-17.15V6.92c0-3.812-3.102-6.915-6.914-6.915H74.085c-3.813,0-6.92,3.106-6.92,6.915v16.682
c0,3.806,3.104,6.909,6.92,6.909h8.414c9.169,0,16.906,5.95,17.146,15.403v0.04c-0.24,9.453-7.978,15.402-17.146,15.402h-8.414
c-3.815,0-6.92,3.103-6.92,6.909v16.682c0,3.81,3.106,6.915,6.92,6.915H89.95c3.812,0,6.914-3.104,6.914-6.915v-9.223
c0-9.312,6.144-17.149,15.858-17.149h7.89L120.726,58.569z M154.772,9.956C148.631,3.814,140.15,0,130.816,0h-15.024v17.424h15.024
c4.526,0,8.647,1.858,11.64,4.849c2.99,2.99,4.849,7.112,4.849,11.639v24.042c0,4.538-1.853,8.665-4.832,11.655l-0.017-0.016
c-2.991,2.991-7.113,4.849-11.64,4.849h-15.024v17.424h15.024c9.333,0,17.814-3.814,23.956-9.956v-0.033
c6.142-6.143,9.955-14.614,9.955-23.923V33.912C164.727,24.578,160.914,16.097,154.772,9.956z"/>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

22
scripts/sync-build-dir.js Normal file
View File

@@ -0,0 +1,22 @@
const syncBuildDir = require('copyfiles');
const path = require('path');
const {
projectRoot,
theme,
themePath,
} = require('../webpack/helpers');
const projectDepth = projectRoot('./').split(path.sep).length;
let callback;
if (theme !== null && theme !== undefined) {
callback = () => {
syncBuildDir([path.join(themePath, '**/*'), 'build'], { up: projectDepth + 2 }, () => {})
}
}
else {
callback = () => {};
}
syncBuildDir([projectRoot('src/**/*'), 'build'], { up: projectDepth + 1 }, callback);

View File

@@ -2,14 +2,29 @@ import { MetadataRegistryComponent } from './metadata-registry/metadata-registry
import { RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { MetadataSchemaComponent } from './metadata-schema/metadata-schema.component';
import { BitstreamFormatsComponent } from './bitstream-formats/bitstream-formats.component';
import { URLCombiner } from '../../core/url-combiner/url-combiner';
import { getRegistriesModulePath } from '../admin-routing.module';
const BITSTREAMFORMATS_MODULE_PATH = 'bitstream-formats';
export function getBitstreamFormatsModulePath() {
return new URLCombiner(getRegistriesModulePath(), BITSTREAMFORMATS_MODULE_PATH).toString();
}
@NgModule({
imports: [
RouterModule.forChild([
{ path: 'metadata', component: MetadataRegistryComponent, data: { title: 'admin.registries.metadata.title' } },
{ path: 'metadata/:schemaName', component: MetadataSchemaComponent, data: { title: 'admin.registries.schema.title' } },
{ path: 'bitstream-formats', component: BitstreamFormatsComponent, data: { title: 'admin.registries.bitstream-formats.title' } },
{path: 'metadata', component: MetadataRegistryComponent, data: {title: 'admin.registries.metadata.title'}},
{
path: 'metadata/:schemaName',
component: MetadataSchemaComponent,
data: {title: 'admin.registries.schema.title'}
},
{
path: BITSTREAMFORMATS_MODULE_PATH,
loadChildren: './bitstream-formats/bitstream-formats.module#BitstreamFormatsModule',
data: {title: 'admin.registries.bitstream-formats.title'}
},
])
]
})

View File

@@ -5,10 +5,10 @@ import { CommonModule } from '@angular/common';
import { MetadataSchemaComponent } from './metadata-schema/metadata-schema.component';
import { RouterModule } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import { BitstreamFormatsComponent } from './bitstream-formats/bitstream-formats.component';
import { SharedModule } from '../../shared/shared.module';
import { MetadataSchemaFormComponent } from './metadata-registry/metadata-schema-form/metadata-schema-form.component';
import {MetadataFieldFormComponent} from './metadata-schema/metadata-field-form/metadata-field-form.component';
import { MetadataFieldFormComponent } from './metadata-schema/metadata-field-form/metadata-field-form.component';
import { BitstreamFormatsModule } from './bitstream-formats/bitstream-formats.module';
@NgModule({
imports: [
@@ -16,12 +16,12 @@ import {MetadataFieldFormComponent} from './metadata-schema/metadata-field-form/
SharedModule,
RouterModule,
TranslateModule,
BitstreamFormatsModule,
AdminRegistriesRoutingModule
],
declarations: [
MetadataRegistryComponent,
MetadataSchemaComponent,
BitstreamFormatsComponent,
MetadataSchemaFormComponent,
MetadataFieldFormComponent
],

View File

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

View File

@@ -0,0 +1,106 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { Router } from '@angular/router';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterStub } from '../../../../shared/testing/router-stub';
import { of as observableOf } from 'rxjs';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../../../shared/testing/notifications-service-stub';
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { RestResponse } from '../../../../core/cache/response.models';
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
import { BitstreamFormatSupportLevel } from '../../../../core/shared/bitstream-format-support-level';
import { ResourceType } from '../../../../core/shared/resource-type';
import { AddBitstreamFormatComponent } from './add-bitstream-format.component';
describe('AddBitstreamFormatComponent', () => {
let comp: AddBitstreamFormatComponent;
let fixture: ComponentFixture<AddBitstreamFormatComponent>;
const bitstreamFormat = new BitstreamFormat();
bitstreamFormat.uuid = 'test-uuid-1';
bitstreamFormat.id = 'test-uuid-1';
bitstreamFormat.shortDescription = 'Unknown';
bitstreamFormat.description = 'Unknown data format';
bitstreamFormat.mimetype = 'application/octet-stream';
bitstreamFormat.supportLevel = BitstreamFormatSupportLevel.Unknown;
bitstreamFormat.internal = false;
bitstreamFormat.extensions = null;
let router;
let notificationService: NotificationsServiceStub;
let bitstreamFormatDataService: BitstreamFormatDataService;
const initAsync = () => {
router = new RouterStub();
notificationService = new NotificationsServiceStub();
bitstreamFormatDataService = jasmine.createSpyObj('bitstreamFormatDataService', {
createBitstreamFormat: observableOf(new RestResponse(true, 200, 'Success')),
clearBitStreamFormatRequests: observableOf(null)
});
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
declarations: [AddBitstreamFormatComponent],
providers: [
{provide: Router, useValue: router},
{provide: NotificationsService, useValue: notificationService},
{provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService},
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
};
const initBeforeEach = () => {
fixture = TestBed.createComponent(AddBitstreamFormatComponent);
comp = fixture.componentInstance;
fixture.detectChanges();
};
describe('createBitstreamFormat success', () => {
beforeEach(async(initAsync));
beforeEach(initBeforeEach);
it('should send the updated form to the service, show a notification and navigate to ', () => {
comp.createBitstreamFormat(bitstreamFormat);
expect(bitstreamFormatDataService.createBitstreamFormat).toHaveBeenCalledWith(bitstreamFormat);
expect(notificationService.success).toHaveBeenCalled();
expect(router.navigate).toHaveBeenCalledWith(['/admin/registries/bitstream-formats']);
});
});
describe('createBitstreamFormat error', () => {
beforeEach(async(() => {
router = new RouterStub();
notificationService = new NotificationsServiceStub();
bitstreamFormatDataService = jasmine.createSpyObj('bitstreamFormatDataService', {
createBitstreamFormat: observableOf(new RestResponse(false, 400, 'Bad Request')),
clearBitStreamFormatRequests: observableOf(null)
});
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
declarations: [AddBitstreamFormatComponent],
providers: [
{provide: Router, useValue: router},
{provide: NotificationsService, useValue: notificationService},
{provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService},
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
}));
beforeEach(initBeforeEach);
it('should send the updated form to the service, show a notification and navigate to ', () => {
comp.createBitstreamFormat(bitstreamFormat);
expect(bitstreamFormatDataService.createBitstreamFormat).toHaveBeenCalledWith(bitstreamFormat);
expect(notificationService.error).toHaveBeenCalled();
expect(router.navigate).not.toHaveBeenCalled();
});
});
});

View File

@@ -0,0 +1,49 @@
import { take } from 'rxjs/operators';
import { Router } from '@angular/router';
import { Component } from '@angular/core';
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { RestResponse } from '../../../../core/cache/response.models';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { getBitstreamFormatsModulePath } from '../../admin-registries-routing.module';
import { TranslateService } from '@ngx-translate/core';
/**
* This component renders the page to create a new bitstream format.
*/
@Component({
selector: 'ds-add-bitstream-format',
templateUrl: './add-bitstream-format.component.html',
})
export class AddBitstreamFormatComponent {
constructor(
private router: Router,
private notificationService: NotificationsService,
private translateService: TranslateService,
private bitstreamFormatDataService: BitstreamFormatDataService,
) {
}
/**
* Creates a new bitstream format based on the provided bitstream format emitted by the form.
* When successful, a success notification will be shown and the user will be navigated back to the overview page.
* When failed, an error notification will be shown.
* @param bitstreamFormat
*/
createBitstreamFormat(bitstreamFormat: BitstreamFormat) {
this.bitstreamFormatDataService.createBitstreamFormat(bitstreamFormat).pipe(take(1)
).subscribe((response: RestResponse) => {
if (response.isSuccessful) {
this.notificationService.success(this.translateService.get('admin.registries.bitstream-formats.create.success.head'),
this.translateService.get('admin.registries.bitstream-formats.create.success.content'));
this.router.navigate([getBitstreamFormatsModulePath()]);
this.bitstreamFormatDataService.clearBitStreamFormatRequests().subscribe();
} else {
this.notificationService.error(this.translateService.get('admin.registries.bitstream-formats.create.failure.head'),
this.translateService.get('admin.registries.bitstream-formats.create.failure.content'));
}
}
);
}
}

View File

@@ -0,0 +1,64 @@
import { Action } from '@ngrx/store';
import { type } from '../../../shared/ngrx/type';
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
/**
* For each action type in an action group, make a simple
* enum object for all of this group's action types.
*
* The 'type' utility function coerces strings into string
* literal types and runs a simple check to guarantee all
* action types in the application are unique.
*/
export const BitstreamFormatsRegistryActionTypes = {
SELECT_FORMAT: type('dspace/bitstream-formats-registry/SELECT_FORMAT'),
DESELECT_FORMAT: type('dspace/bitstream-formats-registry/DESELECT_FORMAT'),
DESELECT_ALL_FORMAT: type('dspace/bitstream-formats-registry/DESELECT_ALL_FORMAT')
};
/* tslint:disable:max-classes-per-file */
/**
* Used to select a single bitstream format in the bitstream format registry
*/
export class BitstreamFormatsRegistrySelectAction implements Action {
type = BitstreamFormatsRegistryActionTypes.SELECT_FORMAT;
bitstreamFormat: BitstreamFormat;
constructor(bitstreamFormat: BitstreamFormat) {
this.bitstreamFormat = bitstreamFormat;
}
}
/**
* Used to deselect a single bitstream format in the bitstream format registry
*/
export class BitstreamFormatsRegistryDeselectAction implements Action {
type = BitstreamFormatsRegistryActionTypes.DESELECT_FORMAT;
bitstreamFormat: BitstreamFormat;
constructor(bitstreamFormat: BitstreamFormat) {
this.bitstreamFormat = bitstreamFormat;
}
}
/**
* Used to deselect all bitstream formats in the bitstream format registry
*/
export class BitstreamFormatsRegistryDeselectAllAction implements Action {
type = BitstreamFormatsRegistryActionTypes.DESELECT_ALL_FORMAT;
}
/* tslint:enable:max-classes-per-file */
/**
* Export a type alias of all actions in this action group
* so that reducers can easily compose action types
* These are all the actions to perform on the bitstream format registry state
*/
export type BitstreamFormatsRegistryAction
= BitstreamFormatsRegistrySelectAction
| BitstreamFormatsRegistryDeselectAction
| BitstreamFormatsRegistryDeselectAllAction

View File

@@ -0,0 +1,83 @@
import { Action } from '@ngrx/store';
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
import { bitstreamFormatReducer, BitstreamFormatRegistryState } from './bitstream-format.reducers';
import {
BitstreamFormatsRegistryDeselectAction,
BitstreamFormatsRegistryDeselectAllAction,
BitstreamFormatsRegistrySelectAction
} from './bitstream-format.actions';
const bitstreamFormat1: BitstreamFormat = new BitstreamFormat();
bitstreamFormat1.id = 'test-uuid-1';
bitstreamFormat1.shortDescription = 'test-short-1';
const bitstreamFormat2: BitstreamFormat = new BitstreamFormat();
bitstreamFormat2.id = 'test-uuid-2';
bitstreamFormat2.shortDescription = 'test-short-2';
const initialState: BitstreamFormatRegistryState = {
selectedBitstreamFormats: []
};
const bitstream1SelectedState: BitstreamFormatRegistryState = {
selectedBitstreamFormats: [bitstreamFormat1]
};
const bitstream1and2SelectedState: BitstreamFormatRegistryState = {
selectedBitstreamFormats: [bitstreamFormat1, bitstreamFormat2]
};
describe('BitstreamFormatReducer', () => {
describe('BitstreamFormatsRegistryActionTypes.SELECT_FORMAT', () => {
it('should add the format to the list of selected formats when initial list is empty', () => {
const state = initialState;
const action = new BitstreamFormatsRegistrySelectAction(bitstreamFormat1);
const newState = bitstreamFormatReducer(state, action);
expect(newState).toEqual(bitstream1SelectedState);
});
it('should add the format to the list of selected formats when formats are already present', () => {
const state = bitstream1SelectedState;
const action = new BitstreamFormatsRegistrySelectAction(bitstreamFormat2);
const newState = bitstreamFormatReducer(state, action);
expect(newState).toEqual(bitstream1and2SelectedState);
});
});
describe('BitstreamFormatsRegistryActionTypes.DESELECT_FORMAT', () => {
it('should deselect a format', () => {
const state = bitstream1and2SelectedState;
const action = new BitstreamFormatsRegistryDeselectAction(bitstreamFormat2);
const newState = bitstreamFormatReducer(state, action);
expect(newState).toEqual(bitstream1SelectedState);
});
});
describe('BitstreamFormatsRegistryActionTypes.DESELECT_ALL_FORMAT', () => {
it('should deselect all formats', () => {
const state = bitstream1and2SelectedState;
const action = new BitstreamFormatsRegistryDeselectAllAction();
const newState = bitstreamFormatReducer(state, action);
expect(newState).toEqual(initialState);
});
});
describe('Invalid action', () => {
it('should return the current state', () => {
const state = initialState;
const action = new NullAction();
const newState = bitstreamFormatReducer(state, action);
expect(newState).toEqual(state);
});
});
});
class NullAction implements Action {
type = null;
constructor() {
// empty constructor
}
}

View File

@@ -0,0 +1,55 @@
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
import {
BitstreamFormatsRegistryAction,
BitstreamFormatsRegistryActionTypes,
BitstreamFormatsRegistryDeselectAction,
BitstreamFormatsRegistrySelectAction
} from './bitstream-format.actions';
/**
* The bitstream format registry state.
* @interface BitstreamFormatRegistryState
*/
export interface BitstreamFormatRegistryState {
selectedBitstreamFormats: BitstreamFormat[];
}
/**
* The initial state.
*/
const initialState: BitstreamFormatRegistryState = {
selectedBitstreamFormats: [],
};
/**
* Reducer that handles BitstreamFormatsRegistryActions to modify the bitstream format registry state
* @param state The current BitstreamFormatRegistryState
* @param action The BitstreamFormatsRegistryAction to perform on the state
*/
export function bitstreamFormatReducer(state = initialState, action: BitstreamFormatsRegistryAction): BitstreamFormatRegistryState {
switch (action.type) {
case BitstreamFormatsRegistryActionTypes.SELECT_FORMAT: {
return Object.assign({}, state, {
selectedBitstreamFormats: [...state.selectedBitstreamFormats, (action as BitstreamFormatsRegistrySelectAction).bitstreamFormat]
});
}
case BitstreamFormatsRegistryActionTypes.DESELECT_FORMAT: {
return Object.assign({}, state, {
selectedBitstreamFormats: state.selectedBitstreamFormats.filter(
(selectedBitstreamFormats) => selectedBitstreamFormats !== (action as BitstreamFormatsRegistryDeselectAction).bitstreamFormat
)
});
}
case BitstreamFormatsRegistryActionTypes.DESELECT_ALL_FORMAT: {
return Object.assign({}, state, {
selectedBitstreamFormats: []
});
}
default:
return state;
}
}

View File

@@ -0,0 +1,37 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { BitstreamFormatsResolver } from './bitstream-formats.resolver';
import { EditBitstreamFormatComponent } from './edit-bitstream-format/edit-bitstream-format.component';
import { BitstreamFormatsComponent } from './bitstream-formats.component';
import { AddBitstreamFormatComponent } from './add-bitstream-format/add-bitstream-format.component';
const BITSTREAMFORMAT_EDIT_PATH = ':id/edit';
const BITSTREAMFORMAT_ADD_PATH = 'add';
@NgModule({
imports: [
RouterModule.forChild([
{
path: '',
component: BitstreamFormatsComponent
},
{
path: BITSTREAMFORMAT_ADD_PATH,
component: AddBitstreamFormatComponent,
},
{
path: BITSTREAMFORMAT_EDIT_PATH,
component: EditBitstreamFormatComponent,
resolve: {
bitstreamFormat: BitstreamFormatsResolver
}
},
])
],
providers: [
BitstreamFormatsResolver,
]
})
export class BitstreamFormatsRoutingModule {
}

View File

@@ -2,13 +2,15 @@
<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 pb-2 ">{{'admin.registries.bitstream-formats.head' | translate}}</h2>
<p id="description">{{'admin.registries.bitstream-formats.description' | translate}}</p>
<p id="create-new" class="mb-2"><a [routerLink]="'add'" class="btn btn-success">{{'admin.registries.bitstream-formats.create.new' | translate}}</a></p>
<p id="description" class="pb-2">{{'admin.registries.bitstream-formats.description' | translate}}</p>
<ds-pagination
*ngIf="(bitstreamFormats | async)?.payload?.totalElements > 0"
[paginationOptions]="config"
[paginationOptions]="pageConfig"
[pageInfoState]="(bitstreamFormats | async)?.payload"
[collectionSize]="(bitstreamFormats | async)?.payload?.totalElements"
[hideGear]="true"
@@ -18,25 +20,38 @@
<table id="formats" class="table table-striped table-hover">
<thead>
<tr>
<th scope="col">{{'admin.registries.bitstream-formats.formats.table.name' | translate}}</th>
<th scope="col">{{'admin.registries.bitstream-formats.formats.table.mimetype' | translate}}</th>
<th scope="col">{{'admin.registries.bitstream-formats.formats.table.supportLevel.head' | translate}}</th>
<th scope="col"></th>
<th scope="col">{{'admin.registries.bitstream-formats.table.name' | translate}}</th>
<th scope="col">{{'admin.registries.bitstream-formats.table.mimetype' | translate}}</th>
<th scope="col">{{'admin.registries.bitstream-formats.table.supportLevel.head' | translate}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let bitstreamFormat of (bitstreamFormats | async)?.payload?.page">
<td>{{bitstreamFormat.shortDescription}}</td>
<td>{{bitstreamFormat.mimetype}} <span *ngIf="bitstreamFormat.internal">({{'admin.registries.bitstream-formats.formats.table.internal' | translate}})</span></td>
<td>{{'admin.registries.bitstream-formats.formats.table.supportLevel.'+bitstreamFormat.supportLevel | translate}}</td>
<td>
<label>
<input type="checkbox"
[checked]="isSelected(bitstreamFormat) | async"
(change)="selectBitStreamFormat(bitstreamFormat, $event)"
>
</label>
</td>
<td><a [routerLink]="['/admin/registries/bitstream-formats', bitstreamFormat.id, 'edit']">{{bitstreamFormat.shortDescription}}</a></td>
<td><a [routerLink]="['/admin/registries/bitstream-formats', bitstreamFormat.id, 'edit']">{{bitstreamFormat.mimetype}} <span *ngIf="bitstreamFormat.internal">({{'admin.registries.bitstream-formats.table.internal' | translate}})</span></a></td>
<td><a [routerLink]="['/admin/registries/bitstream-formats', bitstreamFormat.id, 'edit']">{{'admin.registries.bitstream-formats.table.supportLevel.'+bitstreamFormat.supportLevel | translate}}</a></td>
</tr>
</tbody>
</table>
</div>
</ds-pagination>
<div *ngIf="(bitstreamFormats | async)?.payload?.totalElements == 0" class="alert alert-info" role="alert">
{{'admin.registries.bitstream-formats.formats.no-items' | translate}}
{{'admin.registries.bitstream-formats.no-items' | translate}}
</div>
<div>
<button *ngIf="(bitstreamFormats | async)?.payload?.page?.length > 0" class="btn btn-primary deselect" (click)="deselectAll()">{{'admin.registries.bitstream-formats.table.deselect-all' | translate}}</button>
<button *ngIf="(bitstreamFormats | async)?.payload?.page?.length > 0" type="submit" class="btn btn-danger float-right" (click)="deleteFormats()">{{'admin.registries.bitstream-formats.table.delete' | translate}}</button>
</div>
</div>
</div>
</div>

View File

@@ -1,6 +1,5 @@
import { BitstreamFormatsComponent } from './bitstream-formats.component';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RegistryService } from '../../../core/registry/registry.service';
import { of as observableOf } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import { PaginatedList } from '../../../core/data/paginated-list';
@@ -13,67 +12,105 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { EnumKeysPipe } from '../../../shared/utils/enum-keys-pipe';
import { HostWindowService } from '../../../shared/host-window.service';
import { HostWindowServiceStub } from '../../../shared/testing/host-window-service-stub';
import { BitstreamFormatDataService } from '../../../core/data/bitstream-format-data.service';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
import { BitstreamFormatSupportLevel } from '../../../core/shared/bitstream-format-support-level';
import { cold, getTestScheduler, hot } from 'jasmine-marbles';
import { TestScheduler } from 'rxjs/testing';
describe('BitstreamFormatsComponent', () => {
let comp: BitstreamFormatsComponent;
let fixture: ComponentFixture<BitstreamFormatsComponent>;
let registryService: RegistryService;
const mockFormatsList = [
{
shortDescription: 'Unknown',
description: 'Unknown data format',
mimetype: 'application/octet-stream',
supportLevel: 0,
internal: false,
extensions: null
},
{
shortDescription: 'License',
description: 'Item-specific license agreed upon to submission',
mimetype: 'text/plain; charset=utf-8',
supportLevel: 1,
internal: true,
extensions: null
},
{
shortDescription: 'CC License',
description: 'Item-specific Creative Commons license agreed upon to submission',
mimetype: 'text/html; charset=utf-8',
supportLevel: 2,
internal: true,
extensions: null
},
{
shortDescription: 'Adobe PDF',
description: 'Adobe Portable Document Format',
mimetype: 'application/pdf',
supportLevel: 0,
internal: false,
extensions: null
}
];
const mockFormats = observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockFormatsList)));
const registryServiceStub = {
getBitstreamFormats: () => mockFormats
};
let bitstreamFormatService;
let scheduler: TestScheduler;
let notificationsServiceStub;
const bitstreamFormat1 = new BitstreamFormat();
bitstreamFormat1.uuid = 'test-uuid-1';
bitstreamFormat1.id = 'test-uuid-1';
bitstreamFormat1.shortDescription = 'Unknown';
bitstreamFormat1.description = 'Unknown data format';
bitstreamFormat1.mimetype = 'application/octet-stream';
bitstreamFormat1.supportLevel = BitstreamFormatSupportLevel.Unknown;
bitstreamFormat1.internal = false;
bitstreamFormat1.extensions = null;
const bitstreamFormat2 = new BitstreamFormat();
bitstreamFormat2.uuid = 'test-uuid-2';
bitstreamFormat2.id = 'test-uuid-2';
bitstreamFormat2.shortDescription = 'License';
bitstreamFormat2.description = 'Item-specific license agreed upon to submission';
bitstreamFormat2.mimetype = 'text/plain; charset=utf-8';
bitstreamFormat2.supportLevel = BitstreamFormatSupportLevel.Known;
bitstreamFormat2.internal = true;
bitstreamFormat2.extensions = null;
const bitstreamFormat3 = new BitstreamFormat();
bitstreamFormat3.uuid = 'test-uuid-3';
bitstreamFormat3.id = 'test-uuid-3';
bitstreamFormat3.shortDescription = 'CC License';
bitstreamFormat3.description = 'Item-specific Creative Commons license agreed upon to submission';
bitstreamFormat3.mimetype = 'text/html; charset=utf-8';
bitstreamFormat3.supportLevel = BitstreamFormatSupportLevel.Supported;
bitstreamFormat3.internal = true;
bitstreamFormat3.extensions = null;
const bitstreamFormat4 = new BitstreamFormat();
bitstreamFormat4.uuid = 'test-uuid-4';
bitstreamFormat4.id = 'test-uuid-4';
bitstreamFormat4.shortDescription = 'Adobe PDF';
bitstreamFormat4.description = 'Adobe Portable Document Format';
bitstreamFormat4.mimetype = 'application/pdf';
bitstreamFormat4.supportLevel = BitstreamFormatSupportLevel.Unknown;
bitstreamFormat4.internal = false;
bitstreamFormat4.extensions = null;
const mockFormatsList: BitstreamFormat[] = [
bitstreamFormat1,
bitstreamFormat2,
bitstreamFormat3,
bitstreamFormat4
];
const mockFormatsRD = new RemoteData(false, false, true, undefined, new PaginatedList(null, mockFormatsList));
const initAsync = () => {
notificationsServiceStub = new NotificationsServiceStub();
scheduler = getTestScheduler();
bitstreamFormatService = jasmine.createSpyObj('bitstreamFormatService', {
findAll: observableOf(mockFormatsRD),
find: observableOf(new RemoteData(false, false, true, undefined, mockFormatsList[0])),
getSelectedBitstreamFormats: hot('a', {a: mockFormatsList}),
selectBitstreamFormat: {},
deselectBitstreamFormat: {},
deselectAllBitstreamFormats: {},
delete: observableOf(true),
clearBitStreamFormatRequests: observableOf('cleared')
});
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
providers: [
{ provide: RegistryService, useValue: registryServiceStub },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) }
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
{provide: HostWindowService, useValue: new HostWindowServiceStub(0)},
{provide: NotificationsService, useValue: notificationsServiceStub}
]
}).compileComponents();
}));
};
beforeEach(() => {
const initBeforeEach = () => {
fixture = TestBed.createComponent(BitstreamFormatsComponent);
comp = fixture.componentInstance;
fixture.detectChanges();
registryService = (comp as any).service;
});
};
describe('Bitstream format page content', () => {
beforeEach(async(initAsync));
beforeEach(initBeforeEach);
it('should contain four formats', () => {
const tbody: HTMLElement = fixture.debugElement.query(By.css('#formats>tbody')).nativeElement;
@@ -81,17 +118,172 @@ describe('BitstreamFormatsComponent', () => {
});
it('should contain the correct formats', () => {
const unknownName: HTMLElement = fixture.debugElement.query(By.css('#formats tr:nth-child(1) td:nth-child(1)')).nativeElement;
const unknownName: HTMLElement = fixture.debugElement.query(By.css('#formats tr:nth-child(1) td:nth-child(2)')).nativeElement;
expect(unknownName.textContent).toBe('Unknown');
const licenseName: HTMLElement = fixture.debugElement.query(By.css('#formats tr:nth-child(2) td:nth-child(1)')).nativeElement;
const licenseName: HTMLElement = fixture.debugElement.query(By.css('#formats tr:nth-child(2) td:nth-child(2)')).nativeElement;
expect(licenseName.textContent).toBe('License');
const ccLicenseName: HTMLElement = fixture.debugElement.query(By.css('#formats tr:nth-child(3) td:nth-child(1)')).nativeElement;
const ccLicenseName: HTMLElement = fixture.debugElement.query(By.css('#formats tr:nth-child(3) td:nth-child(2)')).nativeElement;
expect(ccLicenseName.textContent).toBe('CC License');
const adobeName: HTMLElement = fixture.debugElement.query(By.css('#formats tr:nth-child(4) td:nth-child(1)')).nativeElement;
const adobeName: HTMLElement = fixture.debugElement.query(By.css('#formats tr:nth-child(4) td:nth-child(2)')).nativeElement;
expect(adobeName.textContent).toBe('Adobe PDF');
});
});
describe('selectBitStreamFormat', () => {
beforeEach(async(initAsync));
beforeEach(initBeforeEach);
it('should select a bitstreamFormat if it was selected in the event', () => {
const event = {target: {checked: true}};
comp.selectBitStreamFormat(bitstreamFormat1, event);
expect(bitstreamFormatService.selectBitstreamFormat).toHaveBeenCalledWith(bitstreamFormat1);
});
it('should deselect a bitstreamFormat if it is deselected in the event', () => {
const event = {target: {checked: false}};
comp.selectBitStreamFormat(bitstreamFormat1, event);
expect(bitstreamFormatService.deselectBitstreamFormat).toHaveBeenCalledWith(bitstreamFormat1);
});
it('should be called when a user clicks a checkbox', () => {
spyOn(comp, 'selectBitStreamFormat');
const unknownFormat = fixture.debugElement.query(By.css('#formats tr:nth-child(1) input'));
const event = {target: {checked: true}};
unknownFormat.triggerEventHandler('change', event);
expect(comp.selectBitStreamFormat).toHaveBeenCalledWith(bitstreamFormat1, event);
});
});
describe('isSelected', () => {
beforeEach(async(initAsync));
beforeEach(initBeforeEach);
it('should return an observable of true if the provided bistream is in the list returned by the service', () => {
const result = comp.isSelected(bitstreamFormat1);
expect(result).toBeObservable(cold('b', {b: true}));
});
it('should return an observable of false if the provided bistream is not in the list returned by the service', () => {
const format = new BitstreamFormat();
format.uuid = 'new';
const result = comp.isSelected(format);
expect(result).toBeObservable(cold('b', {b: false}));
});
});
describe('deselectAll', () => {
beforeEach(async(initAsync));
beforeEach(initBeforeEach);
it('should deselect all bitstreamFormats', () => {
comp.deselectAll();
expect(bitstreamFormatService.deselectAllBitstreamFormats).toHaveBeenCalled();
});
it('should be called when the deselect all button is clicked', () => {
spyOn(comp, 'deselectAll');
const deselectAllButton = fixture.debugElement.query(By.css('button.deselect'));
deselectAllButton.triggerEventHandler('click', null);
expect(comp.deselectAll).toHaveBeenCalled();
});
});
describe('deleteFormats success', () => {
beforeEach(async(() => {
notificationsServiceStub = new NotificationsServiceStub();
scheduler = getTestScheduler();
bitstreamFormatService = jasmine.createSpyObj('bitstreamFormatService', {
findAll: observableOf(mockFormatsRD),
find: observableOf(new RemoteData(false, false, true, undefined, mockFormatsList[0])),
getSelectedBitstreamFormats: observableOf(mockFormatsList),
selectBitstreamFormat: {},
deselectBitstreamFormat: {},
deselectAllBitstreamFormats: {},
delete: observableOf(true),
clearBitStreamFormatRequests: observableOf('cleared')
});
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
providers: [
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
{provide: HostWindowService, useValue: new HostWindowServiceStub(0)},
{provide: NotificationsService, useValue: notificationsServiceStub}
]
}).compileComponents();
}
));
beforeEach(initBeforeEach);
it('should clear bitstream formats ', () => {
comp.deleteFormats();
expect(bitstreamFormatService.clearBitStreamFormatRequests).toHaveBeenCalled();
expect(bitstreamFormatService.delete).toHaveBeenCalledWith(bitstreamFormat1);
expect(bitstreamFormatService.delete).toHaveBeenCalledWith(bitstreamFormat2);
expect(bitstreamFormatService.delete).toHaveBeenCalledWith(bitstreamFormat3);
expect(bitstreamFormatService.delete).toHaveBeenCalledWith(bitstreamFormat4);
expect(notificationsServiceStub.success).toHaveBeenCalledWith('admin.registries.bitstream-formats.delete.success.head',
'admin.registries.bitstream-formats.delete.success.amount');
expect(notificationsServiceStub.error).not.toHaveBeenCalled();
});
});
describe('deleteFormats error', () => {
beforeEach(async(() => {
notificationsServiceStub = new NotificationsServiceStub();
scheduler = getTestScheduler();
bitstreamFormatService = jasmine.createSpyObj('bitstreamFormatService', {
findAll: observableOf(mockFormatsRD),
find: observableOf(new RemoteData(false, false, true, undefined, mockFormatsList[0])),
getSelectedBitstreamFormats: observableOf(mockFormatsList),
selectBitstreamFormat: {},
deselectBitstreamFormat: {},
deselectAllBitstreamFormats: {},
delete: observableOf(false),
clearBitStreamFormatRequests: observableOf('cleared')
});
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
providers: [
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
{provide: HostWindowService, useValue: new HostWindowServiceStub(0)},
{provide: NotificationsService, useValue: notificationsServiceStub}
]
}).compileComponents();
}
));
beforeEach(initBeforeEach);
it('should clear bitstream formats ', () => {
comp.deleteFormats();
expect(bitstreamFormatService.clearBitStreamFormatRequests).toHaveBeenCalled();
expect(bitstreamFormatService.delete).toHaveBeenCalledWith(bitstreamFormat1);
expect(bitstreamFormatService.delete).toHaveBeenCalledWith(bitstreamFormat2);
expect(bitstreamFormatService.delete).toHaveBeenCalledWith(bitstreamFormat3);
expect(bitstreamFormatService.delete).toHaveBeenCalledWith(bitstreamFormat4);
expect(notificationsServiceStub.error).toHaveBeenCalledWith('admin.registries.bitstream-formats.delete.failure.head',
'admin.registries.bitstream-formats.delete.failure.amount');
expect(notificationsServiceStub.success).not.toHaveBeenCalled();
});
});
});

View File

@@ -1,10 +1,16 @@
import { Component } from '@angular/core';
import { RegistryService } from '../../../core/registry/registry.service';
import { Observable } from 'rxjs';
import { Component, OnInit } from '@angular/core';
import { BehaviorSubject, combineLatest as observableCombineLatest, Observable, zip } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import { PaginatedList } from '../../../core/data/paginated-list';
import { BitstreamFormat } from '../../../core/registry/mock-bitstream-format.model';
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
import { BitstreamFormatDataService } from '../../../core/data/bitstream-format-data.service';
import { FindAllOptions } from '../../../core/data/request.models';
import { map, switchMap, take } from 'rxjs/operators';
import { hasValue } from '../../../shared/empty.util';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
/**
* This component renders a list of bitstream formats
@@ -13,24 +19,125 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio
selector: 'ds-bitstream-formats',
templateUrl: './bitstream-formats.component.html'
})
export class BitstreamFormatsComponent {
export class BitstreamFormatsComponent implements OnInit {
/**
* A paginated list of bitstream formats to be shown on the page
*/
bitstreamFormats: Observable<RemoteData<PaginatedList<BitstreamFormat>>>;
/**
* A BehaviourSubject that keeps track of the pageState used to update the currently displayed bitstreamFormats
*/
pageState: BehaviorSubject<string>;
/**
* The current pagination configuration for the page used by the FindAll method
* Currently simply renders all bitstream formats
*/
config: FindAllOptions = Object.assign(new FindAllOptions(), {
elementsPerPage: 20
});
/**
* The current pagination configuration for the page
* Currently simply renders all bitstream formats
*/
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
pageConfig: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'registry-bitstreamformats-pagination',
pageSize: 10000
pageSize: 20
});
constructor(private registryService: RegistryService) {
this.updateFormats();
constructor(private notificationsService: NotificationsService,
private router: Router,
private translateService: TranslateService,
private bitstreamFormatService: BitstreamFormatDataService) {
}
/**
* Deletes the currently selected formats from the registry and updates the presented list
*/
deleteFormats() {
this.bitstreamFormatService.clearBitStreamFormatRequests().subscribe();
this.bitstreamFormatService.getSelectedBitstreamFormats().pipe(take(1)).subscribe(
(formats) => {
const tasks$ = [];
for (const format of formats) {
if (hasValue(format.id)) {
tasks$.push(this.bitstreamFormatService.delete(format));
}
}
zip(...tasks$).subscribe((results: boolean[]) => {
const successResponses = results.filter((result: boolean) => result);
const failedResponses = results.filter((result: boolean) => !result);
if (successResponses.length > 0) {
this.showNotification(true, successResponses.length);
}
if (failedResponses.length > 0) {
this.showNotification(false, failedResponses.length);
}
this.deselectAll();
this.router.navigate([], {
queryParams: Object.assign({}, { page: 1 }),
queryParamsHandling: 'merge'
}); });
}
);
}
/**
* Deselects all selecetd bitstream formats
*/
deselectAll() {
this.bitstreamFormatService.deselectAllBitstreamFormats();
}
/**
* Checks whether a given bitstream format is selected in the list (checkbox)
* @param bitstreamFormat
*/
isSelected(bitstreamFormat: BitstreamFormat): Observable<boolean> {
return this.bitstreamFormatService.getSelectedBitstreamFormats().pipe(
map((bitstreamFormats: BitstreamFormat[]) => {
return bitstreamFormats.find((selectedFormat) => selectedFormat.id === bitstreamFormat.id) != null;
})
);
}
/**
* Selects or deselects a bitstream format based on the checkbox state
* @param bitstreamFormat
* @param event
*/
selectBitStreamFormat(bitstreamFormat: BitstreamFormat, event) {
event.target.checked ?
this.bitstreamFormatService.selectBitstreamFormat(bitstreamFormat) :
this.bitstreamFormatService.deselectBitstreamFormat(bitstreamFormat);
}
/**
* Show notifications for an amount of deleted bitstream formats
* @param success Whether or not the notification should be a success message (error message when false)
* @param amount The amount of deleted bitstream formats
*/
private showNotification(success: boolean, amount: number) {
const prefix = 'admin.registries.bitstream-formats.delete';
const suffix = success ? 'success' : 'failure';
const messages = observableCombineLatest(
this.translateService.get(`${prefix}.${suffix}.head`),
this.translateService.get(`${prefix}.${suffix}.amount`, {amount: amount})
);
messages.subscribe(([head, content]) => {
if (success) {
this.notificationsService.success(head, content);
} else {
this.notificationsService.error(head, content);
}
});
}
/**
@@ -38,14 +145,26 @@ export class BitstreamFormatsComponent {
* @param event The page change event
*/
onPageChange(event) {
this.config.currentPage = event;
this.updateFormats();
this.config = Object.assign(new FindAllOptions(), this.config, {
currentPage: event,
});
this.pageConfig.currentPage = event;
this.pageState.next('pageChange');
}
ngOnInit(): void {
this.pageState = new BehaviorSubject('init');
this.bitstreamFormats = this.pageState.pipe(
switchMap(() => {
return this.updateFormats()
;
}));
}
/**
* Method to update the bitstream formats that are shown
* Finds all formats based on the current config
*/
private updateFormats() {
this.bitstreamFormats = this.registryService.getBitstreamFormats(this.config);
return this.bitstreamFormatService.findAll(this.config);
}
}

View File

@@ -0,0 +1,30 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import { BitstreamFormatsComponent } from './bitstream-formats.component';
import { SharedModule } from '../../../shared/shared.module';
import { FormatFormComponent } from './format-form/format-form.component';
import { EditBitstreamFormatComponent } from './edit-bitstream-format/edit-bitstream-format.component';
import { BitstreamFormatsRoutingModule } from './bitstream-formats-routing.module';
import { AddBitstreamFormatComponent } from './add-bitstream-format/add-bitstream-format.component';
@NgModule({
imports: [
CommonModule,
SharedModule,
RouterModule,
TranslateModule,
BitstreamFormatsRoutingModule
],
declarations: [
BitstreamFormatsComponent,
EditBitstreamFormatComponent,
AddBitstreamFormatComponent,
FormatFormComponent
],
entryComponents: []
})
export class BitstreamFormatsModule {
}

View File

@@ -0,0 +1,31 @@
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs';
import { find } from 'rxjs/operators';
import { RemoteData } from '../../../core/data/remote-data';
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
import { BitstreamFormatDataService } from '../../../core/data/bitstream-format-data.service';
import { hasValue } from '../../../shared/empty.util';
/**
* This class represents a resolver that requests a specific bitstreamFormat before the route is activated
*/
@Injectable()
export class BitstreamFormatsResolver implements Resolve<RemoteData<BitstreamFormat>> {
constructor(private bitstreamFormatDataService: BitstreamFormatDataService) {
}
/**
* Method for resolving an bitstreamFormat based on the parameters in the current route
* @param {ActivatedRouteSnapshot} route The current ActivatedRouteSnapshot
* @param {RouterStateSnapshot} state The current RouterStateSnapshot
* @returns Observable<<RemoteData<BitstreamFormat>> Emits the found bitstreamFormat based on the parameters in the current route,
* or an error if something went wrong
*/
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<RemoteData<BitstreamFormat>> {
return this.bitstreamFormatDataService.findById(route.params.id)
.pipe(
find((RD) => hasValue(RD.error) || RD.hasSucceeded),
);
}
}

View File

@@ -0,0 +1,11 @@
<div class="container">
<div class="row">
<div class="col-12 mb-4">
<h2 id="sub-header"
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>
</div>
</div>
</div>

View File

@@ -0,0 +1,123 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ActivatedRoute, Router } from '@angular/router';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterStub } from '../../../../shared/testing/router-stub';
import { of as observableOf } from 'rxjs';
import { RemoteData } from '../../../../core/data/remote-data';
import { EditBitstreamFormatComponent } from './edit-bitstream-format.component';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../../../shared/testing/notifications-service-stub';
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { RestResponse } from '../../../../core/cache/response.models';
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
import { BitstreamFormatSupportLevel } from '../../../../core/shared/bitstream-format-support-level';
import { ResourceType } from '../../../../core/shared/resource-type';
describe('EditBitstreamFormatComponent', () => {
let comp: EditBitstreamFormatComponent;
let fixture: ComponentFixture<EditBitstreamFormatComponent>;
const bitstreamFormat = new BitstreamFormat();
bitstreamFormat.uuid = 'test-uuid-1';
bitstreamFormat.id = 'test-uuid-1';
bitstreamFormat.shortDescription = 'Unknown';
bitstreamFormat.description = 'Unknown data format';
bitstreamFormat.mimetype = 'application/octet-stream';
bitstreamFormat.supportLevel = BitstreamFormatSupportLevel.Unknown;
bitstreamFormat.internal = false;
bitstreamFormat.extensions = null;
const routeStub = {
data: observableOf({
bitstreamFormat: new RemoteData(false, false, true, null, bitstreamFormat)
})
};
let router;
let notificationService: NotificationsServiceStub;
let bitstreamFormatDataService: BitstreamFormatDataService;
const initAsync = () => {
router = new RouterStub();
notificationService = new NotificationsServiceStub();
bitstreamFormatDataService = jasmine.createSpyObj('bitstreamFormatDataService', {
updateBitstreamFormat: observableOf(new RestResponse(true, 200, 'Success'))
});
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
declarations: [EditBitstreamFormatComponent],
providers: [
{provide: ActivatedRoute, useValue: routeStub},
{provide: Router, useValue: router},
{provide: NotificationsService, useValue: notificationService},
{provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService},
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
};
const initBeforeEach = () => {
fixture = TestBed.createComponent(EditBitstreamFormatComponent);
comp = fixture.componentInstance;
fixture.detectChanges();
};
describe('init', () => {
beforeEach(async(initAsync));
beforeEach(initBeforeEach);
it('should initialise the bitstreamFormat based on the route', () => {
comp.bitstreamFormatRD$.subscribe((format: RemoteData<BitstreamFormat>) => {
expect(format).toEqual(new RemoteData(false, false, true, null, bitstreamFormat));
});
});
});
describe('updateFormat success', () => {
beforeEach(async(initAsync));
beforeEach(initBeforeEach);
it('should send the updated form to the service, show a notification and navigate to ', () => {
comp.updateFormat(bitstreamFormat);
expect(bitstreamFormatDataService.updateBitstreamFormat).toHaveBeenCalledWith(bitstreamFormat);
expect(notificationService.success).toHaveBeenCalled();
expect(router.navigate).toHaveBeenCalledWith(['/admin/registries/bitstream-formats']);
});
});
describe('updateFormat error', () => {
beforeEach(async( () => {
router = new RouterStub();
notificationService = new NotificationsServiceStub();
bitstreamFormatDataService = jasmine.createSpyObj('bitstreamFormatDataService', {
updateBitstreamFormat: observableOf(new RestResponse(false, 400, 'Bad Request'))
});
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
declarations: [EditBitstreamFormatComponent],
providers: [
{provide: ActivatedRoute, useValue: routeStub},
{provide: Router, useValue: router},
{provide: NotificationsService, useValue: notificationService},
{provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService},
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
}));
beforeEach(initBeforeEach);
it('should send the updated form to the service, show a notification and navigate to ', () => {
comp.updateFormat(bitstreamFormat);
expect(bitstreamFormatDataService.updateBitstreamFormat).toHaveBeenCalledWith(bitstreamFormat);
expect(notificationService.error).toHaveBeenCalled();
expect(router.navigate).not.toHaveBeenCalled();
});
});
});

View File

@@ -0,0 +1,62 @@
import { map, take } from 'rxjs/operators';
import { ActivatedRoute, Router } from '@angular/router';
import { Observable } from 'rxjs';
import { Component, OnInit } from '@angular/core';
import { RemoteData } from '../../../../core/data/remote-data';
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { RestResponse } from '../../../../core/cache/response.models';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { getBitstreamFormatsModulePath } from '../../admin-registries-routing.module';
import { TranslateService } from '@ngx-translate/core';
/**
* This component renders the edit page of a bitstream format.
* The route parameter 'id' is used to request the bitstream format.
*/
@Component({
selector: 'ds-edit-bitstream-format',
templateUrl: './edit-bitstream-format.component.html',
})
export class EditBitstreamFormatComponent implements OnInit {
/**
* The bitstream format wrapped in a remote-data object
*/
bitstreamFormatRD$: Observable<RemoteData<BitstreamFormat>>;
constructor(
private route: ActivatedRoute,
private router: Router,
private notificationService: NotificationsService,
private translateService: TranslateService,
private bitstreamFormatDataService: BitstreamFormatDataService,
) {
}
ngOnInit(): void {
this.bitstreamFormatRD$ = this.route.data.pipe(
map((data) => data.bitstreamFormat as RemoteData<BitstreamFormat>)
);
}
/**
* Updates the bitstream format based on the provided bitstream format emitted by the form.
* When successful, a success notification will be shown and the user will be navigated back to the overview page.
* When failed, an error notification will be shown.
*/
updateFormat(bitstreamFormat: BitstreamFormat) {
this.bitstreamFormatDataService.updateBitstreamFormat(bitstreamFormat).pipe(take(1)
).subscribe((response: RestResponse) => {
if (response.isSuccessful) {
this.notificationService.success(this.translateService.get('admin.registries.bitstream-formats.edit.success.head'),
this.translateService.get('admin.registries.bitstream-formats.edit.success.content'));
this.router.navigate([getBitstreamFormatsModulePath()]);
} else {
this.notificationService.error('admin.registries.bitstream-formats.edit.failure.head',
'admin.registries.bitstream-formats.create.edit.content');
}
}
);
}
}

View File

@@ -0,0 +1,3 @@
<ds-form *ngIf="formModel"
[formId]="'comcol-form-id'"
[formModel]="formModel" (submitForm)="onSubmit()" (cancel)="onCancel()"></ds-form>

View File

@@ -0,0 +1,104 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { RouterStub } from '../../../../shared/testing/router-stub';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { Router } from '@angular/router';
import { FormatFormComponent } from './format-form.component';
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
import { BitstreamFormatSupportLevel } from '../../../../core/shared/bitstream-format-support-level';
import { DynamicCheckboxModel, DynamicFormArrayModel, DynamicInputModel } from '@ng-dynamic-forms/core';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { isEmpty } from '../../../../shared/empty.util';
describe('FormatFormComponent', () => {
let comp: FormatFormComponent;
let fixture: ComponentFixture<FormatFormComponent>;
const router = new RouterStub();
const bitstreamFormat = new BitstreamFormat();
bitstreamFormat.uuid = 'test-uuid-1';
bitstreamFormat.id = 'test-uuid-1';
bitstreamFormat.shortDescription = 'Unknown';
bitstreamFormat.description = 'Unknown data format';
bitstreamFormat.mimetype = 'application/octet-stream';
bitstreamFormat.supportLevel = BitstreamFormatSupportLevel.Unknown;
bitstreamFormat.internal = false;
bitstreamFormat.extensions = [];
const submittedBitstreamFormat = new BitstreamFormat();
submittedBitstreamFormat.id = bitstreamFormat.id;
submittedBitstreamFormat.shortDescription = bitstreamFormat.shortDescription;
submittedBitstreamFormat.mimetype = bitstreamFormat.mimetype;
submittedBitstreamFormat.description = bitstreamFormat.description;
submittedBitstreamFormat.supportLevel = bitstreamFormat.supportLevel;
submittedBitstreamFormat.internal = bitstreamFormat.internal;
submittedBitstreamFormat.extensions = bitstreamFormat.extensions;
const initAsync = () => {
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), ReactiveFormsModule, FormsModule, TranslateModule.forRoot(), NgbModule.forRoot()],
declarations: [FormatFormComponent],
providers: [
{provide: Router, useValue: router},
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
};
const initBeforeEach = () => {
fixture = TestBed.createComponent(FormatFormComponent);
comp = fixture.componentInstance;
comp.bitstreamFormat = bitstreamFormat;
fixture.detectChanges();
};
describe('initialise', () => {
beforeEach(async(initAsync));
beforeEach(initBeforeEach);
it('should initialises the values in the form', () => {
expect((comp.formModel[0] as DynamicInputModel).value).toBe(bitstreamFormat.shortDescription);
expect((comp.formModel[1] as DynamicInputModel).value).toBe(bitstreamFormat.mimetype);
expect((comp.formModel[2] as DynamicInputModel).value).toBe(bitstreamFormat.description);
expect((comp.formModel[3] as DynamicInputModel).value).toBe(bitstreamFormat.supportLevel);
expect((comp.formModel[4] as DynamicCheckboxModel).value).toBe(bitstreamFormat.internal);
const formArray = (comp.formModel[5] as DynamicFormArrayModel);
const extensions = [];
for (let i = 0; i < formArray.groups.length; i++) {
const value = (formArray.get(i).get(0) as DynamicInputModel).value;
if (!isEmpty(value)) {
extensions.push((formArray.get(i).get(0) as DynamicInputModel).value);
}
}
expect(extensions).toEqual(bitstreamFormat.extensions);
});
});
describe('onSubmit', () => {
beforeEach(async(initAsync));
beforeEach(initBeforeEach);
it('should emit the bitstreamFormat currently present in the form', () => {
spyOn(comp.updatedFormat, 'emit');
comp.onSubmit();
expect(comp.updatedFormat.emit).toHaveBeenCalledWith(submittedBitstreamFormat);
});
});
describe('onCancel', () => {
beforeEach(async(initAsync));
beforeEach(initBeforeEach);
it('should navigate back to the bitstream overview', () => {
comp.onCancel();
expect(router.navigate).toHaveBeenCalledWith(['/admin/registries/bitstream-formats']);
});
});
});

View File

@@ -0,0 +1,194 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
import { BitstreamFormatSupportLevel } from '../../../../core/shared/bitstream-format-support-level';
import {
DynamicCheckboxModel,
DynamicFormArrayModel,
DynamicFormControlLayout, DynamicFormControlLayoutConfig,
DynamicFormControlModel,
DynamicFormService,
DynamicInputModel,
DynamicSelectModel,
DynamicTextAreaModel
} from '@ng-dynamic-forms/core';
import { Router } from '@angular/router';
import { getBitstreamFormatsModulePath } from '../../admin-registries-routing.module';
import { hasValue, isEmpty } from '../../../../shared/empty.util';
import { TranslateService } from '@ngx-translate/core';
/**
* The component responsible for rendering the form to create/edit a bitstream format
*/
@Component({
selector: 'ds-bitstream-format-form',
templateUrl: './format-form.component.html'
})
export class FormatFormComponent implements OnInit {
/**
* The current bitstream format
* This can either be and existing one or a new one
*/
@Input() bitstreamFormat: BitstreamFormat = new BitstreamFormat();
/**
* EventEmitter that will emit the updated bitstream format
*/
@Output() updatedFormat: EventEmitter<BitstreamFormat> = new EventEmitter<BitstreamFormat>();
/**
* The different supported support level of the bitstream format
*/
supportLevelOptions = [{label: BitstreamFormatSupportLevel.Known, value: BitstreamFormatSupportLevel.Known},
{label: BitstreamFormatSupportLevel.Unknown, value: BitstreamFormatSupportLevel.Unknown},
{label: BitstreamFormatSupportLevel.Supported, value: BitstreamFormatSupportLevel.Supported}];
/**
* Styling element for repeatable field
*/
arrayElementLayout: DynamicFormControlLayout = {
grid: {
group: 'form-row',
},
};
/**
* Styling element for element of repeatable field
*/
arrayInputElementLayout: DynamicFormControlLayout = {
grid: {
host: 'col'
}
};
/**
* The form model representing the bitstream format
*/
formModel: DynamicFormControlModel[] = [
new DynamicInputModel({
id: 'shortDescription',
name: 'shortDescription',
label: 'admin.registries.bitstream-formats.edit.shortDescription.label',
hint: 'admin.registries.bitstream-formats.edit.shortDescription.hint',
required: true,
validators: {
required: null
},
errorMessages: {
required: 'Please enter a name for this bitstream format'
},
}),
new DynamicInputModel({
id: 'mimetype',
name: 'mimetype',
label: 'admin.registries.bitstream-formats.edit.mimetype.label',
hint: 'admin.registries.bitstream-formats.edit.mimetype.hint',
}),
new DynamicTextAreaModel({
id: 'description',
name: 'description',
label: 'admin.registries.bitstream-formats.edit.description.label',
hint: 'admin.registries.bitstream-formats.edit.description.hint',
}),
new DynamicSelectModel({
id: 'supportLevel',
name: 'supportLevel',
options: this.supportLevelOptions,
label: 'admin.registries.bitstream-formats.edit.supportLevel.label',
hint: 'admin.registries.bitstream-formats.edit.supportLevel.hint',
value: this.supportLevelOptions[0].value
}),
new DynamicCheckboxModel({
id: 'internal',
name: 'internal',
label: 'Internal',
hint: 'admin.registries.bitstream-formats.edit.internal.hint',
}),
new DynamicFormArrayModel({
id: 'extensions',
name: 'extensions',
label: 'admin.registries.bitstream-formats.edit.extensions.label',
groupFactory: () => [
new DynamicInputModel({
id: 'extension',
placeholder: 'admin.registries.bitstream-formats.edit.extensions.placeholder',
}, this.arrayInputElementLayout)
]
}, this.arrayElementLayout),
];
constructor(private dynamicFormService: DynamicFormService,
private translateService: TranslateService,
private router: Router) {
}
ngOnInit(): void {
this.initValues();
}
/**
* Initializes the form based on the provided bitstream format
*/
initValues() {
this.formModel.forEach(
(fieldModel: DynamicFormControlModel) => {
if (fieldModel.name === 'extensions') {
if (hasValue(this.bitstreamFormat.extensions)) {
const extenstions = this.bitstreamFormat.extensions;
const formArray = (fieldModel as DynamicFormArrayModel);
for (let i = 0; i < extenstions.length; i++) {
formArray.insertGroup(i).group[0] = new DynamicInputModel({
id: `extension-${i}`,
value: extenstions[i]
}, this.arrayInputElementLayout);
}
}
} else {
if (hasValue(this.bitstreamFormat[fieldModel.name])) {
(fieldModel as DynamicInputModel).value = this.bitstreamFormat[fieldModel.name];
}
}
});
}
/**
* Creates an updated bistream format based on the current values in the form
* Emits the updated bitstream format trouhg the updatedFormat emitter
*/
onSubmit() {
const updatedBitstreamFormat = Object.assign(new BitstreamFormat(),
{
id: this.bitstreamFormat.id
});
this.formModel.forEach(
(fieldModel: DynamicFormControlModel) => {
if (fieldModel.name === 'extensions') {
const formArray = (fieldModel as DynamicFormArrayModel);
const extensions = [];
for (let i = 0; i < formArray.groups.length; i++) {
const value = (formArray.get(i).get(0) as DynamicInputModel).value;
if (!isEmpty(value)) {
extensions.push((formArray.get(i).get(0) as DynamicInputModel).value);
}
}
updatedBitstreamFormat.extensions = extensions;
} else {
updatedBitstreamFormat[fieldModel.name] = (fieldModel as DynamicInputModel).value;
}
});
this.updatedFormat.emit(updatedBitstreamFormat);
}
/**
* Cancels the edit/create action of the bitstream format and navigates back to the bitstream format registry
*/
onCancel() {
this.router.navigate([getBitstreamFormatsModulePath()]);
}
}

View File

@@ -1,7 +1,7 @@
import { Action } from '@ngrx/store';
import { type } from '../../../shared/ngrx/type';
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
import { MetadataField } from '../../../core/metadata/metadatafield.model';
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
import { MetadataField } from '../../../core/metadata/metadata-field.model';
/**
* For each action type in an action group, make a simple

View File

@@ -1,5 +1,3 @@
@import '../../../../styles/variables.scss';
.selectable-row:hover {
cursor: pointer;
}

View File

@@ -17,6 +17,7 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
import { RestResponse } from '../../../core/cache/response.models';
import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils';
describe('MetadataRegistryComponent', () => {
let comp: MetadataRegistryComponent;
@@ -36,7 +37,7 @@ describe('MetadataRegistryComponent', () => {
namespace: 'http://dspace.org/mockschema'
}
];
const mockSchemas = observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockSchemasList)));
const mockSchemas = createSuccessfulRemoteDataObject$(new PaginatedList(null, mockSchemasList));
/* tslint:disable:no-empty */
const registryServiceStub = {
getMetadataSchemas: () => mockSchemas,

View File

@@ -3,7 +3,6 @@ import { RegistryService } from '../../../core/registry/registry.service';
import { Observable, combineLatest as observableCombineLatest } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import { PaginatedList } from '../../../core/data/paginated-list';
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
import { map, take } from 'rxjs/operators';
import { hasValue } from '../../../shared/empty.util';
@@ -12,6 +11,7 @@ import { zip } from 'rxjs/internal/observable/zip';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { Route, Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
@Component({
selector: 'ds-metadata-registry',

View File

@@ -7,8 +7,8 @@ import {
MetadataRegistrySelectSchemaAction
} from './metadata-registry.actions';
import { metadataRegistryReducer, MetadataRegistryState } from './metadata-registry.reducers';
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
import { MetadataField } from '../../../core/metadata/metadatafield.model';
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
import { MetadataField } from '../../../core/metadata/metadata-field.model';
class NullAction extends MetadataRegistryEditSchemaAction {
type = null;

View File

@@ -1,4 +1,3 @@
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
import {
MetadataRegistryAction,
MetadataRegistryActionTypes,
@@ -9,7 +8,8 @@ import {
MetadataRegistrySelectFieldAction,
MetadataRegistrySelectSchemaAction
} from './metadata-registry.actions';
import { MetadataField } from '../../../core/metadata/metadatafield.model';
import { MetadataField } from '../../../core/metadata/metadata-field.model';
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
/**
* The metadata registry state.

View File

@@ -10,7 +10,7 @@ import { EnumKeysPipe } from '../../../../shared/utils/enum-keys-pipe';
import { RegistryService } from '../../../../core/registry/registry.service';
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
import { of as observableOf } from 'rxjs/internal/observable/of';
import { MetadataSchema } from '../../../../core/metadata/metadataschema.model';
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
describe('MetadataSchemaFormComponent', () => {
let component: MetadataSchemaFormComponent;

View File

@@ -9,9 +9,9 @@ import { FormGroup } from '@angular/forms';
import { RegistryService } from '../../../../core/registry/registry.service';
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
import { take } from 'rxjs/operators';
import { MetadataSchema } from '../../../../core/metadata/metadataschema.model';
import { TranslateService } from '@ngx-translate/core';
import { combineLatest } from 'rxjs/internal/observable/combineLatest';
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
@Component({
selector: 'ds-metadata-schema-form',

View File

@@ -3,7 +3,6 @@ import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing'
import { MetadataFieldFormComponent } from './metadata-field-form.component';
import { RegistryService } from '../../../../core/registry/registry.service';
import { of as observableOf } from 'rxjs/internal/observable/of';
import { MetadataField } from '../../../../core/metadata/metadatafield.model';
import { CommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
@@ -11,7 +10,8 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { EnumKeysPipe } from '../../../../shared/utils/enum-keys-pipe';
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { MetadataSchema } from '../../../../core/metadata/metadataschema.model';
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
describe('MetadataFieldFormComponent', () => {
let component: MetadataFieldFormComponent;

View File

@@ -1,5 +1,4 @@
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { MetadataSchema } from '../../../../core/metadata/metadataschema.model';
import {
DynamicFormControlModel,
DynamicFormLayout,
@@ -8,10 +7,11 @@ import {
import { FormGroup } from '@angular/forms';
import { RegistryService } from '../../../../core/registry/registry.service';
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
import { MetadataField } from '../../../../core/metadata/metadatafield.model';
import { take } from 'rxjs/operators';
import { TranslateService } from '@ngx-translate/core';
import { combineLatest } from 'rxjs/internal/observable/combineLatest';
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
@Component({
selector: 'ds-metadata-field-form',

View File

@@ -1,5 +1,3 @@
@import '../../../../styles/variables.scss';
.selectable-row:hover {
cursor: pointer;
}

View File

@@ -3,7 +3,6 @@ import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing'
import { of as observableOf } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import { PaginatedList } from '../../../core/data/paginated-list';
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
import { TranslateModule } from '@ngx-translate/core';
import { CommonModule } from '@angular/common';
import { ActivatedRoute, Router } from '@angular/router';
@@ -21,6 +20,8 @@ import { NO_ERRORS_SCHEMA } from '@angular/core';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
import { RestResponse } from '../../../core/cache/response.models';
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils';
describe('MetadataSchemaComponent', () => {
let comp: MetadataSchemaComponent;
@@ -74,12 +75,12 @@ describe('MetadataSchemaComponent', () => {
schema: mockSchemasList[1]
}
];
const mockSchemas = observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockSchemasList)));
const mockSchemas = createSuccessfulRemoteDataObject$(new PaginatedList(null, mockSchemasList));
/* tslint:disable:no-empty */
const registryServiceStub = {
getMetadataSchemas: () => mockSchemas,
getMetadataFieldsBySchema: (schema: MetadataSchema) => observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockFieldsList.filter((value) => value.schema === schema)))),
getMetadataSchemaByName: (schemaName: string) => observableOf(new RemoteData(false, false, true, undefined, mockSchemasList.filter((value) => value.prefix === schemaName)[0])),
getMetadataFieldsBySchema: (schema: MetadataSchema) => createSuccessfulRemoteDataObject$(new PaginatedList(null, mockFieldsList.filter((value) => value.schema === schema))),
getMetadataSchemaByName: (schemaName: string) => createSuccessfulRemoteDataObject$(mockSchemasList.filter((value) => value.prefix === schemaName)[0]),
getActiveMetadataField: () => observableOf(undefined),
getSelectedMetadataFields: () => observableOf([]),
editMetadataField: (schema) => {},

View File

@@ -4,8 +4,6 @@ import { ActivatedRoute, Router } from '@angular/router';
import { Observable, combineLatest as observableCombineLatest } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import { PaginatedList } from '../../../core/data/paginated-list';
import { MetadataField } from '../../../core/metadata/metadatafield.model';
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
import { map, take } from 'rxjs/operators';
import { hasValue } from '../../../shared/empty.util';
@@ -13,6 +11,8 @@ import { RestResponse } from '../../../core/cache/response.models';
import { zip } from 'rxjs/internal/observable/zip';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { TranslateService } from '@ngx-translate/core';
import { MetadataField } from '../../../core/metadata/metadata-field.model';
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
@Component({
selector: 'ds-metadata-schema',

View File

@@ -1,11 +1,19 @@
import { RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { URLCombiner } from '../core/url-combiner/url-combiner';
import { getAdminModulePath } from '../app-routing.module';
const REGISTRIES_MODULE_PATH = 'registries';
export function getRegistriesModulePath() {
return new URLCombiner(getAdminModulePath(), REGISTRIES_MODULE_PATH).toString();
}
@NgModule({
imports: [
RouterModule.forChild([
{
path: 'registries',
path: REGISTRIES_MODULE_PATH,
loadChildren: './admin-registries/admin-registries.module#AdminRegistriesModule'
}
])

View File

@@ -1 +0,0 @@
@import '../../../../styles/variables.scss';

View File

@@ -1,4 +1,4 @@
<nav @slideHorizontal class="navbar navbar-dark bg-dark p-0"
<nav @slideHorizontal class="navbar navbar-dark p-0"
[ngClass]="{'active': sidebarOpen, 'inactive': sidebarClosed}"
[@slideSidebar]="{
value: (!(sidebarExpanded | async) ? 'collapsed' : 'expanded'),

View File

@@ -1,5 +1,3 @@
@import '../../../styles/variables.scss';
@import '../../../styles/mixins.scss';
$icon-z-index: 10;
:host {
@@ -8,6 +6,7 @@ $icon-z-index: 10;
height: 100vh;
flex: 1 1 auto;
nav {
background-color: $admin-sidebar-bg;
height: 100%;
flex-direction: column;
> div {
@@ -44,7 +43,7 @@ $icon-z-index: 10;
.sidebar-section {
display: flex;
align-content: stretch;
background-color: $dark;
background-color: $admin-sidebar-bg;
.nav-item {
padding-top: $spacer;
padding-bottom: $spacer;

View File

@@ -1,5 +1,3 @@
@import '../../../../styles/variables.scss';
::ng-deep {
.fa-chevron-right {
padding-left: $spacer/2;

View File

@@ -18,6 +18,7 @@ import { Item } from '../../core/shared/item.model';
import { ENV_CONFIG, GLOBAL_CONFIG } from '../../../config';
import { BrowseEntrySearchOptions } from '../../core/browse/browse-entry-search-options.model';
import { toRemoteData } from '../+browse-by-metadata-page/browse-by-metadata-page.component.spec';
import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils';
describe('BrowseByDatePageComponent', () => {
let comp: BrowseByDatePageComponent;
@@ -48,11 +49,11 @@ describe('BrowseByDatePageComponent', () => {
const mockBrowseService = {
getBrowseEntriesFor: (options: BrowseEntrySearchOptions) => toRemoteData([]),
getBrowseItemsFor: (value: string, options: BrowseEntrySearchOptions) => toRemoteData([firstItem]),
getFirstItemFor: () => observableOf(new RemoteData(false, false, true, undefined, firstItem))
getFirstItemFor: () => createSuccessfulRemoteDataObject$(firstItem)
};
const mockDsoService = {
findById: () => observableOf(new RemoteData(false, false, true, null, mockCommunity))
findById: () => createSuccessfulRemoteDataObject$(mockCommunity)
};
const activatedRouteStub = Object.assign(new ActivatedRouteStub(), {

View File

@@ -13,6 +13,7 @@ import { BrowseService } from '../../core/browse/browse.service';
import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service';
import { GLOBAL_CONFIG, GlobalConfig } from '../../../config';
import { StartsWithType } from '../../shared/starts-with/starts-with-decorator';
import { BrowseByType, rendersBrowseBy } from '../+browse-by-switcher/browse-by-decorator';
@Component({
selector: 'ds-browse-by-date-page',
@@ -21,9 +22,10 @@ import { StartsWithType } from '../../shared/starts-with/starts-with-decorator';
})
/**
* Component for browsing items by metadata definition of type 'date'
* A metadata definition is a short term used to describe one or multiple metadata fields.
* A metadata definition (a.k.a. browse id) is a short term used to describe one or multiple metadata fields.
* An example would be 'dateissued' for 'dc.date.issued'
*/
@rendersBrowseBy(BrowseByType.Date)
export class BrowseByDatePageComponent extends BrowseByMetadataPageComponent {
/**
@@ -53,12 +55,12 @@ export class BrowseByDatePageComponent extends BrowseByMetadataPageComponent {
})
.subscribe((params) => {
const metadataField = params.metadataField || this.defaultMetadataField;
this.metadata = params.metadata || this.defaultMetadata;
this.browseId = params.id || this.defaultBrowseId;
this.startsWith = +params.startsWith || params.startsWith;
const searchOptions = browseParamsToOptions(params, Object.assign({}), this.sortConfig, this.metadata);
const searchOptions = browseParamsToOptions(params, Object.assign({}), this.sortConfig, this.browseId);
this.updatePageWithItems(searchOptions, this.value);
this.updateParent(params.scope);
this.updateStartsWithOptions(this.metadata, metadataField, params.scope);
this.updateStartsWithOptions(this.browseId, metadataField, params.scope);
}));
}
@@ -78,8 +80,9 @@ export class BrowseByDatePageComponent extends BrowseByMetadataPageComponent {
let lowerLimit = this.config.browseBy.defaultLowerLimit;
if (hasValue(firstItemRD.payload)) {
const date = firstItemRD.payload.firstMetadataValue(metadataField);
if (hasValue(date) && hasValue(+date.split('-')[0])) {
lowerLimit = +date.split('-')[0];
if (hasValue(date)) {
const dateObj = new Date(date);
lowerLimit = dateObj.getFullYear();
}
}
const options = [];

View File

@@ -1,7 +1,7 @@
<div class="container">
<div class="browse-by-metadata w-100">
<ds-browse-by *ngIf="startsWithOptions" class="col-xs-12 w-100"
title="{{'browse.title' | translate:{collection: (parent$ | async)?.payload?.name || '', field: 'browse.metadata.' + metadata | translate, value: (value)? '&quot;' + value + '&quot;': ''} }}"
title="{{'browse.title' | translate:{collection: (parent$ | async)?.payload?.name || '', field: 'browse.metadata.' + browseId | translate, value: (value)? '&quot;' + value + '&quot;': ''} }}"
[objects$]="(items$ !== undefined)? items$ : browseEntries$"
[paginationConfig]="paginationConfig"
[sortConfig]="sortConfig"

View File

@@ -20,6 +20,9 @@ import { Item } from '../../core/shared/item.model';
import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service';
import { Community } from '../../core/shared/community.model';
import { MockRouter } from '../../shared/mocks/mock-router';
import { ResourceType } from '../../core/shared/resource-type';
import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils';
import { BrowseEntry } from '../../core/shared/browse-entry.model';
describe('BrowseByMetadataPageComponent', () => {
let comp: BrowseByMetadataPageComponent;
@@ -39,21 +42,21 @@ describe('BrowseByMetadataPageComponent', () => {
const mockEntries = [
{
type: 'author',
type: BrowseEntry.type,
authority: null,
value: 'John Doe',
language: 'en',
count: 1
},
{
type: 'author',
type: BrowseEntry.type,
authority: null,
value: 'James Doe',
language: 'en',
count: 3
},
{
type: 'subject',
type: BrowseEntry.type,
authority: null,
value: 'Fake subject',
language: 'en',
@@ -68,12 +71,12 @@ describe('BrowseByMetadataPageComponent', () => {
];
const mockBrowseService = {
getBrowseEntriesFor: (options: BrowseEntrySearchOptions) => toRemoteData(mockEntries.filter((entry) => entry.type === options.metadataDefinition)),
getBrowseEntriesFor: (options: BrowseEntrySearchOptions) => toRemoteData(mockEntries),
getBrowseItemsFor: (value: string, options: BrowseEntrySearchOptions) => toRemoteData(mockItems)
};
const mockDsoService = {
findById: () => observableOf(new RemoteData(false, false, true, null, mockCommunity))
findById: () => createSuccessfulRemoteDataObject$(mockCommunity)
};
const activatedRouteStub = Object.assign(new ActivatedRouteStub(), {
@@ -105,12 +108,6 @@ describe('BrowseByMetadataPageComponent', () => {
fixture.detectChanges();
});
it('should fetch the correct entries depending on the metadata definition', () => {
comp.browseEntries$.subscribe((result) => {
expect(result.payload.page).toEqual(mockEntries.filter((entry) => entry.type === 'author'));
});
});
it('should not fetch any items when no value is provided', () => {
expect(comp.items$).toBeUndefined();
});
@@ -160,5 +157,5 @@ describe('BrowseByMetadataPageComponent', () => {
});
export function toRemoteData(objects: any[]): Observable<RemoteData<PaginatedList<any>>> {
return observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), objects)));
return createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), objects));
}

View File

@@ -15,6 +15,7 @@ import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.serv
import { DSpaceObject } from '../../core/shared/dspace-object.model';
import { take } from 'rxjs/operators';
import { StartsWithType } from '../../shared/starts-with/starts-with-decorator';
import { BrowseByType, rendersBrowseBy } from '../+browse-by-switcher/browse-by-decorator';
@Component({
selector: 'ds-browse-by-metadata-page',
@@ -23,9 +24,10 @@ import { StartsWithType } from '../../shared/starts-with/starts-with-decorator';
})
/**
* Component for browsing (items) by metadata definition
* A metadata definition is a short term used to describe one or multiple metadata fields.
* A metadata definition (a.k.a. browse id) is a short term used to describe one or multiple metadata fields.
* An example would be 'author' for 'dc.contributor.*'
*/
@rendersBrowseBy(BrowseByType.Metadata)
export class BrowseByMetadataPageComponent implements OnInit {
/**
@@ -63,14 +65,14 @@ export class BrowseByMetadataPageComponent implements OnInit {
subs: Subscription[] = [];
/**
* The default metadata definition to resort to when none is provided
* The default browse id to resort to when none is provided
*/
defaultMetadata = 'author';
defaultBrowseId = 'author';
/**
* The current metadata definition
* The current browse id
*/
metadata = this.defaultMetadata;
browseId = this.defaultBrowseId;
/**
* The type of StartsWith options to render
@@ -112,10 +114,10 @@ export class BrowseByMetadataPageComponent implements OnInit {
return Object.assign({}, params, queryParams);
})
.subscribe((params) => {
this.metadata = params.metadata || this.defaultMetadata;
this.browseId = params.id || this.defaultBrowseId;
this.value = +params.value || params.value || '';
this.startsWith = +params.startsWith || params.startsWith;
const searchOptions = browseParamsToOptions(params, this.paginationConfig, this.sortConfig, this.metadata);
const searchOptions = browseParamsToOptions(params, this.paginationConfig, this.sortConfig, this.browseId);
if (isNotEmpty(this.value)) {
this.updatePageWithItems(searchOptions, this.value);
} else {

View File

@@ -0,0 +1,12 @@
import { BrowseByType, rendersBrowseBy } from './browse-by-decorator';
describe('BrowseByDecorator', () => {
const titleDecorator = rendersBrowseBy(BrowseByType.Title);
const dateDecorator = rendersBrowseBy(BrowseByType.Date);
const metadataDecorator = rendersBrowseBy(BrowseByType.Metadata);
it('should have a decorator for all types', () => {
expect(titleDecorator.length).not.toEqual(0);
expect(dateDecorator.length).not.toEqual(0);
expect(metadataDecorator.length).not.toEqual(0);
});
});

View File

@@ -0,0 +1,37 @@
import { hasNoValue } from '../../shared/empty.util';
export enum BrowseByType {
Title = 'title',
Metadata = 'metadata',
Date = 'date'
}
export const DEFAULT_BROWSE_BY_TYPE = BrowseByType.Metadata;
const map = new Map();
/**
* Decorator used for rendering Browse-By pages by type
* @param browseByType The type of page
*/
export function rendersBrowseBy(browseByType: BrowseByType) {
return function decorator(component: any) {
if (hasNoValue(map.get(browseByType))) {
map.set(browseByType, component);
} else {
throw new Error(`There can't be more than one component to render Browse-By of type "${browseByType}"`);
}
};
}
/**
* Get the component used for rendering a Browse-By page by type
* @param browseByType The type of page
*/
export function getComponentByBrowseByType(browseByType) {
const comp = map.get(browseByType);
if (hasNoValue(comp)) {
map.get(DEFAULT_BROWSE_BY_TYPE);
}
return comp;
}

View File

@@ -0,0 +1 @@
<ng-container *ngComponentOutlet="browseByComponent | async"></ng-container>

View File

@@ -0,0 +1,55 @@
import { BrowseBySwitcherComponent } from './browse-by-switcher.component';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ENV_CONFIG, GLOBAL_CONFIG } from '../../../config';
import { ActivatedRoute } from '@angular/router';
import * as decorator from './browse-by-decorator';
import createSpy = jasmine.createSpy;
import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';
describe('BrowseBySwitcherComponent', () => {
let comp: BrowseBySwitcherComponent;
let fixture: ComponentFixture<BrowseBySwitcherComponent>;
const types = ENV_CONFIG.browseBy.types;
const params = new BehaviorSubject(createParamsWithId('initialValue'));
const activatedRouteStub = {
params: params
};
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BrowseBySwitcherComponent ],
providers: [
{ provide: GLOBAL_CONFIG, useValue: ENV_CONFIG },
{ provide: ActivatedRoute, useValue: activatedRouteStub }
],
schemas: [ NO_ERRORS_SCHEMA ]
}).compileComponents();
}));
beforeEach(async(() => {
fixture = TestBed.createComponent(BrowseBySwitcherComponent);
comp = fixture.componentInstance;
spyOnProperty(decorator, 'getComponentByBrowseByType').and.returnValue(createSpy('getComponentByItemType'));
}));
types.forEach((type) => {
describe(`when switching to a browse-by page for "${type.id}"`, () => {
beforeEach(() => {
params.next(createParamsWithId(type.id));
fixture.detectChanges();
});
it(`should call getComponentByBrowseByType with type "${type.type}"`, () => {
expect(decorator.getComponentByBrowseByType).toHaveBeenCalledWith(type.type);
});
});
});
});
export function createParamsWithId(id) {
return { id: id };
}

View File

@@ -0,0 +1,40 @@
import { Component, Inject, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs/internal/Observable';
import { GLOBAL_CONFIG, GlobalConfig } from '../../../config';
import { BrowseByTypeConfig } from '../../../config/browse-by-type-config.interface';
import { map, tap } from 'rxjs/operators';
import { getComponentByBrowseByType } from './browse-by-decorator';
@Component({
selector: 'ds-browse-by-switcher',
templateUrl: './browse-by-switcher.component.html'
})
/**
* Component for determining what Browse-By component to use depending on the metadata (browse ID) provided
*/
export class BrowseBySwitcherComponent implements OnInit {
/**
* Resolved browse-by component
*/
browseByComponent: Observable<any>;
public constructor(@Inject(GLOBAL_CONFIG) public config: GlobalConfig,
protected route: ActivatedRoute) {
}
/**
* Fetch the correct browse-by component by using the relevant config from environment.js
*/
ngOnInit(): void {
this.browseByComponent = this.route.params.pipe(
map((params) => {
const id = params.id;
return this.config.browseBy.types.find((config: BrowseByTypeConfig) => config.id === id);
}),
map((config: BrowseByTypeConfig) => getComponentByBrowseByType(config.type))
);
}
}

View File

@@ -17,6 +17,7 @@ import { RemoteData } from '../../core/data/remote-data';
import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service';
import { BrowseService } from '../../core/browse/browse.service';
import { MockRouter } from '../../shared/mocks/mock-router';
import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils';
describe('BrowseByTitlePageComponent', () => {
let comp: BrowseByTitlePageComponent;
@@ -52,7 +53,7 @@ describe('BrowseByTitlePageComponent', () => {
};
const mockDsoService = {
findById: () => observableOf(new RemoteData(false, false, true, null, mockCommunity))
findById: () => createSuccessfulRemoteDataObject$(mockCommunity)
};
const activatedRouteStub = Object.assign(new ActivatedRouteStub(), {

View File

@@ -1,6 +1,5 @@
import { combineLatest as observableCombineLatest } from 'rxjs';
import { Component } from '@angular/core';
import { ItemDataService } from '../../core/data/item-data.service';
import { ActivatedRoute, Router } from '@angular/router';
import { hasValue } from '../../shared/empty.util';
import {
@@ -11,6 +10,7 @@ import { BrowseEntrySearchOptions } from '../../core/browse/browse-entry-search-
import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service';
import { BrowseService } from '../../core/browse/browse.service';
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
import { BrowseByType, rendersBrowseBy } from '../+browse-by-switcher/browse-by-decorator';
@Component({
selector: 'ds-browse-by-title-page',
@@ -20,6 +20,7 @@ import { SortDirection, SortOptions } from '../../core/cache/models/sort-options
/**
* Component for browsing items by title (dc.title)
*/
@rendersBrowseBy(BrowseByType.Title)
export class BrowseByTitlePageComponent extends BrowseByMetadataPageComponent {
public constructor(protected route: ActivatedRoute,
@@ -41,8 +42,8 @@ export class BrowseByTitlePageComponent extends BrowseByMetadataPageComponent {
return Object.assign({}, params, queryParams, data);
})
.subscribe((params) => {
this.metadata = params.metadata || this.defaultMetadata;
this.updatePageWithItems(browseParamsToOptions(params, this.paginationConfig, this.sortConfig, this.metadata), undefined);
this.browseId = params.id || this.defaultBrowseId;
this.updatePageWithItems(browseParamsToOptions(params, this.paginationConfig, this.sortConfig, this.browseId), undefined);
this.updateParent(params.scope)
}));
this.updateStartsWithTextOptions();

View File

@@ -1,6 +1,7 @@
import { first } from 'rxjs/operators';
import { BrowseByGuard } from './browse-by-guard';
import { of as observableOf } from 'rxjs';
import { ENV_CONFIG } from '../../config';
describe('BrowseByGuard', () => {
describe('canActivate', () => {
@@ -11,20 +12,20 @@ describe('BrowseByGuard', () => {
const name = 'An interesting DSO';
const title = 'Author';
const field = 'Author';
const metadata = 'author';
const id = 'author';
const metadataField = 'dc.contributor';
const scope = '1234-65487-12354-1235';
const value = 'Filter';
beforeEach(() => {
dsoService = {
findById: (id: string) => observableOf({ payload: { name: name }, hasSucceeded: true })
findById: (dsoId: string) => observableOf({ payload: { name: name }, hasSucceeded: true })
};
translateService = {
instant: () => field
};
guard = new BrowseByGuard(dsoService, translateService);
guard = new BrowseByGuard(ENV_CONFIG, dsoService, translateService);
});
it('should return true, and sets up the data correctly, with a scope and value', () => {
@@ -34,7 +35,7 @@ describe('BrowseByGuard', () => {
metadataField,
},
params: {
metadata,
id,
},
queryParams: {
scope,
@@ -47,7 +48,7 @@ describe('BrowseByGuard', () => {
(canActivate) => {
const result = {
title,
metadata,
id,
metadataField,
collection: name,
field,
@@ -66,7 +67,7 @@ describe('BrowseByGuard', () => {
metadataField,
},
params: {
metadata,
id,
},
queryParams: {
scope
@@ -79,7 +80,7 @@ describe('BrowseByGuard', () => {
(canActivate) => {
const result = {
title,
metadata,
id,
metadataField,
collection: name,
field,
@@ -98,7 +99,7 @@ describe('BrowseByGuard', () => {
metadataField,
},
params: {
metadata,
id,
},
queryParams: {
value
@@ -110,7 +111,7 @@ describe('BrowseByGuard', () => {
(canActivate) => {
const result = {
title,
metadata,
id,
metadataField,
collection: '',
field,

View File

@@ -1,11 +1,12 @@
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot } from '@angular/router';
import { Injectable } from '@angular/core';
import { Inject, Injectable } from '@angular/core';
import { DSpaceObjectDataService } from '../core/data/dspace-object-data.service';
import { hasValue } from '../shared/empty.util';
import { hasNoValue, hasValue } from '../shared/empty.util';
import { map } from 'rxjs/operators';
import { getSucceededRemoteData } from '../core/shared/operators';
import { TranslateService } from '@ngx-translate/core';
import { of as observableOf } from 'rxjs';
import { GLOBAL_CONFIG, GlobalConfig } from '../../config';
@Injectable()
/**
@@ -13,36 +14,43 @@ import { of as observableOf } from 'rxjs';
*/
export class BrowseByGuard implements CanActivate {
constructor(protected dsoService: DSpaceObjectDataService,
constructor(@Inject(GLOBAL_CONFIG) public config: GlobalConfig,
protected dsoService: DSpaceObjectDataService,
protected translate: TranslateService) {
}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
const title = route.data.title;
const metadata = route.params.metadata || route.queryParams.metadata || route.data.metadata;
const metadataField = route.data.metadataField;
const id = route.params.id || route.queryParams.id || route.data.id;
let metadataField = route.data.metadataField;
if (hasNoValue(metadataField) && hasValue(id)) {
const config = this.config.browseBy.types.find((conf) => conf.id === id);
if (hasValue(config) && hasValue(config.metadataField)) {
metadataField = config.metadataField;
}
}
const scope = route.queryParams.scope;
const value = route.queryParams.value;
const metadataTranslated = this.translate.instant('browse.metadata.' + metadata);
const metadataTranslated = this.translate.instant('browse.metadata.' + id);
if (hasValue(scope)) {
const dsoAndMetadata$ = this.dsoService.findById(scope).pipe(getSucceededRemoteData());
return dsoAndMetadata$.pipe(
map((dsoRD) => {
const name = dsoRD.payload.name;
route.data = this.createData(title, metadata, metadataField, name, metadataTranslated, value);
route.data = this.createData(title, id, metadataField, name, metadataTranslated, value);
return true;
})
);
} else {
route.data = this.createData(title, metadata, metadataField, '', metadataTranslated, value);
route.data = this.createData(title, id, metadataField, '', metadataTranslated, value);
return observableOf(true);
}
}
private createData(title, metadata, metadataField, collection, field, value) {
private createData(title, id, metadataField, collection, field, value) {
return {
title: title,
metadata: metadata,
id: id,
metadataField: metadataField,
collection: collection,
field: field,

View File

@@ -1,16 +1,12 @@
import { RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { BrowseByTitlePageComponent } from './+browse-by-title-page/browse-by-title-page.component';
import { BrowseByMetadataPageComponent } from './+browse-by-metadata-page/browse-by-metadata-page.component';
import { BrowseByDatePageComponent } from './+browse-by-date-page/browse-by-date-page.component';
import { BrowseByGuard } from './browse-by-guard';
import { BrowseBySwitcherComponent } from './+browse-by-switcher/browse-by-switcher.component';
@NgModule({
imports: [
RouterModule.forChild([
{ path: 'title', component: BrowseByTitlePageComponent, canActivate: [BrowseByGuard], data: { metadata: 'title', title: 'browse.title' } },
{ path: 'dateissued', component: BrowseByDatePageComponent, canActivate: [BrowseByGuard], data: { metadata: 'dateissued', metadataField: 'dc.date.issued', title: 'browse.title' } },
{ path: ':metadata', component: BrowseByMetadataPageComponent, canActivate: [BrowseByGuard], data: { title: 'browse.title' } }
{ path: ':id', component: BrowseBySwitcherComponent, canActivate: [BrowseByGuard], data: { title: 'browse.title' } }
])
]
})

View File

@@ -8,6 +8,7 @@ import { BrowseService } from '../core/browse/browse.service';
import { BrowseByMetadataPageComponent } from './+browse-by-metadata-page/browse-by-metadata-page.component';
import { BrowseByDatePageComponent } from './+browse-by-date-page/browse-by-date-page.component';
import { BrowseByGuard } from './browse-by-guard';
import { BrowseBySwitcherComponent } from './+browse-by-switcher/browse-by-switcher.component';
@NgModule({
imports: [
@@ -18,12 +19,18 @@ import { BrowseByGuard } from './browse-by-guard';
declarations: [
BrowseByTitlePageComponent,
BrowseByMetadataPageComponent,
BrowseByDatePageComponent
BrowseByDatePageComponent,
BrowseBySwitcherComponent
],
providers: [
ItemDataService,
BrowseService,
BrowseByGuard
],
entryComponents: [
BrowseByTitlePageComponent,
BrowseByMetadataPageComponent,
BrowseByDatePageComponent
]
})
export class BrowseByModule {

View File

@@ -1,12 +1,9 @@
import { Component, Input } from '@angular/core';
import {
DynamicInputModel,
DynamicTextAreaModel
} from '@ng-dynamic-forms/core';
import { DynamicInputModel, DynamicTextAreaModel } from '@ng-dynamic-forms/core';
import { DynamicFormControlModel } from '@ng-dynamic-forms/core/src/model/dynamic-form-control.model';
import { ResourceType } from '../../core/shared/resource-type';
import { Collection } from '../../core/shared/collection.model';
import { ComColFormComponent } from '../../shared/comcol-forms/comcol-form/comcol-form.component';
import { NormalizedCollection } from '../../core/cache/models/normalized-collection.model';
/**
* Form used for creating and editing collections
@@ -23,9 +20,9 @@ export class CollectionFormComponent extends ComColFormComponent<Collection> {
@Input() dso: Collection = new Collection();
/**
* @type {ResourceType.Collection} This is a collection-type form
* @type {Collection.type} This is a collection-type form
*/
protected type = ResourceType.Collection;
protected type = Collection.type;
/**
* The dynamic form fields used for creating/editing a collection

View File

@@ -52,6 +52,9 @@
message="{{'error.recent-submissions' | translate}}"></ds-error>
<ds-loading *ngIf="!itemRD || itemRD.isLoading"
message="{{'loading.recent-submissions' | translate}}"></ds-loading>
<div *ngIf="!itemRD?.isLoading && itemRD?.payload?.page.length === 0" class="alert alert-info w-100" role="alert">
{{'collection.page.browse.recent.empty' | translate}}
</div>
</ng-container>
</div>
<ds-error *ngIf="collectionRD?.hasFailed"

View File

@@ -1 +0,0 @@
@import '../../styles/variables.scss';

View File

@@ -4,7 +4,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { CommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouteService } from '../../shared/services/route.service';
import { RouteService } from '../../core/services/route.service';
import { SharedModule } from '../../shared/shared.module';
import { CollectionDataService } from '../../core/data/collection-data.service';
import { of as observableOf } from 'rxjs';

View File

@@ -1,6 +1,6 @@
import { Component } from '@angular/core';
import { CommunityDataService } from '../../core/data/community-data.service';
import { RouteService } from '../../shared/services/route.service';
import { RouteService } from '../../core/services/route.service';
import { Router } from '@angular/router';
import { CreateComColPageComponent } from '../../shared/comcol-forms/create-comcol-page/create-comcol-page.component';
import { Collection } from '../../core/shared/collection.model';

View File

@@ -1,9 +1,11 @@
import { CreateCollectionPageGuard } from './create-collection-page.guard';
import { MockRouter } from '../../shared/mocks/mock-router';
import { RemoteData } from '../../core/data/remote-data';
import { Community } from '../../core/shared/community.model';
import { of as observableOf } from 'rxjs';
import { first } from 'rxjs/operators';
import {
createFailedRemoteDataObject$,
createSuccessfulRemoteDataObject$
} from '../../shared/testing/utils';
describe('CreateCollectionPageGuard', () => {
describe('canActivate', () => {
@@ -15,11 +17,11 @@ describe('CreateCollectionPageGuard', () => {
communityDataServiceStub = {
findById: (id: string) => {
if (id === 'valid-id') {
return observableOf(new RemoteData(false, false, true, null, new Community()));
return createSuccessfulRemoteDataObject$(new Community());
} else if (id === 'invalid-id') {
return observableOf(new RemoteData(false, false, true, null, undefined));
return createSuccessfulRemoteDataObject$(undefined);
} else if (id === 'error-id') {
return observableOf(new RemoteData(false, false, false, null, new Community()));
return createFailedRemoteDataObject$(new Community());
}
}
};

View File

@@ -20,9 +20,9 @@ export class CommunityFormComponent extends ComColFormComponent<Community> {
@Input() dso: Community = new Community();
/**
* @type {ResourceType.Community} This is a community-type form
* @type {Community.type} This is a community-type form
*/
protected type = ResourceType.Community;
protected type = Community.type;
/**
* The dynamic form fields used for creating/editing a community

View File

@@ -1 +0,0 @@
@import '../../styles/variables.scss';

View File

@@ -4,7 +4,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { CommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouteService } from '../../shared/services/route.service';
import { RouteService } from '../../core/services/route.service';
import { SharedModule } from '../../shared/shared.module';
import { CollectionDataService } from '../../core/data/collection-data.service';
import { of as observableOf } from 'rxjs';

View File

@@ -1,7 +1,7 @@
import { Component } from '@angular/core';
import { Community } from '../../core/shared/community.model';
import { CommunityDataService } from '../../core/data/community-data.service';
import { RouteService } from '../../shared/services/route.service';
import { RouteService } from '../../core/services/route.service';
import { Router } from '@angular/router';
import { CreateComColPageComponent } from '../../shared/comcol-forms/create-comcol-page/create-comcol-page.component';

View File

@@ -1,9 +1,11 @@
import { CreateCommunityPageGuard } from './create-community-page.guard';
import { MockRouter } from '../../shared/mocks/mock-router';
import { RemoteData } from '../../core/data/remote-data';
import { Community } from '../../core/shared/community.model';
import { of as observableOf } from 'rxjs';
import { first } from 'rxjs/operators';
import {
createFailedRemoteDataObject$,
createSuccessfulRemoteDataObject$
} from '../../shared/testing/utils';
describe('CreateCommunityPageGuard', () => {
describe('canActivate', () => {
@@ -15,11 +17,11 @@ describe('CreateCommunityPageGuard', () => {
communityDataServiceStub = {
findById: (id: string) => {
if (id === 'valid-id') {
return observableOf(new RemoteData(false, false, true, null, new Community()));
return createSuccessfulRemoteDataObject$(new Community());
} else if (id === 'invalid-id') {
return observableOf(new RemoteData(false, false, true, null, undefined));
return createSuccessfulRemoteDataObject$(undefined);
} else if (id === 'error-id') {
return observableOf(new RemoteData(false, false, false, null, new Community()));
return createFailedRemoteDataObject$(new Community());
}
}
};

View File

@@ -4,7 +4,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { CommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouteService } from '../../shared/services/route.service';
import { RouteService } from '../../core/services/route.service';
import { SharedModule } from '../../shared/shared.module';
import { of as observableOf } from 'rxjs';
import { NotificationsService } from '../../shared/notifications/notifications.service';

View File

@@ -1 +0,0 @@
@import '../../../styles/variables.scss';

View File

@@ -1 +0,0 @@
@import '../../../styles/variables.scss';

View File

@@ -11,6 +11,7 @@ import {RouterTestingModule} from '@angular/router/testing';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {By} from '@angular/platform-browser';
import {of as observableOf, Observable } from 'rxjs';
import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils';
describe('SubCommunityList Component', () => {
let comp: CommunityPageSubCommunityListComponent;
@@ -40,8 +41,7 @@ describe('SubCommunityList Component', () => {
{ language: 'en_US', value: 'Test title' }
]
},
subcommunities: observableOf(new RemoteData(true, true, true,
undefined, new PaginatedList(new PageInfo(), [])))
subcommunities: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), []))
});
const mockCommunity = Object.assign(new Community(), {
@@ -50,8 +50,7 @@ describe('SubCommunityList Component', () => {
{ language: 'en_US', value: 'Test title' }
]
},
subcommunities: observableOf(new RemoteData(true, true, true,
undefined, new PaginatedList(new PageInfo(), subcommunities)))
subcommunities: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), subcommunities))
})
;

View File

@@ -1,5 +1,3 @@
@import '../../../styles/variables.scss';
:host {
display: block;
margin-top: -$content-spacing;

View File

@@ -1 +1,2 @@
@import '../../styles/variables.scss';
:host {
}

View File

@@ -0,0 +1,179 @@
import { Component, Inject, Injectable, OnInit } from '@angular/core';
import { FieldUpdate, FieldUpdates } from '../../../core/data/object-updates/object-updates.reducer';
import { Observable } from 'rxjs/internal/Observable';
import { Item } from '../../../core/shared/item.model';
import { ItemDataService } from '../../../core/data/item-data.service';
import { ObjectUpdatesService } from '../../../core/data/object-updates/object-updates.service';
import { ActivatedRoute, Router } from '@angular/router';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { TranslateService } from '@ngx-translate/core';
import { GLOBAL_CONFIG, GlobalConfig } from '../../../../config';
import { first, map } from 'rxjs/operators';
import { RemoteData } from '../../../core/data/remote-data';
@Injectable()
/**
* Abstract component for managing object updates of an item
*/
export abstract class AbstractItemUpdateComponent implements OnInit {
/**
* The item to display the edit page for
*/
item: Item;
/**
* The current values and updates for all this item's fields
* Should be initialized in the initializeUpdates method of the child component
*/
updates$: Observable<FieldUpdates>;
/**
* The current url of this page
*/
url: string;
/**
* Prefix for this component's notification translate keys
* Should be initialized in the initializeNotificationsPrefix method of the child component
*/
notificationsPrefix;
/**
* The time span for being able to undo discarding changes
*/
discardTimeOut: number;
constructor(
protected itemService: ItemDataService,
protected objectUpdatesService: ObjectUpdatesService,
protected router: Router,
protected notificationsService: NotificationsService,
protected translateService: TranslateService,
@Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig,
protected route: ActivatedRoute
) {
}
/**
* Initialize common properties between item-update components
*/
ngOnInit(): void {
this.route.parent.data.pipe(map((data) => data.item))
.pipe(
first(),
map((data: RemoteData<Item>) => data.payload)
).subscribe((item: Item) => {
this.item = item;
});
this.discardTimeOut = this.EnvConfig.item.edit.undoTimeout;
this.url = this.router.url;
if (this.url.indexOf('?') > 0) {
this.url = this.url.substr(0, this.url.indexOf('?'));
}
this.hasChanges().pipe(first()).subscribe((hasChanges) => {
if (!hasChanges) {
this.initializeOriginalFields();
} else {
this.checkLastModified();
}
});
this.initializeNotificationsPrefix();
this.initializeUpdates();
}
/**
* Initialize the values and updates of the current item's fields
*/
abstract initializeUpdates(): void;
/**
* Initialize the prefix for notification messages
*/
abstract initializeNotificationsPrefix(): void;
/**
* Sends all initial values of this item to the object updates service
*/
abstract initializeOriginalFields(): void;
/**
* Prevent unnecessary rerendering so fields don't lose focus
*/
trackUpdate(index, update: FieldUpdate) {
return update && update.field ? update.field.uuid : undefined;
}
/**
* Checks whether or not there are currently updates for this item
*/
hasChanges(): Observable<boolean> {
return this.objectUpdatesService.hasUpdates(this.url);
}
/**
* Check if the current page is entirely valid
*/
protected isValid() {
return this.objectUpdatesService.isValidPage(this.url);
}
/**
* Checks if the current item is still in sync with the version in the store
* If it's not, a notification is shown and the changes are removed
*/
private checkLastModified() {
const currentVersion = this.item.lastModified;
this.objectUpdatesService.getLastModified(this.url).pipe(first()).subscribe(
(updateVersion: Date) => {
if (updateVersion.getDate() !== currentVersion.getDate()) {
this.notificationsService.warning(this.getNotificationTitle('outdated'), this.getNotificationContent('outdated'));
this.initializeOriginalFields();
}
}
);
}
/**
* Submit the current changes
*/
abstract submit(): void;
/**
* Request the object updates service to discard all current changes to this item
* Shows a notification to remind the user that they can undo this
*/
discard() {
const undoNotification = this.notificationsService.info(this.getNotificationTitle('discarded'), this.getNotificationContent('discarded'), { timeOut: this.discardTimeOut });
this.objectUpdatesService.discardFieldUpdates(this.url, undoNotification);
}
/**
* Request the object updates service to undo discarding all changes to this item
*/
reinstate() {
this.objectUpdatesService.reinstateFieldUpdates(this.url);
}
/**
* Checks whether or not the item is currently reinstatable
*/
isReinstatable(): Observable<boolean> {
return this.objectUpdatesService.isReinstatable(this.url);
}
/**
* Get translated notification title
* @param key
*/
protected getNotificationTitle(key: string) {
return this.translateService.instant(this.notificationsPrefix + key + '.title');
}
/**
* Get translated notification content
* @param key
*/
protected getNotificationContent(key: string) {
return this.translateService.instant(this.notificationsPrefix + key + '.content');
}
}

View File

@@ -2,6 +2,10 @@ import {RemoteData} from '../../core/data/remote-data';
import {hot} from 'jasmine-marbles';
import {Item} from '../../core/shared/item.model';
import {findSuccessfulAccordingTo} from './edit-item-operators';
import {
createFailedRemoteDataObject,
createSuccessfulRemoteDataObject
} from '../../shared/testing/utils';
describe('findSuccessfulAccordingTo', () => {
let mockItem1;
@@ -19,11 +23,11 @@ describe('findSuccessfulAccordingTo', () => {
});
it('should return first successful RemoteData Observable that complies to predicate', () => {
const testRD = {
a: new RemoteData(false, false, true, null, undefined),
b: new RemoteData(false, false, false, null, mockItem1),
c: new RemoteData(false, false, true, null, mockItem2),
d: new RemoteData(false, false, true, null, mockItem1),
e: new RemoteData(false, false, true, null, mockItem2),
a: createSuccessfulRemoteDataObject(undefined),
b: createFailedRemoteDataObject(mockItem1),
c: createSuccessfulRemoteDataObject(mockItem2),
d: createSuccessfulRemoteDataObject(mockItem1),
e: createSuccessfulRemoteDataObject(mockItem2),
};
const source = hot('abcde', testRD);

View File

@@ -1,5 +1,3 @@
@import '../../../styles/variables.scss';
.btn {
min-width: $edit-item-button-min-width;
}

View File

@@ -15,6 +15,10 @@ import { ItemDeleteComponent } from './item-delete/item-delete.component';
import { ItemMetadataComponent } from './item-metadata/item-metadata.component';
import { EditInPlaceFieldComponent } from './item-metadata/edit-in-place-field/edit-in-place-field.component';
import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component';
import { ItemRelationshipsComponent } from './item-relationships/item-relationships.component';
import { EditRelationshipComponent } from './item-relationships/edit-relationship/edit-relationship.component';
import { EditRelationshipListComponent } from './item-relationships/edit-relationship-list/edit-relationship-list.component';
import { ItemMoveComponent } from './item-move/item-move.component';
/**
* Module that contains all components related to the Edit Item page administrator functionality
@@ -37,8 +41,12 @@ import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.compo
ItemDeleteComponent,
ItemStatusComponent,
ItemMetadataComponent,
ItemRelationshipsComponent,
ItemBitstreamsComponent,
EditInPlaceFieldComponent
EditInPlaceFieldComponent,
EditRelationshipComponent,
EditRelationshipListComponent,
ItemMoveComponent,
]
})
export class EditItemPageModule {

View File

@@ -10,12 +10,15 @@ import { ItemDeleteComponent } from './item-delete/item-delete.component';
import { ItemStatusComponent } from './item-status/item-status.component';
import { ItemMetadataComponent } from './item-metadata/item-metadata.component';
import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component';
import { ItemMoveComponent } from './item-move/item-move.component';
import { ItemRelationshipsComponent } from './item-relationships/item-relationships.component';
const ITEM_EDIT_WITHDRAW_PATH = 'withdraw';
const ITEM_EDIT_REINSTATE_PATH = 'reinstate';
const ITEM_EDIT_PRIVATE_PATH = 'private';
const ITEM_EDIT_PUBLIC_PATH = 'public';
const ITEM_EDIT_DELETE_PATH = 'delete';
const ITEM_EDIT_MOVE_PATH = 'move';
/**
* Routing module that handles the routing for the Edit Item page administrator functionality
@@ -50,6 +53,11 @@ const ITEM_EDIT_DELETE_PATH = 'delete';
component: ItemMetadataComponent,
data: { title: 'item.edit.tabs.metadata.title' }
},
{
path: 'relationships',
component: ItemRelationshipsComponent,
data: { title: 'item.edit.tabs.relationships.title' }
},
{
path: 'view',
/* TODO - change when view page exists */
@@ -98,6 +106,14 @@ const ITEM_EDIT_DELETE_PATH = 'delete';
resolve: {
item: ItemPageResolver
}
},
{
path: ITEM_EDIT_MOVE_PATH,
component: ItemMoveComponent,
data: { title: 'item.edit.move.title' },
resolve: {
item: ItemPageResolver
}
}])
],
providers: [

View File

@@ -1 +0,0 @@
@import '../../../../styles/variables.scss';

View File

@@ -17,6 +17,7 @@ import { By } from '@angular/platform-browser';
import { ItemDeleteComponent } from './item-delete.component';
import { getItemEditPath } from '../../item-page-routing.module';
import { RestResponse } from '../../../core/cache/response.models';
import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils';
let comp: ItemDeleteComponent;
let fixture: ComponentFixture<ItemDeleteComponent>;
@@ -49,7 +50,7 @@ describe('ItemDeleteComponent', () => {
routeStub = {
data: observableOf({
item: new RemoteData(false, false, true, null, mockItem)
item: createSuccessfulRemoteDataObject(mockItem)
})
};

View File

@@ -4,7 +4,7 @@
<span>{{metadata?.key?.split('.').join('.&#8203;')}}</span>
</div>
<div *ngIf="(editable | async)" class="field-container">
<ds-input-suggestions [suggestions]="(metadataFieldSuggestions | async)"
<ds-filter-input-suggestions [suggestions]="(metadataFieldSuggestions | async)"
[(ngModel)]="metadata.key"
(submitSuggestion)="update(suggestionControl)"
(clickSuggestion)="update(suggestionControl)"
@@ -16,7 +16,7 @@
[valid]="(valid | async) !== false"
dsAutoFocus autoFocusSelector=".suggestion_input"
[ngModelOptions]="{standalone: true}"
></ds-input-suggestions>
></ds-filter-input-suggestions>
</div>
<small class="text-danger"
*ngIf="(valid | async) === false">{{"item.edit.metadata.metadatafield.invalid" | translate}}</small>

View File

@@ -1,4 +1,3 @@
@import '../../../../../styles/variables.scss';
.btn[disabled] {
color: $gray-600;
border-color: $gray-600;

View File

@@ -6,17 +6,18 @@ import { ObjectUpdatesService } from '../../../../core/data/object-updates/objec
import { of as observableOf } from 'rxjs';
import { RemoteData } from '../../../../core/data/remote-data';
import { PaginatedList } from '../../../../core/data/paginated-list';
import { MetadataField } from '../../../../core/metadata/metadatafield.model';
import { By } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { SharedModule } from '../../../../shared/shared.module';
import { getTestScheduler } from 'jasmine-marbles';
import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model';
import { TestScheduler } from 'rxjs/testing';
import { MetadataSchema } from '../../../../core/metadata/metadataschema.model';
import { FieldChangeType } from '../../../../core/data/object-updates/object-updates.actions';
import { TranslateModule } from '@ngx-translate/core';
import { MetadatumViewModel } from '../../../../core/shared/metadata.models';
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils';
import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model';
let comp: EditInPlaceFieldComponent;
let fixture: ComponentFixture<EditInPlaceFieldComponent>;
@@ -59,7 +60,7 @@ describe('EditInPlaceFieldComponent', () => {
paginatedMetadataFields = new PaginatedList(undefined, [mdField1, mdField2, mdField3]);
metadataFieldService = jasmine.createSpyObj({
queryMetadataFields: observableOf(new RemoteData(false, false, true, undefined, paginatedMetadataFields)),
queryMetadataFields: createSuccessfulRemoteDataObject$(paginatedMetadataFields),
});
objectUpdatesService = jasmine.createSpyObj('objectUpdatesService',
{

Some files were not shown because too many files have changed in this diff Show More