mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Merge branch 'master' into w2p-64574_Item-page-entities
Conflicts: src/app/core/data/relationship.service.spec.ts
This commit is contained in:
37
.travis.yml
37
.travis.yml
@@ -1,10 +1,44 @@
|
|||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
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
|
||||||
|
|
||||||
|
install:
|
||||||
|
# Start up DSpace 7 using the entities database dump
|
||||||
|
- docker-compose -f ./docker/docker-compose-travis.yml up -d
|
||||||
|
# Use the dspace-cli image to populate the assetstore. Trigger a discovery and oai update
|
||||||
|
- docker-compose -f ./docker/cli.yml -f ./docker/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 ./docker/docker-compose-travis.yml down
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- google-chrome
|
- google-chrome
|
||||||
packages:
|
packages:
|
||||||
|
- dpkg
|
||||||
- google-chrome-stable
|
- google-chrome-stable
|
||||||
|
|
||||||
language: node_js
|
language: node_js
|
||||||
@@ -18,9 +52,6 @@ cache:
|
|||||||
|
|
||||||
bundler_args: --retry 5
|
bundler_args: --retry 5
|
||||||
|
|
||||||
install:
|
|
||||||
- travis_retry yarn install
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Use Chromium instead of Chrome.
|
# Use Chromium instead of Chrome.
|
||||||
- export CHROME_BIN=chromium-browser
|
- export CHROME_BIN=chromium-browser
|
||||||
|
@@ -131,6 +131,11 @@ yarn run clean:prod
|
|||||||
yarn run clean:dist
|
yarn run clean:dist
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Running the application with Docker
|
||||||
|
-----------------------------------
|
||||||
|
See [Docker Runtime Options](docker/README.md)
|
||||||
|
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
|
// This configuration is currently only being used for unit tests, end-to-end tests use environment.dev.ts
|
||||||
module.exports = {
|
module.exports = {
|
||||||
theme: {
|
|
||||||
name: 'default',
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
79
docker/README.md
Normal file
79
docker/README.md
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
# Docker Compose files
|
||||||
|
|
||||||
|
## docker directory
|
||||||
|
- docker-compose.yml
|
||||||
|
- Starts DSpace Angular with Docker Compose from the current branch. This file assumes that a DSpace 7 REST instance will also be started in Docker.
|
||||||
|
- docker-compose-rest.yml
|
||||||
|
- Runs a published instance of the DSpace 7 REST API - persists data in Docker volumes
|
||||||
|
- docker-compose-travis.yml
|
||||||
|
- Runs a published instance of the DSpace 7 REST API for CI testing. The database is re-populated from a SQL dump on each startup.
|
||||||
|
- cli.yml
|
||||||
|
- Docker compose file that provides a DSpace CLI container to work with a running DSpace REST container.
|
||||||
|
- cli.assetstore.yml
|
||||||
|
- Docker compose file that will download and install data into a DSpace REST assetstore. This script points to a default dataset that will be utilized for CI testing.
|
||||||
|
- environment.dev.js
|
||||||
|
- Environment file for running DSpace Angular in Docker
|
||||||
|
- local.cfg
|
||||||
|
- Environment file for running the DSpace 7 REST API in Docker.
|
||||||
|
|
||||||
|
|
||||||
|
## To refresh / pull DSpace images from Dockerhub
|
||||||
|
```
|
||||||
|
docker-compose -f docker/docker-compose.yml pull
|
||||||
|
```
|
||||||
|
|
||||||
|
## To build DSpace images using code in your branch
|
||||||
|
```
|
||||||
|
docker-compose -f docker/docker-compose.yml build
|
||||||
|
```
|
||||||
|
|
||||||
|
## To start DSpace (REST and Angular) from your branch
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose -p d7 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run DSpace REST and DSpace Angular from local branches.
|
||||||
|
_The system will be started in 2 steps. Each step shares the same docker network._
|
||||||
|
|
||||||
|
From DSpace/DSpace (build as needed)
|
||||||
|
```
|
||||||
|
docker-compose -p d7 up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
From DSpace/DSpace-angular
|
||||||
|
```
|
||||||
|
docker-compose -p d7 -f docker/docker-compose.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## Ingest test data from AIPDIR
|
||||||
|
|
||||||
|
Create an administrator
|
||||||
|
```
|
||||||
|
docker-compose -p d7 -f docker/cli.yml run --rm dspace-cli create-administrator -e test@test.edu -f admin -l user -p admin -c en
|
||||||
|
```
|
||||||
|
|
||||||
|
Load content from AIP files
|
||||||
|
```
|
||||||
|
docker-compose -p d7 -f docker/cli.yml -f ./docker/cli.ingest.yml run --rm dspace-cli
|
||||||
|
```
|
||||||
|
|
||||||
|
## Alternative Ingest - Use Entities dataset
|
||||||
|
_Delete your docker volumes or use a unique project (-p) name_
|
||||||
|
|
||||||
|
Start DSpace with Database Content from a database dump
|
||||||
|
```
|
||||||
|
docker-compose -p d7 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f docker/db.entities.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
Load assetstore content and trigger a re-index of the repository
|
||||||
|
```
|
||||||
|
docker-compose -p d7 -f docker/cli.yml -f docker/cli.assetstore.yml run --rm dspace-cli
|
||||||
|
```
|
||||||
|
|
||||||
|
## End to end testing of the rest api (runs in travis).
|
||||||
|
_In this instance, only the REST api runs in Docker using the Entities dataset. Travis will perform CI testing of Angular using Node to drive the tests._
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose -p d7ci -f docker/docker-compose-travis.yml up -d
|
||||||
|
```
|
23
docker/cli.assetstore.yml
Normal file
23
docker/cli.assetstore.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
dspacenet:
|
||||||
|
|
||||||
|
services:
|
||||||
|
dspace-cli:
|
||||||
|
networks:
|
||||||
|
dspacenet: {}
|
||||||
|
environment:
|
||||||
|
- LOADASSETS=https://www.dropbox.com/s/zv7lj8j2lp3egjs/assetstore.tar.gz?dl=1
|
||||||
|
entrypoint:
|
||||||
|
- /bin/bash
|
||||||
|
- '-c'
|
||||||
|
- |
|
||||||
|
if [ ! -z $${LOADASSETS} ]
|
||||||
|
then
|
||||||
|
curl $${LOADASSETS} -L -s --output /tmp/assetstore.tar.gz
|
||||||
|
cd /dspace
|
||||||
|
tar xvfz /tmp/assetstore.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
/dspace/bin/dspace index-discovery
|
32
docker/cli.ingest.yml
Normal file
32
docker/cli.ingest.yml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#
|
||||||
|
# The contents of this file are subject to the license and copyright
|
||||||
|
# detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
|
# tree and available online at
|
||||||
|
#
|
||||||
|
# http://www.dspace.org/license/
|
||||||
|
#
|
||||||
|
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
dspace-cli:
|
||||||
|
environment:
|
||||||
|
- AIPZIP=https://github.com/DSpace-Labs/AIP-Files/raw/master/dogAndReport.zip
|
||||||
|
- ADMIN_EMAIL=test@test.edu
|
||||||
|
- AIPDIR=/tmp/aip-dir
|
||||||
|
entrypoint:
|
||||||
|
- /bin/bash
|
||||||
|
- '-c'
|
||||||
|
- |
|
||||||
|
rm -rf $${AIPDIR}
|
||||||
|
mkdir $${AIPDIR} /dspace/upload
|
||||||
|
cd $${AIPDIR}
|
||||||
|
pwd
|
||||||
|
curl $${AIPZIP} -L -s --output aip.zip
|
||||||
|
unzip aip.zip
|
||||||
|
cd $${AIPDIR}
|
||||||
|
|
||||||
|
/dspace/bin/dspace packager -r -a -t AIP -e $${ADMIN_EMAIL} -f -u SITE*.zip
|
||||||
|
/dspace/bin/dspace database update-sequences
|
||||||
|
|
||||||
|
/dspace/bin/dspace index-discovery
|
22
docker/cli.yml
Normal file
22
docker/cli.yml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
dspace-cli:
|
||||||
|
image: "${DOCKER_OWNER:-dspace}/dspace-cli:${DSPACE_VER:-dspace-7_x}"
|
||||||
|
container_name: dspace-cli
|
||||||
|
#environment:
|
||||||
|
volumes:
|
||||||
|
- "assetstore:/dspace/assetstore"
|
||||||
|
- "./local.cfg:/dspace/config/local.cfg"
|
||||||
|
entrypoint: /dspace/bin/dspace
|
||||||
|
command: help
|
||||||
|
networks:
|
||||||
|
- dspacenet
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
assetstore:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
dspacenet:
|
16
docker/db.entities.yml
Normal file
16
docker/db.entities.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#
|
||||||
|
# The contents of this file are subject to the license and copyright
|
||||||
|
# detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
|
# tree and available online at
|
||||||
|
#
|
||||||
|
# http://www.dspace.org/license/
|
||||||
|
#
|
||||||
|
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
dspacedb:
|
||||||
|
image: dspace/dspace-postgres-pgcrypto:loadsql
|
||||||
|
environment:
|
||||||
|
# Double underbars in env names will be replaced with periods for apache commons
|
||||||
|
- LOADSQL=https://www.dropbox.com/s/xh3ack0vg0922p2/configurable-entities-2019-05-08.sql?dl=1
|
59
docker/docker-compose-rest.yml
Normal file
59
docker/docker-compose-rest.yml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
networks:
|
||||||
|
dspacenet:
|
||||||
|
services:
|
||||||
|
dspace:
|
||||||
|
container_name: dspace
|
||||||
|
depends_on:
|
||||||
|
- dspacedb
|
||||||
|
image: dspace/dspace:dspace-7_x-jdk8-test
|
||||||
|
networks:
|
||||||
|
dspacenet:
|
||||||
|
ports:
|
||||||
|
- published: 8080
|
||||||
|
target: 8080
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- assetstore:/dspace/assetstore
|
||||||
|
- "./local.cfg:/dspace/config/local.cfg"
|
||||||
|
# Ensure that the database is ready before starting tomcat
|
||||||
|
entrypoint:
|
||||||
|
- /bin/bash
|
||||||
|
- '-c'
|
||||||
|
- |
|
||||||
|
/dspace/bin/dspace database migrate
|
||||||
|
catalina.sh run
|
||||||
|
dspacedb:
|
||||||
|
container_name: dspacedb
|
||||||
|
image: dspace/dspace-postgres-pgcrypto
|
||||||
|
environment:
|
||||||
|
PGDATA: /pgdata
|
||||||
|
networks:
|
||||||
|
dspacenet:
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- pgdata:/pgdata
|
||||||
|
dspacesolr:
|
||||||
|
container_name: dspacesolr
|
||||||
|
image: dspace/dspace-solr
|
||||||
|
networks:
|
||||||
|
dspacenet:
|
||||||
|
ports:
|
||||||
|
- published: 8983
|
||||||
|
target: 8983
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- solr_authority:/opt/solr/server/solr/authority/data
|
||||||
|
- solr_oai:/opt/solr/server/solr/oai/data
|
||||||
|
- solr_search:/opt/solr/server/solr/search/data
|
||||||
|
- solr_statistics:/opt/solr/server/solr/statistics/data
|
||||||
|
version: '3.7'
|
||||||
|
volumes:
|
||||||
|
assetstore:
|
||||||
|
pgdata:
|
||||||
|
solr_authority:
|
||||||
|
solr_oai:
|
||||||
|
solr_search:
|
||||||
|
solr_statistics:
|
53
docker/docker-compose-travis.yml
Normal file
53
docker/docker-compose-travis.yml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
networks:
|
||||||
|
dspacenet:
|
||||||
|
services:
|
||||||
|
dspace:
|
||||||
|
container_name: dspace
|
||||||
|
depends_on:
|
||||||
|
- dspacedb
|
||||||
|
image: dspace/dspace:dspace-7_x-jdk8-test
|
||||||
|
networks:
|
||||||
|
dspacenet:
|
||||||
|
ports:
|
||||||
|
- published: 8080
|
||||||
|
target: 8080
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- assetstore:/dspace/assetstore
|
||||||
|
- "./local.cfg:/dspace/config/local.cfg"
|
||||||
|
dspacedb:
|
||||||
|
container_name: dspacedb
|
||||||
|
environment:
|
||||||
|
LOADSQL: https://www.dropbox.com/s/xh3ack0vg0922p2/configurable-entities-2019-05-08.sql?dl=1
|
||||||
|
PGDATA: /pgdata
|
||||||
|
image: dspace/dspace-postgres-pgcrypto:loadsql
|
||||||
|
networks:
|
||||||
|
dspacenet:
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- pgdata:/pgdata
|
||||||
|
dspacesolr:
|
||||||
|
container_name: dspacesolr
|
||||||
|
image: dspace/dspace-solr
|
||||||
|
networks:
|
||||||
|
dspacenet:
|
||||||
|
ports:
|
||||||
|
- published: 8983
|
||||||
|
target: 8983
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- solr_authority:/opt/solr/server/solr/authority/data
|
||||||
|
- solr_oai:/opt/solr/server/solr/oai/data
|
||||||
|
- solr_search:/opt/solr/server/solr/search/data
|
||||||
|
- solr_statistics:/opt/solr/server/solr/statistics/data
|
||||||
|
version: '3.7'
|
||||||
|
volumes:
|
||||||
|
assetstore:
|
||||||
|
pgdata:
|
||||||
|
solr_authority:
|
||||||
|
solr_oai:
|
||||||
|
solr_search:
|
||||||
|
solr_statistics:
|
26
docker/docker-compose.yml
Normal file
26
docker/docker-compose.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
version: '3.7'
|
||||||
|
networks:
|
||||||
|
dspacenet:
|
||||||
|
services:
|
||||||
|
dspace-angular:
|
||||||
|
container_name: dspace-angular
|
||||||
|
environment:
|
||||||
|
DSPACE_HOST: dspace-angular
|
||||||
|
DSPACE_NAMESPACE: /
|
||||||
|
DSPACE_PORT: '3000'
|
||||||
|
DSPACE_SSL: "false"
|
||||||
|
image: dspace/dspace-angular:latest
|
||||||
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
networks:
|
||||||
|
dspacenet:
|
||||||
|
ports:
|
||||||
|
- published: 3000
|
||||||
|
target: 3000
|
||||||
|
- published: 9876
|
||||||
|
target: 9876
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- ./environment.dev.js:/app/config/environment.dev.js
|
16
docker/environment.dev.js
Normal file
16
docker/environment.dev.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* The contents of this file are subject to the license and copyright
|
||||||
|
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
|
* tree and available online at
|
||||||
|
*
|
||||||
|
* http://www.dspace.org/license/
|
||||||
|
*/
|
||||||
|
module.exports = {
|
||||||
|
rest: {
|
||||||
|
ssl: false,
|
||||||
|
host: 'localhost',
|
||||||
|
port: 8080,
|
||||||
|
// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
|
||||||
|
nameSpace: '/server/api'
|
||||||
|
}
|
||||||
|
};
|
6
docker/local.cfg
Normal file
6
docker/local.cfg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
dspace.dir=/dspace
|
||||||
|
db.url=jdbc:postgresql://dspacedb:5432/dspace
|
||||||
|
dspace.hostname=dspace
|
||||||
|
dspace.baseUrl=http://localhost:8080
|
||||||
|
dspace.name=DSpace Started with Docker Compose
|
||||||
|
solr.server=http://dspacesolr:8983/solr
|
14
package.json
14
package.json
@@ -10,6 +10,9 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": "8.* || >= 10.*"
|
"node": "8.* || >= 10.*"
|
||||||
},
|
},
|
||||||
|
"resolutions": {
|
||||||
|
"set-value": ">= 2.0.1"
|
||||||
|
},
|
||||||
"scripts": {
|
"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",
|
"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",
|
||||||
"clean:coverage": "rimraf coverage",
|
"clean:coverage": "rimraf coverage",
|
||||||
@@ -22,10 +25,10 @@
|
|||||||
"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: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",
|
"clean": "yarn run clean:prod && yarn run clean:node",
|
||||||
"prebuild": "yarn run clean:bld && yarn run clean:dist",
|
"prebuild": "yarn run clean:bld && yarn run clean:dist",
|
||||||
"prebuild:aot": "yarn run prebuild",
|
"prebuild:ci": "yarn run prebuild",
|
||||||
"prebuild:prod": "yarn run prebuild",
|
"prebuild:prod": "yarn run prebuild",
|
||||||
"build": "node ./scripts/webpack.js --progress --mode development",
|
"build": "node ./scripts/webpack.js --progress --mode development",
|
||||||
"build:aot": "yarn run syncbuilddir && node ./scripts/webpack.js --env.aot --env.server --mode development && node ./scripts/webpack.js --env.aot --env.client --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",
|
"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",
|
"postbuild:prod": "yarn run rollup",
|
||||||
"rollup": "rollup -c rollup.config.js",
|
"rollup": "rollup -c rollup.config.js",
|
||||||
@@ -51,10 +54,13 @@
|
|||||||
"debug:server": "node-nightly --inspect --debug-brk dist/server.js",
|
"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": "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",
|
"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",
|
"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",
|
"protractor": "node node_modules/protractor/bin/protractor",
|
||||||
"pree2e": "yarn run webdriver:update",
|
"pree2e": "yarn run webdriver:update",
|
||||||
"e2e": "yarn run protractor",
|
"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": "karma start --single-run",
|
||||||
"test:headless": "karma start --single-run --browsers ChromeHeadless",
|
"test:headless": "karma start --single-run --browsers ChromeHeadless",
|
||||||
"test:watch": "karma start --no-single-run --auto-watch",
|
"test:watch": "karma start --no-single-run --auto-watch",
|
||||||
@@ -109,6 +115,7 @@
|
|||||||
"https": "1.0.0",
|
"https": "1.0.0",
|
||||||
"js-cookie": "2.2.0",
|
"js-cookie": "2.2.0",
|
||||||
"js.clone": "0.0.3",
|
"js.clone": "0.0.3",
|
||||||
|
"json5": "^2.1.0",
|
||||||
"jsonschema": "1.2.2",
|
"jsonschema": "1.2.2",
|
||||||
"jwt-decode": "^2.2.0",
|
"jwt-decode": "^2.2.0",
|
||||||
"methods": "1.1.2",
|
"methods": "1.1.2",
|
||||||
@@ -154,6 +161,7 @@
|
|||||||
"@types/hammerjs": "2.0.35",
|
"@types/hammerjs": "2.0.35",
|
||||||
"@types/jasmine": "^2.8.6",
|
"@types/jasmine": "^2.8.6",
|
||||||
"@types/js-cookie": "2.1.0",
|
"@types/js-cookie": "2.1.0",
|
||||||
|
"@types/json5": "^0.0.30",
|
||||||
"@types/lodash": "^4.14.110",
|
"@types/lodash": "^4.14.110",
|
||||||
"@types/memory-cache": "0.2.0",
|
"@types/memory-cache": "0.2.0",
|
||||||
"@types/mime": "2.0.0",
|
"@types/mime": "2.0.0",
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
"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.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.link.home-page": "Přejít na domovskou stránku",
|
||||||
"404.page-not-found": "stránka nenalezena",
|
"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.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.no-items": "Žádné formáty souborů.",
|
||||||
"admin.registries.bitstream-formats.formats.table.internal": "interní",
|
"admin.registries.bitstream-formats.formats.table.internal": "interní",
|
||||||
@@ -13,29 +14,36 @@
|
|||||||
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Úroveň podpory",
|
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Úroveň podpory",
|
||||||
"admin.registries.bitstream-formats.head": "Registr formátů souborů",
|
"admin.registries.bitstream-formats.head": "Registr formátů souborů",
|
||||||
"admin.registries.bitstream-formats.title": "DSpace Angular :: 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 kvalifikový Dublin Core.",
|
|
||||||
|
"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.head": "Registr metadat",
|
||||||
"admin.registries.metadata.schemas.no-items": "Žádná schémata metadat.",
|
"admin.registries.metadata.schemas.no-items": "Žádná schémata metadat.",
|
||||||
"admin.registries.metadata.schemas.table.id": "ID",
|
"admin.registries.metadata.schemas.table.id": "ID",
|
||||||
"admin.registries.metadata.schemas.table.name": "Název",
|
"admin.registries.metadata.schemas.table.name": "Název",
|
||||||
"admin.registries.metadata.schemas.table.namespace": "Jmenný prostor",
|
"admin.registries.metadata.schemas.table.namespace": "Jmenný prostor",
|
||||||
"admin.registries.metadata.title": "DSpace Angular :: Registr metadat",
|
"admin.registries.metadata.title": "DSpace Angular :: Registr metadat",
|
||||||
|
|
||||||
"admin.registries.schema.description": "Toto je schéma metadat pro „{{namespace}}“.",
|
"admin.registries.schema.description": "Toto je schéma metadat pro „{{namespace}}“.",
|
||||||
"admin.registries.schema.fields.head": "Pole schématu metadat",
|
"admin.registries.schema.fields.head": "Pole schématu metadat",
|
||||||
"admin.registries.schema.fields.no-items": "Žádná metadatová pole.",
|
"admin.registries.schema.fields.no-items": "Žádná metadatová pole.",
|
||||||
"admin.registries.schema.fields.table.field": "Pole",
|
"admin.registries.schema.fields.table.field": "Pole",
|
||||||
"admin.registries.schema.fields.table.scopenote": "Poznámka o rozsahu",
|
"admin.registries.schema.fields.table.scopenote": "Poznámka o rozsahu",
|
||||||
"admin.registries.schema.head": "Metadata Schema",
|
"admin.registries.schema.head": "Schéma metadat",
|
||||||
"admin.registries.schema.title": "DSpace Angular :: Registr schémat metadat",
|
"admin.registries.schema.title": "DSpace Angular :: Registr schémat metadat",
|
||||||
|
|
||||||
"auth.errors.invalid-user": "Neplatná e-mailová adresa nebo heslo.",
|
"auth.errors.invalid-user": "Neplatná e-mailová adresa nebo heslo.",
|
||||||
"auth.messages.expired": "Vaše relace vypršela. Prosím, znova se přihlaste.",
|
"auth.messages.expired": "Vaše relace vypršela. Prosím, znova se přihlaste.",
|
||||||
|
|
||||||
"browse.title": "Prohlížíte {{ collection }} dle {{ field }} {{ value }}",
|
"browse.title": "Prohlížíte {{ collection }} dle {{ field }} {{ value }}",
|
||||||
|
|
||||||
"collection.page.browse.recent.head": "Poslední příspěvky",
|
"collection.page.browse.recent.head": "Poslední příspěvky",
|
||||||
"collection.page.license": "Licence",
|
"collection.page.license": "Licence",
|
||||||
"collection.page.news": "Novinky",
|
"collection.page.news": "Novinky",
|
||||||
|
|
||||||
"community.page.license": "Licence",
|
"community.page.license": "Licence",
|
||||||
"community.page.news": "Novinky",
|
"community.page.news": "Novinky",
|
||||||
"community.sub-collection-list.head": "Kolekce v této komunitě",
|
"community.sub-collection-list.head": "Kolekce v této komunitě",
|
||||||
|
|
||||||
"error.browse-by": "Chyba během stahování záznamů",
|
"error.browse-by": "Chyba během stahování záznamů",
|
||||||
"error.collection": "Chyba během stahování kolekce",
|
"error.collection": "Chyba během stahování kolekce",
|
||||||
"error.community": "Chyba během stahování komunity",
|
"error.community": "Chyba během stahování komunity",
|
||||||
@@ -48,9 +56,11 @@
|
|||||||
"error.top-level-communities": "Chyba během stahování komunit nejvyšší úrovně",
|
"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.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 }}.",
|
"error.validation.pattern": "Tento vstup je omezen dle vzoru: {{ pattern }}.",
|
||||||
|
|
||||||
"footer.copyright": "copyright © 2002-{{ year }}",
|
"footer.copyright": "copyright © 2002-{{ year }}",
|
||||||
"footer.link.dspace": "software DSpace",
|
"footer.link.dspace": "software DSpace",
|
||||||
"footer.link.duraspace": "DuraSpace",
|
"footer.link.duraspace": "DuraSpace",
|
||||||
|
|
||||||
"form.cancel": "Zrušit",
|
"form.cancel": "Zrušit",
|
||||||
"form.first-name": "Křestní jméno",
|
"form.first-name": "Křestní jméno",
|
||||||
"form.group-collapse": "Sbalit",
|
"form.group-collapse": "Sbalit",
|
||||||
@@ -64,11 +74,13 @@
|
|||||||
"form.remove": "Smazat",
|
"form.remove": "Smazat",
|
||||||
"form.search": "Hledat",
|
"form.search": "Hledat",
|
||||||
"form.submit": "Odeslat",
|
"form.submit": "Odeslat",
|
||||||
|
|
||||||
"home.description": "",
|
"home.description": "",
|
||||||
"home.title": "DSpace Angular :: Domů",
|
"home.title": "DSpace Angular :: Domů",
|
||||||
"home.top-level-communities.head": "Komunity v DSpace",
|
"home.top-level-communities.head": "Komunity v DSpace",
|
||||||
"home.top-level-communities.help": "Vybráním komunity můžete prohlížet její kolekce.",
|
"home.top-level-communities.help": "Vybráním komunity můžete prohlížet její kolekce.",
|
||||||
"item.page.abstract": "Abstract",
|
|
||||||
|
"item.page.abstract": "Abstrakt",
|
||||||
"item.page.author": "Autor",
|
"item.page.author": "Autor",
|
||||||
"item.page.collections": "Kolekce",
|
"item.page.collections": "Kolekce",
|
||||||
"item.page.date": "Datum",
|
"item.page.date": "Datum",
|
||||||
@@ -81,6 +93,7 @@
|
|||||||
"item.page.link.full": "Úplný záznam",
|
"item.page.link.full": "Úplný záznam",
|
||||||
"item.page.link.simple": "Minimální záznam",
|
"item.page.link.simple": "Minimální záznam",
|
||||||
"item.page.uri": "URI",
|
"item.page.uri": "URI",
|
||||||
|
|
||||||
"loading.browse-by": "Načítají se záznamy...",
|
"loading.browse-by": "Načítají se záznamy...",
|
||||||
"loading.collection": "Načítá se kolekce...",
|
"loading.collection": "Načítá se kolekce...",
|
||||||
"loading.community": "Načítá se komunita...",
|
"loading.community": "Načítá se komunita...",
|
||||||
@@ -91,6 +104,7 @@
|
|||||||
"loading.search-results": "Načítají se výsledky hledání...",
|
"loading.search-results": "Načítají se výsledky hledání...",
|
||||||
"loading.sub-collections": "Načítají se subkolekce...",
|
"loading.sub-collections": "Načítají se subkolekce...",
|
||||||
"loading.top-level-communities": "Načítají se komunity nejvyšší úrovně...",
|
"loading.top-level-communities": "Načítají se komunity nejvyšší úrovně...",
|
||||||
|
|
||||||
"login.form.email": "E-mailová adresa",
|
"login.form.email": "E-mailová adresa",
|
||||||
"login.form.forgot-password": "Zapomněli jste své heslo?",
|
"login.form.forgot-password": "Zapomněli jste své heslo?",
|
||||||
"login.form.header": "Prosím, přihlaste se do DSpace",
|
"login.form.header": "Prosím, přihlaste se do DSpace",
|
||||||
@@ -98,22 +112,29 @@
|
|||||||
"login.form.password": "Heslo",
|
"login.form.password": "Heslo",
|
||||||
"login.form.submit": "Přihlásit se",
|
"login.form.submit": "Přihlásit se",
|
||||||
"login.title": "Přihlásit se",
|
"login.title": "Přihlásit se",
|
||||||
|
|
||||||
"logout.form.header": "Odhlásit se z DSpace",
|
"logout.form.header": "Odhlásit se z DSpace",
|
||||||
"logout.form.submit": "Odhlásit se",
|
"logout.form.submit": "Odhlásit se",
|
||||||
"logout.title": "Odhlásit se",
|
"logout.title": "Odhlásit se",
|
||||||
|
|
||||||
"nav.home": "Domů",
|
"nav.home": "Domů",
|
||||||
"nav.login": "Přihlásit se",
|
"nav.login": "Přihlásit se",
|
||||||
"nav.logout": "Odhlásit se",
|
"nav.logout": "Odhlásit se",
|
||||||
|
|
||||||
"pagination.results-per-page": "Výsledků na stránku",
|
"pagination.results-per-page": "Výsledků na stránku",
|
||||||
"pagination.showing.detail": "{{ range }} z {{ total }}",
|
"pagination.showing.detail": "{{ range }} z {{ total }}",
|
||||||
"pagination.showing.label": "Zobrazují se záznamy ",
|
"pagination.showing.label": "Zobrazují se záznamy ",
|
||||||
"pagination.sort-direction": "Seřazení",
|
"pagination.sort-direction": "Seřazení",
|
||||||
|
|
||||||
"search.description": "",
|
"search.description": "",
|
||||||
|
"search.title": "DSpace Angular :: Hledat",
|
||||||
|
|
||||||
"search.filters.applied.f.author": "Autor",
|
"search.filters.applied.f.author": "Autor",
|
||||||
"search.filters.applied.f.dateIssued.max": "Do data",
|
"search.filters.applied.f.dateIssued.max": "Do data",
|
||||||
"search.filters.applied.f.dateIssued.min": "Od data",
|
"search.filters.applied.f.dateIssued.min": "Od data",
|
||||||
"search.filters.applied.f.has_content_in_original_bundle": "Má soubory",
|
"search.filters.applied.f.has_content_in_original_bundle": "Má soubory",
|
||||||
"search.filters.applied.f.subject": "Předmět",
|
"search.filters.applied.f.subject": "Předmět",
|
||||||
|
|
||||||
"search.filters.filter.author.head": "Autor",
|
"search.filters.filter.author.head": "Autor",
|
||||||
"search.filters.filter.author.placeholder": "Jméno autora",
|
"search.filters.filter.author.placeholder": "Jméno autora",
|
||||||
"search.filters.filter.dateIssued.head": "Datum",
|
"search.filters.filter.dateIssued.head": "Datum",
|
||||||
@@ -126,12 +147,16 @@
|
|||||||
"search.filters.filter.show-more": "Zobrazit více",
|
"search.filters.filter.show-more": "Zobrazit více",
|
||||||
"search.filters.filter.subject.head": "Předmět",
|
"search.filters.filter.subject.head": "Předmět",
|
||||||
"search.filters.filter.subject.placeholder": "Předmět",
|
"search.filters.filter.subject.placeholder": "Předmět",
|
||||||
|
|
||||||
"search.filters.head": "Filtry",
|
"search.filters.head": "Filtry",
|
||||||
"search.filters.reset": "Obnovit filtry",
|
"search.filters.reset": "Obnovit filtry",
|
||||||
|
|
||||||
"search.form.search": "Hledat",
|
"search.form.search": "Hledat",
|
||||||
"search.form.search_dspace": "Hledat v DSpace",
|
"search.form.search_dspace": "Hledat v DSpace",
|
||||||
|
|
||||||
"search.results.head": "Výsledky hledání",
|
"search.results.head": "Výsledky hledání",
|
||||||
"search.results.no-results": "Nebyli nalezeny žádné výsledky",
|
"search.results.no-results": "Nebyli nalezeny žádné výsledky",
|
||||||
|
|
||||||
"search.sidebar.close": "Zpět na výsledky",
|
"search.sidebar.close": "Zpět na výsledky",
|
||||||
"search.sidebar.filters.title": "Filtry",
|
"search.sidebar.filters.title": "Filtry",
|
||||||
"search.sidebar.open": "Vyhledávací nástroje",
|
"search.sidebar.open": "Vyhledávací nástroje",
|
||||||
@@ -139,11 +164,13 @@
|
|||||||
"search.sidebar.settings.rpp": "Výsledků na stránku",
|
"search.sidebar.settings.rpp": "Výsledků na stránku",
|
||||||
"search.sidebar.settings.sort-by": "Řadit dle",
|
"search.sidebar.settings.sort-by": "Řadit dle",
|
||||||
"search.sidebar.settings.title": "Nastavení",
|
"search.sidebar.settings.title": "Nastavení",
|
||||||
"search.title": "DSpace Angular :: Hledat",
|
|
||||||
"search.view-switch.show-grid": "Zobrazit mřížku",
|
"search.view-switch.show-grid": "Zobrazit mřížku",
|
||||||
"search.view-switch.show-list": "Zobrazit seznam",
|
"search.view-switch.show-list": "Zobrazit seznam",
|
||||||
|
|
||||||
"sorting.dc.title.ASC": "Název vzestupně",
|
"sorting.dc.title.ASC": "Název vzestupně",
|
||||||
"sorting.dc.title.DESC": "Název sestupně",
|
"sorting.dc.title.DESC": "Název sestupně",
|
||||||
"sorting.score.DESC": "Relevance",
|
"sorting.score.DESC": "Relevance",
|
||||||
"title": "DSpace"
|
|
||||||
|
"title": "DSpace",
|
||||||
}
|
}
|
@@ -2,6 +2,7 @@
|
|||||||
"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.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.link.home-page": "Zurück zur Startseite",
|
||||||
"404.page-not-found": "Seite nicht gefunden",
|
"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.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.no-items": "Es gibt keine Formate in dieser Referenzliste.",
|
||||||
"admin.registries.bitstream-formats.formats.table.internal": "intern",
|
"admin.registries.bitstream-formats.formats.table.internal": "intern",
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Unterstützungsgrad",
|
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Unterstützungsgrad",
|
||||||
"admin.registries.bitstream-formats.head": "Referenzliste der Dateiformate",
|
"admin.registries.bitstream-formats.head": "Referenzliste der Dateiformate",
|
||||||
"admin.registries.bitstream-formats.title": "DSpace Angular :: 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.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.head": "Metadatenreferenzliste",
|
||||||
"admin.registries.metadata.schemas.no-items": "Es gbit keine Metadatenschemata.",
|
"admin.registries.metadata.schemas.no-items": "Es gbit keine Metadatenschemata.",
|
||||||
@@ -20,6 +22,7 @@
|
|||||||
"admin.registries.metadata.schemas.table.name": "Name",
|
"admin.registries.metadata.schemas.table.name": "Name",
|
||||||
"admin.registries.metadata.schemas.table.namespace": "Namensraum",
|
"admin.registries.metadata.schemas.table.namespace": "Namensraum",
|
||||||
"admin.registries.metadata.title": "DSpace Angular :: Metadatenreferenzliste",
|
"admin.registries.metadata.title": "DSpace Angular :: Metadatenreferenzliste",
|
||||||
|
|
||||||
"admin.registries.schema.description": "Dies ist das Metadatenschema für \"{{namespace}}\".",
|
"admin.registries.schema.description": "Dies ist das Metadatenschema für \"{{namespace}}\".",
|
||||||
"admin.registries.schema.fields.head": "Felder in diesem Schema",
|
"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.no-items": "Es gibt keine Felder in diesem Schema.",
|
||||||
@@ -27,15 +30,19 @@
|
|||||||
"admin.registries.schema.fields.table.scopenote": "Gültigkeitsbereich",
|
"admin.registries.schema.fields.table.scopenote": "Gültigkeitsbereich",
|
||||||
"admin.registries.schema.head": "Metadatenschemata",
|
"admin.registries.schema.head": "Metadatenschemata",
|
||||||
"admin.registries.schema.title": "DSpace Angular :: Referenzliste der Metadatenschemata",
|
"admin.registries.schema.title": "DSpace Angular :: Referenzliste der Metadatenschemata",
|
||||||
|
|
||||||
"auth.errors.invalid-user": "Ungültige E-Mail-Adresse oder Passwort.",
|
"auth.errors.invalid-user": "Ungültige E-Mail-Adresse oder Passwort.",
|
||||||
"auth.messages.expired": "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an.",
|
"auth.messages.expired": "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an.",
|
||||||
|
|
||||||
"browse.title": "Anzeige {{ collection }} nach {{ field }} {{ value }}",
|
"browse.title": "Anzeige {{ collection }} nach {{ field }} {{ value }}",
|
||||||
"collection.page.browse.recent.head": "Aktuellste Veröffentlichungen",
|
"collection.page.browse.recent.head": "Aktuellste Veröffentlichungen",
|
||||||
"collection.page.license": "Lizenz",
|
"collection.page.license": "Lizenz",
|
||||||
"collection.page.news": "Neuigkeiten",
|
"collection.page.news": "Neuigkeiten",
|
||||||
|
|
||||||
"community.page.license": "Lizenz",
|
"community.page.license": "Lizenz",
|
||||||
"community.page.news": "Neuigkeiten",
|
"community.page.news": "Neuigkeiten",
|
||||||
"community.sub-collection-list.head": "Sammlungen in diesem Bereich",
|
"community.sub-collection-list.head": "Sammlungen in diesem Bereich",
|
||||||
|
|
||||||
"error.browse-by": "Fehler beim Laden der Ressourcen",
|
"error.browse-by": "Fehler beim Laden der Ressourcen",
|
||||||
"error.collection": "Fehler beim Laden der Sammlung.",
|
"error.collection": "Fehler beim Laden der Sammlung.",
|
||||||
"error.community": "Fehler beim Laden des Bereiches.",
|
"error.community": "Fehler beim Laden des Bereiches.",
|
||||||
@@ -48,9 +55,11 @@
|
|||||||
"error.top-level-communities": "Fehler beim Laden der Hauptbereiche.",
|
"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.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 }}.",
|
"error.validation.pattern": "Die Eingabe kann nur folgendes Muster haben: {{ pattern }}.",
|
||||||
|
|
||||||
"footer.copyright": "Copyright © 2002-{{ year }}",
|
"footer.copyright": "Copyright © 2002-{{ year }}",
|
||||||
"footer.link.dspace": "DSpace Software",
|
"footer.link.dspace": "DSpace Software",
|
||||||
"footer.link.duraspace": "DuraSpace",
|
"footer.link.duraspace": "DuraSpace",
|
||||||
|
|
||||||
"form.cancel": "Abbrechen",
|
"form.cancel": "Abbrechen",
|
||||||
"form.first-name": "Vorname",
|
"form.first-name": "Vorname",
|
||||||
"form.group-collapse": "Weniger",
|
"form.group-collapse": "Weniger",
|
||||||
@@ -64,10 +73,12 @@
|
|||||||
"form.remove": "Löschen",
|
"form.remove": "Löschen",
|
||||||
"form.search": "Suchen",
|
"form.search": "Suchen",
|
||||||
"form.submit": "Los",
|
"form.submit": "Los",
|
||||||
|
|
||||||
"home.description": "",
|
"home.description": "",
|
||||||
"home.title": "DSpace Angular :: Startseite",
|
"home.title": "DSpace Angular :: Startseite",
|
||||||
"home.top-level-communities.head": "Bereiche in DSpace",
|
"home.top-level-communities.head": "Bereiche in DSpace",
|
||||||
"home.top-level-communities.help": "Wählen Sie einen Bereich, um seine Sammlungen einzusehen.",
|
"home.top-level-communities.help": "Wählen Sie einen Bereich, um seine Sammlungen einzusehen.",
|
||||||
|
|
||||||
"item.page.abstract": "Kurzfassung",
|
"item.page.abstract": "Kurzfassung",
|
||||||
"item.page.author": "Autor",
|
"item.page.author": "Autor",
|
||||||
"item.page.collections": "Sammlungen",
|
"item.page.collections": "Sammlungen",
|
||||||
@@ -81,6 +92,7 @@
|
|||||||
"item.page.link.full": "Vollanzeige",
|
"item.page.link.full": "Vollanzeige",
|
||||||
"item.page.link.simple": "Kurzanzeige",
|
"item.page.link.simple": "Kurzanzeige",
|
||||||
"item.page.uri": "URI",
|
"item.page.uri": "URI",
|
||||||
|
|
||||||
"loading.browse-by": "Die Ressourcen werden geladen ...",
|
"loading.browse-by": "Die Ressourcen werden geladen ...",
|
||||||
"loading.collection": "Die Sammlung wird geladen ...",
|
"loading.collection": "Die Sammlung wird geladen ...",
|
||||||
"loading.community": "Der Bereich wird geladen ...",
|
"loading.community": "Der Bereich wird geladen ...",
|
||||||
@@ -91,6 +103,7 @@
|
|||||||
"loading.search-results": "Die Suchergebnisse werden geladen ...",
|
"loading.search-results": "Die Suchergebnisse werden geladen ...",
|
||||||
"loading.sub-collections": "Die untergeordneten Sammlungen werden geladen ...",
|
"loading.sub-collections": "Die untergeordneten Sammlungen werden geladen ...",
|
||||||
"loading.top-level-communities": "Die Hauptbereiche werden geladen ...",
|
"loading.top-level-communities": "Die Hauptbereiche werden geladen ...",
|
||||||
|
|
||||||
"login.form.email": "E-Mail-Adresse",
|
"login.form.email": "E-Mail-Adresse",
|
||||||
"login.form.forgot-password": "Haben Sie Ihr Passwort vergessen?",
|
"login.form.forgot-password": "Haben Sie Ihr Passwort vergessen?",
|
||||||
"login.form.header": "Bitte Loggen Sie sich ein.",
|
"login.form.header": "Bitte Loggen Sie sich ein.",
|
||||||
@@ -98,22 +111,29 @@
|
|||||||
"login.form.password": "Passwort",
|
"login.form.password": "Passwort",
|
||||||
"login.form.submit": "Einloggen",
|
"login.form.submit": "Einloggen",
|
||||||
"login.title": "Einloggen",
|
"login.title": "Einloggen",
|
||||||
|
|
||||||
"logout.form.header": "Ausloggen aus DSpace",
|
"logout.form.header": "Ausloggen aus DSpace",
|
||||||
"logout.form.submit": "Ausloggen",
|
"logout.form.submit": "Ausloggen",
|
||||||
"logout.title": "Ausloggen",
|
"logout.title": "Ausloggen",
|
||||||
|
|
||||||
"nav.home": "Zur Startseite",
|
"nav.home": "Zur Startseite",
|
||||||
"nav.login": "Anmelden",
|
"nav.login": "Anmelden",
|
||||||
"nav.logout": "Abmelden",
|
"nav.logout": "Abmelden",
|
||||||
|
|
||||||
"pagination.results-per-page": "Ergebnisse pro Seite",
|
"pagination.results-per-page": "Ergebnisse pro Seite",
|
||||||
"pagination.showing.detail": "{{ range }} bis {{ total }}",
|
"pagination.showing.detail": "{{ range }} bis {{ total }}",
|
||||||
"pagination.showing.label": "Anzeige der Treffer ",
|
"pagination.showing.label": "Anzeige der Treffer ",
|
||||||
"pagination.sort-direction": "Sortiermöglichkeiten",
|
"pagination.sort-direction": "Sortiermöglichkeiten",
|
||||||
|
|
||||||
"search.description": "",
|
"search.description": "",
|
||||||
|
"search.title": "DSpace Angular :: Suche",
|
||||||
|
|
||||||
"search.filters.applied.f.author": "Autor",
|
"search.filters.applied.f.author": "Autor",
|
||||||
"search.filters.applied.f.dateIssued.max": "Enddatum",
|
"search.filters.applied.f.dateIssued.max": "Enddatum",
|
||||||
"search.filters.applied.f.dateIssued.min": "Anfangsdatum",
|
"search.filters.applied.f.dateIssued.min": "Anfangsdatum",
|
||||||
"search.filters.applied.f.has_content_in_original_bundle": "Besitzt Dateien",
|
"search.filters.applied.f.has_content_in_original_bundle": "Besitzt Dateien",
|
||||||
"search.filters.applied.f.subject": "Thema",
|
"search.filters.applied.f.subject": "Thema",
|
||||||
|
|
||||||
"search.filters.filter.author.head": "Autor",
|
"search.filters.filter.author.head": "Autor",
|
||||||
"search.filters.filter.author.placeholder": "Autor",
|
"search.filters.filter.author.placeholder": "Autor",
|
||||||
"search.filters.filter.dateIssued.head": "Datum",
|
"search.filters.filter.dateIssued.head": "Datum",
|
||||||
@@ -126,12 +146,16 @@
|
|||||||
"search.filters.filter.show-more": "Zeige mehr",
|
"search.filters.filter.show-more": "Zeige mehr",
|
||||||
"search.filters.filter.subject.head": "Schlagwort",
|
"search.filters.filter.subject.head": "Schlagwort",
|
||||||
"search.filters.filter.subject.placeholder": "Schlagwort",
|
"search.filters.filter.subject.placeholder": "Schlagwort",
|
||||||
|
|
||||||
"search.filters.head": "Filter",
|
"search.filters.head": "Filter",
|
||||||
"search.filters.reset": "Filter zurücksetzen",
|
"search.filters.reset": "Filter zurücksetzen",
|
||||||
|
|
||||||
"search.form.search": "Suche",
|
"search.form.search": "Suche",
|
||||||
"search.form.search_dspace": "DSpace durchsuchen",
|
"search.form.search_dspace": "DSpace durchsuchen",
|
||||||
|
|
||||||
"search.results.head": "Suchergebnisse",
|
"search.results.head": "Suchergebnisse",
|
||||||
"search.results.no-results": "Zu dieser Suche gibt es keine Treffer.",
|
"search.results.no-results": "Zu dieser Suche gibt es keine Treffer.",
|
||||||
|
|
||||||
"search.sidebar.close": "Zurück zu den Ergebnissen",
|
"search.sidebar.close": "Zurück zu den Ergebnissen",
|
||||||
"search.sidebar.filters.title": "Filter",
|
"search.sidebar.filters.title": "Filter",
|
||||||
"search.sidebar.open": "Suchwerkzeuge",
|
"search.sidebar.open": "Suchwerkzeuge",
|
||||||
@@ -139,11 +163,13 @@
|
|||||||
"search.sidebar.settings.rpp": "Treffer pro Seite",
|
"search.sidebar.settings.rpp": "Treffer pro Seite",
|
||||||
"search.sidebar.settings.sort-by": "Sortiere nach",
|
"search.sidebar.settings.sort-by": "Sortiere nach",
|
||||||
"search.sidebar.settings.title": "Einstellungen",
|
"search.sidebar.settings.title": "Einstellungen",
|
||||||
"search.title": "DSpace Angular :: Suche",
|
|
||||||
"search.view-switch.show-grid": "Zeige als Raster",
|
"search.view-switch.show-grid": "Zeige als Raster",
|
||||||
"search.view-switch.show-list": "Zeige als Liste",
|
"search.view-switch.show-list": "Zeige als Liste",
|
||||||
|
|
||||||
"sorting.dc.title.ASC": "Titel aufsteigend",
|
"sorting.dc.title.ASC": "Titel aufsteigend",
|
||||||
"sorting.dc.title.DESC": "Titel absteigend",
|
"sorting.dc.title.DESC": "Titel absteigend",
|
||||||
"sorting.score.DESC": "Relevanz",
|
"sorting.score.DESC": "Relevanz",
|
||||||
"title": "DSpace"
|
|
||||||
|
"title": "DSpace",
|
||||||
}
|
}
|
@@ -2,6 +2,7 @@
|
|||||||
"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.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.link.home-page": "Take me to the home page",
|
||||||
"404.page-not-found": "page not found",
|
"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.content": "An error occurred while creating the new bitstream format.",
|
||||||
"admin.registries.bitstream-formats.create.failure.head": "Failure",
|
"admin.registries.bitstream-formats.create.failure.head": "Failure",
|
||||||
"admin.registries.bitstream-formats.create.head": "Create Bitstream format",
|
"admin.registries.bitstream-formats.create.head": "Create Bitstream format",
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
"admin.registries.bitstream-formats.table.supportLevel.UNKNOWN": "Unknown",
|
"admin.registries.bitstream-formats.table.supportLevel.UNKNOWN": "Unknown",
|
||||||
"admin.registries.bitstream-formats.table.supportLevel.head": "Support Level",
|
"admin.registries.bitstream-formats.table.supportLevel.head": "Support Level",
|
||||||
"admin.registries.bitstream-formats.title": "DSpace Angular :: Bitstream Format Registry",
|
"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.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.create": "Create metadata schema",
|
||||||
"admin.registries.metadata.form.edit": "Edit metadata schema",
|
"admin.registries.metadata.form.edit": "Edit metadata schema",
|
||||||
@@ -56,6 +58,7 @@
|
|||||||
"admin.registries.metadata.schemas.table.name": "Name",
|
"admin.registries.metadata.schemas.table.name": "Name",
|
||||||
"admin.registries.metadata.schemas.table.namespace": "Namespace",
|
"admin.registries.metadata.schemas.table.namespace": "Namespace",
|
||||||
"admin.registries.metadata.title": "DSpace Angular :: Metadata Registry",
|
"admin.registries.metadata.title": "DSpace Angular :: Metadata Registry",
|
||||||
|
|
||||||
"admin.registries.schema.description": "This is the metadata schema for \"{{namespace}}\".",
|
"admin.registries.schema.description": "This is the metadata schema for \"{{namespace}}\".",
|
||||||
"admin.registries.schema.fields.head": "Schema metadata fields",
|
"admin.registries.schema.fields.head": "Schema metadata fields",
|
||||||
"admin.registries.schema.fields.no-items": "No metadata fields to show.",
|
"admin.registries.schema.fields.no-items": "No metadata fields to show.",
|
||||||
@@ -80,8 +83,10 @@
|
|||||||
"admin.registries.schema.notification.success": "Success",
|
"admin.registries.schema.notification.success": "Success",
|
||||||
"admin.registries.schema.return": "Return",
|
"admin.registries.schema.return": "Return",
|
||||||
"admin.registries.schema.title": "DSpace Angular :: Metadata Schema Registry",
|
"admin.registries.schema.title": "DSpace Angular :: Metadata Schema Registry",
|
||||||
|
|
||||||
"auth.errors.invalid-user": "Invalid email address or password.",
|
"auth.errors.invalid-user": "Invalid email address or password.",
|
||||||
"auth.messages.expired": "Your session has expired. Please log in again.",
|
"auth.messages.expired": "Your session has expired. Please log in again.",
|
||||||
|
|
||||||
"browse.comcol.by.author": "By Author",
|
"browse.comcol.by.author": "By Author",
|
||||||
"browse.comcol.by.dateissued": "By Issue Date",
|
"browse.comcol.by.dateissued": "By Issue Date",
|
||||||
"browse.comcol.by.subject": "By Subject",
|
"browse.comcol.by.subject": "By Subject",
|
||||||
@@ -112,7 +117,9 @@
|
|||||||
"browse.startsWith.type_date": "Or type in a date (year-month):",
|
"browse.startsWith.type_date": "Or type in a date (year-month):",
|
||||||
"browse.startsWith.type_text": "Or enter first few letters:",
|
"browse.startsWith.type_text": "Or enter first few letters:",
|
||||||
"browse.title": "Browsing {{ collection }} by {{ field }} {{ value }}",
|
"browse.title": "Browsing {{ collection }} by {{ field }} {{ value }}",
|
||||||
|
|
||||||
"chips.remove": "Remove chip",
|
"chips.remove": "Remove chip",
|
||||||
|
|
||||||
"collection.create.head": "Create a Collection",
|
"collection.create.head": "Create a Collection",
|
||||||
"collection.create.sub-head": "Create a Collection for Community {{ parent }}",
|
"collection.create.sub-head": "Create a Collection for Community {{ parent }}",
|
||||||
"collection.delete.cancel": "Cancel",
|
"collection.delete.cancel": "Cancel",
|
||||||
@@ -135,6 +142,7 @@
|
|||||||
"collection.page.browse.recent.empty": "No items to show",
|
"collection.page.browse.recent.empty": "No items to show",
|
||||||
"collection.page.license": "License",
|
"collection.page.license": "License",
|
||||||
"collection.page.news": "News",
|
"collection.page.news": "News",
|
||||||
|
|
||||||
"community.create.head": "Create a Community",
|
"community.create.head": "Create a Community",
|
||||||
"community.create.sub-head": "Create a Sub-Community for Community {{ parent }}",
|
"community.create.sub-head": "Create a Sub-Community for Community {{ parent }}",
|
||||||
"community.delete.cancel": "Cancel",
|
"community.delete.cancel": "Cancel",
|
||||||
@@ -155,6 +163,7 @@
|
|||||||
"community.page.news": "News",
|
"community.page.news": "News",
|
||||||
"community.sub-collection-list.head": "Collections of this Community",
|
"community.sub-collection-list.head": "Collections of this Community",
|
||||||
"community.sub-community-list.head": "Communities of this Community",
|
"community.sub-community-list.head": "Communities of this Community",
|
||||||
|
|
||||||
"dso-selector.create.collection.head": "New collection",
|
"dso-selector.create.collection.head": "New collection",
|
||||||
"dso-selector.create.community.head": "New community",
|
"dso-selector.create.community.head": "New community",
|
||||||
"dso-selector.create.community.sub-level": "Create a new community in",
|
"dso-selector.create.community.sub-level": "Create a new community in",
|
||||||
@@ -165,6 +174,7 @@
|
|||||||
"dso-selector.edit.item.head": "Edit item",
|
"dso-selector.edit.item.head": "Edit item",
|
||||||
"dso-selector.no-results": "No {{ type }} found",
|
"dso-selector.no-results": "No {{ type }} found",
|
||||||
"dso-selector.placeholder": "Search for a {{ type }}",
|
"dso-selector.placeholder": "Search for a {{ type }}",
|
||||||
|
|
||||||
"error.browse-by": "Error fetching items",
|
"error.browse-by": "Error fetching items",
|
||||||
"error.collection": "Error fetching collection",
|
"error.collection": "Error fetching collection",
|
||||||
"error.community": "Error fetching community",
|
"error.community": "Error fetching community",
|
||||||
@@ -179,9 +189,11 @@
|
|||||||
"error.top-level-communities": "Error fetching top-level communities",
|
"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.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 }}.",
|
"error.validation.pattern": "This input is restricted by the current pattern: {{ pattern }}.",
|
||||||
|
|
||||||
"footer.copyright": "copyright © 2002-{{ year }}",
|
"footer.copyright": "copyright © 2002-{{ year }}",
|
||||||
"footer.link.dspace": "DSpace software",
|
"footer.link.dspace": "DSpace software",
|
||||||
"footer.link.duraspace": "DuraSpace",
|
"footer.link.duraspace": "DuraSpace",
|
||||||
|
|
||||||
"form.cancel": "Cancel",
|
"form.cancel": "Cancel",
|
||||||
"form.clear": "Clear",
|
"form.clear": "Clear",
|
||||||
"form.clear-help": "Click here to remove the selected value",
|
"form.clear-help": "Click here to remove the selected value",
|
||||||
@@ -203,10 +215,12 @@
|
|||||||
"form.search": "Search",
|
"form.search": "Search",
|
||||||
"form.search-help": "Click here to looking for an existing correspondence",
|
"form.search-help": "Click here to looking for an existing correspondence",
|
||||||
"form.submit": "Submit",
|
"form.submit": "Submit",
|
||||||
|
|
||||||
"home.description": "",
|
"home.description": "",
|
||||||
"home.title": "DSpace Angular :: Home",
|
"home.title": "DSpace Angular :: Home",
|
||||||
"home.top-level-communities.head": "Communities in DSpace",
|
"home.top-level-communities.head": "Communities in DSpace",
|
||||||
"home.top-level-communities.help": "Select a community to browse its collections.",
|
"home.top-level-communities.help": "Select a community to browse its collections.",
|
||||||
|
|
||||||
"item.edit.delete.cancel": "Cancel",
|
"item.edit.delete.cancel": "Cancel",
|
||||||
"item.edit.delete.confirm": "Delete",
|
"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.description": "Are you sure this item should be completely deleted? Caution: At present, no tombstone would be left.",
|
||||||
@@ -214,6 +228,7 @@
|
|||||||
"item.edit.delete.header": "Delete item: {{ id }}",
|
"item.edit.delete.header": "Delete item: {{ id }}",
|
||||||
"item.edit.delete.success": "The item has been deleted",
|
"item.edit.delete.success": "The item has been deleted",
|
||||||
"item.edit.head": "Edit Item",
|
"item.edit.head": "Edit Item",
|
||||||
|
|
||||||
"item.edit.metadata.add-button": "Add",
|
"item.edit.metadata.add-button": "Add",
|
||||||
"item.edit.metadata.discard-button": "Discard",
|
"item.edit.metadata.discard-button": "Discard",
|
||||||
"item.edit.metadata.edit.buttons.edit": "Edit",
|
"item.edit.metadata.edit.buttons.edit": "Edit",
|
||||||
@@ -235,27 +250,44 @@
|
|||||||
"item.edit.metadata.notifications.saved.title": "Metadata saved",
|
"item.edit.metadata.notifications.saved.title": "Metadata saved",
|
||||||
"item.edit.metadata.reinstate-button": "Undo",
|
"item.edit.metadata.reinstate-button": "Undo",
|
||||||
"item.edit.metadata.save-button": "Save",
|
"item.edit.metadata.save-button": "Save",
|
||||||
|
|
||||||
"item.edit.modify.overview.field": "Field",
|
"item.edit.modify.overview.field": "Field",
|
||||||
"item.edit.modify.overview.language": "Language",
|
"item.edit.modify.overview.language": "Language",
|
||||||
"item.edit.modify.overview.value": "Value",
|
"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.cancel": "Cancel",
|
||||||
"item.edit.private.confirm": "Make it Private",
|
"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.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.error": "An error occurred while making the item private",
|
||||||
"item.edit.private.header": "Make item private: {{ id }}",
|
"item.edit.private.header": "Make item private: {{ id }}",
|
||||||
"item.edit.private.success": "The item is now private",
|
"item.edit.private.success": "The item is now private",
|
||||||
|
|
||||||
"item.edit.public.cancel": "Cancel",
|
"item.edit.public.cancel": "Cancel",
|
||||||
"item.edit.public.confirm": "Make it Public",
|
"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.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.error": "An error occurred while making the item public",
|
||||||
"item.edit.public.header": "Make item public: {{ id }}",
|
"item.edit.public.header": "Make item public: {{ id }}",
|
||||||
"item.edit.public.success": "The item is now public",
|
"item.edit.public.success": "The item is now public",
|
||||||
|
|
||||||
"item.edit.reinstate.cancel": "Cancel",
|
"item.edit.reinstate.cancel": "Cancel",
|
||||||
"item.edit.reinstate.confirm": "Reinstate",
|
"item.edit.reinstate.confirm": "Reinstate",
|
||||||
"item.edit.reinstate.description": "Are you sure this item should be reinstated to the archive?",
|
"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.error": "An error occurred while reinstating the item",
|
||||||
"item.edit.reinstate.header": "Reinstate item: {{ id }}",
|
"item.edit.reinstate.header": "Reinstate item: {{ id }}",
|
||||||
"item.edit.reinstate.success": "The item was reinstated successfully",
|
"item.edit.reinstate.success": "The item was reinstated successfully",
|
||||||
|
|
||||||
"item.edit.relationships.discard-button": "Discard",
|
"item.edit.relationships.discard-button": "Discard",
|
||||||
"item.edit.relationships.edit.buttons.remove": "Remove",
|
"item.edit.relationships.edit.buttons.remove": "Remove",
|
||||||
"item.edit.relationships.edit.buttons.undo": "Undo changes",
|
"item.edit.relationships.edit.buttons.undo": "Undo changes",
|
||||||
@@ -268,6 +300,7 @@
|
|||||||
"item.edit.relationships.notifications.saved.title": "Relationships saved",
|
"item.edit.relationships.notifications.saved.title": "Relationships saved",
|
||||||
"item.edit.relationships.reinstate-button": "Undo",
|
"item.edit.relationships.reinstate-button": "Undo",
|
||||||
"item.edit.relationships.save-button": "Save",
|
"item.edit.relationships.save-button": "Save",
|
||||||
|
|
||||||
"item.edit.tabs.bitstreams.head": "Item Bitstreams",
|
"item.edit.tabs.bitstreams.head": "Item Bitstreams",
|
||||||
"item.edit.tabs.bitstreams.title": "Item Edit - Bitstreams",
|
"item.edit.tabs.bitstreams.title": "Item Edit - Bitstreams",
|
||||||
"item.edit.tabs.curate.head": "Curate",
|
"item.edit.tabs.curate.head": "Curate",
|
||||||
@@ -301,12 +334,14 @@
|
|||||||
"item.edit.tabs.status.title": "Item Edit - Status",
|
"item.edit.tabs.status.title": "Item Edit - Status",
|
||||||
"item.edit.tabs.view.head": "View Item",
|
"item.edit.tabs.view.head": "View Item",
|
||||||
"item.edit.tabs.view.title": "Item Edit - View",
|
"item.edit.tabs.view.title": "Item Edit - View",
|
||||||
|
|
||||||
"item.edit.withdraw.cancel": "Cancel",
|
"item.edit.withdraw.cancel": "Cancel",
|
||||||
"item.edit.withdraw.confirm": "Withdraw",
|
"item.edit.withdraw.confirm": "Withdraw",
|
||||||
"item.edit.withdraw.description": "Are you sure this item should be withdrawn from the archive?",
|
"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.error": "An error occurred while withdrawing the item",
|
||||||
"item.edit.withdraw.header": "Withdraw item: {{ id }}",
|
"item.edit.withdraw.header": "Withdraw item: {{ id }}",
|
||||||
"item.edit.withdraw.success": "The item was withdrawn successfully",
|
"item.edit.withdraw.success": "The item was withdrawn successfully",
|
||||||
|
|
||||||
"item.page.abstract": "Abstract",
|
"item.page.abstract": "Abstract",
|
||||||
"item.page.author": "Authors",
|
"item.page.author": "Authors",
|
||||||
"item.page.citation": "Citation",
|
"item.page.citation": "Citation",
|
||||||
@@ -326,10 +361,12 @@
|
|||||||
"item.page.related-items.view-less": "View less",
|
"item.page.related-items.view-less": "View less",
|
||||||
"item.page.subject": "Keywords",
|
"item.page.subject": "Keywords",
|
||||||
"item.page.uri": "URI",
|
"item.page.uri": "URI",
|
||||||
|
|
||||||
"item.select.confirm": "Confirm selected",
|
"item.select.confirm": "Confirm selected",
|
||||||
"item.select.table.author": "Author",
|
"item.select.table.author": "Author",
|
||||||
"item.select.table.collection": "Collection",
|
"item.select.table.collection": "Collection",
|
||||||
"item.select.table.title": "Title",
|
"item.select.table.title": "Title",
|
||||||
|
|
||||||
"journal.listelement.badge": "Journal",
|
"journal.listelement.badge": "Journal",
|
||||||
"journal.page.description": "Description",
|
"journal.page.description": "Description",
|
||||||
"journal.page.editor": "Editor-in-Chief",
|
"journal.page.editor": "Editor-in-Chief",
|
||||||
@@ -338,6 +375,7 @@
|
|||||||
"journal.page.titleprefix": "Journal: ",
|
"journal.page.titleprefix": "Journal: ",
|
||||||
"journal.search.results.head": "Journal Search Results",
|
"journal.search.results.head": "Journal Search Results",
|
||||||
"journal.search.title": "DSpace Angular :: Journal Search",
|
"journal.search.title": "DSpace Angular :: Journal Search",
|
||||||
|
|
||||||
"journalissue.listelement.badge": "Journal Issue",
|
"journalissue.listelement.badge": "Journal Issue",
|
||||||
"journalissue.page.description": "Description",
|
"journalissue.page.description": "Description",
|
||||||
"journalissue.page.issuedate": "Issue Date",
|
"journalissue.page.issuedate": "Issue Date",
|
||||||
@@ -346,11 +384,13 @@
|
|||||||
"journalissue.page.keyword": "Keywords",
|
"journalissue.page.keyword": "Keywords",
|
||||||
"journalissue.page.number": "Number",
|
"journalissue.page.number": "Number",
|
||||||
"journalissue.page.titleprefix": "Journal Issue: ",
|
"journalissue.page.titleprefix": "Journal Issue: ",
|
||||||
|
|
||||||
"journalvolume.listelement.badge": "Journal Volume",
|
"journalvolume.listelement.badge": "Journal Volume",
|
||||||
"journalvolume.page.description": "Description",
|
"journalvolume.page.description": "Description",
|
||||||
"journalvolume.page.issuedate": "Issue Date",
|
"journalvolume.page.issuedate": "Issue Date",
|
||||||
"journalvolume.page.titleprefix": "Journal Volume: ",
|
"journalvolume.page.titleprefix": "Journal Volume: ",
|
||||||
"journalvolume.page.volume": "Volume",
|
"journalvolume.page.volume": "Volume",
|
||||||
|
|
||||||
"loading.browse-by": "Loading items...",
|
"loading.browse-by": "Loading items...",
|
||||||
"loading.browse-by-page": "Loading page...",
|
"loading.browse-by-page": "Loading page...",
|
||||||
"loading.collection": "Loading collection...",
|
"loading.collection": "Loading collection...",
|
||||||
@@ -364,6 +404,7 @@
|
|||||||
"loading.sub-collections": "Loading sub-collections...",
|
"loading.sub-collections": "Loading sub-collections...",
|
||||||
"loading.sub-communities": "Loading sub-communities...",
|
"loading.sub-communities": "Loading sub-communities...",
|
||||||
"loading.top-level-communities": "Loading top-level communities...",
|
"loading.top-level-communities": "Loading top-level communities...",
|
||||||
|
|
||||||
"login.form.email": "Email address",
|
"login.form.email": "Email address",
|
||||||
"login.form.forgot-password": "Have you forgotten your password?",
|
"login.form.forgot-password": "Have you forgotten your password?",
|
||||||
"login.form.header": "Please log in to DSpace",
|
"login.form.header": "Please log in to DSpace",
|
||||||
@@ -371,15 +412,19 @@
|
|||||||
"login.form.password": "Password",
|
"login.form.password": "Password",
|
||||||
"login.form.submit": "Log in",
|
"login.form.submit": "Log in",
|
||||||
"login.title": "Login",
|
"login.title": "Login",
|
||||||
|
|
||||||
"logout.form.header": "Log out from DSpace",
|
"logout.form.header": "Log out from DSpace",
|
||||||
"logout.form.submit": "Log out",
|
"logout.form.submit": "Log out",
|
||||||
"logout.title": "Logout",
|
"logout.title": "Logout",
|
||||||
|
|
||||||
"menu.header.admin": "Admin",
|
"menu.header.admin": "Admin",
|
||||||
"menu.header.image.logo": "Repository logo",
|
"menu.header.image.logo": "Repository logo",
|
||||||
|
|
||||||
"menu.section.access_control": "Access Control",
|
"menu.section.access_control": "Access Control",
|
||||||
"menu.section.access_control_authorizations": "Authorizations",
|
"menu.section.access_control_authorizations": "Authorizations",
|
||||||
"menu.section.access_control_groups": "Groups",
|
"menu.section.access_control_groups": "Groups",
|
||||||
"menu.section.access_control_people": "People",
|
"menu.section.access_control_people": "People",
|
||||||
|
|
||||||
"menu.section.browse_community": "This Community",
|
"menu.section.browse_community": "This Community",
|
||||||
"menu.section.browse_community_by_author": "By Author",
|
"menu.section.browse_community_by_author": "By Author",
|
||||||
"menu.section.browse_community_by_issue_date": "By Issue Date",
|
"menu.section.browse_community_by_issue_date": "By Issue Date",
|
||||||
@@ -390,21 +435,26 @@
|
|||||||
"menu.section.browse_global_by_subject": "By Subject",
|
"menu.section.browse_global_by_subject": "By Subject",
|
||||||
"menu.section.browse_global_by_title": "By Title",
|
"menu.section.browse_global_by_title": "By Title",
|
||||||
"menu.section.browse_global_communities_and_collections": "Communities & Collections",
|
"menu.section.browse_global_communities_and_collections": "Communities & Collections",
|
||||||
|
|
||||||
"menu.section.control_panel": "Control Panel",
|
"menu.section.control_panel": "Control Panel",
|
||||||
"menu.section.curation_task": "Curation Task",
|
"menu.section.curation_task": "Curation Task",
|
||||||
|
|
||||||
"menu.section.edit": "Edit",
|
"menu.section.edit": "Edit",
|
||||||
"menu.section.edit_collection": "Collection",
|
"menu.section.edit_collection": "Collection",
|
||||||
"menu.section.edit_community": "Community",
|
"menu.section.edit_community": "Community",
|
||||||
"menu.section.edit_item": "Item",
|
"menu.section.edit_item": "Item",
|
||||||
|
|
||||||
"menu.section.export": "Export",
|
"menu.section.export": "Export",
|
||||||
"menu.section.export_collection": "Collection",
|
"menu.section.export_collection": "Collection",
|
||||||
"menu.section.export_community": "Community",
|
"menu.section.export_community": "Community",
|
||||||
"menu.section.export_item": "Item",
|
"menu.section.export_item": "Item",
|
||||||
"menu.section.export_metadata": "Metadata",
|
"menu.section.export_metadata": "Metadata",
|
||||||
|
|
||||||
"menu.section.find": "Find",
|
"menu.section.find": "Find",
|
||||||
"menu.section.find_items": "Items",
|
"menu.section.find_items": "Items",
|
||||||
"menu.section.find_private_items": "Private Items",
|
"menu.section.find_private_items": "Private Items",
|
||||||
"menu.section.find_withdrawn_items": "Withdrawn Items",
|
"menu.section.find_withdrawn_items": "Withdrawn Items",
|
||||||
|
|
||||||
"menu.section.icon.access_control": "Access Control menu section",
|
"menu.section.icon.access_control": "Access Control menu section",
|
||||||
"menu.section.icon.control_panel": "Control Panel menu section",
|
"menu.section.icon.control_panel": "Control Panel menu section",
|
||||||
"menu.section.icon.curation_task": "Curation Task menu section",
|
"menu.section.icon.curation_task": "Curation Task menu section",
|
||||||
@@ -417,20 +467,27 @@
|
|||||||
"menu.section.icon.registries": "Registries menu section",
|
"menu.section.icon.registries": "Registries menu section",
|
||||||
"menu.section.icon.statistics_task": "Statistics Task menu section",
|
"menu.section.icon.statistics_task": "Statistics Task menu section",
|
||||||
"menu.section.icon.unpin": "Unpin sidebar",
|
"menu.section.icon.unpin": "Unpin sidebar",
|
||||||
|
|
||||||
"menu.section.import": "Import",
|
"menu.section.import": "Import",
|
||||||
"menu.section.import_batch": "Batch Import (ZIP)",
|
"menu.section.import_batch": "Batch Import (ZIP)",
|
||||||
"menu.section.import_metadata": "Metadata",
|
"menu.section.import_metadata": "Metadata",
|
||||||
|
|
||||||
"menu.section.new": "New",
|
"menu.section.new": "New",
|
||||||
"menu.section.new_collection": "Collection",
|
"menu.section.new_collection": "Collection",
|
||||||
"menu.section.new_community": "Community",
|
"menu.section.new_community": "Community",
|
||||||
"menu.section.new_item": "Item",
|
"menu.section.new_item": "Item",
|
||||||
"menu.section.new_item_version": "Item Version",
|
"menu.section.new_item_version": "Item Version",
|
||||||
|
|
||||||
"menu.section.pin": "Pin sidebar",
|
"menu.section.pin": "Pin sidebar",
|
||||||
|
"menu.section.unpin": "Unpin sidebar",
|
||||||
|
|
||||||
"menu.section.registries": "Registries",
|
"menu.section.registries": "Registries",
|
||||||
"menu.section.registries_format": "Format",
|
"menu.section.registries_format": "Format",
|
||||||
"menu.section.registries_metadata": "Metadata",
|
"menu.section.registries_metadata": "Metadata",
|
||||||
|
|
||||||
"menu.section.statistics": "Statistics",
|
"menu.section.statistics": "Statistics",
|
||||||
"menu.section.statistics_task": "Statistics Task",
|
"menu.section.statistics_task": "Statistics Task",
|
||||||
|
|
||||||
"menu.section.toggle.access_control": "Toggle Access Control section",
|
"menu.section.toggle.access_control": "Toggle Access Control section",
|
||||||
"menu.section.toggle.control_panel": "Toggle Control Panel section",
|
"menu.section.toggle.control_panel": "Toggle Control Panel section",
|
||||||
"menu.section.toggle.curation_task": "Toggle Curation Task section",
|
"menu.section.toggle.curation_task": "Toggle Curation Task section",
|
||||||
@@ -441,7 +498,7 @@
|
|||||||
"menu.section.toggle.new": "Toggle New section",
|
"menu.section.toggle.new": "Toggle New section",
|
||||||
"menu.section.toggle.registries": "Toggle Registries section",
|
"menu.section.toggle.registries": "Toggle Registries section",
|
||||||
"menu.section.toggle.statistics_task": "Toggle Statistics Task section",
|
"menu.section.toggle.statistics_task": "Toggle Statistics Task section",
|
||||||
"menu.section.unpin": "Unpin sidebar",
|
|
||||||
"mydspace.description": "",
|
"mydspace.description": "",
|
||||||
"mydspace.general.text-here": "HERE",
|
"mydspace.general.text-here": "HERE",
|
||||||
"mydspace.messages.controller-help": "Select this option to send a message to item's submitter.",
|
"mydspace.messages.controller-help": "Select this option to send a message to item's submitter.",
|
||||||
@@ -479,6 +536,7 @@
|
|||||||
"mydspace.upload.upload-multiple-successful": "{{qty}} new workspace items created.",
|
"mydspace.upload.upload-multiple-successful": "{{qty}} new workspace items created.",
|
||||||
"mydspace.upload.upload-successful": "New workspace item created. Click {{here}} for edit it.",
|
"mydspace.upload.upload-successful": "New workspace item created. Click {{here}} for edit it.",
|
||||||
"mydspace.view-btn": "View",
|
"mydspace.view-btn": "View",
|
||||||
|
|
||||||
"nav.browse.header": "All of DSpace",
|
"nav.browse.header": "All of DSpace",
|
||||||
"nav.community-browse.header": "By Community",
|
"nav.community-browse.header": "By Community",
|
||||||
"nav.language": "Language switch",
|
"nav.language": "Language switch",
|
||||||
@@ -487,6 +545,7 @@
|
|||||||
"nav.mydspace": "MyDSpace",
|
"nav.mydspace": "MyDSpace",
|
||||||
"nav.search": "Search",
|
"nav.search": "Search",
|
||||||
"nav.statistics.header": "Statistics",
|
"nav.statistics.header": "Statistics",
|
||||||
|
|
||||||
"orgunit.listelement.badge": "Organizational Unit",
|
"orgunit.listelement.badge": "Organizational Unit",
|
||||||
"orgunit.page.city": "City",
|
"orgunit.page.city": "City",
|
||||||
"orgunit.page.country": "Country",
|
"orgunit.page.country": "Country",
|
||||||
@@ -494,10 +553,12 @@
|
|||||||
"orgunit.page.description": "Description",
|
"orgunit.page.description": "Description",
|
||||||
"orgunit.page.id": "ID",
|
"orgunit.page.id": "ID",
|
||||||
"orgunit.page.titleprefix": "Organizational Unit: ",
|
"orgunit.page.titleprefix": "Organizational Unit: ",
|
||||||
|
|
||||||
"pagination.results-per-page": "Results Per Page",
|
"pagination.results-per-page": "Results Per Page",
|
||||||
"pagination.showing.detail": "{{ range }} of {{ total }}",
|
"pagination.showing.detail": "{{ range }} of {{ total }}",
|
||||||
"pagination.showing.label": "Now showing ",
|
"pagination.showing.label": "Now showing ",
|
||||||
"pagination.sort-direction": "Sort Options",
|
"pagination.sort-direction": "Sort Options",
|
||||||
|
|
||||||
"person.listelement.badge": "Person",
|
"person.listelement.badge": "Person",
|
||||||
"person.page.birthdate": "Birth Date",
|
"person.page.birthdate": "Birth Date",
|
||||||
"person.page.email": "Email Address",
|
"person.page.email": "Email Address",
|
||||||
@@ -510,6 +571,7 @@
|
|||||||
"person.page.titleprefix": "Person: ",
|
"person.page.titleprefix": "Person: ",
|
||||||
"person.search.results.head": "Person Search Results",
|
"person.search.results.head": "Person Search Results",
|
||||||
"person.search.title": "DSpace Angular :: Person Search",
|
"person.search.title": "DSpace Angular :: Person Search",
|
||||||
|
|
||||||
"project.listelement.badge": "Research Project",
|
"project.listelement.badge": "Research Project",
|
||||||
"project.page.contributor": "Contributors",
|
"project.page.contributor": "Contributors",
|
||||||
"project.page.description": "Description",
|
"project.page.description": "Description",
|
||||||
@@ -519,6 +581,7 @@
|
|||||||
"project.page.keyword": "Keywords",
|
"project.page.keyword": "Keywords",
|
||||||
"project.page.status": "Status",
|
"project.page.status": "Status",
|
||||||
"project.page.titleprefix": "Research Project: ",
|
"project.page.titleprefix": "Research Project: ",
|
||||||
|
|
||||||
"publication.listelement.badge": "Publication",
|
"publication.listelement.badge": "Publication",
|
||||||
"publication.page.description": "Description",
|
"publication.page.description": "Description",
|
||||||
"publication.page.journal-issn": "Journal ISSN",
|
"publication.page.journal-issn": "Journal ISSN",
|
||||||
@@ -528,6 +591,7 @@
|
|||||||
"publication.page.volume-title": "Volume Title",
|
"publication.page.volume-title": "Volume Title",
|
||||||
"publication.search.results.head": "Publication Search Results",
|
"publication.search.results.head": "Publication Search Results",
|
||||||
"publication.search.title": "DSpace Angular :: Publication Search",
|
"publication.search.title": "DSpace Angular :: Publication Search",
|
||||||
|
|
||||||
"relationships.isAuthorOf": "Authors",
|
"relationships.isAuthorOf": "Authors",
|
||||||
"relationships.isIssueOf": "Journal Issues",
|
"relationships.isIssueOf": "Journal Issues",
|
||||||
"relationships.isJournalIssueOf": "Journal Issue",
|
"relationships.isJournalIssueOf": "Journal Issue",
|
||||||
@@ -540,7 +604,11 @@
|
|||||||
"relationships.isSingleJournalOf": "Journal",
|
"relationships.isSingleJournalOf": "Journal",
|
||||||
"relationships.isSingleVolumeOf": "Journal Volume",
|
"relationships.isSingleVolumeOf": "Journal Volume",
|
||||||
"relationships.isVolumeOf": "Journal Volumes",
|
"relationships.isVolumeOf": "Journal Volumes",
|
||||||
|
|
||||||
"search.description": "",
|
"search.description": "",
|
||||||
|
"search.switch-configuration.title": "Show",
|
||||||
|
"search.title": "DSpace Angular :: Search",
|
||||||
|
|
||||||
"search.filters.applied.f.author": "Author",
|
"search.filters.applied.f.author": "Author",
|
||||||
"search.filters.applied.f.dateIssued.max": "End date",
|
"search.filters.applied.f.dateIssued.max": "End date",
|
||||||
"search.filters.applied.f.dateIssued.min": "Start date",
|
"search.filters.applied.f.dateIssued.min": "Start date",
|
||||||
@@ -551,6 +619,7 @@
|
|||||||
"search.filters.applied.f.namedresourcetype": "Status",
|
"search.filters.applied.f.namedresourcetype": "Status",
|
||||||
"search.filters.applied.f.subject": "Subject",
|
"search.filters.applied.f.subject": "Subject",
|
||||||
"search.filters.applied.f.submitter": "Submitter",
|
"search.filters.applied.f.submitter": "Submitter",
|
||||||
|
|
||||||
"search.filters.filter.author.head": "Author",
|
"search.filters.filter.author.head": "Author",
|
||||||
"search.filters.filter.author.placeholder": "Author name",
|
"search.filters.filter.author.placeholder": "Author name",
|
||||||
"search.filters.filter.birthDate.head": "Birth Date",
|
"search.filters.filter.birthDate.head": "Birth Date",
|
||||||
@@ -595,14 +664,18 @@
|
|||||||
"search.filters.filter.subject.placeholder": "Subject",
|
"search.filters.filter.subject.placeholder": "Subject",
|
||||||
"search.filters.filter.submitter.head": "Submitter",
|
"search.filters.filter.submitter.head": "Submitter",
|
||||||
"search.filters.filter.submitter.placeholder": "Submitter",
|
"search.filters.filter.submitter.placeholder": "Submitter",
|
||||||
|
|
||||||
"search.filters.head": "Filters",
|
"search.filters.head": "Filters",
|
||||||
"search.filters.reset": "Reset filters",
|
"search.filters.reset": "Reset filters",
|
||||||
|
|
||||||
"search.form.search": "Search",
|
"search.form.search": "Search",
|
||||||
"search.form.search_dspace": "Search DSpace",
|
"search.form.search_dspace": "Search DSpace",
|
||||||
"search.form.search_mydspace": "Search MyDSpace",
|
"search.form.search_mydspace": "Search MyDSpace",
|
||||||
|
|
||||||
"search.results.head": "Search Results",
|
"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": "Your search returned no results. Having trouble finding what you're looking for? Try putting",
|
||||||
"search.results.no-results-link": "quotes around it",
|
"search.results.no-results-link": "quotes around it",
|
||||||
|
|
||||||
"search.sidebar.close": "Back to results",
|
"search.sidebar.close": "Back to results",
|
||||||
"search.sidebar.filters.title": "Filters",
|
"search.sidebar.filters.title": "Filters",
|
||||||
"search.sidebar.open": "Search Tools",
|
"search.sidebar.open": "Search Tools",
|
||||||
@@ -610,14 +683,15 @@
|
|||||||
"search.sidebar.settings.rpp": "Results per page",
|
"search.sidebar.settings.rpp": "Results per page",
|
||||||
"search.sidebar.settings.sort-by": "Sort By",
|
"search.sidebar.settings.sort-by": "Sort By",
|
||||||
"search.sidebar.settings.title": "Settings",
|
"search.sidebar.settings.title": "Settings",
|
||||||
"search.switch-configuration.title": "Show",
|
|
||||||
"search.title": "DSpace Angular :: Search",
|
|
||||||
"search.view-switch.show-detail": "Show detail",
|
"search.view-switch.show-detail": "Show detail",
|
||||||
"search.view-switch.show-grid": "Show as grid",
|
"search.view-switch.show-grid": "Show as grid",
|
||||||
"search.view-switch.show-list": "Show as list",
|
"search.view-switch.show-list": "Show as list",
|
||||||
|
|
||||||
"sorting.dc.title.ASC": "Title Ascending",
|
"sorting.dc.title.ASC": "Title Ascending",
|
||||||
"sorting.dc.title.DESC": "Title Descending",
|
"sorting.dc.title.DESC": "Title Descending",
|
||||||
"sorting.score.DESC": "Relevance",
|
"sorting.score.DESC": "Relevance",
|
||||||
|
|
||||||
"submission.edit.title": "Edit Submission",
|
"submission.edit.title": "Edit Submission",
|
||||||
"submission.general.cannot_submit": "You have not the privilege to make a new submission.",
|
"submission.general.cannot_submit": "You have not the privilege to make a new submission.",
|
||||||
"submission.general.deposit": "Deposit",
|
"submission.general.deposit": "Deposit",
|
||||||
@@ -628,7 +702,7 @@
|
|||||||
"submission.general.discard.submit": "Discard",
|
"submission.general.discard.submit": "Discard",
|
||||||
"submission.general.save": "Save",
|
"submission.general.save": "Save",
|
||||||
"submission.general.save-later": "Save for later",
|
"submission.general.save-later": "Save for later",
|
||||||
"submission.mydspace": {},
|
|
||||||
"submission.sections.general.add-more": "Add more",
|
"submission.sections.general.add-more": "Add more",
|
||||||
"submission.sections.general.collection": "Collection",
|
"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_error_notice": "There was an issue when submitting the item, please try again later.",
|
||||||
@@ -643,6 +717,7 @@
|
|||||||
"submission.sections.general.save_success_notice": "Submission saved successfully.",
|
"submission.sections.general.save_success_notice": "Submission saved successfully.",
|
||||||
"submission.sections.general.search-collection": "Search for a collection",
|
"submission.sections.general.search-collection": "Search for a collection",
|
||||||
"submission.sections.general.sections_not_valid": "There are incomplete sections.",
|
"submission.sections.general.sections_not_valid": "There are incomplete sections.",
|
||||||
|
|
||||||
"submission.sections.submit.progressbar.cclicense": "Creative commons license",
|
"submission.sections.submit.progressbar.cclicense": "Creative commons license",
|
||||||
"submission.sections.submit.progressbar.describe.recycle": "Recycle",
|
"submission.sections.submit.progressbar.describe.recycle": "Recycle",
|
||||||
"submission.sections.submit.progressbar.describe.stepcustom": "Describe",
|
"submission.sections.submit.progressbar.describe.stepcustom": "Describe",
|
||||||
@@ -651,6 +726,7 @@
|
|||||||
"submission.sections.submit.progressbar.detect-duplicate": "Potential duplicates",
|
"submission.sections.submit.progressbar.detect-duplicate": "Potential duplicates",
|
||||||
"submission.sections.submit.progressbar.license": "Deposit license",
|
"submission.sections.submit.progressbar.license": "Deposit license",
|
||||||
"submission.sections.submit.progressbar.upload": "Upload files",
|
"submission.sections.submit.progressbar.upload": "Upload files",
|
||||||
|
|
||||||
"submission.sections.upload.delete.confirm.cancel": "Cancel",
|
"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.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.submit": "Yes, I'm sure",
|
||||||
@@ -674,13 +750,16 @@
|
|||||||
"submission.sections.upload.undo": "Cancel",
|
"submission.sections.upload.undo": "Cancel",
|
||||||
"submission.sections.upload.upload-failed": "Upload failed",
|
"submission.sections.upload.upload-failed": "Upload failed",
|
||||||
"submission.sections.upload.upload-successful": "Upload successful",
|
"submission.sections.upload.upload-successful": "Upload successful",
|
||||||
|
|
||||||
"submission.submit.title": "Submission",
|
"submission.submit.title": "Submission",
|
||||||
|
|
||||||
"submission.workflow.generic.delete": "Delete",
|
"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.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": "Edit",
|
||||||
"submission.workflow.generic.edit-help": "Select this option to change the item's metadata.",
|
"submission.workflow.generic.edit-help": "Select this option to change the item's metadata.",
|
||||||
"submission.workflow.generic.view": "View",
|
"submission.workflow.generic.view": "View",
|
||||||
"submission.workflow.generic.view-help": "Select this option to view the item's metadata.",
|
"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": "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.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": "Edit",
|
||||||
@@ -693,18 +772,22 @@
|
|||||||
"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.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": "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.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.error": "Error occurred during operation...",
|
||||||
"submission.workflow.tasks.generic.processing": "Processing...",
|
"submission.workflow.tasks.generic.processing": "Processing...",
|
||||||
"submission.workflow.tasks.generic.submitter": "Submitter",
|
"submission.workflow.tasks.generic.submitter": "Submitter",
|
||||||
"submission.workflow.tasks.generic.success": "Operation successful",
|
"submission.workflow.tasks.generic.success": "Operation successful",
|
||||||
|
|
||||||
"submission.workflow.tasks.pool.claim": "Claim",
|
"submission.workflow.tasks.pool.claim": "Claim",
|
||||||
"submission.workflow.tasks.pool.claim_help": "Assign this task to yourself.",
|
"submission.workflow.tasks.pool.claim_help": "Assign this task to yourself.",
|
||||||
"submission.workflow.tasks.pool.hide-detail": "Hide detail",
|
"submission.workflow.tasks.pool.hide-detail": "Hide detail",
|
||||||
"submission.workflow.tasks.pool.show-detail": "Show detail",
|
"submission.workflow.tasks.pool.show-detail": "Show detail",
|
||||||
|
|
||||||
"title": "DSpace",
|
"title": "DSpace",
|
||||||
|
|
||||||
"uploader.browse": "browse",
|
"uploader.browse": "browse",
|
||||||
"uploader.drag-message": "Drag & Drop your files here",
|
"uploader.drag-message": "Drag & Drop your files here",
|
||||||
"uploader.or": ", or",
|
"uploader.or": ", or",
|
||||||
"uploader.processing": "Processing",
|
"uploader.processing": "Processing",
|
||||||
"uploader.queue-lenght": "Queue length"
|
"uploader.queue-length": "Queue length",
|
||||||
}
|
}
|
@@ -2,6 +2,7 @@
|
|||||||
"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.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.link.home-page": "Terug naar de homepagina",
|
||||||
"404.page-not-found": "Pagina niet gevonden",
|
"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.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.no-items": "Er kunnen geen bitstreamformaten getoond worden.",
|
||||||
"admin.registries.bitstream-formats.formats.table.internal": "intern",
|
"admin.registries.bitstream-formats.formats.table.internal": "intern",
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Ondersteuning",
|
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Ondersteuning",
|
||||||
"admin.registries.bitstream-formats.head": "Bitstream Formaat Register",
|
"admin.registries.bitstream-formats.head": "Bitstream Formaat Register",
|
||||||
"admin.registries.bitstream-formats.title": "DSpace Angular :: 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.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.head": "Metadata Register",
|
||||||
"admin.registries.metadata.schemas.no-items": "Er kunnen geen metadataschema's getoond worden.",
|
"admin.registries.metadata.schemas.no-items": "Er kunnen geen metadataschema's getoond worden.",
|
||||||
@@ -20,6 +22,7 @@
|
|||||||
"admin.registries.metadata.schemas.table.name": "Naam",
|
"admin.registries.metadata.schemas.table.name": "Naam",
|
||||||
"admin.registries.metadata.schemas.table.namespace": "Naamruimte",
|
"admin.registries.metadata.schemas.table.namespace": "Naamruimte",
|
||||||
"admin.registries.metadata.title": "DSpace Angular :: Metadata Register",
|
"admin.registries.metadata.title": "DSpace Angular :: Metadata Register",
|
||||||
|
|
||||||
"admin.registries.schema.description": "Dit is het metadataschema voor \"{{namespace}}\".",
|
"admin.registries.schema.description": "Dit is het metadataschema voor \"{{namespace}}\".",
|
||||||
"admin.registries.schema.fields.head": "Schema metadatavelden",
|
"admin.registries.schema.fields.head": "Schema metadatavelden",
|
||||||
"admin.registries.schema.fields.no-items": "Er kunnen geen metadatavelden getoond worden.",
|
"admin.registries.schema.fields.no-items": "Er kunnen geen metadatavelden getoond worden.",
|
||||||
@@ -27,15 +30,20 @@
|
|||||||
"admin.registries.schema.fields.table.scopenote": "Opmerking over bereik",
|
"admin.registries.schema.fields.table.scopenote": "Opmerking over bereik",
|
||||||
"admin.registries.schema.head": "Metadata Schema",
|
"admin.registries.schema.head": "Metadata Schema",
|
||||||
"admin.registries.schema.title": "DSpace Angular :: Metadata Schema Register",
|
"admin.registries.schema.title": "DSpace Angular :: Metadata Schema Register",
|
||||||
|
|
||||||
"auth.errors.invalid-user": "Ongeldig e-mailadres of wachtwoord.",
|
"auth.errors.invalid-user": "Ongeldig e-mailadres of wachtwoord.",
|
||||||
"auth.messages.expired": "Uw sessie is vervallen. Gelieve opnieuw aan te melden.",
|
"auth.messages.expired": "Uw sessie is vervallen. Gelieve opnieuw aan te melden.",
|
||||||
|
|
||||||
"browse.title": "Verken {{ collection }} volgens {{ field }} {{ value }}",
|
"browse.title": "Verken {{ collection }} volgens {{ field }} {{ value }}",
|
||||||
|
|
||||||
"collection.page.browse.recent.head": "Recent toegevoegd",
|
"collection.page.browse.recent.head": "Recent toegevoegd",
|
||||||
"collection.page.license": "Licentie",
|
"collection.page.license": "Licentie",
|
||||||
"collection.page.news": "Nieuws",
|
"collection.page.news": "Nieuws",
|
||||||
|
|
||||||
"community.page.license": "Licentie",
|
"community.page.license": "Licentie",
|
||||||
"community.page.news": "Nieuws",
|
"community.page.news": "Nieuws",
|
||||||
"community.sub-collection-list.head": "Collecties in deze Community",
|
"community.sub-collection-list.head": "Collecties in deze Community",
|
||||||
|
|
||||||
"error.browse-by": "Fout bij het ophalen van items",
|
"error.browse-by": "Fout bij het ophalen van items",
|
||||||
"error.collection": "Fout bij het ophalen van een collectie",
|
"error.collection": "Fout bij het ophalen van een collectie",
|
||||||
"error.community": "Fout bij het ophalen van een community",
|
"error.community": "Fout bij het ophalen van een community",
|
||||||
@@ -48,9 +56,11 @@
|
|||||||
"error.top-level-communities": "Fout bij het inladen van communities op het hoogste niveau",
|
"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.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 }}.",
|
"error.validation.pattern": "Deze invoer is niet toegelaten volgens dit patroon: {{ pattern }}.",
|
||||||
|
|
||||||
"footer.copyright": "copyright © 2002-{{ year }}",
|
"footer.copyright": "copyright © 2002-{{ year }}",
|
||||||
"footer.link.dspace": "DSpace software",
|
"footer.link.dspace": "DSpace software",
|
||||||
"footer.link.duraspace": "DuraSpace",
|
"footer.link.duraspace": "DuraSpace",
|
||||||
|
|
||||||
"form.cancel": "Annuleer",
|
"form.cancel": "Annuleer",
|
||||||
"form.first-name": "Voornaam",
|
"form.first-name": "Voornaam",
|
||||||
"form.group-collapse": "Inklappen",
|
"form.group-collapse": "Inklappen",
|
||||||
@@ -64,10 +74,12 @@
|
|||||||
"form.remove": "Verwijder",
|
"form.remove": "Verwijder",
|
||||||
"form.search": "Zoek",
|
"form.search": "Zoek",
|
||||||
"form.submit": "Verstuur",
|
"form.submit": "Verstuur",
|
||||||
|
|
||||||
"home.description": "",
|
"home.description": "",
|
||||||
"home.title": "DSpace Angular :: Home",
|
"home.title": "DSpace Angular :: Home",
|
||||||
"home.top-level-communities.head": "Communities in DSpace",
|
"home.top-level-communities.head": "Communities in DSpace",
|
||||||
"home.top-level-communities.help": "Selecteer een community om diens collecties te verkennen.",
|
"home.top-level-communities.help": "Selecteer een community om diens collecties te verkennen.",
|
||||||
|
|
||||||
"item.page.abstract": "Abstract",
|
"item.page.abstract": "Abstract",
|
||||||
"item.page.author": "Auteur",
|
"item.page.author": "Auteur",
|
||||||
"item.page.collections": "Collecties",
|
"item.page.collections": "Collecties",
|
||||||
@@ -81,6 +93,7 @@
|
|||||||
"item.page.link.full": "Volledige itemweergave",
|
"item.page.link.full": "Volledige itemweergave",
|
||||||
"item.page.link.simple": "Eenvoudige itemweergave",
|
"item.page.link.simple": "Eenvoudige itemweergave",
|
||||||
"item.page.uri": "URI",
|
"item.page.uri": "URI",
|
||||||
|
|
||||||
"loading.browse-by": "Items worden ingeladen...",
|
"loading.browse-by": "Items worden ingeladen...",
|
||||||
"loading.collection": "Collectie wordt ingeladen...",
|
"loading.collection": "Collectie wordt ingeladen...",
|
||||||
"loading.community": "Community wordt ingeladen...",
|
"loading.community": "Community wordt ingeladen...",
|
||||||
@@ -91,6 +104,7 @@
|
|||||||
"loading.search-results": "Zoekresultaten worden ingeladen...",
|
"loading.search-results": "Zoekresultaten worden ingeladen...",
|
||||||
"loading.sub-collections": "De sub-collecties worden ingeladen...",
|
"loading.sub-collections": "De sub-collecties worden ingeladen...",
|
||||||
"loading.top-level-communities": "Inladen van de Communities op het hoogste niveau...",
|
"loading.top-level-communities": "Inladen van de Communities op het hoogste niveau...",
|
||||||
|
|
||||||
"login.form.email": "Email adres",
|
"login.form.email": "Email adres",
|
||||||
"login.form.forgot-password": "Bent u uw wachtwoord vergeten?",
|
"login.form.forgot-password": "Bent u uw wachtwoord vergeten?",
|
||||||
"login.form.header": "Gelieve in te loggen in DSpace",
|
"login.form.header": "Gelieve in te loggen in DSpace",
|
||||||
@@ -98,17 +112,23 @@
|
|||||||
"login.form.password": "Wachtwoord",
|
"login.form.password": "Wachtwoord",
|
||||||
"login.form.submit": "Aanmelden",
|
"login.form.submit": "Aanmelden",
|
||||||
"login.title": "Aanmelden",
|
"login.title": "Aanmelden",
|
||||||
|
|
||||||
"logout.form.header": "Afmelden in DSpace",
|
"logout.form.header": "Afmelden in DSpace",
|
||||||
"logout.form.submit": "Afmelden",
|
"logout.form.submit": "Afmelden",
|
||||||
"logout.title": "Afmelden",
|
"logout.title": "Afmelden",
|
||||||
|
|
||||||
"nav.home": "Home",
|
"nav.home": "Home",
|
||||||
"nav.login": "Log In",
|
"nav.login": "Log In",
|
||||||
"nav.logout": "Log Uit",
|
"nav.logout": "Log Uit",
|
||||||
|
|
||||||
"pagination.results-per-page": "Resultaten per pagina",
|
"pagination.results-per-page": "Resultaten per pagina",
|
||||||
"pagination.showing.detail": "{{ range }} van {{ total }}",
|
"pagination.showing.detail": "{{ range }} van {{ total }}",
|
||||||
"pagination.showing.label": "Resultaten ",
|
"pagination.showing.label": "Resultaten ",
|
||||||
"pagination.sort-direction": "Sorteermogelijkheden",
|
"pagination.sort-direction": "Sorteermogelijkheden",
|
||||||
|
|
||||||
"search.description": "",
|
"search.description": "",
|
||||||
|
"search.title": "DSpace Angular :: Zoek",
|
||||||
|
|
||||||
"search.filters.applied.f.author": "Auteur",
|
"search.filters.applied.f.author": "Auteur",
|
||||||
"search.filters.applied.f.dateIssued.max": "Einddatum",
|
"search.filters.applied.f.dateIssued.max": "Einddatum",
|
||||||
"search.filters.applied.f.dateIssued.min": "Startdatum",
|
"search.filters.applied.f.dateIssued.min": "Startdatum",
|
||||||
@@ -126,12 +146,16 @@
|
|||||||
"search.filters.filter.show-more": "Toon meer",
|
"search.filters.filter.show-more": "Toon meer",
|
||||||
"search.filters.filter.subject.head": "Onderwerp",
|
"search.filters.filter.subject.head": "Onderwerp",
|
||||||
"search.filters.filter.subject.placeholder": "Onderwerp",
|
"search.filters.filter.subject.placeholder": "Onderwerp",
|
||||||
|
|
||||||
"search.filters.head": "Filters",
|
"search.filters.head": "Filters",
|
||||||
"search.filters.reset": "Filters verwijderen",
|
"search.filters.reset": "Filters verwijderen",
|
||||||
|
|
||||||
"search.form.search": "Zoek",
|
"search.form.search": "Zoek",
|
||||||
"search.form.search_dspace": "Zoek in DSpace",
|
"search.form.search_dspace": "Zoek in DSpace",
|
||||||
|
|
||||||
"search.results.head": "Zoekresultaten",
|
"search.results.head": "Zoekresultaten",
|
||||||
"search.results.no-results": "Er waren geen resultaten voor deze zoekopdracht",
|
"search.results.no-results": "Er waren geen resultaten voor deze zoekopdracht",
|
||||||
|
|
||||||
"search.sidebar.close": "Terug naar de resultaten",
|
"search.sidebar.close": "Terug naar de resultaten",
|
||||||
"search.sidebar.filters.title": "Filters",
|
"search.sidebar.filters.title": "Filters",
|
||||||
"search.sidebar.open": "Zoek Tools",
|
"search.sidebar.open": "Zoek Tools",
|
||||||
@@ -139,11 +163,13 @@
|
|||||||
"search.sidebar.settings.rpp": "Resultaten per pagina",
|
"search.sidebar.settings.rpp": "Resultaten per pagina",
|
||||||
"search.sidebar.settings.sort-by": "Sorteer volgens",
|
"search.sidebar.settings.sort-by": "Sorteer volgens",
|
||||||
"search.sidebar.settings.title": "Instellingen",
|
"search.sidebar.settings.title": "Instellingen",
|
||||||
"search.title": "DSpace Angular :: Zoek",
|
|
||||||
"search.view-switch.show-grid": "Toon in raster",
|
"search.view-switch.show-grid": "Toon in raster",
|
||||||
"search.view-switch.show-list": "Toon als lijst",
|
"search.view-switch.show-list": "Toon als lijst",
|
||||||
|
|
||||||
"sorting.dc.title.ASC": "Oplopend op titel",
|
"sorting.dc.title.ASC": "Oplopend op titel",
|
||||||
"sorting.dc.title.DESC": "Aflopend op titel",
|
"sorting.dc.title.DESC": "Aflopend op titel",
|
||||||
"sorting.score.DESC": "Relevantie",
|
"sorting.score.DESC": "Relevantie",
|
||||||
"title": "DSpace"
|
|
||||||
|
"title": "DSpace",
|
||||||
}
|
}
|
@@ -4,7 +4,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
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 { SharedModule } from '../../shared/shared.module';
|
||||||
import { CollectionDataService } from '../../core/data/collection-data.service';
|
import { CollectionDataService } from '../../core/data/collection-data.service';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { CommunityDataService } from '../../core/data/community-data.service';
|
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 { Router } from '@angular/router';
|
||||||
import { CreateComColPageComponent } from '../../shared/comcol-forms/create-comcol-page/create-comcol-page.component';
|
import { CreateComColPageComponent } from '../../shared/comcol-forms/create-comcol-page/create-comcol-page.component';
|
||||||
import { Collection } from '../../core/shared/collection.model';
|
import { Collection } from '../../core/shared/collection.model';
|
||||||
|
@@ -4,7 +4,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
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 { SharedModule } from '../../shared/shared.module';
|
||||||
import { CollectionDataService } from '../../core/data/collection-data.service';
|
import { CollectionDataService } from '../../core/data/collection-data.service';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Community } from '../../core/shared/community.model';
|
import { Community } from '../../core/shared/community.model';
|
||||||
import { CommunityDataService } from '../../core/data/community-data.service';
|
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 { Router } from '@angular/router';
|
||||||
import { CreateComColPageComponent } from '../../shared/comcol-forms/create-comcol-page/create-comcol-page.component';
|
import { CreateComColPageComponent } from '../../shared/comcol-forms/create-comcol-page/create-comcol-page.component';
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
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 { SharedModule } from '../../shared/shared.module';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
|
@@ -18,6 +18,7 @@ import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.compo
|
|||||||
import { ItemRelationshipsComponent } from './item-relationships/item-relationships.component';
|
import { ItemRelationshipsComponent } from './item-relationships/item-relationships.component';
|
||||||
import { EditRelationshipComponent } from './item-relationships/edit-relationship/edit-relationship.component';
|
import { EditRelationshipComponent } from './item-relationships/edit-relationship/edit-relationship.component';
|
||||||
import { EditRelationshipListComponent } from './item-relationships/edit-relationship-list/edit-relationship-list.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
|
* Module that contains all components related to the Edit Item page administrator functionality
|
||||||
@@ -44,7 +45,8 @@ import { EditRelationshipListComponent } from './item-relationships/edit-relatio
|
|||||||
ItemBitstreamsComponent,
|
ItemBitstreamsComponent,
|
||||||
EditInPlaceFieldComponent,
|
EditInPlaceFieldComponent,
|
||||||
EditRelationshipComponent,
|
EditRelationshipComponent,
|
||||||
EditRelationshipListComponent
|
EditRelationshipListComponent,
|
||||||
|
ItemMoveComponent,
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class EditItemPageModule {
|
export class EditItemPageModule {
|
||||||
|
@@ -10,6 +10,7 @@ import { ItemDeleteComponent } from './item-delete/item-delete.component';
|
|||||||
import { ItemStatusComponent } from './item-status/item-status.component';
|
import { ItemStatusComponent } from './item-status/item-status.component';
|
||||||
import { ItemMetadataComponent } from './item-metadata/item-metadata.component';
|
import { ItemMetadataComponent } from './item-metadata/item-metadata.component';
|
||||||
import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.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';
|
import { ItemRelationshipsComponent } from './item-relationships/item-relationships.component';
|
||||||
|
|
||||||
const ITEM_EDIT_WITHDRAW_PATH = 'withdraw';
|
const ITEM_EDIT_WITHDRAW_PATH = 'withdraw';
|
||||||
@@ -17,6 +18,7 @@ const ITEM_EDIT_REINSTATE_PATH = 'reinstate';
|
|||||||
const ITEM_EDIT_PRIVATE_PATH = 'private';
|
const ITEM_EDIT_PRIVATE_PATH = 'private';
|
||||||
const ITEM_EDIT_PUBLIC_PATH = 'public';
|
const ITEM_EDIT_PUBLIC_PATH = 'public';
|
||||||
const ITEM_EDIT_DELETE_PATH = 'delete';
|
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
|
* Routing module that handles the routing for the Edit Item page administrator functionality
|
||||||
@@ -104,6 +106,14 @@ const ITEM_EDIT_DELETE_PATH = 'delete';
|
|||||||
resolve: {
|
resolve: {
|
||||||
item: ItemPageResolver
|
item: ItemPageResolver
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: ITEM_EDIT_MOVE_PATH,
|
||||||
|
component: ItemMoveComponent,
|
||||||
|
data: { title: 'item.edit.move.title' },
|
||||||
|
resolve: {
|
||||||
|
item: ItemPageResolver
|
||||||
|
}
|
||||||
}])
|
}])
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<span>{{metadata?.key?.split('.').join('.​')}}</span>
|
<span>{{metadata?.key?.split('.').join('.​')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="(editable | async)" class="field-container">
|
<div *ngIf="(editable | async)" class="field-container">
|
||||||
<ds-input-suggestions [suggestions]="(metadataFieldSuggestions | async)"
|
<ds-filter-input-suggestions [suggestions]="(metadataFieldSuggestions | async)"
|
||||||
[(ngModel)]="metadata.key"
|
[(ngModel)]="metadata.key"
|
||||||
(submitSuggestion)="update(suggestionControl)"
|
(submitSuggestion)="update(suggestionControl)"
|
||||||
(clickSuggestion)="update(suggestionControl)"
|
(clickSuggestion)="update(suggestionControl)"
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
[valid]="(valid | async) !== false"
|
[valid]="(valid | async) !== false"
|
||||||
dsAutoFocus autoFocusSelector=".suggestion_input"
|
dsAutoFocus autoFocusSelector=".suggestion_input"
|
||||||
[ngModelOptions]="{standalone: true}"
|
[ngModelOptions]="{standalone: true}"
|
||||||
></ds-input-suggestions>
|
></ds-filter-input-suggestions>
|
||||||
</div>
|
</div>
|
||||||
<small class="text-danger"
|
<small class="text-danger"
|
||||||
*ngIf="(valid | async) === false">{{"item.edit.metadata.metadatafield.invalid" | translate}}</small>
|
*ngIf="(valid | async) === false">{{"item.edit.metadata.metadatafield.invalid" | translate}}</small>
|
||||||
|
@@ -10,7 +10,6 @@ import { By } from '@angular/platform-browser';
|
|||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { SharedModule } from '../../../../shared/shared.module';
|
import { SharedModule } from '../../../../shared/shared.module';
|
||||||
import { getTestScheduler } from 'jasmine-marbles';
|
import { getTestScheduler } from 'jasmine-marbles';
|
||||||
import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model';
|
|
||||||
import { TestScheduler } from 'rxjs/testing';
|
import { TestScheduler } from 'rxjs/testing';
|
||||||
import { FieldChangeType } from '../../../../core/data/object-updates/object-updates.actions';
|
import { FieldChangeType } from '../../../../core/data/object-updates/object-updates.actions';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
@@ -18,6 +17,7 @@ import { MetadatumViewModel } from '../../../../core/shared/metadata.models';
|
|||||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||||
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
||||||
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils';
|
||||||
|
import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model';
|
||||||
|
|
||||||
let comp: EditInPlaceFieldComponent;
|
let comp: EditInPlaceFieldComponent;
|
||||||
let fixture: ComponentFixture<EditInPlaceFieldComponent>;
|
let fixture: ComponentFixture<EditInPlaceFieldComponent>;
|
||||||
|
@@ -4,13 +4,13 @@ import { RegistryService } from '../../../../core/registry/registry.service';
|
|||||||
import { cloneDeep } from 'lodash';
|
import { cloneDeep } from 'lodash';
|
||||||
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
|
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
|
||||||
import { map, take } from 'rxjs/operators';
|
import { map, take } from 'rxjs/operators';
|
||||||
import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model';
|
|
||||||
import { FieldChangeType } from '../../../../core/data/object-updates/object-updates.actions';
|
import { FieldChangeType } from '../../../../core/data/object-updates/object-updates.actions';
|
||||||
import { FieldUpdate } from '../../../../core/data/object-updates/object-updates.reducer';
|
import { FieldUpdate } from '../../../../core/data/object-updates/object-updates.reducer';
|
||||||
import { ObjectUpdatesService } from '../../../../core/data/object-updates/object-updates.service';
|
import { ObjectUpdatesService } from '../../../../core/data/object-updates/object-updates.service';
|
||||||
import { NgModel } from '@angular/forms';
|
import { NgModel } from '@angular/forms';
|
||||||
import { MetadatumViewModel } from '../../../../core/shared/metadata.models';
|
import { MetadatumViewModel } from '../../../../core/shared/metadata.models';
|
||||||
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
||||||
|
import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
// tslint:disable-next-line:component-selector
|
// tslint:disable-next-line:component-selector
|
||||||
|
@@ -0,0 +1,48 @@
|
|||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<h2>{{'item.edit.move.head' | translate: {id: (itemRD$ | async)?.payload?.handle} }}</h2>
|
||||||
|
<p>{{'item.edit.move.description' | translate}}</p>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<ds-dso-input-suggestions #f id="search-form"
|
||||||
|
[suggestions]="(collectionSearchResults | async)"
|
||||||
|
[placeholder]="'item.edit.move.search.placeholder'| translate"
|
||||||
|
[action]="getCurrentUrl()"
|
||||||
|
[name]="'item-move'"
|
||||||
|
[(ngModel)]="selectedCollectionName"
|
||||||
|
(clickSuggestion)="onClick($event)"
|
||||||
|
(typeSuggestion)="resetCollection($event)"
|
||||||
|
(findSuggestions)="findSuggestions($event)"
|
||||||
|
(click)="f.open()"
|
||||||
|
ngDefaultControl>
|
||||||
|
</ds-dso-input-suggestions>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<p>
|
||||||
|
<input type="checkbox" name="tc" [(ngModel)]="inheritPolicies" id="inheritPoliciesCheckbox">
|
||||||
|
<label for="inheritPoliciesCheckbox">{{'item.edit.move.inheritpolicies.checkbox' |
|
||||||
|
translate}}</label>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{{'item.edit.move.inheritpolicies.description' | translate}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button (click)="moveCollection()" class="btn btn-primary" [disabled]=!canSubmit>
|
||||||
|
<span *ngIf="!processing"> {{'item.edit.move.move' | translate}}</span>
|
||||||
|
<span *ngIf="processing"><i class='fas fa-circle-notch fa-spin'></i>
|
||||||
|
{{'item.edit.move.processing' | translate}}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button [routerLink]="['/items/', (itemRD$ | async)?.payload?.id, 'edit']"
|
||||||
|
class="btn btn-outline-secondary">
|
||||||
|
{{'item.edit.move.cancel' | translate}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@@ -0,0 +1,172 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
import { Item } from '../../../core/shared/item.model';
|
||||||
|
import { RouterStub } from '../../../shared/testing/router-stub';
|
||||||
|
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 { ItemMoveComponent } from './item-move.component';
|
||||||
|
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
|
||||||
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
|
import { SearchService } from '../../../+search-page/search-service/search.service';
|
||||||
|
import { of as observableOf } from 'rxjs';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { ItemDataService } from '../../../core/data/item-data.service';
|
||||||
|
import { RemoteData } from '../../../core/data/remote-data';
|
||||||
|
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||||
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
|
import { RestResponse } from '../../../core/cache/response.models';
|
||||||
|
import { Collection } from '../../../core/shared/collection.model';
|
||||||
|
|
||||||
|
describe('ItemMoveComponent', () => {
|
||||||
|
let comp: ItemMoveComponent;
|
||||||
|
let fixture: ComponentFixture<ItemMoveComponent>;
|
||||||
|
|
||||||
|
const mockItem = Object.assign(new Item(), {
|
||||||
|
id: 'fake-id',
|
||||||
|
handle: 'fake/handle',
|
||||||
|
lastModified: '2018'
|
||||||
|
});
|
||||||
|
|
||||||
|
const itemPageUrl = `fake-url/${mockItem.id}`;
|
||||||
|
const routerStub = Object.assign(new RouterStub(), {
|
||||||
|
url: `${itemPageUrl}/edit`
|
||||||
|
});
|
||||||
|
|
||||||
|
const mockItemDataService = jasmine.createSpyObj({
|
||||||
|
moveToCollection: observableOf(new RestResponse(true, 200, 'Success'))
|
||||||
|
});
|
||||||
|
|
||||||
|
const mockItemDataServiceFail = jasmine.createSpyObj({
|
||||||
|
moveToCollection: observableOf(new RestResponse(false, 500, 'Internal server error'))
|
||||||
|
});
|
||||||
|
|
||||||
|
const routeStub = {
|
||||||
|
data: observableOf({
|
||||||
|
item: new RemoteData(false, false, true, null, {
|
||||||
|
id: 'item1'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
const collection1 = Object.assign(new Collection(),{
|
||||||
|
uuid: 'collection-uuid-1',
|
||||||
|
name: 'Test collection 1',
|
||||||
|
self: 'self-link-1',
|
||||||
|
});
|
||||||
|
|
||||||
|
const collection2 = Object.assign(new Collection(),{
|
||||||
|
uuid: 'collection-uuid-2',
|
||||||
|
name: 'Test collection 2',
|
||||||
|
self: 'self-link-2',
|
||||||
|
});
|
||||||
|
|
||||||
|
const mockSearchService = {
|
||||||
|
search: () => {
|
||||||
|
return observableOf(new RemoteData(false, false, true, null,
|
||||||
|
new PaginatedList(null, [
|
||||||
|
{
|
||||||
|
indexableObject: collection1,
|
||||||
|
hitHighlights: {}
|
||||||
|
}, {
|
||||||
|
indexableObject: collection2,
|
||||||
|
hitHighlights: {}
|
||||||
|
}
|
||||||
|
])));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const notificationsServiceStub = new NotificationsServiceStub();
|
||||||
|
|
||||||
|
describe('ItemMoveComponent success', () => {
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
||||||
|
declarations: [ItemMoveComponent],
|
||||||
|
providers: [
|
||||||
|
{provide: ActivatedRoute, useValue: routeStub},
|
||||||
|
{provide: Router, useValue: routerStub},
|
||||||
|
{provide: ItemDataService, useValue: mockItemDataService},
|
||||||
|
{provide: NotificationsService, useValue: notificationsServiceStub},
|
||||||
|
{provide: SearchService, useValue: mockSearchService},
|
||||||
|
], schemas: [
|
||||||
|
CUSTOM_ELEMENTS_SCHEMA
|
||||||
|
]
|
||||||
|
}).compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ItemMoveComponent);
|
||||||
|
comp = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
it('should load suggestions', () => {
|
||||||
|
const expected = [
|
||||||
|
collection1,
|
||||||
|
collection2
|
||||||
|
];
|
||||||
|
|
||||||
|
comp.collectionSearchResults.subscribe((value) => {
|
||||||
|
expect(value).toEqual(expected);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('should get current url ', () => {
|
||||||
|
expect(comp.getCurrentUrl()).toEqual('fake-url/fake-id/edit');
|
||||||
|
});
|
||||||
|
it('should on click select the correct collection name and id', () => {
|
||||||
|
const data = collection1;
|
||||||
|
|
||||||
|
comp.onClick(data);
|
||||||
|
|
||||||
|
expect(comp.selectedCollectionName).toEqual('Test collection 1');
|
||||||
|
expect(comp.selectedCollection).toEqual(collection1);
|
||||||
|
});
|
||||||
|
describe('moveCollection', () => {
|
||||||
|
it('should call itemDataService.moveToCollection', () => {
|
||||||
|
comp.itemId = 'item-id';
|
||||||
|
comp.selectedCollectionName = 'selected-collection-id';
|
||||||
|
comp.selectedCollection = collection1;
|
||||||
|
comp.moveCollection();
|
||||||
|
|
||||||
|
expect(mockItemDataService.moveToCollection).toHaveBeenCalledWith('item-id', collection1);
|
||||||
|
});
|
||||||
|
it('should call notificationsService success message on success', () => {
|
||||||
|
comp.moveCollection();
|
||||||
|
|
||||||
|
expect(notificationsServiceStub.success).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('ItemMoveComponent fail', () => {
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
||||||
|
declarations: [ItemMoveComponent],
|
||||||
|
providers: [
|
||||||
|
{provide: ActivatedRoute, useValue: routeStub},
|
||||||
|
{provide: Router, useValue: routerStub},
|
||||||
|
{provide: ItemDataService, useValue: mockItemDataServiceFail},
|
||||||
|
{provide: NotificationsService, useValue: notificationsServiceStub},
|
||||||
|
{provide: SearchService, useValue: mockSearchService},
|
||||||
|
], schemas: [
|
||||||
|
CUSTOM_ELEMENTS_SCHEMA
|
||||||
|
]
|
||||||
|
}).compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ItemMoveComponent);
|
||||||
|
comp = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should call notificationsService error message on fail', () => {
|
||||||
|
comp.moveCollection();
|
||||||
|
|
||||||
|
expect(notificationsServiceStub.error).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@@ -0,0 +1,139 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { SearchService } from '../../../+search-page/search-service/search.service';
|
||||||
|
import { first, map } from 'rxjs/operators';
|
||||||
|
import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model';
|
||||||
|
import { SearchOptions } from '../../../+search-page/search-options.model';
|
||||||
|
import { RemoteData } from '../../../core/data/remote-data';
|
||||||
|
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
||||||
|
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||||
|
import { SearchResult } from '../../../+search-page/search-result.model';
|
||||||
|
import { Item } from '../../../core/shared/item.model';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { getSucceededRemoteData } from '../../../core/shared/operators';
|
||||||
|
import { ItemDataService } from '../../../core/data/item-data.service';
|
||||||
|
import { getItemEditPath } from '../../item-page-routing.module';
|
||||||
|
import { Observable, of as observableOf } from 'rxjs';
|
||||||
|
import { RestResponse } from '../../../core/cache/response.models';
|
||||||
|
import { Collection } from '../../../core/shared/collection.model';
|
||||||
|
import { tap } from 'rxjs/internal/operators/tap';
|
||||||
|
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
||||||
|
import { PaginatedSearchOptions } from '../../../+search-page/paginated-search-options.model';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'ds-item-move',
|
||||||
|
templateUrl: './item-move.component.html'
|
||||||
|
})
|
||||||
|
/**
|
||||||
|
* Component that handles the moving of an item to a different collection
|
||||||
|
*/
|
||||||
|
export class ItemMoveComponent implements OnInit {
|
||||||
|
/**
|
||||||
|
* TODO: There is currently no backend support to change the owningCollection and inherit policies,
|
||||||
|
* TODO: when this is added, the inherit policies option should be used.
|
||||||
|
*/
|
||||||
|
|
||||||
|
selectorType = DSpaceObjectType.COLLECTION;
|
||||||
|
|
||||||
|
inheritPolicies = false;
|
||||||
|
itemRD$: Observable<RemoteData<Item>>;
|
||||||
|
collectionSearchResults: Observable<any[]> = observableOf([]);
|
||||||
|
selectedCollectionName: string;
|
||||||
|
selectedCollection: Collection;
|
||||||
|
canSubmit = false;
|
||||||
|
|
||||||
|
itemId: string;
|
||||||
|
processing = false;
|
||||||
|
|
||||||
|
pagination = new PaginationComponentOptions();
|
||||||
|
|
||||||
|
constructor(private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
private notificationsService: NotificationsService,
|
||||||
|
private itemDataService: ItemDataService,
|
||||||
|
private searchService: SearchService,
|
||||||
|
private translateService: TranslateService) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.itemRD$ = this.route.data.pipe(map((data) => data.item), getSucceededRemoteData()) as Observable<RemoteData<Item>>;
|
||||||
|
this.itemRD$.subscribe((rd) => {
|
||||||
|
this.itemId = rd.payload.id;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.pagination.pageSize = 5;
|
||||||
|
this.loadSuggestions('');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find suggestions based on entered query
|
||||||
|
* @param query - Search query
|
||||||
|
*/
|
||||||
|
findSuggestions(query): void {
|
||||||
|
this.loadSuggestions(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load all available collections to move the item to.
|
||||||
|
* TODO: When the API support it, only fetch collections where user has ADD rights to.
|
||||||
|
*/
|
||||||
|
loadSuggestions(query): void {
|
||||||
|
this.collectionSearchResults = this.searchService.search(new PaginatedSearchOptions({
|
||||||
|
pagination: this.pagination,
|
||||||
|
dsoType: DSpaceObjectType.COLLECTION,
|
||||||
|
query: query
|
||||||
|
})).pipe(
|
||||||
|
first(),
|
||||||
|
map((rd: RemoteData<PaginatedList<SearchResult<DSpaceObject>>>) => {
|
||||||
|
return rd.payload.page.map((searchResult) => {
|
||||||
|
return searchResult.indexableObject
|
||||||
|
})
|
||||||
|
}) ,
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the collection name and id based on the selected value
|
||||||
|
* @param data - obtained from the ds-input-suggestions component
|
||||||
|
*/
|
||||||
|
onClick(data: any): void {
|
||||||
|
this.selectedCollection = data;
|
||||||
|
this.selectedCollectionName = data.name;
|
||||||
|
this.canSubmit = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {string} the current URL
|
||||||
|
*/
|
||||||
|
getCurrentUrl() {
|
||||||
|
return this.router.url;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Moves the item to a new collection based on the selected collection
|
||||||
|
*/
|
||||||
|
moveCollection() {
|
||||||
|
this.processing = true;
|
||||||
|
this.itemDataService.moveToCollection(this.itemId, this.selectedCollection).pipe(first()).subscribe(
|
||||||
|
(response: RestResponse) => {
|
||||||
|
this.router.navigate([getItemEditPath(this.itemId)]);
|
||||||
|
if (response.isSuccessful) {
|
||||||
|
this.notificationsService.success(this.translateService.get('item.edit.move.success'));
|
||||||
|
} else {
|
||||||
|
this.notificationsService.error(this.translateService.get('item.edit.move.error'));
|
||||||
|
}
|
||||||
|
this.processing = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the can submit when the user changes the content of the input field
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
resetCollection(data: any) {
|
||||||
|
this.canSubmit = false;
|
||||||
|
}
|
||||||
|
}
|
@@ -4,7 +4,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!operation.disabled" class="col-9 float-left action-button">
|
<div *ngIf="!operation.disabled" class="col-9 float-left action-button">
|
||||||
<a class="btn btn-outline-secondary" href="{{operation.operationUrl}}">
|
<a class="btn btn-outline-secondary" [routerLink]="operation.operationUrl">
|
||||||
{{'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate}}
|
{{'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -3,6 +3,7 @@ import {async, TestBed} from '@angular/core/testing';
|
|||||||
import { ItemOperationComponent } from './item-operation.component';
|
import { ItemOperationComponent } from './item-operation.component';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
|
|
||||||
describe('ItemOperationComponent', () => {
|
describe('ItemOperationComponent', () => {
|
||||||
let itemOperation: ItemOperation;
|
let itemOperation: ItemOperation;
|
||||||
@@ -12,7 +13,7 @@ describe('ItemOperationComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot()],
|
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])],
|
||||||
declarations: [ItemOperationComponent]
|
declarations: [ItemOperationComponent]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
@@ -38,8 +38,8 @@ describe('EditRelationshipListComponent', () => {
|
|||||||
relationshipType = Object.assign(new RelationshipType(), {
|
relationshipType = Object.assign(new RelationshipType(), {
|
||||||
id: '1',
|
id: '1',
|
||||||
uuid: '1',
|
uuid: '1',
|
||||||
leftLabel: 'isAuthorOfPublication',
|
leftwardType: 'isAuthorOfPublication',
|
||||||
rightLabel: 'isPublicationOfAuthor'
|
rightwardType: 'isPublicationOfAuthor'
|
||||||
});
|
});
|
||||||
|
|
||||||
relationships = [
|
relationships = [
|
||||||
@@ -119,7 +119,7 @@ describe('EditRelationshipListComponent', () => {
|
|||||||
de = fixture.debugElement;
|
de = fixture.debugElement;
|
||||||
comp.item = item;
|
comp.item = item;
|
||||||
comp.url = url;
|
comp.url = url;
|
||||||
comp.relationshipLabel = relationshipType.leftLabel;
|
comp.relationshipLabel = relationshipType.leftwardType;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -34,8 +34,8 @@ describe('EditRelationshipComponent', () => {
|
|||||||
relationshipType = Object.assign(new RelationshipType(), {
|
relationshipType = Object.assign(new RelationshipType(), {
|
||||||
id: '1',
|
id: '1',
|
||||||
uuid: '1',
|
uuid: '1',
|
||||||
leftLabel: 'isAuthorOfPublication',
|
leftwardType: 'isAuthorOfPublication',
|
||||||
rightLabel: 'isPublicationOfAuthor'
|
rightwardType: 'isPublicationOfAuthor'
|
||||||
});
|
});
|
||||||
|
|
||||||
relationships = [
|
relationships = [
|
||||||
|
@@ -68,8 +68,8 @@ describe('ItemRelationshipsComponent', () => {
|
|||||||
relationshipType = Object.assign(new RelationshipType(), {
|
relationshipType = Object.assign(new RelationshipType(), {
|
||||||
id: '1',
|
id: '1',
|
||||||
uuid: '1',
|
uuid: '1',
|
||||||
leftLabel: 'isAuthorOfPublication',
|
leftwardType: 'isAuthorOfPublication',
|
||||||
rightLabel: 'isPublicationOfAuthor'
|
rightwardType: 'isPublicationOfAuthor'
|
||||||
});
|
});
|
||||||
|
|
||||||
relationships = [
|
relationships = [
|
||||||
|
@@ -79,6 +79,7 @@ export class ItemStatusComponent implements OnInit {
|
|||||||
this.operations.push(new ItemOperation('public', this.getCurrentUrl(item) + '/public'));
|
this.operations.push(new ItemOperation('public', this.getCurrentUrl(item) + '/public'));
|
||||||
}
|
}
|
||||||
this.operations.push(new ItemOperation('delete', this.getCurrentUrl(item) + '/delete'));
|
this.operations.push(new ItemOperation('delete', this.getCurrentUrl(item) + '/delete'));
|
||||||
|
this.operations.push(new ItemOperation('move', this.getCurrentUrl(item) + '/move'));
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -56,10 +56,10 @@ export const filterRelationsByTypeLabel = (label: string, thisId?: string) =>
|
|||||||
return relatedItems$.pipe(
|
return relatedItems$.pipe(
|
||||||
map((arr) => relsCurrentPage.filter((rel: Relationship, idx: number) =>
|
map((arr) => relsCurrentPage.filter((rel: Relationship, idx: number) =>
|
||||||
hasValue(relTypesCurrentPage[idx]) && (
|
hasValue(relTypesCurrentPage[idx]) && (
|
||||||
(hasNoValue(thisId) && (relTypesCurrentPage[idx].leftLabel === label ||
|
(hasNoValue(thisId) && (relTypesCurrentPage[idx].leftwardType === label ||
|
||||||
relTypesCurrentPage[idx].rightLabel === label)) ||
|
relTypesCurrentPage[idx].rightwardType === label)) ||
|
||||||
(thisId === arr[idx][0].id && relTypesCurrentPage[idx].leftLabel === label) ||
|
(thisId === arr[idx][0].id && relTypesCurrentPage[idx].leftwardType === label) ||
|
||||||
(thisId === arr[idx][1].id && relTypesCurrentPage[idx].rightLabel === label)
|
(thisId === arr[idx][1].id && relTypesCurrentPage[idx].rightwardType === label)
|
||||||
)
|
)
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
@@ -3,7 +3,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<img class="mb-4 login-logo" src="assets/images/dspace-logo.png">
|
<img class="mb-4 login-logo" src="assets/images/dspace-logo.png">
|
||||||
<h1 class="h3 mb-0 font-weight-normal">{{"login.form.header" | translate}}</h1>
|
<h1 class="h3 mb-0 font-weight-normal">{{"login.form.header" | translate}}</h1>
|
||||||
<ds-log-in></ds-log-in>
|
<ds-log-in
|
||||||
|
[isStandalonePage]="true"></ds-log-in>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -8,7 +8,7 @@ import { MyDSpaceConfigurationValueType } from './my-dspace-configuration-value-
|
|||||||
import { RoleService } from '../core/roles/role.service';
|
import { RoleService } from '../core/roles/role.service';
|
||||||
import { SearchConfigurationOption } from '../+search-page/search-switch-configuration/search-configuration-option.model';
|
import { SearchConfigurationOption } from '../+search-page/search-switch-configuration/search-configuration-option.model';
|
||||||
import { SearchConfigurationService } from '../+search-page/search-service/search-configuration.service';
|
import { SearchConfigurationService } from '../+search-page/search-service/search-configuration.service';
|
||||||
import { RouteService } from '../shared/services/route.service';
|
import { RouteService } from '../core/services/route.service';
|
||||||
import { PaginationComponentOptions } from '../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../shared/pagination/pagination-component-options.model';
|
||||||
import { SortDirection, SortOptions } from '../core/cache/models/sort-options.model';
|
import { SortDirection, SortOptions } from '../core/cache/models/sort-options.model';
|
||||||
import { SearchFixedFilterService } from '../+search-page/search-filters/search-filter/search-fixed-filter.service';
|
import { SearchFixedFilterService } from '../+search-page/search-filters/search-filter/search-fixed-filter.service';
|
||||||
|
@@ -17,7 +17,7 @@ import { HostWindowService } from '../shared/host-window.service';
|
|||||||
import { PaginationComponentOptions } from '../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../shared/pagination/pagination-component-options.model';
|
||||||
import { RemoteData } from '../core/data/remote-data';
|
import { RemoteData } from '../core/data/remote-data';
|
||||||
import { MyDSpacePageComponent, SEARCH_CONFIG_SERVICE } from './my-dspace-page.component';
|
import { MyDSpacePageComponent, SEARCH_CONFIG_SERVICE } from './my-dspace-page.component';
|
||||||
import { RouteService } from '../shared/services/route.service';
|
import { RouteService } from '../core/services/route.service';
|
||||||
import { routeServiceStub } from '../shared/testing/route-service-stub';
|
import { routeServiceStub } from '../shared/testing/route-service-stub';
|
||||||
import { SearchConfigurationServiceStub } from '../shared/testing/search-configuration-service-stub';
|
import { SearchConfigurationServiceStub } from '../shared/testing/search-configuration-service-stub';
|
||||||
import { SearchService } from '../+search-page/search-service/search.service';
|
import { SearchService } from '../+search-page/search-service/search.service';
|
||||||
@@ -82,9 +82,6 @@ describe('MyDSpacePageComponent', () => {
|
|||||||
expand: () => this.isCollapsed = observableOf(false)
|
expand: () => this.isCollapsed = observableOf(false)
|
||||||
};
|
};
|
||||||
const mockFixedFilterService: SearchFixedFilterService = {
|
const mockFixedFilterService: SearchFixedFilterService = {
|
||||||
getQueryByFilterName: (filter: string) => {
|
|
||||||
return observableOf(undefined)
|
|
||||||
}
|
|
||||||
} as SearchFixedFilterService;
|
} as SearchFixedFilterService;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
|
@@ -4,12 +4,12 @@ import { SearchSidebarService } from './search-sidebar/search-sidebar.service';
|
|||||||
import { SearchPageComponent } from './search-page.component';
|
import { SearchPageComponent } from './search-page.component';
|
||||||
import { ChangeDetectionStrategy, Component, Inject, Input, OnInit } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, Inject, Input, OnInit } from '@angular/core';
|
||||||
import { pushInOut } from '../shared/animations/push';
|
import { pushInOut } from '../shared/animations/push';
|
||||||
import { RouteService } from '../shared/services/route.service';
|
|
||||||
import { SearchConfigurationService } from './search-service/search-configuration.service';
|
import { SearchConfigurationService } from './search-service/search-configuration.service';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { PaginatedSearchOptions } from './paginated-search-options.model';
|
import { PaginatedSearchOptions } from './paginated-search-options.model';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../+my-dspace-page/my-dspace-page.component';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
|
import { RouteService } from '../core/services/route.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component renders a search page using a configuration as input.
|
* This component renders a search page using a configuration as input.
|
||||||
|
@@ -4,12 +4,12 @@ import { SearchSidebarService } from './search-sidebar/search-sidebar.service';
|
|||||||
import { SearchPageComponent } from './search-page.component';
|
import { SearchPageComponent } from './search-page.component';
|
||||||
import { ChangeDetectionStrategy, Component, Inject, Input, OnInit } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, Inject, Input, OnInit } from '@angular/core';
|
||||||
import { pushInOut } from '../shared/animations/push';
|
import { pushInOut } from '../shared/animations/push';
|
||||||
import { RouteService } from '../shared/services/route.service';
|
|
||||||
import { SearchConfigurationService } from './search-service/search-configuration.service';
|
import { SearchConfigurationService } from './search-service/search-configuration.service';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { PaginatedSearchOptions } from './paginated-search-options.model';
|
import { PaginatedSearchOptions } from './paginated-search-options.model';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../+my-dspace-page/my-dspace-page.component';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
|
import { RouteService } from '../core/services/route.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component renders a simple item page.
|
* This component renders a simple item page.
|
||||||
|
@@ -15,13 +15,13 @@
|
|||||||
| translate}}</a>
|
| translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ds-input-suggestions [suggestions]="(filterSearchResults | async)"
|
<ds-filter-input-suggestions [suggestions]="(filterSearchResults | async)"
|
||||||
[placeholder]="'search.filters.filter.' + filterConfig.name + '.placeholder'| translate"
|
[placeholder]="'search.filters.filter.' + filterConfig.name + '.placeholder'| translate"
|
||||||
[action]="getCurrentUrl()"
|
[action]="currentUrl"
|
||||||
[name]="filterConfig.paramName"
|
[name]="filterConfig.paramName"
|
||||||
[(ngModel)]="filter"
|
[(ngModel)]="filter"
|
||||||
(submitSuggestion)="onSubmit($event)"
|
(submitSuggestion)="onSubmit($event)"
|
||||||
(clickSuggestion)="onSubmit($event)"
|
(clickSuggestion)="onSubmit($event)"
|
||||||
(findSuggestions)="findSuggestions($event)"
|
(findSuggestions)="findSuggestions($event)"
|
||||||
ngDefaultControl></ds-input-suggestions>
|
ngDefaultControl></ds-filter-input-suggestions>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<a *ngIf="isVisible | async" class="d-flex flex-row"
|
<a *ngIf="isVisible | async" class="d-flex flex-row"
|
||||||
[routerLink]="[getSearchLink()]"
|
[routerLink]="[searchLink]"
|
||||||
[queryParams]="addQueryParams" queryParamsHandling="merge">
|
[queryParams]="addQueryParams" queryParamsHandling="merge">
|
||||||
<input type="checkbox" [checked]="false" class="my-1 align-self-stretch"/>
|
<input type="checkbox" [checked]="false" class="my-1 align-self-stretch"/>
|
||||||
<span class="filter-value px-1">{{filterValue.value}}</span>
|
<span class="filter-value px-1">{{filterValue.value}}</span>
|
||||||
|
@@ -50,6 +50,10 @@ export class SearchFacetOptionComponent implements OnInit, OnDestroy {
|
|||||||
*/
|
*/
|
||||||
addQueryParams;
|
addQueryParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to the search page
|
||||||
|
*/
|
||||||
|
searchLink: string;
|
||||||
/**
|
/**
|
||||||
* Subscription to unsubscribe from on destroy
|
* Subscription to unsubscribe from on destroy
|
||||||
*/
|
*/
|
||||||
@@ -66,6 +70,7 @@ export class SearchFacetOptionComponent implements OnInit, OnDestroy {
|
|||||||
* Initializes all observable instance variables and starts listening to them
|
* Initializes all observable instance variables and starts listening to them
|
||||||
*/
|
*/
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.searchLink = this.getSearchLink();
|
||||||
this.isVisible = this.isChecked().pipe(map((checked: boolean) => !checked));
|
this.isVisible = this.isChecked().pipe(map((checked: boolean) => !checked));
|
||||||
this.sub = observableCombineLatest(this.selectedValues$, this.searchConfigService.searchOptions)
|
this.sub = observableCombineLatest(this.selectedValues$, this.searchConfigService.searchOptions)
|
||||||
.subscribe(([selectedValues, searchOptions]) => {
|
.subscribe(([selectedValues, searchOptions]) => {
|
||||||
@@ -83,7 +88,7 @@ export class SearchFacetOptionComponent implements OnInit, OnDestroy {
|
|||||||
/**
|
/**
|
||||||
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
||||||
*/
|
*/
|
||||||
public getSearchLink(): string {
|
private getSearchLink(): string {
|
||||||
if (this.inPlaceSearch) {
|
if (this.inPlaceSearch) {
|
||||||
return './';
|
return './';
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<a *ngIf="isVisible | async" class="d-flex flex-row"
|
<a *ngIf="isVisible | async" class="d-flex flex-row"
|
||||||
[routerLink]="[getSearchLink()]"
|
[routerLink]="[searchLink]"
|
||||||
[queryParams]="changeQueryParams" queryParamsHandling="merge">
|
[queryParams]="changeQueryParams" queryParamsHandling="merge">
|
||||||
<span class="filter-value px-1">{{filterValue.label}}</span>
|
<span class="filter-value px-1">{{filterValue.label}}</span>
|
||||||
<span class="float-right filter-value-count ml-auto">
|
<span class="float-right filter-value-count ml-auto">
|
||||||
|
@@ -56,6 +56,11 @@ export class SearchFacetRangeOptionComponent implements OnInit, OnDestroy {
|
|||||||
*/
|
*/
|
||||||
sub: Subscription;
|
sub: Subscription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to the search page
|
||||||
|
*/
|
||||||
|
searchLink: string;
|
||||||
|
|
||||||
constructor(protected searchService: SearchService,
|
constructor(protected searchService: SearchService,
|
||||||
protected filterService: SearchFilterService,
|
protected filterService: SearchFilterService,
|
||||||
protected searchConfigService: SearchConfigurationService,
|
protected searchConfigService: SearchConfigurationService,
|
||||||
@@ -67,6 +72,7 @@ export class SearchFacetRangeOptionComponent implements OnInit, OnDestroy {
|
|||||||
* Initializes all observable instance variables and starts listening to them
|
* Initializes all observable instance variables and starts listening to them
|
||||||
*/
|
*/
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.searchLink = this.getSearchLink();
|
||||||
this.isVisible = this.isChecked().pipe(map((checked: boolean) => !checked));
|
this.isVisible = this.isChecked().pipe(map((checked: boolean) => !checked));
|
||||||
this.sub = this.searchConfigService.searchOptions.subscribe(() => {
|
this.sub = this.searchConfigService.searchOptions.subscribe(() => {
|
||||||
this.updateChangeParams()
|
this.updateChangeParams()
|
||||||
@@ -83,7 +89,7 @@ export class SearchFacetRangeOptionComponent implements OnInit, OnDestroy {
|
|||||||
/**
|
/**
|
||||||
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
||||||
*/
|
*/
|
||||||
public getSearchLink(): string {
|
private getSearchLink(): string {
|
||||||
if (this.inPlaceSearch) {
|
if (this.inPlaceSearch) {
|
||||||
return './';
|
return './';
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<a class="d-flex flex-row"
|
<a class="d-flex flex-row"
|
||||||
[routerLink]="[getSearchLink()]"
|
[routerLink]="[searchLink]"
|
||||||
[queryParams]="removeQueryParams" queryParamsHandling="merge">
|
[queryParams]="removeQueryParams" queryParamsHandling="merge">
|
||||||
<input type="checkbox" [checked]="true" class="my-1 align-self-stretch"/>
|
<input type="checkbox" [checked]="true" class="my-1 align-self-stretch"/>
|
||||||
<span class="filter-value pl-1 text-capitalize">{{selectedValue.label}}</span>
|
<span class="filter-value pl-1 text-capitalize">{{selectedValue.label}}</span>
|
||||||
|
@@ -49,6 +49,11 @@ export class SearchFacetSelectedOptionComponent implements OnInit, OnDestroy {
|
|||||||
*/
|
*/
|
||||||
sub: Subscription;
|
sub: Subscription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to the search page
|
||||||
|
*/
|
||||||
|
searchLink: string;
|
||||||
|
|
||||||
constructor(protected searchService: SearchService,
|
constructor(protected searchService: SearchService,
|
||||||
protected filterService: SearchFilterService,
|
protected filterService: SearchFilterService,
|
||||||
protected searchConfigService: SearchConfigurationService,
|
protected searchConfigService: SearchConfigurationService,
|
||||||
@@ -64,12 +69,13 @@ export class SearchFacetSelectedOptionComponent implements OnInit, OnDestroy {
|
|||||||
.subscribe(([selectedValues, searchOptions]) => {
|
.subscribe(([selectedValues, searchOptions]) => {
|
||||||
this.updateRemoveParams(selectedValues)
|
this.updateRemoveParams(selectedValues)
|
||||||
});
|
});
|
||||||
|
this.searchLink = this.getSearchLink();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
||||||
*/
|
*/
|
||||||
public getSearchLink(): string {
|
private getSearchLink(): string {
|
||||||
if (this.inPlaceSearch) {
|
if (this.inPlaceSearch) {
|
||||||
return './';
|
return './';
|
||||||
}
|
}
|
||||||
|
@@ -21,9 +21,9 @@ import { SearchService } from '../../../search-service/search.service';
|
|||||||
import { FILTER_CONFIG, IN_PLACE_SEARCH, SearchFilterService } from '../search-filter.service';
|
import { FILTER_CONFIG, IN_PLACE_SEARCH, SearchFilterService } from '../search-filter.service';
|
||||||
import { SearchConfigurationService } from '../../../search-service/search-configuration.service';
|
import { SearchConfigurationService } from '../../../search-service/search-configuration.service';
|
||||||
import { getSucceededRemoteData } from '../../../../core/shared/operators';
|
import { getSucceededRemoteData } from '../../../../core/shared/operators';
|
||||||
import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model';
|
|
||||||
import { SearchOptions } from '../../../search-options.model';
|
import { SearchOptions } from '../../../search-options.model';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../+my-dspace-page/my-dspace-page.component';
|
||||||
|
import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-search-facet-filter',
|
selector: 'ds-search-facet-filter',
|
||||||
@@ -80,6 +80,11 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy {
|
|||||||
*/
|
*/
|
||||||
searchOptions$: Observable<SearchOptions>;
|
searchOptions$: Observable<SearchOptions>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The current URL
|
||||||
|
*/
|
||||||
|
currentUrl: string;
|
||||||
|
|
||||||
constructor(protected searchService: SearchService,
|
constructor(protected searchService: SearchService,
|
||||||
protected filterService: SearchFilterService,
|
protected filterService: SearchFilterService,
|
||||||
protected rdbs: RemoteDataBuildService,
|
protected rdbs: RemoteDataBuildService,
|
||||||
@@ -93,6 +98,7 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy {
|
|||||||
* Initializes all observable instance variables and starts listening to them
|
* Initializes all observable instance variables and starts listening to them
|
||||||
*/
|
*/
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.currentUrl = this.router.url;
|
||||||
this.filterValues$ = new BehaviorSubject(new RemoteData(true, false, undefined, undefined, undefined));
|
this.filterValues$ = new BehaviorSubject(new RemoteData(true, false, undefined, undefined, undefined));
|
||||||
this.currentPage = this.getCurrentPage().pipe(distinctUntilChanged());
|
this.currentPage = this.getCurrentPage().pipe(distinctUntilChanged());
|
||||||
|
|
||||||
@@ -215,13 +221,6 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy {
|
|||||||
return this.filterService.getPage(this.filterConfig.name);
|
return this.filterService.getPage(this.filterConfig.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {string} the current URL
|
|
||||||
*/
|
|
||||||
getCurrentUrl() {
|
|
||||||
return this.router.url;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Submits a new active custom value to the filter from the input field
|
* Submits a new active custom value to the filter from the input field
|
||||||
* @param data The string from the input field
|
* @param data The string from the input field
|
||||||
|
@@ -28,11 +28,7 @@ describe('SearchFilterService', () => {
|
|||||||
pageSize: 2
|
pageSize: 2
|
||||||
});
|
});
|
||||||
|
|
||||||
const mockFixedFilterService: SearchFixedFilterService = {
|
const mockFixedFilterService: SearchFixedFilterService = {} as SearchFixedFilterService
|
||||||
getQueryByFilterName: (filter: string) => {
|
|
||||||
return observableOf(undefined)
|
|
||||||
}
|
|
||||||
} as SearchFixedFilterService
|
|
||||||
const value1 = 'random value';
|
const value1 = 'random value';
|
||||||
// const value2 = 'another value';
|
// const value2 = 'another value';
|
||||||
const store: Store<SearchFiltersState> = jasmine.createSpyObj('store', {
|
const store: Store<SearchFiltersState> = jasmine.createSpyObj('store', {
|
||||||
@@ -264,20 +260,6 @@ describe('SearchFilterService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when the getCurrentFixedFilter method is called', () => {
|
|
||||||
const filter = 'filter';
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
spyOn(routeServiceStub, 'getRouteParameterValue').and.returnValue(observableOf(filter));
|
|
||||||
spyOn(mockFixedFilterService, 'getQueryByFilterName').and.returnValue(observableOf(filter));
|
|
||||||
service.getCurrentFixedFilter().subscribe();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should call getQueryByFilterName on the fixed-filter service with the correct filter', () => {
|
|
||||||
expect(mockFixedFilterService.getQueryByFilterName).toHaveBeenCalledWith(filter);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('when the getCurrentView method is called', () => {
|
describe('when the getCurrentView method is called', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
spyOn(routeServiceStub, 'getQueryParameterValue');
|
spyOn(routeServiceStub, 'getQueryParameterValue');
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { combineLatest as observableCombineLatest, Observable } from 'rxjs';
|
import { combineLatest as observableCombineLatest, Observable } from 'rxjs';
|
||||||
import { mergeMap, map, distinctUntilChanged } from 'rxjs/operators';
|
import { distinctUntilChanged, map, mergeMap } from 'rxjs/operators';
|
||||||
import { Injectable, InjectionToken } from '@angular/core';
|
import { Injectable, InjectionToken } from '@angular/core';
|
||||||
import { SearchFiltersState, SearchFilterState } from './search-filter.reducer';
|
import { SearchFiltersState, SearchFilterState } from './search-filter.reducer';
|
||||||
import { createSelector, MemoizedSelector, select, Store } from '@ngrx/store';
|
import { createSelector, MemoizedSelector, select, Store } from '@ngrx/store';
|
||||||
@@ -14,16 +14,12 @@ import {
|
|||||||
} from './search-filter.actions';
|
} from './search-filter.actions';
|
||||||
import { hasValue, isNotEmpty, } from '../../../shared/empty.util';
|
import { hasValue, isNotEmpty, } from '../../../shared/empty.util';
|
||||||
import { SearchFilterConfig } from '../../search-service/search-filter-config.model';
|
import { SearchFilterConfig } from '../../search-service/search-filter-config.model';
|
||||||
import { RouteService } from '../../../shared/services/route.service';
|
import { RouteService } from '../../../core/services/route.service';
|
||||||
import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model';
|
import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model';
|
||||||
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
||||||
import { SearchOptions } from '../../search-options.model';
|
|
||||||
import { PaginatedSearchOptions } from '../../paginated-search-options.model';
|
|
||||||
import { SearchFixedFilterService } from './search-fixed-filter.service';
|
import { SearchFixedFilterService } from './search-fixed-filter.service';
|
||||||
import { Params } from '@angular/router';
|
import { Params } from '@angular/router';
|
||||||
import * as postcss from 'postcss';
|
|
||||||
import prefix = postcss.vendor.prefix;
|
|
||||||
// const spy = create();
|
|
||||||
const filterStateSelector = (state: SearchFiltersState) => state.searchFilter;
|
const filterStateSelector = (state: SearchFiltersState) => state.searchFilter;
|
||||||
|
|
||||||
export const FILTER_CONFIG: InjectionToken<SearchFilterConfig> = new InjectionToken<SearchFilterConfig>('filterConfig');
|
export const FILTER_CONFIG: InjectionToken<SearchFilterConfig> = new InjectionToken<SearchFilterConfig>('filterConfig');
|
||||||
@@ -117,15 +113,6 @@ export class SearchFilterService {
|
|||||||
return this.routeService.getQueryParamsWithPrefix('f.');
|
return this.routeService.getQueryParamsWithPrefix('f.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch the current active fixed filter from the route parameters and return the query by filter name
|
|
||||||
* @returns {Observable<string>}
|
|
||||||
*/
|
|
||||||
getCurrentFixedFilter(): Observable<string> {
|
|
||||||
const filter: Observable<string> = this.routeService.getRouteParameterValue('filter');
|
|
||||||
return filter.pipe(mergeMap((f) => this.fixedFilterService.getQueryByFilterName(f)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the current view from the query parameters
|
* Fetch the current view from the query parameters
|
||||||
* @returns {Observable<string>}
|
* @returns {Observable<string>}
|
||||||
|
@@ -1,48 +1,27 @@
|
|||||||
import { SearchFixedFilterService } from './search-fixed-filter.service';
|
import { SearchFixedFilterService } from './search-fixed-filter.service';
|
||||||
import { RouteService } from '../../../shared/services/route.service';
|
|
||||||
import { RequestService } from '../../../core/data/request.service';
|
import { RequestService } from '../../../core/data/request.service';
|
||||||
import { HALEndpointService } from '../../../core/shared/hal-endpoint.service';
|
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { RequestEntry } from '../../../core/data/request.reducer';
|
import { RequestEntry } from '../../../core/data/request.reducer';
|
||||||
import { FilteredDiscoveryQueryResponse, RestResponse } from '../../../core/cache/response.models';
|
import { FilteredDiscoveryQueryResponse } from '../../../core/cache/response.models';
|
||||||
|
|
||||||
describe('SearchFixedFilterService', () => {
|
describe('SearchFixedFilterService', () => {
|
||||||
let service: SearchFixedFilterService;
|
let service: SearchFixedFilterService;
|
||||||
|
|
||||||
const filterQuery = 'filter:query';
|
const filterQuery = 'filter:query';
|
||||||
|
|
||||||
const routeServiceStub = {} as RouteService;
|
|
||||||
const requestServiceStub = Object.assign({
|
const requestServiceStub = Object.assign({
|
||||||
/* tslint:disable:no-empty */
|
/* tslint:disable:no-empty */
|
||||||
configure: () => {},
|
configure: () => {
|
||||||
|
},
|
||||||
/* tslint:enable:no-empty */
|
/* tslint:enable:no-empty */
|
||||||
generateRequestId: () => 'fake-id',
|
generateRequestId: () => 'fake-id',
|
||||||
getByHref: () => observableOf(Object.assign(new RequestEntry(), {
|
getByHref: () => observableOf(Object.assign(new RequestEntry(), {
|
||||||
response: new FilteredDiscoveryQueryResponse(filterQuery, 200, 'OK')
|
response: new FilteredDiscoveryQueryResponse(filterQuery, 200, 'OK')
|
||||||
}))
|
}))
|
||||||
}) as RequestService;
|
}) as RequestService;
|
||||||
const halServiceStub = Object.assign(new HALEndpointService(requestServiceStub, undefined), {
|
|
||||||
getEndpoint: () => observableOf('fake-url')
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
service = new SearchFixedFilterService(routeServiceStub, requestServiceStub, halServiceStub);
|
service = new SearchFixedFilterService();
|
||||||
});
|
|
||||||
|
|
||||||
describe('when getQueryByFilterName is called with a filterName', () => {
|
|
||||||
it('should return the filter query', () => {
|
|
||||||
service.getQueryByFilterName('filter').subscribe((query) => {
|
|
||||||
expect(query).toBe(filterQuery);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('when getQueryByFilterName is called without a filterName', () => {
|
|
||||||
it('should return undefined', () => {
|
|
||||||
service.getQueryByFilterName(undefined).subscribe((query) => {
|
|
||||||
expect(query).toBeUndefined();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when getQueryByRelations is called', () => {
|
describe('when getQueryByRelations is called', () => {
|
||||||
|
@@ -1,63 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { flatMap, map, switchMap, tap } from 'rxjs/operators';
|
|
||||||
import { Observable, of as observableOf } from 'rxjs';
|
|
||||||
import { HALEndpointService } from '../../../core/shared/hal-endpoint.service';
|
|
||||||
import { GetRequest, RestRequest } from '../../../core/data/request.models';
|
|
||||||
import { RequestService } from '../../../core/data/request.service';
|
|
||||||
import { ResponseParsingService } from '../../../core/data/parsing.service';
|
|
||||||
import { GenericConstructor } from '../../../core/shared/generic-constructor';
|
|
||||||
import { FilteredDiscoveryPageResponseParsingService } from '../../../core/data/filtered-discovery-page-response-parsing.service';
|
|
||||||
import { hasValue } from '../../../shared/empty.util';
|
|
||||||
import { configureRequest, getResponseFromEntry } from '../../../core/shared/operators';
|
|
||||||
import { RouteService } from '../../../shared/services/route.service';
|
|
||||||
import { FilteredDiscoveryQueryResponse } from '../../../core/cache/response.models';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service for performing actions on the filtered-discovery-pages REST endpoint
|
* Service for performing actions on the filtered-discovery-pages REST endpoint
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SearchFixedFilterService {
|
export class SearchFixedFilterService {
|
||||||
private queryByFilterPath = 'filtered-discovery-pages';
|
|
||||||
|
|
||||||
constructor(private routeService: RouteService,
|
|
||||||
protected requestService: RequestService,
|
|
||||||
private halService: HALEndpointService) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the filter query for a certain filter by name
|
|
||||||
* @param {string} filterName Name of the filter
|
|
||||||
* @returns {Observable<string>} Filter query
|
|
||||||
*/
|
|
||||||
getQueryByFilterName(filterName: string): Observable<string> {
|
|
||||||
if (hasValue(filterName)) {
|
|
||||||
const requestUuid = this.requestService.generateRequestId();
|
|
||||||
const requestObs = this.halService.getEndpoint(this.queryByFilterPath).pipe(
|
|
||||||
map((url: string) => {
|
|
||||||
url += ('/' + filterName);
|
|
||||||
const request = new GetRequest(requestUuid, url);
|
|
||||||
return Object.assign(request, {
|
|
||||||
getResponseParser(): GenericConstructor<ResponseParsingService> {
|
|
||||||
return FilteredDiscoveryPageResponseParsingService;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
configureRequest(this.requestService)
|
|
||||||
);
|
|
||||||
|
|
||||||
const requestEntryObs = requestObs.pipe(
|
|
||||||
switchMap((request: RestRequest) => this.requestService.getByHref(request.href)),
|
|
||||||
);
|
|
||||||
const filterQuery = requestEntryObs.pipe(
|
|
||||||
getResponseFromEntry(),
|
|
||||||
map((response: FilteredDiscoveryQueryResponse) =>
|
|
||||||
response.filterQuery
|
|
||||||
));
|
|
||||||
return filterQuery;
|
|
||||||
}
|
|
||||||
return observableOf(undefined);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the query for looking up items by relation type
|
* Get the query for looking up items by relation type
|
||||||
|
@@ -15,14 +15,14 @@
|
|||||||
| translate}}</a>
|
| translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ds-input-suggestions [suggestions]="(filterSearchResults | async)"
|
<ds-filter-input-suggestions [suggestions]="(filterSearchResults | async)"
|
||||||
[placeholder]="'search.filters.filter.' + filterConfig.name + '.placeholder'| translate"
|
[placeholder]="'search.filters.filter.' + filterConfig.name + '.placeholder'| translate"
|
||||||
[action]="getCurrentUrl()"
|
[action]="currentUrl"
|
||||||
[name]="filterConfig.paramName"
|
[name]="filterConfig.paramName"
|
||||||
[(ngModel)]="filter"
|
[(ngModel)]="filter"
|
||||||
(submitSuggestion)="onSubmit($event)"
|
(submitSuggestion)="onSubmit($event)"
|
||||||
(clickSuggestion)="onClick($event)"
|
(clickSuggestion)="onClick($event)"
|
||||||
(findSuggestions)="findSuggestions($event)"
|
(findSuggestions)="findSuggestions($event)"
|
||||||
ngDefaultControl
|
ngDefaultControl
|
||||||
></ds-input-suggestions>
|
></ds-filter-input-suggestions>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="filters py-2">
|
<div class="filters py-2">
|
||||||
<form #form="ngForm" (ngSubmit)="onSubmit()" class="add-filter row"
|
<form #form="ngForm" (ngSubmit)="onSubmit()" class="add-filter row"
|
||||||
[action]="getCurrentUrl()">
|
[action]="currentUrl">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<input type="text" [(ngModel)]="range[0]" [name]="filterConfig.paramName + '.min'"
|
<input type="text" [(ngModel)]="range[0]" [name]="filterConfig.paramName + '.min'"
|
||||||
class="form-control" (blur)="onSubmit()"
|
class="form-control" (blur)="onSubmit()"
|
||||||
|
@@ -16,7 +16,7 @@ import { RouterStub } from '../../../../shared/testing/router-stub';
|
|||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { PageInfo } from '../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../core/shared/page-info.model';
|
||||||
import { SearchRangeFilterComponent } from './search-range-filter.component';
|
import { SearchRangeFilterComponent } from './search-range-filter.component';
|
||||||
import { RouteService } from '../../../../shared/services/route.service';
|
import { RouteService } from '../../../../core/services/route.service';
|
||||||
import { RemoteDataBuildService } from '../../../../core/cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../../../../core/cache/builders/remote-data-build.service';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../+my-dspace-page/my-dspace-page.component';
|
||||||
import { SearchConfigurationServiceStub } from '../../../../shared/testing/search-configuration-service-stub';
|
import { SearchConfigurationServiceStub } from '../../../../shared/testing/search-configuration-service-stub';
|
||||||
|
@@ -14,7 +14,7 @@ import { FILTER_CONFIG, IN_PLACE_SEARCH, SearchFilterService } from '../search-f
|
|||||||
import { SearchService } from '../../../search-service/search.service';
|
import { SearchService } from '../../../search-service/search.service';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import { RouteService } from '../../../../shared/services/route.service';
|
import { RouteService } from '../../../../core/services/route.service';
|
||||||
import { hasValue } from '../../../../shared/empty.util';
|
import { hasValue } from '../../../../shared/empty.util';
|
||||||
import { SearchConfigurationService } from '../../../search-service/search-configuration.service';
|
import { SearchConfigurationService } from '../../../search-service/search-configuration.service';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../+my-dspace-page/my-dspace-page.component';
|
||||||
|
@@ -15,13 +15,13 @@
|
|||||||
| translate}}</a>
|
| translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ds-input-suggestions [suggestions]="(filterSearchResults | async)"
|
<ds-filter-input-suggestions [suggestions]="(filterSearchResults | async)"
|
||||||
[placeholder]="'search.filters.filter.' + filterConfig.name + '.placeholder'| translate"
|
[placeholder]="'search.filters.filter.' + filterConfig.name + '.placeholder'| translate"
|
||||||
[action]="getCurrentUrl()"
|
[action]="currentUrl"
|
||||||
[name]="filterConfig.paramName"
|
[name]="filterConfig.paramName"
|
||||||
[(ngModel)]="filter"
|
[(ngModel)]="filter"
|
||||||
(submitSuggestion)="onSubmit($event)"
|
(submitSuggestion)="onSubmit($event)"
|
||||||
(clickSuggestion)="onClick($event)"
|
(clickSuggestion)="onClick($event)"
|
||||||
(findSuggestions)="findSuggestions($event)"
|
(findSuggestions)="findSuggestions($event)"
|
||||||
ngDefaultControl></ds-input-suggestions>
|
ngDefaultControl></ds-filter-input-suggestions>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -4,4 +4,4 @@
|
|||||||
<ds-search-filter [filter]="filter" [inPlaceSearch]="inPlaceSearch"></ds-search-filter>
|
<ds-search-filter [filter]="filter" [inPlaceSearch]="inPlaceSearch"></ds-search-filter>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="btn btn-primary" [routerLink]="[getSearchLink()]" [queryParams]="clearParams | async" queryParamsHandling="merge" role="button">{{"search.filters.reset" | translate}}</a>
|
<a class="btn btn-primary" [routerLink]="[searchLink]" [queryParams]="clearParams | async" queryParamsHandling="merge" role="button">{{"search.filters.reset" | translate}}</a>
|
||||||
|
@@ -58,7 +58,7 @@ describe('SearchFiltersComponent', () => {
|
|||||||
describe('when the getSearchLink method is called', () => {
|
describe('when the getSearchLink method is called', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
spyOn(searchService, 'getSearchLink');
|
spyOn(searchService, 'getSearchLink');
|
||||||
comp.getSearchLink();
|
(comp as any).getSearchLink();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call getSearchLink on the searchService', () => {
|
it('should call getSearchLink on the searchService', () => {
|
||||||
|
@@ -37,6 +37,11 @@ export class SearchFiltersComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
@Input() inPlaceSearch;
|
@Input() inPlaceSearch;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to the search page
|
||||||
|
*/
|
||||||
|
searchLink: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize instance variables
|
* Initialize instance variables
|
||||||
* @param {SearchService} searchService
|
* @param {SearchService} searchService
|
||||||
@@ -60,12 +65,13 @@ export class SearchFiltersComponent implements OnInit {
|
|||||||
Object.keys(filters).forEach((f) => filters[f] = null);
|
Object.keys(filters).forEach((f) => filters[f] = null);
|
||||||
return filters;
|
return filters;
|
||||||
}));
|
}));
|
||||||
|
this.searchLink = this.getSearchLink();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
||||||
*/
|
*/
|
||||||
public getSearchLink(): string {
|
private getSearchLink(): string {
|
||||||
if (this.inPlaceSearch) {
|
if (this.inPlaceSearch) {
|
||||||
return './';
|
return './';
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,6 @@
|
|||||||
|
<a class="badge badge-primary mr-1 mb-1 text-capitalize"
|
||||||
|
[routerLink]="searchLink"
|
||||||
|
[queryParams]="(removeParameters | async)" queryParamsHandling="merge">
|
||||||
|
{{('search.filters.applied.' + key) | translate}}: {{normalizeFilterValue(value)}}
|
||||||
|
<span> ×</span>
|
||||||
|
</a>
|
@@ -0,0 +1,87 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { Observable, of as observableOf } from 'rxjs';
|
||||||
|
import { Params } from '@angular/router';
|
||||||
|
import { SearchLabelComponent } from './search-label.component';
|
||||||
|
import { ObjectKeysPipe } from '../../../shared/utils/object-keys-pipe';
|
||||||
|
import { SearchService } from '../../search-service/search.service';
|
||||||
|
import { SEARCH_CONFIG_SERVICE } from '../../../+my-dspace-page/my-dspace-page.component';
|
||||||
|
import { SearchServiceStub } from '../../../shared/testing/search-service-stub';
|
||||||
|
import { SearchConfigurationServiceStub } from '../../../shared/testing/search-configuration-service-stub';
|
||||||
|
|
||||||
|
describe('SearchLabelComponent', () => {
|
||||||
|
let comp: SearchLabelComponent;
|
||||||
|
let fixture: ComponentFixture<SearchLabelComponent>;
|
||||||
|
|
||||||
|
const searchLink = '/search';
|
||||||
|
let searchService;
|
||||||
|
|
||||||
|
const key1 = 'author';
|
||||||
|
const key2 = 'subject';
|
||||||
|
const value1 = 'Test, Author';
|
||||||
|
const normValue1 = 'Test, Author';
|
||||||
|
const value2 = 'TestSubject';
|
||||||
|
const value3 = 'Test, Authority,authority';
|
||||||
|
const normValue3 = 'Test, Authority';
|
||||||
|
const filter1 = [key1, value1];
|
||||||
|
const filter2 = [key2, value2];
|
||||||
|
const mockFilters = [
|
||||||
|
filter1,
|
||||||
|
filter2
|
||||||
|
];
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule],
|
||||||
|
declarations: [SearchLabelComponent, ObjectKeysPipe],
|
||||||
|
providers: [
|
||||||
|
{ provide: SearchService, useValue: new SearchServiceStub(searchLink) },
|
||||||
|
{ provide: SEARCH_CONFIG_SERVICE, useValue: new SearchConfigurationServiceStub() }
|
||||||
|
// { provide: SearchConfigurationService, useValue: {getCurrentFrontendFilters : () => observableOf({})} }
|
||||||
|
],
|
||||||
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
|
}).overrideComponent(SearchLabelComponent, {
|
||||||
|
set: { changeDetection: ChangeDetectionStrategy.Default }
|
||||||
|
}).compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(SearchLabelComponent);
|
||||||
|
comp = fixture.componentInstance;
|
||||||
|
searchService = (comp as any).searchService;
|
||||||
|
comp.key = key1;
|
||||||
|
comp.value = value1;
|
||||||
|
(comp as any).appliedFilters = observableOf(mockFilters);
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('when getRemoveParams is called', () => {
|
||||||
|
let obs: Observable<Params>;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
obs = comp.getRemoveParams();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return all params but the provided filter', () => {
|
||||||
|
obs.subscribe((params) => {
|
||||||
|
// Should contain only filter2 and page: length == 2
|
||||||
|
expect(Object.keys(params).length).toBe(2);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('when normalizeFilterValue is called', () => {
|
||||||
|
it('should return properly filter value', () => {
|
||||||
|
let result: string;
|
||||||
|
|
||||||
|
result = comp.normalizeFilterValue(value1);
|
||||||
|
expect(result).toBe(normValue1);
|
||||||
|
|
||||||
|
result = comp.normalizeFilterValue(value3);
|
||||||
|
expect(result).toBe(normValue3);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
@@ -0,0 +1,75 @@
|
|||||||
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
import { Params } from '@angular/router';
|
||||||
|
import { SearchService } from '../../search-service/search.service';
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
|
import { hasValue, isNotEmpty } from '../../../shared/empty.util';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'ds-search-label',
|
||||||
|
templateUrl: './search-label.component.html',
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Component that represents the label containing the currently active filters
|
||||||
|
*/
|
||||||
|
export class SearchLabelComponent implements OnInit {
|
||||||
|
@Input() key: string;
|
||||||
|
@Input() value: string;
|
||||||
|
@Input() inPlaceSearch: boolean;
|
||||||
|
@Input() appliedFilters: Observable<Params>;
|
||||||
|
searchLink: string;
|
||||||
|
removeParameters: Observable<Params>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the instance variable
|
||||||
|
*/
|
||||||
|
constructor(
|
||||||
|
private searchService: SearchService) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.searchLink = this.getSearchLink();
|
||||||
|
this.removeParameters = this.getRemoveParams();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculates the parameters that should change if a given value for the given filter would be removed from the active filters
|
||||||
|
* @returns {Observable<Params>} The changed filter parameters
|
||||||
|
*/
|
||||||
|
getRemoveParams(): Observable<Params> {
|
||||||
|
return this.appliedFilters.pipe(
|
||||||
|
map((filters) => {
|
||||||
|
const field: string = Object.keys(filters).find((f) => f === this.key);
|
||||||
|
const newValues = hasValue(filters[field]) ? filters[field].filter((v) => v !== this.value) : null;
|
||||||
|
return {
|
||||||
|
[field]: isNotEmpty(newValues) ? newValues : null,
|
||||||
|
page: 1
|
||||||
|
};
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
||||||
|
*/
|
||||||
|
private getSearchLink(): string {
|
||||||
|
if (this.inPlaceSearch) {
|
||||||
|
return './';
|
||||||
|
}
|
||||||
|
return this.searchService.getSearchLink();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO to review after https://github.com/DSpace/dspace-angular/issues/368 is resolved
|
||||||
|
* Strips authority operator from filter value
|
||||||
|
* e.g. 'test ,authority' => 'test'
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
*/
|
||||||
|
normalizeFilterValue(value: string) {
|
||||||
|
// const pattern = /,[^,]*$/g;
|
||||||
|
const pattern = /,authority*$/g;
|
||||||
|
return value.replace(pattern, '');
|
||||||
|
}
|
||||||
|
}
|
@@ -1,13 +1,7 @@
|
|||||||
<div class="row mb-3 mb-md-1">
|
<div class="row mb-3 mb-md-1">
|
||||||
<div class="labels col-sm-9 offset-sm-3">
|
<div class="labels col-sm-9 offset-sm-3">
|
||||||
<ng-container *ngFor="let key of ((appliedFilters | async) | dsObjectKeys)"><!--Do not remove this to prevent uneven spacing
|
<ng-container *ngFor="let key of ((appliedFilters | async) | dsObjectKeys)">
|
||||||
--><a *ngFor="let values of (appliedFilters | async)[key]"
|
<ds-search-label *ngFor="let value of (appliedFilters | async)[key]" [inPlaceSearch]="inPlaceSearch" [key]="key" [value]="value" [appliedFilters]="appliedFilters"></ds-search-label>
|
||||||
class="badge badge-primary mr-1 mb-1 text-capitalize"
|
</ng-container>
|
||||||
[routerLink]="getSearchLink()"
|
|
||||||
[queryParams]="(getRemoveParams(key, values) | async)" queryParamsHandling="merge">
|
|
||||||
{{('search.filters.applied.' + key) | translate}}: {{normalizeFilterValue(values)}}
|
|
||||||
<span> ×</span>
|
|
||||||
</a><!--Do not remove this to prevent uneven spacing
|
|
||||||
--></ng-container>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -6,11 +6,9 @@ import { SearchService } from '../search-service/search.service';
|
|||||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { SearchServiceStub } from '../../shared/testing/search-service-stub';
|
import { SearchServiceStub } from '../../shared/testing/search-service-stub';
|
||||||
import { Observable, of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { Params } from '@angular/router';
|
|
||||||
import { ObjectKeysPipe } from '../../shared/utils/object-keys-pipe';
|
import { ObjectKeysPipe } from '../../shared/utils/object-keys-pipe';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../+my-dspace-page/my-dspace-page.component';
|
||||||
import { SearchConfigurationServiceStub } from '../../shared/testing/search-configuration-service-stub';
|
|
||||||
|
|
||||||
describe('SearchLabelsComponent', () => {
|
describe('SearchLabelsComponent', () => {
|
||||||
let comp: SearchLabelsComponent;
|
let comp: SearchLabelsComponent;
|
||||||
@@ -22,10 +20,7 @@ describe('SearchLabelsComponent', () => {
|
|||||||
const field1 = 'author';
|
const field1 = 'author';
|
||||||
const field2 = 'subject';
|
const field2 = 'subject';
|
||||||
const value1 = 'Test, Author';
|
const value1 = 'Test, Author';
|
||||||
const normValue1 = 'Test, Author';
|
|
||||||
const value2 = 'TestSubject';
|
const value2 = 'TestSubject';
|
||||||
const value3 = 'Test, Authority,authority';
|
|
||||||
const normValue3 = 'Test, Authority';
|
|
||||||
const filter1 = [field1, value1];
|
const filter1 = [field1, value1];
|
||||||
const filter2 = [field2, value2];
|
const filter2 = [field2, value2];
|
||||||
const mockFilters = [
|
const mockFilters = [
|
||||||
@@ -39,8 +34,7 @@ describe('SearchLabelsComponent', () => {
|
|||||||
declarations: [SearchLabelsComponent, ObjectKeysPipe],
|
declarations: [SearchLabelsComponent, ObjectKeysPipe],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: SearchService, useValue: new SearchServiceStub(searchLink) },
|
{ provide: SearchService, useValue: new SearchServiceStub(searchLink) },
|
||||||
{ provide: SEARCH_CONFIG_SERVICE, useValue: new SearchConfigurationServiceStub() }
|
{ provide: SEARCH_CONFIG_SERVICE, useValue: { getCurrentFrontendFilters: () => observableOf(mockFilters) } }
|
||||||
// { provide: SearchConfigurationService, useValue: {getCurrentFrontendFilters : () => observableOf({})} }
|
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
}).overrideComponent(SearchLabelsComponent, {
|
}).overrideComponent(SearchLabelsComponent, {
|
||||||
@@ -56,30 +50,11 @@ describe('SearchLabelsComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when getRemoveParams is called', () => {
|
describe('when the component has been initialized', () => {
|
||||||
let obs: Observable<Params>;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
obs = comp.getRemoveParams(filter1[0], filter1[1]);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return all params but the provided filter', () => {
|
it('should return all params but the provided filter', () => {
|
||||||
obs.subscribe((params) => {
|
comp.appliedFilters.subscribe((filters) => {
|
||||||
// Should contain only filter2 and page: length == 2
|
expect(filters).toBe(mockFilters);
|
||||||
expect(Object.keys(params).length).toBe(2);
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when normalizeFilterValue is called', () => {
|
|
||||||
it('should return properly filter value', () => {
|
|
||||||
let result: string;
|
|
||||||
|
|
||||||
result = comp.normalizeFilterValue(value1);
|
|
||||||
expect(result).toBe(normValue1);
|
|
||||||
|
|
||||||
result = comp.normalizeFilterValue(value3);
|
|
||||||
expect(result).toBe(normValue3);
|
|
||||||
})
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Inject, Input } from '@angular/core';
|
import { Component, Inject, Input, OnInit } from '@angular/core';
|
||||||
import { SearchService } from '../search-service/search.service';
|
import { SearchService } from '../search-service/search.service';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { Params } from '@angular/router';
|
import { Params } from '@angular/router';
|
||||||
@@ -31,50 +31,7 @@ export class SearchLabelsComponent {
|
|||||||
* Initialize the instance variable
|
* Initialize the instance variable
|
||||||
*/
|
*/
|
||||||
constructor(
|
constructor(
|
||||||
private searchService: SearchService,
|
|
||||||
@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService) {
|
@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService) {
|
||||||
this.appliedFilters = this.searchConfigService.getCurrentFrontendFilters();
|
this.appliedFilters = this.searchConfigService.getCurrentFrontendFilters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculates the parameters that should change if a given value for the given filter would be removed from the active filters
|
|
||||||
* @param {string} filterField The filter field parameter name from which the value should be removed
|
|
||||||
* @param {string} filterValue The value that is removed for this given filter field
|
|
||||||
* @returns {Observable<Params>} The changed filter parameters
|
|
||||||
*/
|
|
||||||
getRemoveParams(filterField: string, filterValue: string): Observable<Params> {
|
|
||||||
return this.appliedFilters.pipe(
|
|
||||||
map((filters) => {
|
|
||||||
const field: string = Object.keys(filters).find((f) => f === filterField);
|
|
||||||
const newValues = hasValue(filters[field]) ? filters[field].filter((v) => v !== filterValue) : null;
|
|
||||||
return {
|
|
||||||
[field]: isNotEmpty(newValues) ? newValues : null,
|
|
||||||
page: 1
|
|
||||||
};
|
|
||||||
})
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
|
||||||
*/
|
|
||||||
public getSearchLink(): string {
|
|
||||||
if (this.inPlaceSearch) {
|
|
||||||
return './';
|
|
||||||
}
|
|
||||||
return this.searchService.getSearchLink();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO to review after https://github.com/DSpace/dspace-angular/issues/368 is resolved
|
|
||||||
* Strips authority operator from filter value
|
|
||||||
* e.g. 'test ,authority' => 'test'
|
|
||||||
*
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
normalizeFilterValue(value: string) {
|
|
||||||
// const pattern = /,[^,]*$/g;
|
|
||||||
const pattern = /,authority*$/g;
|
|
||||||
return value.replace(pattern, '');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -13,4 +13,5 @@ import { ConfigurationSearchPageComponent } from './configuration-search-page.co
|
|||||||
])
|
])
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class SearchPageRoutingModule { }
|
export class SearchPageRoutingModule {
|
||||||
|
}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<ds-search-form *ngIf="searchEnabled" id="search-form"
|
<ds-search-form *ngIf="searchEnabled" id="search-form"
|
||||||
[query]="(searchOptions$ | async)?.query"
|
[query]="(searchOptions$ | async)?.query"
|
||||||
[scope]="(searchOptions$ | async)?.scope"
|
[scope]="(searchOptions$ | async)?.scope"
|
||||||
[currentUrl]="getSearchLink()"
|
[currentUrl]="searchLink"
|
||||||
[scopes]="(scopeListRD$ | async)"
|
[scopes]="(scopeListRD$ | async)"
|
||||||
[inPlaceSearch]="inPlaceSearch">
|
[inPlaceSearch]="inPlaceSearch">
|
||||||
</ds-search-form>
|
</ds-search-form>
|
||||||
@@ -15,12 +15,12 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="search-body"
|
<div id="search-body"
|
||||||
class="row-offcanvas row-offcanvas-left"
|
class="row-offcanvas row-offcanvas-left"
|
||||||
[@pushInOut]="(isSidebarCollapsed() | async) ? 'collapsed' : 'expanded'">
|
[@pushInOut]="(isSidebarCollapsed$ | async) ? 'collapsed' : 'expanded'">
|
||||||
<ds-search-sidebar *ngIf="(isXsOrSm$ | async)" class="col-12"
|
<ds-search-sidebar *ngIf="(isXsOrSm$ | async)" class="col-12"
|
||||||
id="search-sidebar-sm"
|
id="search-sidebar-sm"
|
||||||
[resultCount]="(resultsRD$ | async)?.payload.totalElements"
|
[resultCount]="(resultsRD$ | async)?.payload.totalElements"
|
||||||
(toggleSidebar)="closeSidebar()"
|
(toggleSidebar)="closeSidebar()"
|
||||||
[ngClass]="{'active': !(isSidebarCollapsed() | async)}">
|
[ngClass]="{'active': !(isSidebarCollapsed$ | async)}">
|
||||||
</ds-search-sidebar>
|
</ds-search-sidebar>
|
||||||
<div id="search-content" class="col-12">
|
<div id="search-content" class="col-12">
|
||||||
<div class="d-block d-md-none search-controls clearfix">
|
<div class="d-block d-md-none search-controls clearfix">
|
||||||
|
@@ -21,7 +21,7 @@ import { SearchFilterService } from './search-filters/search-filter/search-filte
|
|||||||
import { SearchConfigurationService } from './search-service/search-configuration.service';
|
import { SearchConfigurationService } from './search-service/search-configuration.service';
|
||||||
import { RemoteData } from '../core/data/remote-data';
|
import { RemoteData } from '../core/data/remote-data';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../+my-dspace-page/my-dspace-page.component';
|
||||||
import { RouteService } from '../shared/services/route.service';
|
import { RouteService } from '../core/services/route.service';
|
||||||
import { SearchConfigurationServiceStub } from '../shared/testing/search-configuration-service-stub';
|
import { SearchConfigurationServiceStub } from '../shared/testing/search-configuration-service-stub';
|
||||||
import { PaginatedSearchOptions } from './paginated-search-options.model';
|
import { PaginatedSearchOptions } from './paginated-search-options.model';
|
||||||
import { SearchFixedFilterService } from './search-filters/search-filter/search-fixed-filter.service';
|
import { SearchFixedFilterService } from './search-filters/search-filter/search-fixed-filter.service';
|
||||||
@@ -89,11 +89,7 @@ const routeServiceStub = {
|
|||||||
return observableOf('')
|
return observableOf('')
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const mockFixedFilterService: SearchFixedFilterService = {
|
const mockFixedFilterService: SearchFixedFilterService = {} as SearchFixedFilterService;
|
||||||
getQueryByFilterName: (filter: string) => {
|
|
||||||
return observableOf(undefined)
|
|
||||||
}
|
|
||||||
} as SearchFixedFilterService;
|
|
||||||
|
|
||||||
export function configureSearchComponentTestingModule(compType) {
|
export function configureSearchComponentTestingModule(compType) {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
@@ -201,7 +197,7 @@ describe('SearchPageComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
menu = fixture.debugElement.query(By.css('#search-sidebar-sm')).nativeElement;
|
menu = fixture.debugElement.query(By.css('#search-sidebar-sm')).nativeElement;
|
||||||
comp.isSidebarCollapsed = () => observableOf(true);
|
(comp as any).isSidebarCollapsed$ = observableOf(true);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -216,7 +212,7 @@ describe('SearchPageComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
menu = fixture.debugElement.query(By.css('#search-sidebar-sm')).nativeElement;
|
menu = fixture.debugElement.query(By.css('#search-sidebar-sm')).nativeElement;
|
||||||
comp.isSidebarCollapsed = () => observableOf(false);
|
(comp as any).isSidebarCollapsed$ = observableOf(false);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ import { SearchSidebarService } from './search-sidebar/search-sidebar.service';
|
|||||||
import { hasValue, isNotEmpty } from '../shared/empty.util';
|
import { hasValue, isNotEmpty } from '../shared/empty.util';
|
||||||
import { SearchConfigurationService } from './search-service/search-configuration.service';
|
import { SearchConfigurationService } from './search-service/search-configuration.service';
|
||||||
import { getSucceededRemoteData } from '../core/shared/operators';
|
import { getSucceededRemoteData } from '../core/shared/operators';
|
||||||
import { RouteService } from '../shared/services/route.service';
|
import { RouteService } from '../core/services/route.service';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../+my-dspace-page/my-dspace-page.component';
|
||||||
|
|
||||||
export const SEARCH_ROUTE = '/search';
|
export const SEARCH_ROUTE = '/search';
|
||||||
@@ -91,6 +91,16 @@ export class SearchPageComponent implements OnInit {
|
|||||||
@Input()
|
@Input()
|
||||||
configuration$: Observable<string>;
|
configuration$: Observable<string>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to the search page
|
||||||
|
*/
|
||||||
|
searchLink: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Observable for whether or not the sidebar is currently collapsed
|
||||||
|
*/
|
||||||
|
isSidebarCollapsed$: Observable<boolean>;
|
||||||
|
|
||||||
constructor(protected service: SearchService,
|
constructor(protected service: SearchService,
|
||||||
protected sidebarService: SearchSidebarService,
|
protected sidebarService: SearchSidebarService,
|
||||||
protected windowService: HostWindowService,
|
protected windowService: HostWindowService,
|
||||||
@@ -107,6 +117,8 @@ export class SearchPageComponent implements OnInit {
|
|||||||
* If something changes, update the list of scopes for the dropdown
|
* If something changes, update the list of scopes for the dropdown
|
||||||
*/
|
*/
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.isSidebarCollapsed$ = this.isSidebarCollapsed();
|
||||||
|
this.searchLink = this.getSearchLink();
|
||||||
this.searchOptions$ = this.getSearchOptions();
|
this.searchOptions$ = this.getSearchOptions();
|
||||||
this.sub = this.searchOptions$.pipe(
|
this.sub = this.searchOptions$.pipe(
|
||||||
switchMap((options) => this.service.search(options).pipe(getSucceededRemoteData(), startWith(undefined))))
|
switchMap((options) => this.service.search(options).pipe(getSucceededRemoteData(), startWith(undefined))))
|
||||||
@@ -147,14 +159,14 @@ export class SearchPageComponent implements OnInit {
|
|||||||
* Check if the sidebar is collapsed
|
* Check if the sidebar is collapsed
|
||||||
* @returns {Observable<boolean>} emits true if the sidebar is currently collapsed, false if it is expanded
|
* @returns {Observable<boolean>} emits true if the sidebar is currently collapsed, false if it is expanded
|
||||||
*/
|
*/
|
||||||
public isSidebarCollapsed(): Observable<boolean> {
|
private isSidebarCollapsed(): Observable<boolean> {
|
||||||
return this.sidebarService.isCollapsed;
|
return this.sidebarService.isCollapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
|
||||||
*/
|
*/
|
||||||
public getSearchLink(): string {
|
private getSearchLink(): string {
|
||||||
if (this.inPlaceSearch) {
|
if (this.inPlaceSearch) {
|
||||||
return './';
|
return './';
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,7 @@ import { SearchFacetSelectedOptionComponent } from './search-filters/search-filt
|
|||||||
import { SearchFacetRangeOptionComponent } from './search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component';
|
import { SearchFacetRangeOptionComponent } from './search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component';
|
||||||
import { SearchSwitchConfigurationComponent } from './search-switch-configuration/search-switch-configuration.component';
|
import { SearchSwitchConfigurationComponent } from './search-switch-configuration/search-switch-configuration.component';
|
||||||
import { SearchAuthorityFilterComponent } from './search-filters/search-filter/search-authority-filter/search-authority-filter.component';
|
import { SearchAuthorityFilterComponent } from './search-filters/search-filter/search-authority-filter/search-authority-filter.component';
|
||||||
|
import { SearchLabelComponent } from './search-labels/search-label/search-label.component';
|
||||||
import { ConfigurationSearchPageComponent } from './configuration-search-page.component';
|
import { ConfigurationSearchPageComponent } from './configuration-search-page.component';
|
||||||
import { ConfigurationSearchPageGuard } from './configuration-search-page.guard';
|
import { ConfigurationSearchPageGuard } from './configuration-search-page.guard';
|
||||||
import { FilteredSearchPageComponent } from './filtered-search-page.component';
|
import { FilteredSearchPageComponent } from './filtered-search-page.component';
|
||||||
@@ -50,6 +51,7 @@ const components = [
|
|||||||
SearchFilterComponent,
|
SearchFilterComponent,
|
||||||
SearchFacetFilterComponent,
|
SearchFacetFilterComponent,
|
||||||
SearchLabelsComponent,
|
SearchLabelsComponent,
|
||||||
|
SearchLabelComponent,
|
||||||
SearchFacetFilterComponent,
|
SearchFacetFilterComponent,
|
||||||
SearchFacetFilterWrapperComponent,
|
SearchFacetFilterWrapperComponent,
|
||||||
SearchRangeFilterComponent,
|
SearchRangeFilterComponent,
|
||||||
@@ -79,7 +81,6 @@ const components = [
|
|||||||
SearchFilterService,
|
SearchFilterService,
|
||||||
SearchFixedFilterService,
|
SearchFixedFilterService,
|
||||||
ConfigurationSearchPageGuard,
|
ConfigurationSearchPageGuard,
|
||||||
SearchFilterService,
|
|
||||||
SearchConfigurationService
|
SearchConfigurationService
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
|
@@ -163,12 +163,4 @@ describe('SearchConfigurationService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when getCurrentFixedFilter is called', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
service.getCurrentFixedFilter();
|
|
||||||
});
|
|
||||||
it('should call getRouteParameterValue on the routeService with parameter name \'filter\'', () => {
|
|
||||||
expect((service as any).routeService.getRouteParameterValue).toHaveBeenCalledWith('filter');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
@@ -14,7 +14,7 @@ import { SortDirection, SortOptions } from '../../core/cache/models/sort-options
|
|||||||
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
|
||||||
import { SearchOptions } from '../search-options.model';
|
import { SearchOptions } from '../search-options.model';
|
||||||
import { PaginatedSearchOptions } from '../paginated-search-options.model';
|
import { PaginatedSearchOptions } from '../paginated-search-options.model';
|
||||||
import { RouteService } from '../../shared/services/route.service';
|
import { RouteService } from '../../core/services/route.service';
|
||||||
import { hasNoValue, hasValue, isNotEmpty, isNotEmptyOperator } from '../../shared/empty.util';
|
import { hasNoValue, hasValue, isNotEmpty, isNotEmptyOperator } from '../../shared/empty.util';
|
||||||
import { RemoteData } from '../../core/data/remote-data';
|
import { RemoteData } from '../../core/data/remote-data';
|
||||||
import { getSucceededRemoteData } from '../../core/shared/operators';
|
import { getSucceededRemoteData } from '../../core/shared/operators';
|
||||||
@@ -205,15 +205,6 @@ export class SearchConfigurationService implements OnDestroy {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Observable<string>} Emits the current fixed filter as a string
|
|
||||||
*/
|
|
||||||
getCurrentFixedFilter(): Observable<string> {
|
|
||||||
return this.routeService.getRouteParameterValue('filter').pipe(
|
|
||||||
switchMap((f) => this.fixedFilterService.getQueryByFilterName(f))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {Observable<Params>} Emits the current active filters with their values as they are displayed in the frontend URL
|
* @returns {Observable<Params>} Emits the current active filters with their values as they are displayed in the frontend URL
|
||||||
*/
|
*/
|
||||||
@@ -233,7 +224,6 @@ export class SearchConfigurationService implements OnDestroy {
|
|||||||
this.getQueryPart(defaults.query),
|
this.getQueryPart(defaults.query),
|
||||||
this.getDSOTypePart(),
|
this.getDSOTypePart(),
|
||||||
this.getFiltersPart(),
|
this.getFiltersPart(),
|
||||||
this.getFixedFilterPart()
|
|
||||||
).subscribe((update) => {
|
).subscribe((update) => {
|
||||||
const currentValue: SearchOptions = this.searchOptions.getValue();
|
const currentValue: SearchOptions = this.searchOptions.getValue();
|
||||||
const updatedValue: SearchOptions = Object.assign(currentValue, update);
|
const updatedValue: SearchOptions = Object.assign(currentValue, update);
|
||||||
@@ -255,7 +245,6 @@ export class SearchConfigurationService implements OnDestroy {
|
|||||||
this.getQueryPart(defaults.query),
|
this.getQueryPart(defaults.query),
|
||||||
this.getDSOTypePart(),
|
this.getDSOTypePart(),
|
||||||
this.getFiltersPart(),
|
this.getFiltersPart(),
|
||||||
this.getFixedFilterPart()
|
|
||||||
).subscribe((update) => {
|
).subscribe((update) => {
|
||||||
const currentValue: PaginatedSearchOptions = this.paginatedSearchOptions.getValue();
|
const currentValue: PaginatedSearchOptions = this.paginatedSearchOptions.getValue();
|
||||||
const updatedValue: PaginatedSearchOptions = Object.assign(currentValue, update);
|
const updatedValue: PaginatedSearchOptions = Object.assign(currentValue, update);
|
||||||
@@ -352,16 +341,4 @@ export class SearchConfigurationService implements OnDestroy {
|
|||||||
return { filters }
|
return { filters }
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Observable<string>} Emits the current fixed filter as a partial SearchOptions object
|
|
||||||
*/
|
|
||||||
private getFixedFilterPart(): Observable<any> {
|
|
||||||
return this.getCurrentFixedFilter().pipe(
|
|
||||||
isNotEmptyOperator(),
|
|
||||||
map((fixedFilter) => {
|
|
||||||
return { fixedFilter }
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,7 @@ import { CommunityDataService } from '../../core/data/community-data.service';
|
|||||||
import { ViewMode } from '../../core/shared/view-mode.model';
|
import { ViewMode } from '../../core/shared/view-mode.model';
|
||||||
import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service';
|
import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { RouteService } from '../../shared/services/route.service';
|
import { RouteService } from '../../core/services/route.service';
|
||||||
import { routeServiceStub } from '../../shared/testing/route-service-stub';
|
import { routeServiceStub } from '../../shared/testing/route-service-stub';
|
||||||
import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils';
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@ import { Community } from '../../core/shared/community.model';
|
|||||||
import { CommunityDataService } from '../../core/data/community-data.service';
|
import { CommunityDataService } from '../../core/data/community-data.service';
|
||||||
import { ViewMode } from '../../core/shared/view-mode.model';
|
import { ViewMode } from '../../core/shared/view-mode.model';
|
||||||
import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service';
|
import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service';
|
||||||
import { RouteService } from '../../shared/services/route.service';
|
import { RouteService } from '../../core/services/route.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service that performs all general actions that have to do with the search page
|
* Service that performs all general actions that have to do with the search page
|
||||||
|
@@ -26,7 +26,7 @@ import { HostWindowResizeAction } from './shared/host-window.actions';
|
|||||||
import { MetadataService } from './core/metadata/metadata.service';
|
import { MetadataService } from './core/metadata/metadata.service';
|
||||||
|
|
||||||
import { GLOBAL_CONFIG, ENV_CONFIG } from '../config';
|
import { GLOBAL_CONFIG, ENV_CONFIG } from '../config';
|
||||||
import { NativeWindowRef, NativeWindowService } from './shared/services/window.service';
|
import { NativeWindowRef, NativeWindowService } from './core/services/window.service';
|
||||||
|
|
||||||
import { MockTranslateLoader } from './shared/mocks/mock-translate-loader';
|
import { MockTranslateLoader } from './shared/mocks/mock-translate-loader';
|
||||||
import { MockMetadataService } from './shared/mocks/mock-metadata-service';
|
import { MockMetadataService } from './shared/mocks/mock-metadata-service';
|
||||||
@@ -41,11 +41,11 @@ import { MenuServiceStub } from './shared/testing/menu-service-stub';
|
|||||||
import { HostWindowService } from './shared/host-window.service';
|
import { HostWindowService } from './shared/host-window.service';
|
||||||
import { HostWindowServiceStub } from './shared/testing/host-window-service-stub';
|
import { HostWindowServiceStub } from './shared/testing/host-window-service-stub';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { RouteService } from './shared/services/route.service';
|
import { RouteService } from './core/services/route.service';
|
||||||
import { MockActivatedRoute } from './shared/mocks/mock-active-router';
|
import { MockActivatedRoute } from './shared/mocks/mock-active-router';
|
||||||
import { MockRouter } from './shared/mocks/mock-router';
|
import { MockRouter } from './shared/mocks/mock-router';
|
||||||
import { CookieService } from './shared/services/cookie.service';
|
|
||||||
import { MockCookieService } from './shared/mocks/mock-cookie.service';
|
import { MockCookieService } from './shared/mocks/mock-cookie.service';
|
||||||
|
import { CookieService } from './core/services/cookie.service';
|
||||||
|
|
||||||
let comp: AppComponent;
|
let comp: AppComponent;
|
||||||
let fixture: ComponentFixture<AppComponent>;
|
let fixture: ComponentFixture<AppComponent>;
|
||||||
|
@@ -19,11 +19,11 @@ import { GLOBAL_CONFIG, GlobalConfig } from '../config';
|
|||||||
import { MetadataService } from './core/metadata/metadata.service';
|
import { MetadataService } from './core/metadata/metadata.service';
|
||||||
import { HostWindowResizeAction } from './shared/host-window.actions';
|
import { HostWindowResizeAction } from './shared/host-window.actions';
|
||||||
import { HostWindowState } from './shared/host-window.reducer';
|
import { HostWindowState } from './shared/host-window.reducer';
|
||||||
import { NativeWindowRef, NativeWindowService } from './shared/services/window.service';
|
import { NativeWindowRef, NativeWindowService } from './core/services/window.service';
|
||||||
import { isAuthenticated } from './core/auth/selectors';
|
import { isAuthenticated } from './core/auth/selectors';
|
||||||
import { AuthService } from './core/auth/auth.service';
|
import { AuthService } from './core/auth/auth.service';
|
||||||
import { Angulartics2GoogleAnalytics } from 'angulartics2/ga';
|
import { Angulartics2GoogleAnalytics } from 'angulartics2/ga';
|
||||||
import { RouteService } from './shared/services/route.service';
|
import { RouteService } from './core/services/route.service';
|
||||||
import variables from '../styles/_exposed_variables.scss';
|
import variables from '../styles/_exposed_variables.scss';
|
||||||
import { CSSVariableService } from './shared/sass-helper/sass-helper.service';
|
import { CSSVariableService } from './shared/sass-helper/sass-helper.service';
|
||||||
import { MenuService } from './shared/menu/menu.service';
|
import { MenuService } from './shared/menu/menu.service';
|
||||||
@@ -32,9 +32,8 @@ import { combineLatest as combineLatestObservable, Observable, of } from 'rxjs';
|
|||||||
import { slideSidebarPadding } from './shared/animations/slide';
|
import { slideSidebarPadding } from './shared/animations/slide';
|
||||||
import { HostWindowService } from './shared/host-window.service';
|
import { HostWindowService } from './shared/host-window.service';
|
||||||
import { Theme } from '../config/theme.inferface';
|
import { Theme } from '../config/theme.inferface';
|
||||||
import { ClientCookieService } from './shared/services/client-cookie.service';
|
|
||||||
import { isNotEmpty } from './shared/empty.util';
|
import { isNotEmpty } from './shared/empty.util';
|
||||||
import { CookieService } from './shared/services/cookie.service';
|
import { CookieService } from './core/services/cookie.service';
|
||||||
|
|
||||||
export const LANG_COOKIE = 'language_cookie';
|
export const LANG_COOKIE = 'language_cookie';
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ import { ExpandableAdminSidebarSectionComponent } from './+admin/admin-sidebar/e
|
|||||||
import { NavbarModule } from './navbar/navbar.module';
|
import { NavbarModule } from './navbar/navbar.module';
|
||||||
import { JournalEntitiesModule } from './entity-groups/journal-entities/journal-entities.module';
|
import { JournalEntitiesModule } from './entity-groups/journal-entities/journal-entities.module';
|
||||||
import { ResearchEntitiesModule } from './entity-groups/research-entities/research-entities.module';
|
import { ResearchEntitiesModule } from './entity-groups/research-entities/research-entities.module';
|
||||||
import { ClientCookieService } from './shared/services/client-cookie.service';
|
import { ClientCookieService } from './core/services/client-cookie.service';
|
||||||
|
|
||||||
export function getConfig() {
|
export function getConfig() {
|
||||||
return ENV_CONFIG;
|
return ENV_CONFIG;
|
||||||
|
@@ -7,12 +7,12 @@ import { REQUEST } from '@nguniversal/express-engine/tokens';
|
|||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
|
|
||||||
import { authReducer, AuthState } from './auth.reducer';
|
import { authReducer, AuthState } from './auth.reducer';
|
||||||
import { NativeWindowRef, NativeWindowService } from '../../shared/services/window.service';
|
import { NativeWindowRef, NativeWindowService } from '../services/window.service';
|
||||||
import { AuthService } from './auth.service';
|
import { AuthService } from './auth.service';
|
||||||
import { RouterStub } from '../../shared/testing/router-stub';
|
import { RouterStub } from '../../shared/testing/router-stub';
|
||||||
import { ActivatedRouteStub } from '../../shared/testing/active-router-stub';
|
import { ActivatedRouteStub } from '../../shared/testing/active-router-stub';
|
||||||
|
|
||||||
import { CookieService } from '../../shared/services/cookie.service';
|
import { CookieService } from '../services/cookie.service';
|
||||||
import { AuthRequestServiceStub } from '../../shared/testing/auth-request-service-stub';
|
import { AuthRequestServiceStub } from '../../shared/testing/auth-request-service-stub';
|
||||||
import { AuthRequestService } from './auth-request.service';
|
import { AuthRequestService } from './auth-request.service';
|
||||||
import { AuthStatus } from './models/auth-status.model';
|
import { AuthStatus } from './models/auth-status.model';
|
||||||
@@ -20,14 +20,17 @@ import { AuthTokenInfo } from './models/auth-token-info.model';
|
|||||||
import { EPerson } from '../eperson/models/eperson.model';
|
import { EPerson } from '../eperson/models/eperson.model';
|
||||||
import { EPersonMock } from '../../shared/testing/eperson-mock';
|
import { EPersonMock } from '../../shared/testing/eperson-mock';
|
||||||
import { AppState } from '../../app.reducer';
|
import { AppState } from '../../app.reducer';
|
||||||
import { ClientCookieService } from '../../shared/services/client-cookie.service';
|
import { ClientCookieService } from '../services/client-cookie.service';
|
||||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||||
import { getMockRemoteDataBuildService } from '../../shared/mocks/mock-remote-data-build.service';
|
import { getMockRemoteDataBuildService } from '../../shared/mocks/mock-remote-data-build.service';
|
||||||
|
import { routeServiceStub } from '../../shared/testing/route-service-stub';
|
||||||
|
import { RouteService } from '../services/route.service';
|
||||||
|
|
||||||
describe('AuthService test', () => {
|
describe('AuthService test', () => {
|
||||||
|
|
||||||
let mockStore: Store<AuthState>;
|
let mockStore: Store<AuthState>;
|
||||||
let authService: AuthService;
|
let authService: AuthService;
|
||||||
|
let routeServiceMock: RouteService;
|
||||||
let authRequest;
|
let authRequest;
|
||||||
let window;
|
let window;
|
||||||
let routerStub;
|
let routerStub;
|
||||||
@@ -74,6 +77,7 @@ describe('AuthService test', () => {
|
|||||||
{ provide: NativeWindowService, useValue: window },
|
{ provide: NativeWindowService, useValue: window },
|
||||||
{ provide: REQUEST, useValue: {} },
|
{ provide: REQUEST, useValue: {} },
|
||||||
{ provide: Router, useValue: routerStub },
|
{ provide: Router, useValue: routerStub },
|
||||||
|
{ provide: RouteService, useValue: routeServiceStub },
|
||||||
{ provide: ActivatedRoute, useValue: routeStub },
|
{ provide: ActivatedRoute, useValue: routeStub },
|
||||||
{ provide: Store, useValue: mockStore },
|
{ provide: Store, useValue: mockStore },
|
||||||
{ provide: RemoteDataBuildService, useValue: rdbService },
|
{ provide: RemoteDataBuildService, useValue: rdbService },
|
||||||
@@ -138,6 +142,7 @@ describe('AuthService test', () => {
|
|||||||
{ provide: AuthRequestService, useValue: authRequest },
|
{ provide: AuthRequestService, useValue: authRequest },
|
||||||
{ provide: REQUEST, useValue: {} },
|
{ provide: REQUEST, useValue: {} },
|
||||||
{ provide: Router, useValue: routerStub },
|
{ provide: Router, useValue: routerStub },
|
||||||
|
{ provide: RouteService, useValue: routeServiceStub },
|
||||||
{ provide: RemoteDataBuildService, useValue: rdbService },
|
{ provide: RemoteDataBuildService, useValue: rdbService },
|
||||||
CookieService,
|
CookieService,
|
||||||
AuthService
|
AuthService
|
||||||
@@ -145,13 +150,13 @@ describe('AuthService test', () => {
|
|||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(inject([CookieService, AuthRequestService, Store, Router], (cookieService: CookieService, authReqService: AuthRequestService, store: Store<AppState>, router: Router) => {
|
beforeEach(inject([CookieService, AuthRequestService, Store, Router, RouteService], (cookieService: CookieService, authReqService: AuthRequestService, store: Store<AppState>, router: Router, routeService: RouteService) => {
|
||||||
store
|
store
|
||||||
.subscribe((state) => {
|
.subscribe((state) => {
|
||||||
(state as any).core = Object.create({});
|
(state as any).core = Object.create({});
|
||||||
(state as any).core.auth = authenticatedState;
|
(state as any).core.auth = authenticatedState;
|
||||||
});
|
});
|
||||||
authService = new AuthService({}, window, undefined, authReqService, router, cookieService, store, rdbService);
|
authService = new AuthService({}, window, undefined, authReqService, router, routeService, cookieService, store, rdbService);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should return true when user is logged in', () => {
|
it('should return true when user is logged in', () => {
|
||||||
@@ -189,6 +194,7 @@ describe('AuthService test', () => {
|
|||||||
{ provide: AuthRequestService, useValue: authRequest },
|
{ provide: AuthRequestService, useValue: authRequest },
|
||||||
{ provide: REQUEST, useValue: {} },
|
{ provide: REQUEST, useValue: {} },
|
||||||
{ provide: Router, useValue: routerStub },
|
{ provide: Router, useValue: routerStub },
|
||||||
|
{ provide: RouteService, useValue: routeServiceStub },
|
||||||
{ provide: RemoteDataBuildService, useValue: rdbService },
|
{ provide: RemoteDataBuildService, useValue: rdbService },
|
||||||
ClientCookieService,
|
ClientCookieService,
|
||||||
CookieService,
|
CookieService,
|
||||||
@@ -197,7 +203,7 @@ describe('AuthService test', () => {
|
|||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(inject([ClientCookieService, AuthRequestService, Store, Router], (cookieService: ClientCookieService, authReqService: AuthRequestService, store: Store<AppState>, router: Router) => {
|
beforeEach(inject([ClientCookieService, AuthRequestService, Store, Router, RouteService], (cookieService: ClientCookieService, authReqService: AuthRequestService, store: Store<AppState>, router: Router, routeService: RouteService) => {
|
||||||
const expiredToken: AuthTokenInfo = new AuthTokenInfo('test_token');
|
const expiredToken: AuthTokenInfo = new AuthTokenInfo('test_token');
|
||||||
expiredToken.expires = Date.now() - (1000 * 60 * 60);
|
expiredToken.expires = Date.now() - (1000 * 60 * 60);
|
||||||
authenticatedState = {
|
authenticatedState = {
|
||||||
@@ -212,11 +218,14 @@ describe('AuthService test', () => {
|
|||||||
(state as any).core = Object.create({});
|
(state as any).core = Object.create({});
|
||||||
(state as any).core.auth = authenticatedState;
|
(state as any).core.auth = authenticatedState;
|
||||||
});
|
});
|
||||||
authService = new AuthService({}, window, undefined, authReqService, router, cookieService, store, rdbService);
|
authService = new AuthService({}, window, undefined, authReqService, router, routeService, cookieService, store, rdbService);
|
||||||
storage = (authService as any).storage;
|
storage = (authService as any).storage;
|
||||||
|
routeServiceMock = TestBed.get(RouteService);
|
||||||
|
routerStub = TestBed.get(Router);
|
||||||
spyOn(storage, 'get');
|
spyOn(storage, 'get');
|
||||||
spyOn(storage, 'remove');
|
spyOn(storage, 'remove');
|
||||||
spyOn(storage, 'set');
|
spyOn(storage, 'set');
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should throw false when token is not valid', () => {
|
it('should throw false when token is not valid', () => {
|
||||||
@@ -238,5 +247,32 @@ describe('AuthService test', () => {
|
|||||||
expect(storage.remove).toHaveBeenCalled();
|
expect(storage.remove).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it ('should set redirect url to previous page', () => {
|
||||||
|
spyOn(routeServiceMock, 'getHistory').and.callThrough();
|
||||||
|
authService.redirectAfterLoginSuccess(true);
|
||||||
|
expect(routeServiceMock.getHistory).toHaveBeenCalled();
|
||||||
|
expect(routerStub.navigate).toHaveBeenCalledWith(['/collection/123']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it ('should set redirect url to current page', () => {
|
||||||
|
spyOn(routeServiceMock, 'getHistory').and.callThrough();
|
||||||
|
authService.redirectAfterLoginSuccess(false);
|
||||||
|
expect(routeServiceMock.getHistory).toHaveBeenCalled();
|
||||||
|
expect(routerStub.navigate).toHaveBeenCalledWith(['/home']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it ('should redirect to / and not to /login', () => {
|
||||||
|
spyOn(routeServiceMock, 'getHistory').and.returnValue(observableOf(['/login', '/login']));
|
||||||
|
authService.redirectAfterLoginSuccess(true);
|
||||||
|
expect(routeServiceMock.getHistory).toHaveBeenCalled();
|
||||||
|
expect(routerStub.navigate).toHaveBeenCalledWith(['/']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it ('should redirect to / when no redirect url is found', () => {
|
||||||
|
spyOn(routeServiceMock, 'getHistory').and.returnValue(observableOf(['']));
|
||||||
|
authService.redirectAfterLoginSuccess(true);
|
||||||
|
expect(routeServiceMock.getHistory).toHaveBeenCalled();
|
||||||
|
expect(routerStub.navigate).toHaveBeenCalledWith(['/']);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -15,13 +15,14 @@ import { HttpOptions } from '../dspace-rest-v2/dspace-rest-v2.service';
|
|||||||
import { AuthStatus } from './models/auth-status.model';
|
import { AuthStatus } from './models/auth-status.model';
|
||||||
import { AuthTokenInfo, TOKENITEM } from './models/auth-token-info.model';
|
import { AuthTokenInfo, TOKENITEM } from './models/auth-token-info.model';
|
||||||
import { isEmpty, isNotEmpty, isNotNull, isNotUndefined } from '../../shared/empty.util';
|
import { isEmpty, isNotEmpty, isNotNull, isNotUndefined } from '../../shared/empty.util';
|
||||||
import { CookieService } from '../../shared/services/cookie.service';
|
import { CookieService } from '../services/cookie.service';
|
||||||
import { getAuthenticationToken, getRedirectUrl, isAuthenticated, isTokenRefreshing } from './selectors';
|
import { getAuthenticationToken, getRedirectUrl, isAuthenticated, isTokenRefreshing } from './selectors';
|
||||||
import { AppState, routerStateSelector } from '../../app.reducer';
|
import { AppState, routerStateSelector } from '../../app.reducer';
|
||||||
import { ResetAuthenticationMessagesAction, SetRedirectUrlAction } from './auth.actions';
|
import { ResetAuthenticationMessagesAction, SetRedirectUrlAction } from './auth.actions';
|
||||||
import { NativeWindowRef, NativeWindowService } from '../../shared/services/window.service';
|
import { NativeWindowRef, NativeWindowService } from '../services/window.service';
|
||||||
import { Base64EncodeUrl } from '../../shared/utils/encode-decode.util';
|
import { Base64EncodeUrl } from '../../shared/utils/encode-decode.util';
|
||||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||||
|
import {RouteService} from '../services/route.service';
|
||||||
|
|
||||||
export const LOGIN_ROUTE = '/login';
|
export const LOGIN_ROUTE = '/login';
|
||||||
export const LOGOUT_ROUTE = '/logout';
|
export const LOGOUT_ROUTE = '/logout';
|
||||||
@@ -45,6 +46,7 @@ export class AuthService {
|
|||||||
protected authRequestService: AuthRequestService,
|
protected authRequestService: AuthRequestService,
|
||||||
@Optional() @Inject(RESPONSE) private response: any,
|
@Optional() @Inject(RESPONSE) private response: any,
|
||||||
protected router: Router,
|
protected router: Router,
|
||||||
|
protected routeService: RouteService,
|
||||||
protected storage: CookieService,
|
protected storage: CookieService,
|
||||||
protected store: Store<AppState>,
|
protected store: Store<AppState>,
|
||||||
protected rdbService: RemoteDataBuildService
|
protected rdbService: RemoteDataBuildService
|
||||||
@@ -337,7 +339,7 @@ export class AuthService {
|
|||||||
/**
|
/**
|
||||||
* Redirect to the route navigated before the login
|
* Redirect to the route navigated before the login
|
||||||
*/
|
*/
|
||||||
public redirectToPreviousUrl() {
|
public redirectAfterLoginSuccess(isStandalonePage: boolean) {
|
||||||
this.getRedirectUrl().pipe(
|
this.getRedirectUrl().pipe(
|
||||||
take(1))
|
take(1))
|
||||||
.subscribe((redirectUrl) => {
|
.subscribe((redirectUrl) => {
|
||||||
@@ -346,16 +348,37 @@ export class AuthService {
|
|||||||
this.clearRedirectUrl();
|
this.clearRedirectUrl();
|
||||||
this.router.onSameUrlNavigation = 'reload';
|
this.router.onSameUrlNavigation = 'reload';
|
||||||
const url = decodeURIComponent(redirectUrl);
|
const url = decodeURIComponent(redirectUrl);
|
||||||
this.router.navigateByUrl(url);
|
this.navigateToRedirectUrl(url);
|
||||||
/* TODO Reenable hard redirect when REST API can handle x-forwarded-for, see https://github.com/DSpace/DSpace/pull/2207 */
|
|
||||||
// this._window.nativeWindow.location.href = url;
|
|
||||||
} else {
|
} else {
|
||||||
|
// If redirectUrl is empty use history.
|
||||||
|
this.routeService.getHistory().pipe(
|
||||||
|
take(1)
|
||||||
|
).subscribe((history) => {
|
||||||
|
let redirUrl;
|
||||||
|
if (isStandalonePage) {
|
||||||
|
// For standalone login pages, use the previous route.
|
||||||
|
redirUrl = history[history.length - 2] || '';
|
||||||
|
} else {
|
||||||
|
redirUrl = history[history.length - 1] || '';
|
||||||
|
}
|
||||||
|
this.navigateToRedirectUrl(redirUrl);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected navigateToRedirectUrl(url: string) {
|
||||||
|
// in case the user navigates directly to /login (via bookmark, etc), or the route history is not found.
|
||||||
|
if (isEmpty(url) || url.startsWith(LOGIN_ROUTE)) {
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
/* TODO Reenable hard redirect when REST API can handle x-forwarded-for, see https://github.com/DSpace/DSpace/pull/2207 */
|
/* TODO Reenable hard redirect when REST API can handle x-forwarded-for, see https://github.com/DSpace/DSpace/pull/2207 */
|
||||||
// this._window.nativeWindow.location.href = '/';
|
// this._window.nativeWindow.location.href = '/';
|
||||||
|
} else {
|
||||||
|
/* TODO Reenable hard redirect when REST API can handle x-forwarded-for, see https://github.com/DSpace/DSpace/pull/2207 */
|
||||||
|
// this._window.nativeWindow.location.href = url;
|
||||||
|
this.router.navigate([url]);
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -400,4 +423,5 @@ export class AuthService {
|
|||||||
this.store.dispatch(new SetRedirectUrlAction(''));
|
this.store.dispatch(new SetRedirectUrlAction(''));
|
||||||
this.storage.remove(REDIRECT_COOKIE);
|
this.storage.remove(REDIRECT_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
import { map, switchMap, take } from 'rxjs/operators';
|
import { filter, map, switchMap, take } from 'rxjs/operators';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { HttpHeaders } from '@angular/common/http';
|
import { HttpHeaders } from '@angular/common/http';
|
||||||
import { HttpOptions } from '../dspace-rest-v2/dspace-rest-v2.service';
|
import { HttpOptions } from '../dspace-rest-v2/dspace-rest-v2.service';
|
||||||
import { AuthStatus } from './models/auth-status.model';
|
import { AuthStatus } from './models/auth-status.model';
|
||||||
import { isNotEmpty } from '../../shared/empty.util';
|
import { isEmpty, isNotEmpty } from '../../shared/empty.util';
|
||||||
import { AuthService } from './auth.service';
|
import { AuthService, LOGIN_ROUTE } from './auth.service';
|
||||||
import { AuthTokenInfo } from './models/auth-token-info.model';
|
import { AuthTokenInfo } from './models/auth-token-info.model';
|
||||||
import { CheckAuthenticationTokenAction } from './auth.actions';
|
import { CheckAuthenticationTokenAction } from './auth.actions';
|
||||||
import { EPerson } from '../eperson/models/eperson.model';
|
import { EPerson } from '../eperson/models/eperson.model';
|
||||||
@@ -54,7 +54,7 @@ export class ServerAuthService extends AuthService {
|
|||||||
/**
|
/**
|
||||||
* Redirect to the route navigated before the login
|
* Redirect to the route navigated before the login
|
||||||
*/
|
*/
|
||||||
public redirectToPreviousUrl() {
|
public redirectAfterLoginSuccess(isStandalonePage: boolean) {
|
||||||
this.getRedirectUrl().pipe(
|
this.getRedirectUrl().pipe(
|
||||||
take(1))
|
take(1))
|
||||||
.subscribe((redirectUrl) => {
|
.subscribe((redirectUrl) => {
|
||||||
@@ -67,10 +67,15 @@ export class ServerAuthService extends AuthService {
|
|||||||
const url = decodeURIComponent(redirectUrl);
|
const url = decodeURIComponent(redirectUrl);
|
||||||
this.router.navigateByUrl(url);
|
this.router.navigateByUrl(url);
|
||||||
} else {
|
} else {
|
||||||
this.router.navigate(['/']);
|
// If redirectUrl is empty use history. For ssr the history array should contain the requested url.
|
||||||
|
this.routeService.getHistory().pipe(
|
||||||
|
filter((history) => history.length > 0),
|
||||||
|
take(1)
|
||||||
|
).subscribe((history) => {
|
||||||
|
this.navigateToRedirectUrl(history[history.length - 1] || '');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,7 @@ export class NormalizedRelationshipType extends NormalizedObject<RelationshipTyp
|
|||||||
* The label that describes the Relation to the left of this RelationshipType
|
* The label that describes the Relation to the left of this RelationshipType
|
||||||
*/
|
*/
|
||||||
@autoserialize
|
@autoserialize
|
||||||
leftLabel: string;
|
leftwardType: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum amount of Relationships allowed to the left of this RelationshipType
|
* The maximum amount of Relationships allowed to the left of this RelationshipType
|
||||||
@@ -41,7 +41,7 @@ export class NormalizedRelationshipType extends NormalizedObject<RelationshipTyp
|
|||||||
* The label that describes the Relation to the right of this RelationshipType
|
* The label that describes the Relation to the right of this RelationshipType
|
||||||
*/
|
*/
|
||||||
@autoserialize
|
@autoserialize
|
||||||
rightLabel: string;
|
rightwardType: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum amount of Relationships allowed to the right of this RelationshipType
|
* The maximum amount of Relationships allowed to the right of this RelationshipType
|
||||||
|
@@ -5,7 +5,7 @@ import { AuthEffects } from './auth/auth.effects';
|
|||||||
import { JsonPatchOperationsEffects } from './json-patch/json-patch-operations.effects';
|
import { JsonPatchOperationsEffects } from './json-patch/json-patch-operations.effects';
|
||||||
import { ServerSyncBufferEffects } from './cache/server-sync-buffer.effects';
|
import { ServerSyncBufferEffects } from './cache/server-sync-buffer.effects';
|
||||||
import { ObjectUpdatesEffects } from './data/object-updates/object-updates.effects';
|
import { ObjectUpdatesEffects } from './data/object-updates/object-updates.effects';
|
||||||
import { RouteEffects } from '../shared/services/route.effects';
|
import { RouteEffects } from './services/route.effects';
|
||||||
|
|
||||||
export const coreEffects = [
|
export const coreEffects = [
|
||||||
RequestEffects,
|
RequestEffects,
|
||||||
|
@@ -14,7 +14,7 @@ import { coreReducers } from './core.reducers';
|
|||||||
|
|
||||||
import { isNotEmpty } from '../shared/empty.util';
|
import { isNotEmpty } from '../shared/empty.util';
|
||||||
|
|
||||||
import { ApiService } from '../shared/services/api.service';
|
import { ApiService } from './services/api.service';
|
||||||
import { BrowseEntriesResponseParsingService } from './data/browse-entries-response-parsing.service';
|
import { BrowseEntriesResponseParsingService } from './data/browse-entries-response-parsing.service';
|
||||||
import { CollectionDataService } from './data/collection-data.service';
|
import { CollectionDataService } from './data/collection-data.service';
|
||||||
import { CommunityDataService } from './data/community-data.service';
|
import { CommunityDataService } from './data/community-data.service';
|
||||||
@@ -34,12 +34,12 @@ import { PaginationComponentOptions } from '../shared/pagination/pagination-comp
|
|||||||
import { RemoteDataBuildService } from './cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from './cache/builders/remote-data-build.service';
|
||||||
import { RequestService } from './data/request.service';
|
import { RequestService } from './data/request.service';
|
||||||
import { EndpointMapResponseParsingService } from './data/endpoint-map-response-parsing.service';
|
import { EndpointMapResponseParsingService } from './data/endpoint-map-response-parsing.service';
|
||||||
import { ServerResponseService } from '../shared/services/server-response.service';
|
import { ServerResponseService } from './services/server-response.service';
|
||||||
import { NativeWindowFactory, NativeWindowService } from '../shared/services/window.service';
|
import { NativeWindowFactory, NativeWindowService } from './services/window.service';
|
||||||
import { BrowseService } from './browse/browse.service';
|
import { BrowseService } from './browse/browse.service';
|
||||||
import { BrowseResponseParsingService } from './data/browse-response-parsing.service';
|
import { BrowseResponseParsingService } from './data/browse-response-parsing.service';
|
||||||
import { ConfigResponseParsingService } from './config/config-response-parsing.service';
|
import { ConfigResponseParsingService } from './config/config-response-parsing.service';
|
||||||
import { RouteService } from '../shared/services/route.service';
|
import { RouteService } from './services/route.service';
|
||||||
import { SubmissionDefinitionsConfigService } from './config/submission-definitions-config.service';
|
import { SubmissionDefinitionsConfigService } from './config/submission-definitions-config.service';
|
||||||
import { SubmissionFormsConfigService } from './config/submission-forms-config.service';
|
import { SubmissionFormsConfigService } from './config/submission-forms-config.service';
|
||||||
import { SubmissionSectionsConfigService } from './config/submission-sections-config.service';
|
import { SubmissionSectionsConfigService } from './config/submission-sections-config.service';
|
||||||
|
@@ -13,7 +13,7 @@ import {
|
|||||||
objectUpdatesReducer,
|
objectUpdatesReducer,
|
||||||
ObjectUpdatesState
|
ObjectUpdatesState
|
||||||
} from './data/object-updates/object-updates.reducer';
|
} from './data/object-updates/object-updates.reducer';
|
||||||
import { routeReducer, RouteState } from '../shared/services/route.reducer';
|
import { routeReducer, RouteState } from './services/route.reducer';
|
||||||
|
|
||||||
export interface CoreState {
|
export interface CoreState {
|
||||||
'cache/object': ObjectCacheState,
|
'cache/object': ObjectCacheState,
|
||||||
|
@@ -19,6 +19,7 @@ import { Observable } from 'rxjs/internal/Observable';
|
|||||||
import { FindAllOptions } from './request.models';
|
import { FindAllOptions } from './request.models';
|
||||||
import { RemoteData } from './remote-data';
|
import { RemoteData } from './remote-data';
|
||||||
import { PaginatedList } from './paginated-list';
|
import { PaginatedList } from './paginated-list';
|
||||||
|
import { SearchParam } from '../cache/models/search-param.model';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CollectionDataService extends ComColDataService<Collection> {
|
export class CollectionDataService extends ComColDataService<Collection> {
|
||||||
@@ -40,6 +41,36 @@ export class CollectionDataService extends ComColDataService<Collection> {
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all collections the user is authorized to submit to
|
||||||
|
*
|
||||||
|
* @param options The [[FindAllOptions]] object
|
||||||
|
* @return Observable<RemoteData<PaginatedList<Collection>>>
|
||||||
|
* collection list
|
||||||
|
*/
|
||||||
|
getAuthorizedCollection(options: FindAllOptions = {}): Observable<RemoteData<PaginatedList<Collection>>> {
|
||||||
|
const searchHref = 'findAuthorized';
|
||||||
|
|
||||||
|
return this.searchBy(searchHref, options).pipe(
|
||||||
|
filter((collections: RemoteData<PaginatedList<Collection>>) => !collections.isResponsePending));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all collections the user is authorized to submit to, by community
|
||||||
|
*
|
||||||
|
* @param communityId The community id
|
||||||
|
* @param options The [[FindAllOptions]] object
|
||||||
|
* @return Observable<RemoteData<PaginatedList<Collection>>>
|
||||||
|
* collection list
|
||||||
|
*/
|
||||||
|
getAuthorizedCollectionByCommunity(communityId: string, options: FindAllOptions = {}): Observable<RemoteData<PaginatedList<Collection>>> {
|
||||||
|
const searchHref = 'findAuthorizedByCommunity';
|
||||||
|
options.searchParams = [new SearchParam('uuid', communityId)];
|
||||||
|
|
||||||
|
return this.searchBy(searchHref, options).pipe(
|
||||||
|
filter((collections: RemoteData<PaginatedList<Collection>>) => !collections.isResponsePending));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find whether there is a collection whom user has authorization to submit to
|
* Find whether there is a collection whom user has authorization to submit to
|
||||||
*
|
*
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { distinctUntilChanged, filter, map } from 'rxjs/operators';
|
import { distinctUntilChanged, filter, find, map } from 'rxjs/operators';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { isNotEmpty } from '../../shared/empty.util';
|
import { hasValue, isNotEmpty } from '../../shared/empty.util';
|
||||||
import { BrowseService } from '../browse/browse.service';
|
import { BrowseService } from '../browse/browse.service';
|
||||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||||
import { CoreState } from '../core.reducers';
|
import { CoreState } from '../core.reducers';
|
||||||
@@ -12,14 +12,17 @@ import { URLCombiner } from '../url-combiner/url-combiner';
|
|||||||
import { DataService } from './data.service';
|
import { DataService } from './data.service';
|
||||||
import { RequestService } from './request.service';
|
import { RequestService } from './request.service';
|
||||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||||
import { FindAllOptions, PatchRequest, RestRequest } from './request.models';
|
import { FindAllOptions, PatchRequest, PutRequest, RestRequest } from './request.models';
|
||||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { DSOChangeAnalyzer } from './dso-change-analyzer.service';
|
import { DSOChangeAnalyzer } from './dso-change-analyzer.service';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||||
import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service';
|
import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service';
|
||||||
import { configureRequest, getRequestFromRequestHref } from '../shared/operators';
|
import { configureRequest, getRequestFromRequestHref } from '../shared/operators';
|
||||||
import { RequestEntry } from './request.reducer';
|
import { RequestEntry } from './request.reducer';
|
||||||
|
import { RestResponse } from '../cache/response.models';
|
||||||
|
import { HttpOptions } from '../dspace-rest-v2/dspace-rest-v2.service';
|
||||||
|
import { Collection } from '../shared/collection.model';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ItemDataService extends DataService<Item> {
|
export class ItemDataService extends DataService<Item> {
|
||||||
@@ -118,4 +121,43 @@ export class ItemDataService extends DataService<Item> {
|
|||||||
map((requestEntry: RequestEntry) => requestEntry.response)
|
map((requestEntry: RequestEntry) => requestEntry.response)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the endpoint to move the item
|
||||||
|
* @param itemId
|
||||||
|
*/
|
||||||
|
public getMoveItemEndpoint(itemId: string): Observable<string> {
|
||||||
|
return this.halService.getEndpoint(this.linkPath).pipe(
|
||||||
|
map((endpoint: string) => this.getIDHref(endpoint, itemId)),
|
||||||
|
map((endpoint: string) => `${endpoint}/owningCollection`)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move the item to a different owning collection
|
||||||
|
* @param itemId
|
||||||
|
* @param collection
|
||||||
|
*/
|
||||||
|
public moveToCollection(itemId: string, collection: Collection): Observable<RestResponse> {
|
||||||
|
const options: HttpOptions = Object.create({});
|
||||||
|
let headers = new HttpHeaders();
|
||||||
|
headers = headers.append('Content-Type', 'text/uri-list');
|
||||||
|
options.headers = headers;
|
||||||
|
|
||||||
|
const requestId = this.requestService.generateRequestId();
|
||||||
|
const hrefObs = this.getMoveItemEndpoint(itemId);
|
||||||
|
|
||||||
|
hrefObs.pipe(
|
||||||
|
find((href: string) => hasValue(href)),
|
||||||
|
map((href: string) => {
|
||||||
|
const request = new PutRequest(requestId, href, collection.self, options);
|
||||||
|
this.requestService.configure(request);
|
||||||
|
})
|
||||||
|
).subscribe();
|
||||||
|
|
||||||
|
return this.requestService.getByUUID(requestId).pipe(
|
||||||
|
find((request: RequestEntry) => request.completed),
|
||||||
|
map((request: RequestEntry) => request.response)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,6 @@ import { getMockRemoteDataBuildService } from '../../shared/mocks/mock-remote-da
|
|||||||
import { of as observableOf } from 'rxjs/internal/observable/of';
|
import { of as observableOf } from 'rxjs/internal/observable/of';
|
||||||
import { RequestEntry } from './request.reducer';
|
import { RequestEntry } from './request.reducer';
|
||||||
import { RelationshipType } from '../shared/item-relationships/relationship-type.model';
|
import { RelationshipType } from '../shared/item-relationships/relationship-type.model';
|
||||||
import { ResourceType } from '../shared/resource-type';
|
|
||||||
import { Relationship } from '../shared/item-relationships/relationship.model';
|
import { Relationship } from '../shared/item-relationships/relationship.model';
|
||||||
import { RemoteData } from './remote-data';
|
import { RemoteData } from './remote-data';
|
||||||
import { getMockRequestService } from '../../shared/mocks/mock-request.service';
|
import { getMockRequestService } from '../../shared/mocks/mock-request.service';
|
||||||
@@ -15,6 +14,7 @@ import { PageInfo } from '../shared/page-info.model';
|
|||||||
import { DeleteRequest } from './request.models';
|
import { DeleteRequest } from './request.models';
|
||||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||||
import { Observable } from 'rxjs/internal/Observable';
|
import { Observable } from 'rxjs/internal/Observable';
|
||||||
|
import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils';
|
||||||
|
|
||||||
describe('RelationshipService', () => {
|
describe('RelationshipService', () => {
|
||||||
let service: RelationshipService;
|
let service: RelationshipService;
|
||||||
@@ -23,18 +23,12 @@ describe('RelationshipService', () => {
|
|||||||
const restEndpointURL = 'https://rest.api/';
|
const restEndpointURL = 'https://rest.api/';
|
||||||
const relationshipsEndpointURL = `${restEndpointURL}/relationships`;
|
const relationshipsEndpointURL = `${restEndpointURL}/relationships`;
|
||||||
const halService: any = new HALEndpointServiceStub(restEndpointURL);
|
const halService: any = new HALEndpointServiceStub(restEndpointURL);
|
||||||
const rdbService = getMockRemoteDataBuildService();
|
|
||||||
const objectCache = Object.assign({
|
|
||||||
/* tslint:disable:no-empty */
|
|
||||||
remove: () => {}
|
|
||||||
/* tslint:enable:no-empty */
|
|
||||||
}) as ObjectCacheService;
|
|
||||||
|
|
||||||
const relationshipType = Object.assign(new RelationshipType(), {
|
const relationshipType = Object.assign(new RelationshipType(), {
|
||||||
id: '1',
|
id: '1',
|
||||||
uuid: '1',
|
uuid: '1',
|
||||||
leftLabel: 'isAuthorOfPublication',
|
leftwardType: 'isAuthorOfPublication',
|
||||||
rightLabel: 'isPublicationOfAuthor'
|
rightwardType: 'isPublicationOfAuthor'
|
||||||
});
|
});
|
||||||
|
|
||||||
const relationship1 = Object.assign(new Relationship(), {
|
const relationship1 = Object.assign(new Relationship(), {
|
||||||
@@ -73,6 +67,14 @@ describe('RelationshipService', () => {
|
|||||||
relationship2.rightItem = getRemotedataObservable(item);
|
relationship2.rightItem = getRemotedataObservable(item);
|
||||||
const relatedItems = [relatedItem1, relatedItem2];
|
const relatedItems = [relatedItem1, relatedItem2];
|
||||||
|
|
||||||
|
const buildList$ = createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [relatedItems]));
|
||||||
|
const rdbService = getMockRemoteDataBuildService(undefined, buildList$);
|
||||||
|
const objectCache = Object.assign({
|
||||||
|
/* tslint:disable:no-empty */
|
||||||
|
remove: () => {}
|
||||||
|
/* tslint:enable:no-empty */
|
||||||
|
}) as ObjectCacheService;
|
||||||
|
|
||||||
const itemService = jasmine.createSpyObj('itemService', {
|
const itemService = jasmine.createSpyObj('itemService', {
|
||||||
findById: (uuid) => new RemoteData(false, false, true, undefined, relatedItems.filter((relatedItem) => relatedItem.id === uuid)[0])
|
findById: (uuid) => new RemoteData(false, false, true, undefined, relatedItems.filter((relatedItem) => relatedItem.id === uuid)[0])
|
||||||
});
|
});
|
||||||
@@ -134,7 +136,7 @@ describe('RelationshipService', () => {
|
|||||||
describe('getItemRelationshipLabels', () => {
|
describe('getItemRelationshipLabels', () => {
|
||||||
it('should return the correct labels', () => {
|
it('should return the correct labels', () => {
|
||||||
service.getItemRelationshipLabels(item).subscribe((result) => {
|
service.getItemRelationshipLabels(item).subscribe((result) => {
|
||||||
expect(result).toEqual([relationshipType.rightLabel]);
|
expect(result).toEqual([relationshipType.rightwardType]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -147,6 +149,14 @@ describe('RelationshipService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('getRelatedItemsByLabel', () => {
|
||||||
|
it('should return the related items by label', () => {
|
||||||
|
service.getRelatedItemsByLabel(item, relationshipType.rightwardType).subscribe((result) => {
|
||||||
|
expect(result.payload.page).toEqual(relatedItems);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function getRemotedataObservable(obj: any): Observable<RemoteData<any>> {
|
function getRemotedataObservable(obj: any): Observable<RemoteData<any>> {
|
||||||
|
@@ -201,9 +201,9 @@ export class RelationshipService extends DataService<Relationship> {
|
|||||||
map(([leftItems, rightItems, relTypesCurrentPage]) => {
|
map(([leftItems, rightItems, relTypesCurrentPage]) => {
|
||||||
return relTypesCurrentPage.map((type, index) => {
|
return relTypesCurrentPage.map((type, index) => {
|
||||||
if (leftItems[index].uuid === item.uuid) {
|
if (leftItems[index].uuid === item.uuid) {
|
||||||
return type.leftLabel;
|
return type.leftwardType;
|
||||||
} else {
|
} else {
|
||||||
return type.rightLabel;
|
return type.rightwardType;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
@@ -3,7 +3,7 @@ import { HttpHeaders } from '@angular/common/http';
|
|||||||
|
|
||||||
import { createSelector, MemoizedSelector, select, Store } from '@ngrx/store';
|
import { createSelector, MemoizedSelector, select, Store } from '@ngrx/store';
|
||||||
import { Observable, race as observableRace } from 'rxjs';
|
import { Observable, race as observableRace } from 'rxjs';
|
||||||
import { filter, find, map, mergeMap, take } from 'rxjs/operators';
|
import { filter, map, mergeMap, take } from 'rxjs/operators';
|
||||||
import { cloneDeep, remove } from 'lodash';
|
import { cloneDeep, remove } from 'lodash';
|
||||||
|
|
||||||
import { AppState } from '../../app.reducer';
|
import { AppState } from '../../app.reducer';
|
||||||
@@ -262,8 +262,9 @@ export class RequestService {
|
|||||||
*/
|
*/
|
||||||
private clearRequestsOnTheirWayToTheStore(request: GetRequest) {
|
private clearRequestsOnTheirWayToTheStore(request: GetRequest) {
|
||||||
this.getByHref(request.href).pipe(
|
this.getByHref(request.href).pipe(
|
||||||
find((re: RequestEntry) => hasValue(re)))
|
filter((re: RequestEntry) => hasValue(re)),
|
||||||
.subscribe((re: RequestEntry) => {
|
take(1)
|
||||||
|
).subscribe((re: RequestEntry) => {
|
||||||
if (!re.responsePending) {
|
if (!re.responsePending) {
|
||||||
remove(this.requestsOnTheirWayToTheStore, (item) => item === request.href);
|
remove(this.requestsOnTheirWayToTheStore, (item) => item === request.href);
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user