diff --git a/README.md b/README.md
index a9f2b0861b..27e61afe76 100644
--- a/README.md
+++ b/README.md
@@ -3,13 +3,12 @@
dspace-angular
==============
-> The next UI for DSpace, based on Angular Universal.
+> The next UI for DSpace 7, based on Angular Universal.
-This project is currently in pre-alpha.
+This project is currently under active development. For more information on the DSpace 7 release see the [DSpace 7.0 Release Status wiki page](https://wiki.lyrasis.org/display/DSPACE/DSpace+Release+7.0+Status)
-You can find additional information on the [wiki](https://wiki.duraspace.org/display/DSPACE/DSpace+7+-+Angular+UI) or [the project board (waffle.io)](https://waffle.io/DSpace/dspace-angular).
+You can find additional information on the DSpace 7 Angular UI on the [wiki](https://wiki.lyrasis.org/display/DSPACE/DSpace+7+-+Angular+UI+Development).
-If you're looking for the 2016 Angular 2 DSpace UI prototype, you can find it [here](https://github.com/DSpace-Labs/angular2-ui-prototype)
Quick start
-----------
@@ -32,8 +31,6 @@ yarn start
Then go to [http://localhost:3000](http://localhost:3000) in your browser
-NOTE: currently there's not much to see at that URL. We really do need your help. If you're interested in jumping in, and you've made it this far, please look at the [the project board (waffle.io)](https://waffle.io/DSpace/dspace-angular), grab a card, and get to work. Thanks!
-
Not sure where to start? watch the training videos linked in the [Introduction to the technology](#introduction-to-the-technology) section below.
Table of Contents
@@ -42,24 +39,27 @@ Table of Contents
- [Introduction to the technology](#introduction-to-the-technology)
- [Requirements](#requirements)
- [Installing](#installing)
-- [Configuring](#configuring)
+ - [Configuring](#configuring)
- [Running the app](#running-the-app)
-- [Running in production mode](#running-in-production-mode)
+ - [Running in production mode](#running-in-production-mode)
+ - [Deploy](#deploy)
+ - [Running the application with Docker](#running-the-application-with-docker)
- [Cleaning](#cleaning)
- [Testing](#testing)
+ - [Test a Pull Request](#test-a-pull-request)
- [Documentation](#documentation)
- [Other commands](#other-commands)
- [Recommended Editors/IDEs](#recommended-editorsides)
- [Collaborating](#collaborating)
- [File Structure](#file-structure)
-- [3rd Party Library Installation](#3rd-party-library-installation)
+- [Managing Dependencies (via yarn)](#managing-dependencies-via-yarn)
- [Frequently asked questions](#frequently-asked-questions)
- [License](#license)
Introduction to the technology
------------------------------
-You can find more information on the technologies used in this project (Angular 2, Typescript, Angular Universal, RxJS, etc) on the [DuraSpace wiki](https://wiki.duraspace.org/display/DSPACE/DSpace+7+UI+Technology+Stack)
+You can find more information on the technologies used in this project (Angular.io, Typescript, Angular Universal, RxJS, etc) on the [LYRASIS wiki](https://wiki.lyrasis.org/display/DSPACE/DSpace+7+UI+Technology+Stack)
Requirements
------------
@@ -75,8 +75,7 @@ Installing
- `yarn run global` to install the required global dependencies
- `yarn install` to install the local dependencies
-Configuring
------------
+### Configuring
Default configuration file is located in `config/` folder.
@@ -98,8 +97,7 @@ Running the app
After you have installed all dependencies you can now run the app. Run `yarn run watch` to start a local server which will watch for changes, rebuild the code, and reload the server for you. You can visit it at `http://localhost:3000`.
-Running in production mode
---------------------------
+### Running in production mode
When building for production we're using Ahead of Time (AoT) compilation. With AoT, the browser downloads a pre-compiled version of the application, so it can render the application immediately, without waiting to compile the app first. The compiler is roughly half the size of Angular itself, so omitting it dramatically reduces the application payload.
@@ -117,6 +115,19 @@ yarn run build:prod
This will build the application and put the result in the `dist` folder
+### Deploy
+```bash
+# deploy production in standalone pm2 container
+yarn run deploy
+
+# remove production from standalone pm2 container
+yarn run undeploy
+```
+
+### Running the application with Docker
+See [Docker Runtime Options](docker/README.md)
+
+
Cleaning
--------
@@ -131,10 +142,6 @@ yarn run clean:prod
yarn run clean:dist
```
-Running the application with Docker
------------------------------------
-See [Docker Runtime Options](docker/README.md)
-
Testing
-------
@@ -189,21 +196,14 @@ To run all the tests (e.g.: to run tests with Continuous Integration software) y
Documentation
--------------
+See [`./docs`](docs) for further documentation.
+
+### Building code documentation
+
To build the code documentation we use [TYPEDOC](http://typedoc.org). TYPEDOC is a documentation generator for TypeScript projects. It extracts informations from properly formatted comments that can be written within the code files. Follow the instructions [here](http://typedoc.org/guides/doccomments/) to know how to make those comments.
Run:`yarn run docs` to produce the documentation that will be available in the 'doc' folder.
-Deploy
-------
-
-```bash
-# deploy production in standalone pm2 container
-yarn run deploy
-
-# remove production from standalone pm2 container
-yarn run undeploy
-```
-
Other commands
--------------
@@ -229,7 +229,7 @@ To get the most out of TypeScript, you'll need a TypeScript-aware editor. We've
Collaborating
-------------
-See [the guide on the wiki](https://wiki.duraspace.org/display/DSPACE/DSpace+7+-+Angular+2+UI#DSpace7-Angular2UI-Howtocontribute)
+See [the guide on the wiki](https://wiki.lyrasis.org/display/DSPACE/DSpace+7+-+Angular+UI+Development#DSpace7-AngularUIDevelopment-Howtocontribute)
File Structure
--------------
@@ -335,10 +335,20 @@ dspace-angular
└── yarn.lock * Yarn lockfile (https://yarnpkg.com/en/docs/yarn-lock)
```
-3rd Party Library Installation
-------------------------------
+Managing Dependencies (via yarn)
+-------------
-Install your library via `yarn add lib-name --save` and import it in your code. `--save` will add it to `package.json`.
+This project makes use of [`yarn`](https://yarnpkg.com/en/) to ensure that the exact same dependency versions are used every time you install it.
+
+* `yarn` creates a [`yarn.lock`](https://yarnpkg.com/en/docs/yarn-lock) to track those versions. That file is updated automatically by whenever dependencies are added/updated/removed via yarn.
+* **Adding new dependencies**: To install/add a new dependency (third party library), use [`yarn add`](https://yarnpkg.com/en/docs/cli/add). For example: `yarn add some-lib`.
+ * If you are adding a new build tool dependency (to `devDependencies`), use `yarn add some-lib --dev`
+* **Upgrading existing dependencies**: To upgrade existing dependencies, you can use [`yarn upgrade`](https://yarnpkg.com/en/docs/cli/upgrade). For example: `yarn upgrade some-lib` or `yarn upgrade some-lib@version`
+* **Removing dependencies**: If a dependency is no longer needed, or replaced, use [`yarn remove`](https://yarnpkg.com/en/docs/cli/remove) to remove it.
+
+As you can see above, using `yarn` commandline tools means that you should never need to modify the `package.json` manually. *We recommend always using `yarn` to keep dependencies updated / in sync.*
+
+### Adding Typings for libraries
If the library does not include typings, you can install them using yarn:
@@ -370,24 +380,6 @@ If you're importing a module that uses CommonJS you need to import as
import * as _ from 'lodash';
```
-Managing Dependencies (via yarn)
--------------
-
-This project makes use of [`yarn`](https://yarnpkg.com/en/) to ensure that the exact same dependency versions are used every time you install it.
-
-* `yarn` creates a [`yarn.lock`](https://yarnpkg.com/en/docs/yarn-lock) to track those versions. That file is updated automatically by whenever dependencies are added/updated/removed via yarn.
-* **Adding new dependencies**: To install/add a new dependency (third party library), use [`yarn add`](https://yarnpkg.com/en/docs/cli/add). For example: `yarn add some-lib`.
- * If you are adding a new build tool dependency (to `devDependencies`), use `yarn add some-lib --dev`
-* **Upgrading existing dependencies**: To upgrade existing dependencies, you can use [`yarn upgrade`](https://yarnpkg.com/en/docs/cli/upgrade). For example: `yarn upgrade some-lib` or `yarn upgrade some-lib@version`
-* **Removing dependencies**: If a dependency is no longer needed, or replaced, use [`yarn remove`](https://yarnpkg.com/en/docs/cli/remove) to remove it.
-
-As you can see above, using `yarn` commandline tools means that you should never need to modify the `package.json` manually. *We recommend always using `yarn` to keep dependencies updated / in sync.*
-
-Further Documentation
----------------------
-
-See [`./docs`](docs) for further documentation.
-
Frequently asked questions
--------------------------
@@ -411,5 +403,4 @@ Frequently asked questions
License
-------
-
-http://www.dspace.org/license
+This project's source code is made available under the DSpace BSD License: http://www.dspace.org/license
diff --git a/config/environment.default.js b/config/environment.default.js
index 03080f756f..24386d6cf7 100644
--- a/config/environment.default.js
+++ b/config/environment.default.js
@@ -141,6 +141,10 @@ module.exports = {
code: 'nl',
label: 'Nederlands',
active: false,
+ }, {
+ code: 'pt',
+ label: 'Português',
+ active: true,
}],
// Browse-By Pages
browseBy: {
diff --git a/resources/i18n/cs.json5 b/resources/i18n/cs.json5
index 5e787b5cc9..2dbe7c55fb 100644
--- a/resources/i18n/cs.json5
+++ b/resources/i18n/cs.json5
@@ -1125,9 +1125,9 @@
// TODO New key - Add a translation
"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.error": "An error occurred when attempting to move the item",
// TODO New key - Add a translation
- "item.edit.move.error": "An error occured when attempting to move the item",
+ "item.edit.move.error": "An error occurred when attempting to move the item",
// "item.edit.move.head": "Move item: {{id}}",
// TODO New key - Add a translation
@@ -1153,9 +1153,9 @@
// TODO New key - Add a translation
"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.success": "The item has been moved successfully",
// TODO New key - Add a translation
- "item.edit.move.success": "The item has been moved succesfully",
+ "item.edit.move.success": "The item has been moved successfully",
// "item.edit.move.title": "Move item",
// TODO New key - Add a translation
@@ -2911,9 +2911,9 @@
// TODO New key - Add a translation
"submission.sections.upload.header.policy.default.withlist": "Please note that uploaded files in the {{collectionName}} collection will be accessible, in addition to what is explicitly decided for the single file, with the following group(s):",
- // "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
+ // "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the file metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
// TODO New key - Add a translation
- "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
+ "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the file metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
// "submission.sections.upload.no-entry": "No",
// TODO New key - Add a translation
diff --git a/resources/i18n/de.json5 b/resources/i18n/de.json5
index fb56921fa4..ade65d7052 100644
--- a/resources/i18n/de.json5
+++ b/resources/i18n/de.json5
@@ -587,7 +587,7 @@
"item.edit.move.cancel": "Abbrechen",
// "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.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.error": "An error occurred when attempting to move the item",
"item.edit.move.error": "Ein Fehler ist beim Verschieben der Ressource aufgetreten",
// "item.edit.move.head": "Move item: {{id}}",
"item.edit.move.head": "Ressource verschieben: {{id}}",
@@ -601,7 +601,7 @@
"item.edit.move.processing": "Verschieben...",
// "item.edit.move.search.placeholder": "Enter a search query to look for collections",
"item.edit.move.search.placeholder": "Geben Sie einen Begriff ein, um nach Sammlungen zu suchen",
- // "item.edit.move.success": "The item has been moved succesfully",
+ // "item.edit.move.success": "The item has been moved successfully",
"item.edit.move.success": "Die Ressource wurde erfolgreich verschoben",
// "item.edit.move.title": "Move item",
"item.edit.move.title": "Ressource verschieben",
@@ -1515,7 +1515,7 @@
"submission.sections.upload.header.policy.default.nolist": "In diese Sammlung {{collectionName}} hochgeladene Dateien werden für folgende(n) Gruppe(n) zugänglich sein:",
// "submission.sections.upload.header.policy.default.withlist": "Please note that uploaded files in the {{collectionName}} collection will be accessible, in addition to what is explicitly decided for the single file, with the following group(s):",
"submission.sections.upload.header.policy.default.withlist": "Bitte beachten Sie, dass in diese Sammlung {{collectionName}} hochgeladene Dateien zugüglich zu dem, was für einzelne Dateien entschieden wurde, für folgende Gruppe(n) zugänglich sein:",
- // "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
+ // "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the file metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
"submission.sections.upload.info": "Hier finden Sie alle Dateien, die aktuell zur Ressource gehören. Sie können die Metadaten und Zugriffsrechte bearbeiten oder weitere Dateien hinzufügen, indem Sie sie einfach irgenwo auf diese Seite ziehen.",
// "submission.sections.upload.no-entry": "No",
"submission.sections.upload.no-entry": "Kein Eintrag",
diff --git a/resources/i18n/en.json5 b/resources/i18n/en.json5
index f104099d26..0dc5b51c05 100644
--- a/resources/i18n/en.json5
+++ b/resources/i18n/en.json5
@@ -614,7 +614,7 @@
"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.error": "An error occurred when attempting to move the item",
"item.edit.move.head": "Move item: {{id}}",
@@ -628,7 +628,7 @@
"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.success": "The item has been moved successfully",
"item.edit.move.title": "Move item",
@@ -1592,7 +1592,7 @@
"submission.sections.upload.header.policy.default.withlist": "Please note that uploaded files in the {{collectionName}} collection will be accessible, in addition to what is explicitly decided for the single file, with the following group(s):",
- "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
+ "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the file metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
"submission.sections.upload.no-entry": "No",
diff --git a/resources/i18n/es.json5 b/resources/i18n/es.json5
index 99c5168d3e..230af002b6 100644
--- a/resources/i18n/es.json5
+++ b/resources/i18n/es.json5
@@ -591,7 +591,7 @@
"item.edit.move.cancel": "Cancelar",
// "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.description": "Seleccione la colección a la que desea mover este ítem. Para reducir la lista de colecciones mostradas, puede ingresar una consulta de búsqueda en el cuadro.",
-// "item.edit.move.error": "An error occured when attempting to move the item",
+// "item.edit.move.error": "An error occurred when attempting to move the item",
"item.edit.move.error": "Ha ocurrido un error cuando ha intentado mover el ítem",
// "item.edit.move.head": "Move item: {{id}}",
"item.edit.move.head": "Mover el ítem: {{id}}",
@@ -605,7 +605,7 @@
"item.edit.move.processing": "Moviendo...",
// "item.edit.move.search.placeholder": "Enter a search query to look for collections",
"item.edit.move.search.placeholder": "Ingrese una consulta para buscar colecciones",
-// "item.edit.move.success": "The item has been moved succesfully",
+// "item.edit.move.success": "The item has been moved successfully",
"item.edit.move.success": "El ítem ha sido movido exitosamente",
// "item.edit.move.title": "Move item",
"item.edit.move.title": "Mover ítem",
@@ -1521,7 +1521,7 @@
"submission.sections.upload.header.policy.default.nolist": "Archivos subidos a la colección {{collectionName}} serán accesibles según el siguiente grupo(s):",
// "submission.sections.upload.header.policy.default.withlist": "Please note that uploaded files in the {{collectionName}} collection will be accessible, in addition to what is explicitly decided for the single file, with the following group(s):",
"submission.sections.upload.header.policy.default.withlist": "Tenga en cuenta que los archivos cargados en la colección {{collectionName}} serán accesibles, además de lo que se decida explísitamente para el único archivo con el siguiente grupo(s):",
-// "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
+// "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the file metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
"submission.sections.upload.info": "Aquí encontrará todos los archivos aque actualmente están en el ítem.. Puede actualizar los metadatos del archivo y las condiciones de acceso o cargar los archivos adicionales simplemente arrastrándolos y soltándolos en cualquier parte de la página",
// "submission.sections.upload.no-entry": "No",
"submission.sections.upload.no-entry": "No",
diff --git a/resources/i18n/nl.json5 b/resources/i18n/nl.json5
index 81f8ec4ada..3eb7b7c7c3 100644
--- a/resources/i18n/nl.json5
+++ b/resources/i18n/nl.json5
@@ -1122,9 +1122,9 @@
// TODO New key - Add a translation
"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.error": "An error occurred when attempting to move the item",
// TODO New key - Add a translation
- "item.edit.move.error": "An error occured when attempting to move the item",
+ "item.edit.move.error": "An error occurred when attempting to move the item",
// "item.edit.move.head": "Move item: {{id}}",
// TODO New key - Add a translation
@@ -1150,9 +1150,9 @@
// TODO New key - Add a translation
"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.success": "The item has been moved successfully",
// TODO New key - Add a translation
- "item.edit.move.success": "The item has been moved succesfully",
+ "item.edit.move.success": "The item has been moved successfully",
// "item.edit.move.title": "Move item",
// TODO New key - Add a translation
@@ -2908,9 +2908,9 @@
// TODO New key - Add a translation
"submission.sections.upload.header.policy.default.withlist": "Please note that uploaded files in the {{collectionName}} collection will be accessible, in addition to what is explicitly decided for the single file, with the following group(s):",
- // "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
+ // "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the file metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
// TODO New key - Add a translation
- "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
+ "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the file metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page",
// "submission.sections.upload.no-entry": "No",
// TODO New key - Add a translation
diff --git a/resources/i18n/pt.json5 b/resources/i18n/pt.json5
index 398c57e6b2..15f0608520 100644
--- a/resources/i18n/pt.json5
+++ b/resources/i18n/pt.json5
@@ -1,958 +1,728 @@
{
// "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. ",
- // TODO New key - Add a translation
- "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": "Não pudemos encontrar a página pela qual procura. A página pode ter sido movida ou apagada. Você pode utilizar o botão abaixo para voltar a página inicial. ",
// "404.link.home-page": "Take me to the home page",
- // TODO New key - Add a translation
- "404.link.home-page": "Take me to the home page",
+ "404.link.home-page": "Leve-me a página inicial",
// "404.page-not-found": "page not found",
- // TODO New key - Add a translation
- "404.page-not-found": "page not found",
+ "404.page-not-found": "página não encontrada",
// "admin.registries.bitstream-formats.create.failure.content": "An error occurred while creating the new bitstream format.",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.create.failure.content": "An error occurred while creating the new bitstream format.",
+ "admin.registries.bitstream-formats.create.failure.content": "Um erro ocorreu durante a criação do novo formato de bitstream.",
// "admin.registries.bitstream-formats.create.failure.head": "Failure",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.create.failure.head": "Failure",
+ "admin.registries.bitstream-formats.create.failure.head": "Falha",
// "admin.registries.bitstream-formats.create.head": "Create Bitstream format",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.create.head": "Create Bitstream format",
+ "admin.registries.bitstream-formats.create.head": "Criar formato de Bitstream",
// "admin.registries.bitstream-formats.create.new": "Add a new bitstream format",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.create.new": "Add a new bitstream format",
+ "admin.registries.bitstream-formats.create.new": "Adicionar um novo formato de bitstream",
// "admin.registries.bitstream-formats.create.success.content": "The new bitstream format was successfully created.",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.create.success.content": "The new bitstream format was successfully created.",
+ "admin.registries.bitstream-formats.create.success.content": "O novo formato de bitstream foi criado com sucesso.",
// "admin.registries.bitstream-formats.create.success.head": "Success",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.create.success.head": "Success",
+ "admin.registries.bitstream-formats.create.success.head": "Sucesso",
// "admin.registries.bitstream-formats.delete.failure.amount": "Failed to remove {{ amount }} format(s)",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.delete.failure.amount": "Failed to remove {{ amount }} format(s)",
+ "admin.registries.bitstream-formats.delete.failure.amount": "Falha ao remover {{ amount }} formato(s)",
// "admin.registries.bitstream-formats.delete.failure.head": "Failure",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.delete.failure.head": "Failure",
+ "admin.registries.bitstream-formats.delete.failure.head": "Falha",
// "admin.registries.bitstream-formats.delete.success.amount": "Successfully removed {{ amount }} format(s)",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.delete.success.amount": "Successfully removed {{ amount }} format(s)",
+ "admin.registries.bitstream-formats.delete.success.amount": "Removeu {{ amount }} formato(s) com sucesso",
// "admin.registries.bitstream-formats.delete.success.head": "Success",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.delete.success.head": "Success",
+ "admin.registries.bitstream-formats.delete.success.head": "Sucesso",
// "admin.registries.bitstream-formats.description": "This list of bitstream formats provides information about known formats and their support level.",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.description": "This list of bitstream formats provides information about known formats and their support level.",
+ "admin.registries.bitstream-formats.description": "Esta lista de formatos de bitstream provê informações sobre formatos conhecidos e seus níveis de suporte.",
// "admin.registries.bitstream-formats.edit.description.hint": "",
- // TODO New key - Add a translation
"admin.registries.bitstream-formats.edit.description.hint": "",
// "admin.registries.bitstream-formats.edit.description.label": "Description",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.description.label": "Description",
+ "admin.registries.bitstream-formats.edit.description.label": "Descrição",
// "admin.registries.bitstream-formats.edit.extensions.hint": "Extensions are file extensions that are used to automatically identify the format of uploaded files. You can enter several extensions for each format.",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.extensions.hint": "Extensions are file extensions that are used to automatically identify the format of uploaded files. You can enter several extensions for each format.",
+ "admin.registries.bitstream-formats.edit.extensions.hint": "Extensões são extensões de arquivo que são usadas para identificar automaticamente o formato dos arquivo enviados. Você pode informar várias extensões para cada formato.",
// "admin.registries.bitstream-formats.edit.extensions.label": "File extensions",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.extensions.label": "File extensions",
+ "admin.registries.bitstream-formats.edit.extensions.label": "Extensões de arquivo",
// "admin.registries.bitstream-formats.edit.extensions.placeholder": "Enter a file extenstion without the dot",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.extensions.placeholder": "Enter a file extenstion without the dot",
+ "admin.registries.bitstream-formats.edit.extensions.placeholder": "Informe uma extenção e arquivo sem o ponto",
// "admin.registries.bitstream-formats.edit.failure.content": "An error occurred while editing the bitstream format.",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.failure.content": "An error occurred while editing the bitstream format.",
+ "admin.registries.bitstream-formats.edit.failure.content": "Ocorreu um erro ao editar o formato de bitstream.",
// "admin.registries.bitstream-formats.edit.failure.head": "Failure",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.failure.head": "Failure",
+ "admin.registries.bitstream-formats.edit.failure.head": "Falha",
// "admin.registries.bitstream-formats.edit.head": "Bitstream format: {{ format }}",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.head": "Bitstream format: {{ format }}",
+ "admin.registries.bitstream-formats.edit.head": "Formato de bitstream: {{ format }}",
- // "admin.registries.bitstream-formats.edit.internal.hint": "Formats marked as internal are are hidden from the user, and used for administrative purposes.",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.internal.hint": "Formats marked as internal are are hidden from the user, and used for administrative purposes.",
+ // "admin.registries.bitstream-formats.edit.internal.hint": "Formats marked as internal are hidden from the user, and used for administrative purposes.",
+ "admin.registries.bitstream-formats.edit.internal.hint": "Formatos marcados como interno são ocultos para o usuário, e utilizados por motivos administrativos.",
// "admin.registries.bitstream-formats.edit.internal.label": "Internal",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.internal.label": "Internal",
+ "admin.registries.bitstream-formats.edit.internal.label": "Interno",
// "admin.registries.bitstream-formats.edit.mimetype.hint": "The MIME type associated with this format, does not have to be unique.",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.mimetype.hint": "The MIME type associated with this format, does not have to be unique.",
+ "admin.registries.bitstream-formats.edit.mimetype.hint": "O MIME type associado à este formato não tem que ser único.",
// "admin.registries.bitstream-formats.edit.mimetype.label": "MIME Type",
- // TODO New key - Add a translation
"admin.registries.bitstream-formats.edit.mimetype.label": "MIME Type",
// "admin.registries.bitstream-formats.edit.shortDescription.hint": "A unique name for this format, (e.g. Microsoft Word XP or Microsoft Word 2000)",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.shortDescription.hint": "A unique name for this format, (e.g. Microsoft Word XP or Microsoft Word 2000)",
+ "admin.registries.bitstream-formats.edit.shortDescription.hint": "Um nome único para este formato (exemplo. Microsoft Word XP ou Microsoft Word 2000)",
// "admin.registries.bitstream-formats.edit.shortDescription.label": "Name",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.shortDescription.label": "Name",
+ "admin.registries.bitstream-formats.edit.shortDescription.label": "Nome",
// "admin.registries.bitstream-formats.edit.success.content": "The bitstream format was successfully edited.",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.success.content": "The bitstream format was successfully edited.",
+ "admin.registries.bitstream-formats.edit.success.content": "O formato de bitstream foi editedo com sucesso.",
// "admin.registries.bitstream-formats.edit.success.head": "Success",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.success.head": "Success",
+ "admin.registries.bitstream-formats.edit.success.head": "Sucesso",
// "admin.registries.bitstream-formats.edit.supportLevel.hint": "The level of support your institution pledges for this format.",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.supportLevel.hint": "The level of support your institution pledges for this format.",
+ "admin.registries.bitstream-formats.edit.supportLevel.hint": "O nível de suporte que a sua instituição promete para este formato.",
// "admin.registries.bitstream-formats.edit.supportLevel.label": "Support level",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.edit.supportLevel.label": "Support level",
+ "admin.registries.bitstream-formats.edit.supportLevel.label": "Nível de suporte",
// "admin.registries.bitstream-formats.head": "Bitstream Format Registry",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.head": "Bitstream Format Registry",
+ "admin.registries.bitstream-formats.head": "Registro de Formato de Bitstream",
// "admin.registries.bitstream-formats.no-items": "No bitstream formats to show.",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.no-items": "No bitstream formats to show.",
+ "admin.registries.bitstream-formats.no-items": "Nenhum formato de bitstream para exibir.",
// "admin.registries.bitstream-formats.table.delete": "Delete selected",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.table.delete": "Delete selected",
+ "admin.registries.bitstream-formats.table.delete": "Apagar selecionado(s)",
// "admin.registries.bitstream-formats.table.deselect-all": "Deselect all",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.table.deselect-all": "Deselect all",
+ "admin.registries.bitstream-formats.table.deselect-all": "Desselecionar todos",
// "admin.registries.bitstream-formats.table.internal": "internal",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.table.internal": "internal",
+ "admin.registries.bitstream-formats.table.internal": "Interno",
// "admin.registries.bitstream-formats.table.mimetype": "MIME Type",
- // TODO New key - Add a translation
"admin.registries.bitstream-formats.table.mimetype": "MIME Type",
// "admin.registries.bitstream-formats.table.name": "Name",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.table.name": "Name",
+ "admin.registries.bitstream-formats.table.name": "Nome",
// "admin.registries.bitstream-formats.table.return": "Return",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.table.return": "Return",
+ "admin.registries.bitstream-formats.table.return": "Voltar",
// "admin.registries.bitstream-formats.table.supportLevel.KNOWN": "Known",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.table.supportLevel.KNOWN": "Known",
+ "admin.registries.bitstream-formats.table.supportLevel.KNOWN": "Conhecido",
// "admin.registries.bitstream-formats.table.supportLevel.SUPPORTED": "Supported",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.table.supportLevel.SUPPORTED": "Supported",
+ "admin.registries.bitstream-formats.table.supportLevel.SUPPORTED": "Com suporte",
// "admin.registries.bitstream-formats.table.supportLevel.UNKNOWN": "Unknown",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.table.supportLevel.UNKNOWN": "Unknown",
+ "admin.registries.bitstream-formats.table.supportLevel.UNKNOWN": "Desconhecido",
// "admin.registries.bitstream-formats.table.supportLevel.head": "Support Level",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.table.supportLevel.head": "Support Level",
+ "admin.registries.bitstream-formats.table.supportLevel.head": "Nível de Suporte",
// "admin.registries.bitstream-formats.title": "DSpace Angular :: Bitstream Format Registry",
- // TODO New key - Add a translation
- "admin.registries.bitstream-formats.title": "DSpace Angular :: Bitstream Format Registry",
+ "admin.registries.bitstream-formats.title": "DSpace Angular :: Registro de Formato de Bitstream",
// "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.",
- // TODO New key - Add a translation
- "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": "O registro de metadados mantém a lista de todos os campos de metadados disponíveis no repositório. Estes campos podêm ser divididos em multiplos esquemas. Entretanto, o DSpace requer esquemas de Dublin Core qualificados.",
// "admin.registries.metadata.form.create": "Create metadata schema",
- // TODO New key - Add a translation
- "admin.registries.metadata.form.create": "Create metadata schema",
+ "admin.registries.metadata.form.create": "Criar esquema de metadados",
// "admin.registries.metadata.form.edit": "Edit metadata schema",
- // TODO New key - Add a translation
- "admin.registries.metadata.form.edit": "Edit metadata schema",
+ "admin.registries.metadata.form.edit": "Editar esquema de metadados",
// "admin.registries.metadata.form.name": "Name",
- // TODO New key - Add a translation
- "admin.registries.metadata.form.name": "Name",
+ "admin.registries.metadata.form.name": "Nome",
// "admin.registries.metadata.form.namespace": "Namespace",
- // TODO New key - Add a translation
"admin.registries.metadata.form.namespace": "Namespace",
// "admin.registries.metadata.head": "Metadata Registry",
- // TODO New key - Add a translation
- "admin.registries.metadata.head": "Metadata Registry",
+ "admin.registries.metadata.head": "Registro de Metadados",
// "admin.registries.metadata.schemas.no-items": "No metadata schemas to show.",
- // TODO New key - Add a translation
- "admin.registries.metadata.schemas.no-items": "No metadata schemas to show.",
+ "admin.registries.metadata.schemas.no-items": "Nenhum esquema de metadados a mostrar.",
// "admin.registries.metadata.schemas.table.delete": "Delete selected",
- // TODO New key - Add a translation
- "admin.registries.metadata.schemas.table.delete": "Delete selected",
+ "admin.registries.metadata.schemas.table.delete": "Apagar selecionado(s)",
// "admin.registries.metadata.schemas.table.id": "ID",
- // TODO New key - Add a translation
"admin.registries.metadata.schemas.table.id": "ID",
// "admin.registries.metadata.schemas.table.name": "Name",
- // TODO New key - Add a translation
- "admin.registries.metadata.schemas.table.name": "Name",
+ "admin.registries.metadata.schemas.table.name": "Nome",
// "admin.registries.metadata.schemas.table.namespace": "Namespace",
- // TODO New key - Add a translation
"admin.registries.metadata.schemas.table.namespace": "Namespace",
// "admin.registries.metadata.title": "DSpace Angular :: Metadata Registry",
- // TODO New key - Add a translation
- "admin.registries.metadata.title": "DSpace Angular :: Metadata Registry",
+ "admin.registries.metadata.title": "DSpace Angular :: Registro de Metadados",
// "admin.registries.schema.description": "This is the metadata schema for \"{{namespace}}\".",
- // TODO New key - Add a translation
- "admin.registries.schema.description": "This is the metadata schema for \"{{namespace}}\".",
+ "admin.registries.schema.description": "Este é o esquema de metadados para \"{{namespace}}\".",
// "admin.registries.schema.fields.head": "Schema metadata fields",
- // TODO New key - Add a translation
- "admin.registries.schema.fields.head": "Schema metadata fields",
+ "admin.registries.schema.fields.head": "Campos do esquema de metadados",
// "admin.registries.schema.fields.no-items": "No metadata fields to show.",
- // TODO New key - Add a translation
- "admin.registries.schema.fields.no-items": "No metadata fields to show.",
+ "admin.registries.schema.fields.no-items": "Nenhum campo de metadado a exibir.",
// "admin.registries.schema.fields.table.delete": "Delete selected",
- // TODO New key - Add a translation
- "admin.registries.schema.fields.table.delete": "Delete selected",
+ "admin.registries.schema.fields.table.delete": "Apagar selecionado(s)",
// "admin.registries.schema.fields.table.field": "Field",
- // TODO New key - Add a translation
- "admin.registries.schema.fields.table.field": "Field",
+ "admin.registries.schema.fields.table.field": "Campo",
// "admin.registries.schema.fields.table.scopenote": "Scope Note",
- // TODO New key - Add a translation
- "admin.registries.schema.fields.table.scopenote": "Scope Note",
+ "admin.registries.schema.fields.table.scopenote": "Nota de escopo",
// "admin.registries.schema.form.create": "Create metadata field",
- // TODO New key - Add a translation
- "admin.registries.schema.form.create": "Create metadata field",
+ "admin.registries.schema.form.create": "Criar campo de metadado",
// "admin.registries.schema.form.edit": "Edit metadata field",
- // TODO New key - Add a translation
- "admin.registries.schema.form.edit": "Edit metadata field",
+ "admin.registries.schema.form.edit": "Editar campo de metadado",
// "admin.registries.schema.form.element": "Element",
- // TODO New key - Add a translation
- "admin.registries.schema.form.element": "Element",
+ "admin.registries.schema.form.element": "Elemento",
// "admin.registries.schema.form.qualifier": "Qualifier",
- // TODO New key - Add a translation
- "admin.registries.schema.form.qualifier": "Qualifier",
+ "admin.registries.schema.form.qualifier": "Qualificador",
// "admin.registries.schema.form.scopenote": "Scope Note",
- // TODO New key - Add a translation
- "admin.registries.schema.form.scopenote": "Scope Note",
+ "admin.registries.schema.form.scopenote": "Nota de Escopo",
// "admin.registries.schema.head": "Metadata Schema",
- // TODO New key - Add a translation
- "admin.registries.schema.head": "Metadata Schema",
+ "admin.registries.schema.head": "Esquema de Metadados",
// "admin.registries.schema.notification.created": "Successfully created metadata schema \"{{prefix}}\"",
- // TODO New key - Add a translation
- "admin.registries.schema.notification.created": "Successfully created metadata schema \"{{prefix}}\"",
+ "admin.registries.schema.notification.created": "Criou o esquema de metadados \"{{prefix}}\" com sucesso",
// "admin.registries.schema.notification.deleted.failure": "Failed to delete {{amount}} metadata schemas",
- // TODO New key - Add a translation
- "admin.registries.schema.notification.deleted.failure": "Failed to delete {{amount}} metadata schemas",
+ "admin.registries.schema.notification.deleted.failure": "Falhou ao apagar {{amount}} esquema(s) de metadados",
// "admin.registries.schema.notification.deleted.success": "Successfully deleted {{amount}} metadata schemas",
- // TODO New key - Add a translation
- "admin.registries.schema.notification.deleted.success": "Successfully deleted {{amount}} metadata schemas",
+ "admin.registries.schema.notification.deleted.success": "Apagou {{amount}} esquema(s) de metadados com sucesso",
// "admin.registries.schema.notification.edited": "Successfully edited metadata schema \"{{prefix}}\"",
- // TODO New key - Add a translation
- "admin.registries.schema.notification.edited": "Successfully edited metadata schema \"{{prefix}}\"",
+ "admin.registries.schema.notification.edited": "Editou o esquema de metadados \"{{prefix}}\" com sucesso",
// "admin.registries.schema.notification.failure": "Error",
- // TODO New key - Add a translation
- "admin.registries.schema.notification.failure": "Error",
+ "admin.registries.schema.notification.failure": "Erro",
// "admin.registries.schema.notification.field.created": "Successfully created metadata field \"{{field}}\"",
- // TODO New key - Add a translation
- "admin.registries.schema.notification.field.created": "Successfully created metadata field \"{{field}}\"",
+ "admin.registries.schema.notification.field.created": "Criou o campo de medado \"{{field}}\" com sucesso",
// "admin.registries.schema.notification.field.deleted.failure": "Failed to delete {{amount}} metadata fields",
- // TODO New key - Add a translation
- "admin.registries.schema.notification.field.deleted.failure": "Failed to delete {{amount}} metadata fields",
+ "admin.registries.schema.notification.field.deleted.failure": "Falhou ao apagar {{amount}} campo(s) de metadados",
// "admin.registries.schema.notification.field.deleted.success": "Successfully deleted {{amount}} metadata fields",
- // TODO New key - Add a translation
- "admin.registries.schema.notification.field.deleted.success": "Successfully deleted {{amount}} metadata fields",
+ "admin.registries.schema.notification.field.deleted.success": "Apagou {{amount}} campo(s) de metadados com sucesso",
// "admin.registries.schema.notification.field.edited": "Successfully edited metadata field \"{{field}}\"",
- // TODO New key - Add a translation
- "admin.registries.schema.notification.field.edited": "Successfully edited metadata field \"{{field}}\"",
+ "admin.registries.schema.notification.field.edited": "Editou o campo de metadodo \"{{field}}\" com sucesso",
// "admin.registries.schema.notification.success": "Success",
- // TODO New key - Add a translation
- "admin.registries.schema.notification.success": "Success",
+ "admin.registries.schema.notification.success": "Sucesso",
// "admin.registries.schema.return": "Return",
- // TODO New key - Add a translation
- "admin.registries.schema.return": "Return",
+ "admin.registries.schema.return": "Voltar",
// "admin.registries.schema.title": "DSpace Angular :: Metadata Schema Registry",
- // TODO New key - Add a translation
- "admin.registries.schema.title": "DSpace Angular :: Metadata Schema Registry",
+ "admin.registries.schema.title": "DSpace Angular :: Registro de Esquema de Metadados",
// "auth.errors.invalid-user": "Invalid email address or password.",
- // TODO New key - Add a translation
- "auth.errors.invalid-user": "Invalid email address or password.",
+ "auth.errors.invalid-user": "Endereço de email ou senha inválidos.",
// "auth.messages.expired": "Your session has expired. Please log in again.",
- // TODO New key - Add a translation
- "auth.messages.expired": "Your session has expired. Please log in again.",
+ "auth.messages.expired": "Sua sessão expirou. Por favor entre novamente.",
// "browse.comcol.by.author": "By Author",
- // TODO New key - Add a translation
- "browse.comcol.by.author": "By Author",
+ "browse.comcol.by.author": "Por Autor",
// "browse.comcol.by.dateissued": "By Issue Date",
- // TODO New key - Add a translation
- "browse.comcol.by.dateissued": "By Issue Date",
+ "browse.comcol.by.dateissued": "Por Data de Publicação",
// "browse.comcol.by.subject": "By Subject",
- // TODO New key - Add a translation
- "browse.comcol.by.subject": "By Subject",
+ "browse.comcol.by.subject": "Por Assunto",
// "browse.comcol.by.title": "By Title",
- // TODO New key - Add a translation
- "browse.comcol.by.title": "By Title",
+ "browse.comcol.by.title": "Por Título",
// "browse.comcol.head": "Browse",
- // TODO New key - Add a translation
- "browse.comcol.head": "Browse",
+ "browse.comcol.head": "Navegar",
// "browse.empty": "No items to show.",
- // TODO New key - Add a translation
- "browse.empty": "No items to show.",
+ "browse.empty": "Sem itens a exibir.",
// "browse.metadata.author": "Author",
- // TODO New key - Add a translation
- "browse.metadata.author": "Author",
+ "browse.metadata.author": "Autor",
// "browse.metadata.dateissued": "Issue Date",
- // TODO New key - Add a translation
- "browse.metadata.dateissued": "Issue Date",
+ "browse.metadata.dateissued": "Data de Publicação",
// "browse.metadata.subject": "Subject",
- // TODO New key - Add a translation
- "browse.metadata.subject": "Subject",
+ "browse.metadata.subject": "Assunto",
// "browse.metadata.title": "Title",
- // TODO New key - Add a translation
- "browse.metadata.title": "Title",
+ "browse.metadata.title": "Título",
// "browse.startsWith.choose_start": "(Choose start)",
- // TODO New key - Add a translation
- "browse.startsWith.choose_start": "(Choose start)",
+ "browse.startsWith.choose_start": "(Escolha o início)",
// "browse.startsWith.choose_year": "(Choose year)",
- // TODO New key - Add a translation
- "browse.startsWith.choose_year": "(Choose year)",
+ "browse.startsWith.choose_year": "(Escolha o ano)",
// "browse.startsWith.jump": "Jump to a point in the index:",
- // TODO New key - Add a translation
- "browse.startsWith.jump": "Jump to a point in the index:",
+ "browse.startsWith.jump": "Pular para um ponto do índice:",
// "browse.startsWith.months.april": "April",
- // TODO New key - Add a translation
- "browse.startsWith.months.april": "April",
+ "browse.startsWith.months.april": "Abril",
// "browse.startsWith.months.august": "August",
- // TODO New key - Add a translation
- "browse.startsWith.months.august": "August",
+ "browse.startsWith.months.august": "Agosto",
// "browse.startsWith.months.december": "December",
- // TODO New key - Add a translation
- "browse.startsWith.months.december": "December",
+ "browse.startsWith.months.december": "Dezembro",
// "browse.startsWith.months.february": "February",
- // TODO New key - Add a translation
- "browse.startsWith.months.february": "February",
+ "browse.startsWith.months.february": "Fevereiro",
// "browse.startsWith.months.january": "January",
- // TODO New key - Add a translation
- "browse.startsWith.months.january": "January",
+ "browse.startsWith.months.january": "Janeiro",
// "browse.startsWith.months.july": "July",
- // TODO New key - Add a translation
- "browse.startsWith.months.july": "July",
+ "browse.startsWith.months.july": "Julho",
// "browse.startsWith.months.june": "June",
- // TODO New key - Add a translation
- "browse.startsWith.months.june": "June",
+ "browse.startsWith.months.june": "Junho",
// "browse.startsWith.months.march": "March",
- // TODO New key - Add a translation
- "browse.startsWith.months.march": "March",
+ "browse.startsWith.months.march": "Março",
// "browse.startsWith.months.may": "May",
- // TODO New key - Add a translation
- "browse.startsWith.months.may": "May",
+ "browse.startsWith.months.may": "Maio",
// "browse.startsWith.months.none": "(Choose month)",
- // TODO New key - Add a translation
- "browse.startsWith.months.none": "(Choose month)",
+ "browse.startsWith.months.none": "(escolha o mês)",
// "browse.startsWith.months.november": "November",
- // TODO New key - Add a translation
- "browse.startsWith.months.november": "November",
+ "browse.startsWith.months.november": "Novembro",
// "browse.startsWith.months.october": "October",
- // TODO New key - Add a translation
- "browse.startsWith.months.october": "October",
+ "browse.startsWith.months.october": "Outubro",
// "browse.startsWith.months.september": "September",
- // TODO New key - Add a translation
- "browse.startsWith.months.september": "September",
+ "browse.startsWith.months.september": "Setembro",
// "browse.startsWith.submit": "Go",
- // TODO New key - Add a translation
- "browse.startsWith.submit": "Go",
+ "browse.startsWith.submit": "Ir",
// "browse.startsWith.type_date": "Or type in a date (year-month):",
- // TODO New key - Add a translation
- "browse.startsWith.type_date": "Or type in a date (year-month):",
+ "browse.startsWith.type_date": "Ou informe uma data (ano-mês):",
// "browse.startsWith.type_text": "Or enter first few letters:",
- // TODO New key - Add a translation
- "browse.startsWith.type_text": "Or enter first few letters:",
+ "browse.startsWith.type_text": "Ou informe as primeiras letras:",
// "browse.title": "Browsing {{ collection }} by {{ field }} {{ value }}",
- // TODO New key - Add a translation
- "browse.title": "Browsing {{ collection }} by {{ field }} {{ value }}",
+ "browse.title": "Navegando {{ collection }} por {{ field }} {{ value }}",
// "chips.remove": "Remove chip",
- // TODO New key - Add a translation
- "chips.remove": "Remove chip",
+ "chips.remove": "Remover chip",
// "collection.create.head": "Create a Collection",
- // TODO New key - Add a translation
- "collection.create.head": "Create a Collection",
+ "collection.create.head": "Criar uma coleção",
// "collection.create.sub-head": "Create a Collection for Community {{ parent }}",
- // TODO New key - Add a translation
- "collection.create.sub-head": "Create a Collection for Community {{ parent }}",
+ "collection.create.sub-head": "Criar uma Coleção na Comunidade {{ parent }}",
// "collection.delete.cancel": "Cancel",
- // TODO New key - Add a translation
- "collection.delete.cancel": "Cancel",
+ "collection.delete.cancel": "Cancelar",
// "collection.delete.confirm": "Confirm",
- // TODO New key - Add a translation
- "collection.delete.confirm": "Confirm",
+ "collection.delete.confirm": "Confirmar",
// "collection.delete.head": "Delete Collection",
- // TODO New key - Add a translation
- "collection.delete.head": "Delete Collection",
+ "collection.delete.head": "Apagar Coleção",
// "collection.delete.notification.fail": "Collection could not be deleted",
- // TODO New key - Add a translation
- "collection.delete.notification.fail": "Collection could not be deleted",
+ "collection.delete.notification.fail": "Coleção não pôde ser apagada",
// "collection.delete.notification.success": "Successfully deleted collection",
- // TODO New key - Add a translation
- "collection.delete.notification.success": "Successfully deleted collection",
+ "collection.delete.notification.success": "Apagou a coleção com sucesso",
// "collection.delete.text": "Are you sure you want to delete collection \"{{ dso }}\"",
- // TODO New key - Add a translation
- "collection.delete.text": "Are you sure you want to delete collection \"{{ dso }}\"",
+ "collection.delete.text": "Você tem certeza que deseja apagar a coleção \"{{ dso }}?\"",
// "collection.edit.delete": "Delete this collection",
- // TODO New key - Add a translation
- "collection.edit.delete": "Delete this collection",
+ "collection.edit.delete": "Apagar esta coleção",
// "collection.edit.head": "Edit Collection",
- // TODO New key - Add a translation
- "collection.edit.head": "Edit Collection",
+ "collection.edit.head": "Editar Coleção",
// "collection.edit.item-mapper.cancel": "Cancel",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.cancel": "Cancel",
+ "collection.edit.item-mapper.cancel": "Cancelar",
// "collection.edit.item-mapper.collection": "Collection: \"{{name}}\"",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.collection": "Collection: \"{{name}}\"",
+ "collection.edit.item-mapper.collection": "Coleção: \"{{name}}\"",
// "collection.edit.item-mapper.confirm": "Map selected items",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.confirm": "Map selected items",
+ "collection.edit.item-mapper.confirm": "Mapear itens selecionados",
// "collection.edit.item-mapper.description": "This is the item mapper tool that allows collection administrators to map items from other collections into this collection. You can search for items from other collections and map them, or browse the list of currently mapped items.",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.description": "This is the item mapper tool that allows collection administrators to map items from other collections into this collection. You can search for items from other collections and map them, or browse the list of currently mapped items.",
+ "collection.edit.item-mapper.description": "Esta é a ferramenta de mapeação de itens que permite administradores de coleções a mapear itens de outras coleções nesta. VoCẽ pode busca-los em outras coleções para mapeá-los, ou navegar na lista dos itens atualmente mapeados.",
// "collection.edit.item-mapper.head": "Item Mapper - Map Items from Other Collections",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.head": "Item Mapper - Map Items from Other Collections",
+ "collection.edit.item-mapper.head": "Mapeador de Itens - Mapear itens em Outras Coleções",
// "collection.edit.item-mapper.no-search": "Please enter a query to search",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.no-search": "Please enter a query to search",
+ "collection.edit.item-mapper.no-search": "Por favor informe uma consulta para buscar",
// "collection.edit.item-mapper.notifications.map.error.content": "Errors occurred for mapping of {{amount}} items.",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.notifications.map.error.content": "Errors occurred for mapping of {{amount}} items.",
+ "collection.edit.item-mapper.notifications.map.error.content": "Ocorreu erros ao mapear {{amount}} itens.",
// "collection.edit.item-mapper.notifications.map.error.head": "Mapping errors",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.notifications.map.error.head": "Mapping errors",
+ "collection.edit.item-mapper.notifications.map.error.head": "Erros de mapeamento",
// "collection.edit.item-mapper.notifications.map.success.content": "Successfully mapped {{amount}} items.",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.notifications.map.success.content": "Successfully mapped {{amount}} items.",
+ "collection.edit.item-mapper.notifications.map.success.content": "Mapeou {{amount}} itens com sucesso.",
// "collection.edit.item-mapper.notifications.map.success.head": "Mapping completed",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.notifications.map.success.head": "Mapping completed",
+ "collection.edit.item-mapper.notifications.map.success.head": "Mapeamento completo",
// "collection.edit.item-mapper.notifications.unmap.error.content": "Errors occurred for removing the mappings of {{amount}} items.",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.notifications.unmap.error.content": "Errors occurred for removing the mappings of {{amount}} items.",
+ "collection.edit.item-mapper.notifications.unmap.error.content": "Ocorreram erros ao tentar remover os mapeamentos de {{amount}} item(ns).",
// "collection.edit.item-mapper.notifications.unmap.error.head": "Remove mapping errors",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.notifications.unmap.error.head": "Remove mapping errors",
+ "collection.edit.item-mapper.notifications.unmap.error.head": "Erros de remoção de mapeamento",
// "collection.edit.item-mapper.notifications.unmap.success.content": "Successfully removed the mappings of {{amount}} items.",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.notifications.unmap.success.content": "Successfully removed the mappings of {{amount}} items.",
+ "collection.edit.item-mapper.notifications.unmap.success.content": "Removeu os mapeamentps de {{amount}} item(ns) com sucesso.",
// "collection.edit.item-mapper.notifications.unmap.success.head": "Remove mapping completed",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.notifications.unmap.success.head": "Remove mapping completed",
+ "collection.edit.item-mapper.notifications.unmap.success.head": "Remoção de mapeamentos completa",
// "collection.edit.item-mapper.remove": "Remove selected item mappings",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.remove": "Remove selected item mappings",
+ "collection.edit.item-mapper.remove": "Remover mapeamentos selecionados",
// "collection.edit.item-mapper.tabs.browse": "Browse mapped items",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.tabs.browse": "Browse mapped items",
+ "collection.edit.item-mapper.tabs.browse": "Navegar por itens mapeados",
// "collection.edit.item-mapper.tabs.map": "Map new items",
- // TODO New key - Add a translation
- "collection.edit.item-mapper.tabs.map": "Map new items",
+ "collection.edit.item-mapper.tabs.map": "Mapear novos itens",
// "collection.form.abstract": "Short Description",
- // TODO New key - Add a translation
- "collection.form.abstract": "Short Description",
+ "collection.form.abstract": "Descrição curta",
// "collection.form.description": "Introductory text (HTML)",
- // TODO New key - Add a translation
- "collection.form.description": "Introductory text (HTML)",
+ "collection.form.description": "Texto introdutório (HTML)",
// "collection.form.errors.title.required": "Please enter a collection name",
- // TODO New key - Add a translation
- "collection.form.errors.title.required": "Please enter a collection name",
+ "collection.form.errors.title.required": "Por favor informe um nome de coleção",
// "collection.form.license": "License",
- // TODO New key - Add a translation
- "collection.form.license": "License",
+ "collection.form.license": "Licença",
// "collection.form.provenance": "Provenance",
- // TODO New key - Add a translation
- "collection.form.provenance": "Provenance",
+ "collection.form.provenance": "Proveniência",
// "collection.form.rights": "Copyright text (HTML)",
- // TODO New key - Add a translation
- "collection.form.rights": "Copyright text (HTML)",
+ "collection.form.rights": "Texto de direito de cópia (HTML)",
// "collection.form.tableofcontents": "News (HTML)",
- // TODO New key - Add a translation
- "collection.form.tableofcontents": "News (HTML)",
+ "collection.form.tableofcontents": "Notícias (HTML)",
// "collection.form.title": "Name",
- // TODO New key - Add a translation
- "collection.form.title": "Name",
+ "collection.form.title": "Nome",
// "collection.page.browse.recent.head": "Recent Submissions",
- // TODO New key - Add a translation
- "collection.page.browse.recent.head": "Recent Submissions",
+ "collection.page.browse.recent.head": "Submissões Recentes",
// "collection.page.browse.recent.empty": "No items to show",
- // TODO New key - Add a translation
- "collection.page.browse.recent.empty": "No items to show",
+ "collection.page.browse.recent.empty": "Nenhum item a exibir",
// "collection.page.handle": "Permanent URI for this collection",
- // TODO New key - Add a translation
- "collection.page.handle": "Permanent URI for this collection",
+ "collection.page.handle": "URI Permanente para esta coleção",
// "collection.page.license": "License",
- // TODO New key - Add a translation
- "collection.page.license": "License",
+ "collection.page.license": "Licença",
// "collection.page.news": "News",
- // TODO New key - Add a translation
- "collection.page.news": "News",
+ "collection.page.news": "Notícias",
// "collection.select.confirm": "Confirm selected",
- // TODO New key - Add a translation
- "collection.select.confirm": "Confirm selected",
+ "collection.select.confirm": "Confirmar seleção",
// "collection.select.empty": "No collections to show",
- // TODO New key - Add a translation
- "collection.select.empty": "No collections to show",
+ "collection.select.empty": "Nenhuma coleção a mostrar",
// "collection.select.table.title": "Title",
- // TODO New key - Add a translation
- "collection.select.table.title": "Title",
+ "collection.select.table.title": "Título",
// "community.create.head": "Create a Community",
- // TODO New key - Add a translation
- "community.create.head": "Create a Community",
+ "community.create.head": "Criar uma comunidade",
// "community.create.sub-head": "Create a Sub-Community for Community {{ parent }}",
- // TODO New key - Add a translation
- "community.create.sub-head": "Create a Sub-Community for Community {{ parent }}",
+ "community.create.sub-head": "Criar uma Sub-Comunidade para Comunidade {{ parent }}",
// "community.delete.cancel": "Cancel",
- // TODO New key - Add a translation
- "community.delete.cancel": "Cancel",
+ "community.delete.cancel": "Cancelar",
// "community.delete.confirm": "Confirm",
- // TODO New key - Add a translation
- "community.delete.confirm": "Confirm",
+ "community.delete.confirm": "Confirmar",
// "community.delete.head": "Delete Community",
- // TODO New key - Add a translation
- "community.delete.head": "Delete Community",
+ "community.delete.head": "Apagar Comunidade",
// "community.delete.notification.fail": "Community could not be deleted",
- // TODO New key - Add a translation
- "community.delete.notification.fail": "Community could not be deleted",
+ "community.delete.notification.fail": "Comunidade não pôde ser apagada",
// "community.delete.notification.success": "Successfully deleted community",
- // TODO New key - Add a translation
- "community.delete.notification.success": "Successfully deleted community",
+ "community.delete.notification.success": "Comunidade apagada com sucesso",
// "community.delete.text": "Are you sure you want to delete community \"{{ dso }}\"",
- // TODO New key - Add a translation
- "community.delete.text": "Are you sure you want to delete community \"{{ dso }}\"",
+ "community.delete.text": "Você tem certeza que quer apagar a comunidade \"{{ dso }}\"?",
// "community.edit.delete": "Delete this community",
- // TODO New key - Add a translation
- "community.edit.delete": "Delete this community",
+ "community.edit.delete": "Apagar esta comunidade",
// "community.edit.head": "Edit Community",
- // TODO New key - Add a translation
- "community.edit.head": "Edit Community",
+ "community.edit.head": "Editar Comunidade",
// "community.form.abstract": "Short Description",
- // TODO New key - Add a translation
- "community.form.abstract": "Short Description",
+ "community.form.abstract": "Descrição curta",
// "community.form.description": "Introductory text (HTML)",
- // TODO New key - Add a translation
- "community.form.description": "Introductory text (HTML)",
+ "community.form.description": "Texto introdutório (HTML)",
// "community.form.errors.title.required": "Please enter a community name",
- // TODO New key - Add a translation
- "community.form.errors.title.required": "Please enter a community name",
+ "community.form.errors.title.required": "Por favor informe um nome para comunidade",
// "community.form.rights": "Copyright text (HTML)",
- // TODO New key - Add a translation
- "community.form.rights": "Copyright text (HTML)",
+ "community.form.rights": "Texto de direito de cópia (HTML)",
// "community.form.tableofcontents": "News (HTML)",
- // TODO New key - Add a translation
- "community.form.tableofcontents": "News (HTML)",
+ "community.form.tableofcontents": "Notícias (HTML)",
// "community.form.title": "Name",
- // TODO New key - Add a translation
- "community.form.title": "Name",
+ "community.form.title": "Nome",
// "community.page.handle": "Permanent URI for this community",
- // TODO New key - Add a translation
- "community.page.handle": "Permanent URI for this community",
+ "community.page.handle": "URI Permanente desta comunidade",
// "community.page.license": "License",
- // TODO New key - Add a translation
- "community.page.license": "License",
+ "community.page.license": "Licença",
// "community.page.news": "News",
- // TODO New key - Add a translation
- "community.page.news": "News",
+ "community.page.news": "Notícias",
// "community.all-lists.head": "Subcommunities and Collections",
- // TODO New key - Add a translation
- "community.all-lists.head": "Subcommunities and Collections",
+ "community.all-lists.head": "Sub-Comunidade e Coleções",
// "community.sub-collection-list.head": "Collections of this Community",
- // TODO New key - Add a translation
- "community.sub-collection-list.head": "Collections of this Community",
+ "community.sub-collection-list.head": "Coleções desta Comunidade",
// "community.sub-community-list.head": "Communities of this Community",
- // TODO New key - Add a translation
- "community.sub-community-list.head": "Communities of this Community",
+ "community.sub-community-list.head": "Comunidades desta Comunidade",
// "dso-selector.create.collection.head": "New collection",
- // TODO New key - Add a translation
- "dso-selector.create.collection.head": "New collection",
+ "dso-selector.create.collection.head": "Nova coleção",
// "dso-selector.create.community.head": "New community",
- // TODO New key - Add a translation
- "dso-selector.create.community.head": "New community",
+ "dso-selector.create.community.head": "Nova comunidade",
// "dso-selector.create.community.sub-level": "Create a new community in",
- // TODO New key - Add a translation
- "dso-selector.create.community.sub-level": "Create a new community in",
+ "dso-selector.create.community.sub-level": "Criar uma nova coleção em",
// "dso-selector.create.community.top-level": "Create a new top-level community",
- // TODO New key - Add a translation
- "dso-selector.create.community.top-level": "Create a new top-level community",
+ "dso-selector.create.community.top-level": "Criar uma nova comunidade no nível superior",
// "dso-selector.create.item.head": "New item",
- // TODO New key - Add a translation
- "dso-selector.create.item.head": "New item",
+ "dso-selector.create.item.head": "Novo item",
// "dso-selector.edit.collection.head": "Edit collection",
- // TODO New key - Add a translation
- "dso-selector.edit.collection.head": "Edit collection",
+ "dso-selector.edit.collection.head": "Editar coleção",
// "dso-selector.edit.community.head": "Edit community",
- // TODO New key - Add a translation
- "dso-selector.edit.community.head": "Edit community",
+ "dso-selector.edit.community.head": "Editar comunidade",
// "dso-selector.edit.item.head": "Edit item",
- // TODO New key - Add a translation
- "dso-selector.edit.item.head": "Edit item",
+ "dso-selector.edit.item.head": "Editar item",
// "dso-selector.no-results": "No {{ type }} found",
- // TODO New key - Add a translation
- "dso-selector.no-results": "No {{ type }} found",
+ "dso-selector.no-results": "Nenhum(a) {{ type }} encontrado(a)",
// "dso-selector.placeholder": "Search for a {{ type }}",
- // TODO New key - Add a translation
- "dso-selector.placeholder": "Search for a {{ type }}",
+ "dso-selector.placeholder": "Buscar por um(a) {{ type }}",
// "error.browse-by": "Error fetching items",
- // TODO New key - Add a translation
- "error.browse-by": "Error fetching items",
+ "error.browse-by": "Erro ao carregar itens",
// "error.collection": "Error fetching collection",
- // TODO New key - Add a translation
- "error.collection": "Error fetching collection",
+ "error.collection": "Erro ao carregar coleção",
// "error.collections": "Error fetching collections",
- // TODO New key - Add a translation
- "error.collections": "Error fetching collections",
+ "error.collections": "Erro ao carregar coleções",
// "error.community": "Error fetching community",
- // TODO New key - Add a translation
- "error.community": "Error fetching community",
+ "error.community": "Erro ao carregar comunidade",
// "error.identifier": "No item found for the identifier",
- // TODO New key - Add a translation
- "error.identifier": "No item found for the identifier",
+ "error.identifier": "Nenhum item encontrado para o identificador",
// "error.default": "Error",
- // TODO New key - Add a translation
- "error.default": "Error",
+ "error.default": "Erro",
// "error.item": "Error fetching item",
- // TODO New key - Add a translation
- "error.item": "Error fetching item",
+ "error.item": "Erro ao carregar item",
// "error.items": "Error fetching items",
- // TODO New key - Add a translation
- "error.items": "Error fetching items",
+ "error.items": "Erro ao carregar itens",
// "error.objects": "Error fetching objects",
- // TODO New key - Add a translation
- "error.objects": "Error fetching objects",
+ "error.objects": "Erro ao carregar objetos",
// "error.recent-submissions": "Error fetching recent submissions",
- // TODO New key - Add a translation
- "error.recent-submissions": "Error fetching recent submissions",
+ "error.recent-submissions": "Erro ao carregar as submissões recentes",
// "error.search-results": "Error fetching search results",
- // TODO New key - Add a translation
- "error.search-results": "Error fetching search results",
+ "error.search-results": "Erro ao carregar os resultados de busca",
// "error.sub-collections": "Error fetching sub-collections",
- // TODO New key - Add a translation
- "error.sub-collections": "Error fetching sub-collections",
+ "error.sub-collections": "Erro ao carregar sub-coleções",
// "error.sub-communities": "Error fetching sub-communities",
- // TODO New key - Add a translation
- "error.sub-communities": "Error fetching sub-communities",
+ "error.sub-communities": "Erro ao carregar sub-comunidade",
// "error.submission.sections.init-form-error": "An error occurred during section initialize, please check your input-form configuration. Details are below :
",
- // TODO New key - Add a translation
- "error.submission.sections.init-form-error": "An error occurred during section initialize, please check your input-form configuration. Details are below :
",
+ "error.submission.sections.init-form-error": "Ocorreu um erro durante a seção de inicialização, por favor verifique sua configuração de input-form. Detalhes estão abaixo :
+
diff --git a/src/app/+search-page/search-settings/search-settings.component.spec.ts b/src/app/+search-page/search-settings/search-settings.component.spec.ts
index b9b5c5a5eb..e0fbc84deb 100644
--- a/src/app/+search-page/search-settings/search-settings.component.spec.ts
+++ b/src/app/+search-page/search-settings/search-settings.component.spec.ts
@@ -7,84 +7,92 @@ import { SortDirection, SortOptions } from '../../core/cache/models/sort-options
import { TranslateModule } from '@ngx-translate/core';
import { RouterTestingModule } from '@angular/router/testing';
import { ActivatedRoute } from '@angular/router';
-import { SearchSidebarService } from '../search-sidebar/search-sidebar.service';
+import { SidebarService } from '../../shared/sidebar/sidebar.service';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { EnumKeysPipe } from '../../shared/utils/enum-keys-pipe';
import { By } from '@angular/platform-browser';
import { SearchFilterService } from '../search-filters/search-filter/search-filter.service';
-import { hot } from 'jasmine-marbles';
import { VarDirective } from '../../shared/utils/var.directive';
-import { first } from 'rxjs/operators';
+import { take } from 'rxjs/operators';
import { SEARCH_CONFIG_SERVICE } from '../../+my-dspace-page/my-dspace-page.component';
describe('SearchSettingsComponent', () => {
- let comp: SearchSettingsComponent;
- let fixture: ComponentFixture;
- let searchServiceObject: SearchService;
+ let comp:SearchSettingsComponent;
+ let fixture:ComponentFixture;
+ let searchServiceObject:SearchService;
- const pagination: PaginationComponentOptions = new PaginationComponentOptions();
- pagination.id = 'search-results-pagination';
- pagination.currentPage = 1;
- pagination.pageSize = 10;
- const sort: SortOptions = new SortOptions('score', SortDirection.DESC);
- const mockResults = ['test', 'data'];
- const searchServiceStub = {
- searchOptions: { pagination: pagination, sort: sort },
- search: () => mockResults
- };
+ let pagination:PaginationComponentOptions;
+ let sort:SortOptions;
+ let mockResults;
+ let searchServiceStub;
- const queryParam = 'test query';
- const scopeParam = '7669c72a-3f2a-451f-a3b9-9210e7a4c02f';
- const paginatedSearchOptions = {
- query: queryParam,
- scope: scopeParam,
- pagination,
- sort
- };
+ let queryParam;
+ let scopeParam;
+ let paginatedSearchOptions;
- const activatedRouteStub = {
- queryParams: observableOf({
- query: queryParam,
- scope: scopeParam
- })
- };
+ let activatedRouteStub;
- const sidebarService = {
- isCollapsed: observableOf(true),
- collapse: () => this.isCollapsed = observableOf(true),
- expand: () => this.isCollapsed = observableOf(false)
- };
+ let sidebarService;
beforeEach(async(() => {
+ pagination = new PaginationComponentOptions();
+ pagination.id = 'search-results-pagination';
+ pagination.currentPage = 1;
+ pagination.pageSize = 10;
+ sort = new SortOptions('score', SortDirection.DESC);
+ mockResults = ['test', 'data'];
+ searchServiceStub = {
+ searchOptions: {pagination: pagination, sort: sort},
+ search: () => mockResults,
+ };
+
+ queryParam = 'test query';
+ scopeParam = '7669c72a-3f2a-451f-a3b9-9210e7a4c02f';
+ paginatedSearchOptions = {
+ query: queryParam,
+ scope: scopeParam,
+ pagination,
+ sort,
+ };
+
+ activatedRouteStub = {
+ queryParams: observableOf({
+ query: queryParam,
+ scope: scopeParam,
+ }),
+ };
+
+ sidebarService = {
+ isCollapsed: observableOf(true),
+ collapse: () => this.isCollapsed = observableOf(true),
+ expand: () => this.isCollapsed = observableOf(false),
+ };
+
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])],
declarations: [SearchSettingsComponent, EnumKeysPipe, VarDirective],
providers: [
- { provide: SearchService, useValue: searchServiceStub },
+ {provide: SearchService, useValue: searchServiceStub},
- { provide: ActivatedRoute, useValue: activatedRouteStub },
+ {provide: ActivatedRoute, useValue: activatedRouteStub},
{
- provide: SearchSidebarService,
- useValue: sidebarService
+ provide: SidebarService,
+ useValue: sidebarService,
},
{
provide: SearchFilterService,
- useValue: {}
+ useValue: {},
},
{
provide: SEARCH_CONFIG_SERVICE,
useValue: {
- paginatedSearchOptions: hot('a', {
- a: paginatedSearchOptions
- }),
- getCurrentScope: hot('a', {
- a: 'test-id'
- }),
- }
+ paginatedSearchOptions: observableOf(paginatedSearchOptions),
+ getCurrentScope: observableOf('test-id'),
+ },
},
],
- schemas: [NO_ERRORS_SCHEMA]
+ schemas: [NO_ERRORS_SCHEMA],
}).compileComponents();
}));
@@ -101,42 +109,46 @@ describe('SearchSettingsComponent', () => {
});
- it('it should show the order settings with the respective selectable options', () => {
- (comp as any).searchOptions$.pipe(first()).subscribe((options) => {
+ it('it should show the order settings with the respective selectable options', (done) => {
+ (comp as any).searchOptions$.pipe(take(1)).subscribe((options) => {
fixture.detectChanges();
const orderSetting = fixture.debugElement.query(By.css('div.result-order-settings'));
expect(orderSetting).toBeDefined();
- const childElements = orderSetting.query(By.css('.form-control')).children;
+ const childElements = orderSetting.queryAll(By.css('option'));
expect(childElements.length).toEqual(comp.searchOptionPossibilities.length);
+ done();
});
});
- it('it should show the size settings with the respective selectable options', () => {
- (comp as any).searchOptions$.pipe(first()).subscribe((options) => {
+ it('it should show the size settings with the respective selectable options', (done) => {
+ (comp as any).searchOptions$.pipe(take(1)).subscribe((options) => {
fixture.detectChanges();
const pageSizeSetting = fixture.debugElement.query(By.css('div.page-size-settings'));
expect(pageSizeSetting).toBeDefined();
- const childElements = pageSizeSetting.query(By.css('.form-control')).children;
+ const childElements = pageSizeSetting.queryAll(By.css('option'));
expect(childElements.length).toEqual(options.pagination.pageSizeOptions.length);
- }
- )
+ done();
+ },
+ );
});
- it('should have the proper order value selected by default', () => {
- (comp as any).searchOptions$.pipe(first()).subscribe((options) => {
+ it('should have the proper order value selected by default', (done) => {
+ (comp as any).searchOptions$.pipe(take(1)).subscribe((options) => {
fixture.detectChanges();
const orderSetting = fixture.debugElement.query(By.css('div.result-order-settings'));
- const childElementToBeSelected = orderSetting.query(By.css('.form-control option[value="0"][selected="selected"]'));
+ const childElementToBeSelected = orderSetting.query(By.css('option[value="0"][selected="selected"]'));
expect(childElementToBeSelected).toBeDefined();
+ done();
});
});
- it('should have the proper rpp value selected by default', () => {
- (comp as any).searchOptions$.pipe(first()).subscribe((options) => {
+ it('should have the proper rpp value selected by default', (done) => {
+ (comp as any).searchOptions$.pipe(take(1)).subscribe((options) => {
fixture.detectChanges();
const pageSizeSetting = fixture.debugElement.query(By.css('div.page-size-settings'));
- const childElementToBeSelected = pageSizeSetting.query(By.css('.form-control option[value="10"][selected="selected"]'));
+ const childElementToBeSelected = pageSizeSetting.query(By.css('option[value="10"][selected="selected"]'));
expect(childElementToBeSelected).toBeDefined();
+ done();
});
});
diff --git a/src/app/+search-page/search-sidebar/search-sidebar.reducer.ts b/src/app/+search-page/search-sidebar/search-sidebar.reducer.ts
deleted file mode 100644
index a01f0ff6d6..0000000000
--- a/src/app/+search-page/search-sidebar/search-sidebar.reducer.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import { SearchSidebarAction, SearchSidebarActionTypes } from './search-sidebar.actions';
-
-/**
- * Interface that represents the state of the sidebar
- */
-export interface SearchSidebarState {
- sidebarCollapsed: boolean;
-}
-
-const initialState: SearchSidebarState = {
- sidebarCollapsed: true
-};
-
-/**
- * Performs a search sidebar action on the current state
- * @param {SearchSidebarState} state The state before the action is performed
- * @param {SearchSidebarAction} action The action that should be performed
- * @returns {SearchSidebarState} The state after the action is performed
- */
-export function sidebarReducer(state = initialState, action: SearchSidebarAction): SearchSidebarState {
- switch (action.type) {
-
- case SearchSidebarActionTypes.COLLAPSE: {
- return Object.assign({}, state, {
- sidebarCollapsed: true
- });
- }
-
- case SearchSidebarActionTypes.EXPAND: {
- return Object.assign({}, state, {
- sidebarCollapsed: false
- });
-
- }
-
- case SearchSidebarActionTypes.TOGGLE: {
- return Object.assign({}, state, {
- sidebarCollapsed: !state.sidebarCollapsed
- });
-
- }
-
- default: {
- return state;
- }
- }
-}
diff --git a/src/app/app.reducer.ts b/src/app/app.reducer.ts
index bc84f961fb..f9dc813722 100644
--- a/src/app/app.reducer.ts
+++ b/src/app/app.reducer.ts
@@ -1,11 +1,15 @@
-import { ActionReducerMap, createSelector, MemoizedSelector } from '@ngrx/store';
+import { ActionReducerMap, createSelector, MemoizedSelector, State } from '@ngrx/store';
import * as fromRouter from '@ngrx/router-store';
import { hostWindowReducer, HostWindowState } from './shared/host-window.reducer';
import { formReducer, FormState } from './shared/form/form.reducer';
import {
- SearchSidebarState,
+ SidebarState,
sidebarReducer
-} from './+search-page/search-sidebar/search-sidebar.reducer';
+} from './shared/sidebar/sidebar.reducer';
+import {
+ SidebarFilterState,
+ sidebarFilterReducer, SidebarFiltersState
+} from './shared/sidebar/filter/sidebar-filter.reducer';
import {
filterReducer,
SearchFiltersState
@@ -37,7 +41,8 @@ export interface AppState {
metadataRegistry: MetadataRegistryState;
bitstreamFormats: BitstreamFormatRegistryState;
notifications: NotificationsState;
- searchSidebar: SearchSidebarState;
+ sidebar: SidebarState;
+ sidebarFilter: SidebarFiltersState;
searchFilter: SearchFiltersState;
truncatable: TruncatablesState;
cssVariables: CSSVariablesState;
@@ -53,7 +58,8 @@ export const appReducers: ActionReducerMap = {
metadataRegistry: metadataRegistryReducer,
bitstreamFormats: bitstreamFormatReducer,
notifications: notificationsReducer,
- searchSidebar: sidebarReducer,
+ sidebar: sidebarReducer,
+ sidebarFilter: sidebarFilterReducer,
searchFilter: filterReducer,
truncatable: truncatableReducer,
cssVariables: cssVariablesReducer,
diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts
index cce01012e5..68a9049cb5 100644
--- a/src/app/shared/shared.module.ts
+++ b/src/app/shared/shared.module.ts
@@ -145,6 +145,10 @@ import { ListableObjectDirective } from './object-collection/shared/listable-obj
import { CommunitySearchResultGridElementComponent } from './object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component';
import { CollectionSearchResultGridElementComponent } from './object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component';
import { ItemMetadataRepresentationListElementComponent } from './object-list/metadata-representation-list-element/item/item-metadata-representation-list-element.component';
+import { PageWithSidebarComponent } from './sidebar/page-with-sidebar.component';
+import { SidebarDropdownComponent } from './sidebar/sidebar-dropdown.component';
+import { SidebarFilterComponent } from './sidebar/filter/sidebar-filter.component';
+import { SidebarFilterSelectedOptionComponent } from './sidebar/filter/sidebar-filter-selected-option.component';
const MODULES = [
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
@@ -228,6 +232,10 @@ const COMPONENTS = [
ObjectCollectionComponent,
PaginationComponent,
SearchFormComponent,
+ PageWithSidebarComponent,
+ SidebarDropdownComponent,
+ SidebarFilterComponent,
+ SidebarFilterSelectedOptionComponent,
ThumbnailComponent,
GridThumbnailComponent,
UploaderComponent,
diff --git a/src/app/shared/sidebar/filter/sidebar-filter-selected-option.component.html b/src/app/shared/sidebar/filter/sidebar-filter-selected-option.component.html
new file mode 100644
index 0000000000..bbe0b93566
--- /dev/null
+++ b/src/app/shared/sidebar/filter/sidebar-filter-selected-option.component.html
@@ -0,0 +1,6 @@
+
+
+
diff --git a/src/app/shared/sidebar/filter/sidebar-filter-selected-option.component.scss b/src/app/shared/sidebar/filter/sidebar-filter-selected-option.component.scss
new file mode 100644
index 0000000000..b4e9cd340c
--- /dev/null
+++ b/src/app/shared/sidebar/filter/sidebar-filter-selected-option.component.scss
@@ -0,0 +1,11 @@
+a {
+ color: $body-color;
+
+ &:hover, &focus {
+ text-decoration: none;
+ }
+
+ span.badge {
+ vertical-align: text-top;
+ }
+}
diff --git a/src/app/shared/sidebar/filter/sidebar-filter-selected-option.component.ts b/src/app/shared/sidebar/filter/sidebar-filter-selected-option.component.ts
new file mode 100644
index 0000000000..5c80a9cd87
--- /dev/null
+++ b/src/app/shared/sidebar/filter/sidebar-filter-selected-option.component.ts
@@ -0,0 +1,15 @@
+import { Component, EventEmitter, Input, Output } from '@angular/core';
+
+@Component({
+ selector: 'ds-sidebar-filter-selected-option',
+ styleUrls: ['./sidebar-filter-selected-option.component.scss'],
+ templateUrl: './sidebar-filter-selected-option.component.html',
+})
+
+/**
+ * Represents a single selected option in a sidebar filter
+ */
+export class SidebarFilterSelectedOptionComponent {
+ @Input() label:string;
+ @Output() click:EventEmitter = new EventEmitter();
+}
diff --git a/src/app/shared/sidebar/filter/sidebar-filter.actions.ts b/src/app/shared/sidebar/filter/sidebar-filter.actions.ts
new file mode 100644
index 0000000000..2391274489
--- /dev/null
+++ b/src/app/shared/sidebar/filter/sidebar-filter.actions.ts
@@ -0,0 +1,74 @@
+import { Action } from '@ngrx/store';
+
+import { type } from '../../ngrx/type';
+
+/**
+ * For each action type in an action group, make a simple
+ * enum object for all of this group's action types.
+ *
+ * The 'type' utility function coerces strings into string
+ * literal types and runs a simple check to guarantee all
+ * action types in the application are unique.
+ */
+export const SidebarFilterActionTypes = {
+ INITIALIZE: type('dspace/sidebar-filter/INITIALIZE'),
+ COLLAPSE: type('dspace/sidebar-filter/COLLAPSE'),
+ EXPAND: type('dspace/sidebar-filter/EXPAND'),
+ TOGGLE: type('dspace/sidebar-filter/TOGGLE'),
+};
+
+export class SidebarFilterAction implements Action {
+ /**
+ * Name of the filter the action is performed on, used to identify the filter
+ */
+ filterName: string;
+
+ /**
+ * Type of action that will be performed
+ */
+ type;
+
+ /**
+ * Initialize with the filter's name
+ * @param {string} name of the filter
+ */
+ constructor(name: string) {
+ this.filterName = name;
+ }
+}
+
+/* tslint:disable:max-classes-per-file */
+/**
+ * Used to initialize a filter
+ */
+export class FilterInitializeAction extends SidebarFilterAction {
+ type = SidebarFilterActionTypes.INITIALIZE;
+ initiallyExpanded;
+
+ constructor(name:string, initiallyExpanded:boolean) {
+ super(name);
+ this.initiallyExpanded = initiallyExpanded;
+ }
+}
+
+/**
+ * Used to collapse a filter
+ */
+export class FilterCollapseAction extends SidebarFilterAction {
+ type = SidebarFilterActionTypes.COLLAPSE;
+}
+
+/**
+ * Used to expand a filter
+ */
+export class FilterExpandAction extends SidebarFilterAction {
+ type = SidebarFilterActionTypes.EXPAND;
+}
+
+/**
+ * Used to collapse a filter when it's expanded and expand it when it's collapsed
+ */
+export class FilterToggleAction extends SidebarFilterAction {
+ type = SidebarFilterActionTypes.TOGGLE;
+}
+/* tslint:enable:max-classes-per-file */
diff --git a/src/app/shared/sidebar/filter/sidebar-filter.component.html b/src/app/shared/sidebar/filter/sidebar-filter.component.html
new file mode 100644
index 0000000000..bd392aa715
--- /dev/null
+++ b/src/app/shared/sidebar/filter/sidebar-filter.component.html
@@ -0,0 +1,26 @@
+
+
+
+ {{ label | translate }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/shared/sidebar/filter/sidebar-filter.component.scss b/src/app/shared/sidebar/filter/sidebar-filter.component.scss
new file mode 100644
index 0000000000..68949f3450
--- /dev/null
+++ b/src/app/shared/sidebar/filter/sidebar-filter.component.scss
@@ -0,0 +1,12 @@
+:host .facet-filter {
+ border: 1px solid map-get($theme-colors, light);
+ cursor: pointer;
+
+ .sidebar-filter-wrapper.closed {
+ overflow: hidden;
+ }
+
+ .filter-toggle {
+ line-height: $line-height-base;
+ }
+}
diff --git a/src/app/shared/sidebar/filter/sidebar-filter.component.ts b/src/app/shared/sidebar/filter/sidebar-filter.component.ts
new file mode 100644
index 0000000000..2a98565639
--- /dev/null
+++ b/src/app/shared/sidebar/filter/sidebar-filter.component.ts
@@ -0,0 +1,89 @@
+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
+import { Observable } from 'rxjs';
+import { SidebarFilterService } from './sidebar-filter.service';
+import { slide } from '../../animations/slide';
+
+@Component({
+ selector: 'ds-sidebar-filter',
+ styleUrls: ['./sidebar-filter.component.scss'],
+ templateUrl: './sidebar-filter.component.html',
+ animations: [slide],
+})
+/**
+ * This components renders a sidebar filter including the label and the selected values.
+ * The filter input itself should still be provided in the content.
+ */
+export class SidebarFilterComponent implements OnInit {
+
+ @Input() name:string;
+ @Input() type:string;
+ @Input() label:string;
+ @Input() expanded = true;
+ @Input() singleValue = false;
+ @Input() selectedValues:Observable;
+ @Output() removeValue:EventEmitter = new EventEmitter();
+
+ /**
+ * True when the filter is 100% collapsed in the UI
+ */
+ closed = true;
+
+ /**
+ * Emits true when the filter is currently collapsed in the store
+ */
+ collapsed$:Observable;
+
+ constructor(
+ protected filterService:SidebarFilterService,
+ ) {
+ }
+
+ /**
+ * Changes the state for this filter to collapsed when it's expanded and to expanded it when it's collapsed
+ */
+ toggle() {
+ this.filterService.toggle(this.name);
+ }
+
+ /**
+ * Method to change this.collapsed to false when the slide animation ends and is sliding open
+ * @param event The animation event
+ */
+ finishSlide(event:any):void {
+ if (event.fromState === 'collapsed') {
+ this.closed = false;
+ }
+ }
+
+ /**
+ * Method to change this.collapsed to true when the slide animation starts and is sliding closed
+ * @param event The animation event
+ */
+ startSlide(event:any):void {
+ if (event.toState === 'collapsed') {
+ this.closed = true;
+ }
+ }
+
+ ngOnInit():void {
+ this.closed = !this.expanded;
+ this.initializeFilter();
+ this.collapsed$ = this.isCollapsed();
+ }
+
+ /**
+ * Sets the initial state of the filter
+ */
+ initializeFilter() {
+ this.filterService.initializeFilter(this.name, this.expanded);
+ }
+
+ /**
+ * Checks if the filter is currently collapsed
+ * @returns {Observable} Emits true when the current state of the filter is collapsed, false when it's expanded
+ */
+ private isCollapsed():Observable {
+ return this.filterService.isCollapsed(this.name);
+ }
+
+}
diff --git a/src/app/shared/sidebar/filter/sidebar-filter.reducer.ts b/src/app/shared/sidebar/filter/sidebar-filter.reducer.ts
new file mode 100644
index 0000000000..d25737eaa9
--- /dev/null
+++ b/src/app/shared/sidebar/filter/sidebar-filter.reducer.ts
@@ -0,0 +1,70 @@
+import {
+ FilterInitializeAction,
+ SidebarFilterAction,
+ SidebarFilterActionTypes
+} from './sidebar-filter.actions';
+
+/**
+ * Interface that represents the state for a single filters
+ */
+export interface SidebarFilterState {
+ filterCollapsed:boolean,
+}
+
+/**
+ * Interface that represents the state for all available filters
+ */
+export interface SidebarFiltersState {
+ [name:string]:SidebarFilterState
+}
+
+const initialState:SidebarFiltersState = Object.create(null);
+
+/**
+ * Performs a filter action on the current state
+ * @param {SidebarFiltersState} state The state before the action is performed
+ * @param {SidebarFilterAction} action The action that should be performed
+ * @returns {SidebarFiltersState} The state after the action is performed
+ */
+export function sidebarFilterReducer(state = initialState, action:SidebarFilterAction):SidebarFiltersState {
+
+ switch (action.type) {
+
+ case SidebarFilterActionTypes.INITIALIZE: {
+ const initAction = (action as FilterInitializeAction);
+ return Object.assign({}, state, {
+ [action.filterName]: {
+ filterCollapsed: !initAction.initiallyExpanded,
+ }
+ });
+ }
+
+ case SidebarFilterActionTypes.COLLAPSE: {
+ return Object.assign({}, state, {
+ [action.filterName]: {
+ filterCollapsed: true,
+ }
+ });
+ }
+
+ case SidebarFilterActionTypes.EXPAND: {
+ return Object.assign({}, state, {
+ [action.filterName]: {
+ filterCollapsed: false,
+ }
+ });
+ }
+
+ case SidebarFilterActionTypes.TOGGLE: {
+ return Object.assign({}, state, {
+ [action.filterName]: {
+ filterCollapsed: !state[action.filterName].filterCollapsed,
+ }
+ });
+ }
+
+ default: {
+ return state;
+ }
+ }
+}
diff --git a/src/app/shared/sidebar/filter/sidebar-filter.service.ts b/src/app/shared/sidebar/filter/sidebar-filter.service.ts
new file mode 100644
index 0000000000..2ff28fd2f5
--- /dev/null
+++ b/src/app/shared/sidebar/filter/sidebar-filter.service.ts
@@ -0,0 +1,90 @@
+import { Injectable } from '@angular/core';
+import {
+ FilterCollapseAction,
+ FilterExpandAction, FilterInitializeAction,
+ FilterToggleAction
+} from './sidebar-filter.actions';
+import { createSelector, MemoizedSelector, select, Store } from '@ngrx/store';
+import { SidebarFiltersState, SidebarFilterState } from './sidebar-filter.reducer';
+import { Observable } from 'rxjs';
+import { distinctUntilChanged, map } from 'rxjs/operators';
+import { hasValue } from '../../empty.util';
+
+/**
+ * Service that performs all actions that have to do with sidebar filters like collapsing or expanding them.
+ */
+@Injectable()
+export class SidebarFilterService {
+
+ constructor(private store:Store) {
+ }
+
+ /**
+ * Dispatches an initialize action to the store for a given filter
+ * @param {string} filter The filter for which the action is dispatched
+ * @param {boolean} expanded If the filter should be open from the start
+ */
+ public initializeFilter(filter:string, expanded:boolean):void {
+ this.store.dispatch(new FilterInitializeAction(filter, expanded));
+ }
+
+ /**
+ * Dispatches a collapse action to the store for a given filter
+ * @param {string} filterName The filter for which the action is dispatched
+ */
+ public collapse(filterName:string):void {
+ this.store.dispatch(new FilterCollapseAction(filterName));
+ }
+
+ /**
+ * Dispatches an expand action to the store for a given filter
+ * @param {string} filterName The filter for which the action is dispatched
+ */
+ public expand(filterName:string):void {
+ this.store.dispatch(new FilterExpandAction(filterName));
+ }
+
+ /**
+ * Dispatches a toggle action to the store for a given filter
+ * @param {string} filterName The filter for which the action is dispatched
+ */
+ public toggle(filterName:string):void {
+ this.store.dispatch(new FilterToggleAction(filterName));
+ }
+
+ /**
+ * Checks if the state of a given filter is currently collapsed or not
+ * @param {string} filterName The filtername for which the collapsed state is checked
+ * @returns {Observable} Emits the current collapsed state of the given filter, if it's unavailable, return false
+ */
+ isCollapsed(filterName:string):Observable {
+ return this.store.pipe(
+ select(filterByNameSelector(filterName)),
+ map((object:SidebarFilterState) => {
+ if (object) {
+ return object.filterCollapsed;
+ } else {
+ return false;
+ }
+ }),
+ distinctUntilChanged()
+ );
+ }
+
+}
+
+const filterStateSelector = (state:SidebarFiltersState) => state.sidebarFilter;
+
+function filterByNameSelector(name:string):MemoizedSelector {
+ return keySelector(name);
+}
+
+export function keySelector(key:string):MemoizedSelector {
+ return createSelector(filterStateSelector, (state:SidebarFilterState) => {
+ if (hasValue(state)) {
+ return state[key];
+ } else {
+ return undefined;
+ }
+ });
+}
diff --git a/src/app/shared/sidebar/page-with-sidebar.component.html b/src/app/shared/sidebar/page-with-sidebar.component.html
new file mode 100644
index 0000000000..9feb6c792e
--- /dev/null
+++ b/src/app/shared/sidebar/page-with-sidebar.component.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/shared/sidebar/page-with-sidebar.component.scss b/src/app/shared/sidebar/page-with-sidebar.component.scss
new file mode 100644
index 0000000000..8be48cea2b
--- /dev/null
+++ b/src/app/shared/sidebar/page-with-sidebar.component.scss
@@ -0,0 +1,52 @@
+@include media-breakpoint-down(md) {
+ .container {
+ width: 100%;
+ max-width: none;
+ }
+}
+
+.row-with-sidebar {
+
+ &.row-offcanvas {
+ width: 100%;
+ }
+
+ @include media-breakpoint-up(md) {
+ display: flex;
+ }
+
+ @include media-breakpoint-down(sm) {
+ position: relative;
+
+ &.row-offcanvas {
+ position: relative;
+ }
+
+ &.row-offcanvas-right .sidebar-content {
+ right: -100%;
+ }
+
+ &.row-offcanvas-left .sidebar-content {
+ left: -100%;
+ }
+
+ .sidebar-content {
+ position: absolute;
+ top: 0;
+ width: 100%;
+ }
+ }
+}
+
+@include media-breakpoint-up(md) {
+ .sidebar-content {
+ position: sticky;
+ position: -webkit-sticky;
+ top: 0;
+ z-index: $zindex-sticky;
+ padding-top: $content-spacing;
+ margin-top: -$content-spacing;
+ align-self: flex-start;
+ display: block;
+ }
+}
diff --git a/src/app/shared/sidebar/page-with-sidebar.component.spec.ts b/src/app/shared/sidebar/page-with-sidebar.component.spec.ts
new file mode 100644
index 0000000000..77f59090ab
--- /dev/null
+++ b/src/app/shared/sidebar/page-with-sidebar.component.spec.ts
@@ -0,0 +1,75 @@
+import { By } from '@angular/platform-browser';
+import { of as observableOf } from 'rxjs';
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { PageWithSidebarComponent } from './page-with-sidebar.component';
+import { SidebarService } from './sidebar.service';
+import { HostWindowService } from '../host-window.service';
+import { NoopAnimationsModule } from '@angular/platform-browser/animations';
+
+describe('PageWithSidebarComponent', () => {
+ let comp:PageWithSidebarComponent;
+ let fixture:ComponentFixture;
+
+ const sidebarService = {
+ isCollapsed: observableOf(true),
+ collapse: () => this.isCollapsed = observableOf(true),
+ expand: () => this.isCollapsed = observableOf(false)
+ };
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [NoopAnimationsModule],
+ providers: [
+ {
+ provide: SidebarService,
+ useValue: sidebarService
+ },
+ {
+ provide: HostWindowService, useValue: jasmine.createSpyObj('hostWindowService',
+ {
+ isXs: observableOf(true),
+ isSm: observableOf(false),
+ isXsOrSm: observableOf(true)
+ })
+ },
+ ],
+ declarations: [PageWithSidebarComponent]
+ }).compileComponents();
+ fixture = TestBed.createComponent(PageWithSidebarComponent);
+ comp = fixture.componentInstance;
+ comp.id = 'mock-id';
+ fixture.detectChanges();
+ });
+
+ describe('when sidebarCollapsed is true in mobile view', () => {
+ let menu:HTMLElement;
+
+ beforeEach(() => {
+ menu = fixture.debugElement.query(By.css('#mock-id-sidebar-content')).nativeElement;
+ (comp as any).sidebarService.isCollapsed = observableOf(true);
+ comp.ngOnInit();
+ fixture.detectChanges();
+ });
+
+ it('should close the sidebar', () => {
+ expect(menu.classList).not.toContain('active');
+ });
+
+ });
+
+ describe('when sidebarCollapsed is false in mobile view', () => {
+ let menu:HTMLElement;
+
+ beforeEach(() => {
+ menu = fixture.debugElement.query(By.css('#mock-id-sidebar-content')).nativeElement;
+ (comp as any).sidebarService.isCollapsed = observableOf(false);
+ comp.ngOnInit();
+ fixture.detectChanges();
+ });
+
+ it('should open the menu', () => {
+ expect(menu.classList).toContain('active');
+ });
+
+ });
+});
diff --git a/src/app/shared/sidebar/page-with-sidebar.component.ts b/src/app/shared/sidebar/page-with-sidebar.component.ts
new file mode 100644
index 0000000000..8b7f987a37
--- /dev/null
+++ b/src/app/shared/sidebar/page-with-sidebar.component.ts
@@ -0,0 +1,77 @@
+import { Component, Input, OnInit, TemplateRef } from '@angular/core';
+import { SidebarService } from './sidebar.service';
+import { HostWindowService } from '../host-window.service';
+import { Observable } from 'rxjs';
+import { pushInOut } from '../animations/push';
+import { map } from 'rxjs/operators';
+
+@Component({
+ selector: 'ds-page-with-sidebar',
+ styleUrls: ['./page-with-sidebar.component.scss'],
+ templateUrl: './page-with-sidebar.component.html',
+ animations: [pushInOut],
+})
+/**
+ * This component takes care of displaying the sidebar properly on all viewports. It does not
+ * provide default buttons to open or close the sidebar. Instead the parent component is expected
+ * to provide the content of the sidebar through an input. The main content of the page goes in
+ * the template outlet (inside the page-width-sidebar tags).
+ */
+export class PageWithSidebarComponent implements OnInit {
+ @Input() id:string;
+ @Input() sidebarContent:TemplateRef;
+
+ /**
+ * Emits true if were on a small screen
+ */
+ isXsOrSm$:Observable;
+
+ /**
+ * The width of the sidebar (bootstrap columns)
+ */
+ @Input()
+ sideBarWidth = 3;
+
+ /**
+ * Observable for whether or not the sidebar is currently collapsed
+ */
+ isSidebarCollapsed$:Observable;
+
+ sidebarClasses:Observable;
+
+ constructor(protected sidebarService:SidebarService,
+ protected windowService:HostWindowService,
+ ) {
+ }
+
+ ngOnInit():void {
+ this.isXsOrSm$ = this.windowService.isXsOrSm();
+ this.isSidebarCollapsed$ = this.isSidebarCollapsed();
+ this.sidebarClasses = this.isSidebarCollapsed$.pipe(
+ map((isCollapsed) => isCollapsed ? '' : 'active')
+ );
+ }
+
+ /**
+ * Check if the sidebar is collapsed
+ * @returns {Observable} emits true if the sidebar is currently collapsed, false if it is expanded
+ */
+ private isSidebarCollapsed():Observable {
+ return this.sidebarService.isCollapsed;
+ }
+
+ /**
+ * Set the sidebar to a collapsed state
+ */
+ public closeSidebar():void {
+ this.sidebarService.collapse()
+ }
+
+ /**
+ * Set the sidebar to an expanded state
+ */
+ public openSidebar():void {
+ this.sidebarService.expand();
+ }
+
+}
diff --git a/src/app/+search-page/search-sidebar/search-sidebar.effects.spec.ts b/src/app/shared/sidebar/search-sidebar.effects.spec.ts
similarity index 68%
rename from src/app/+search-page/search-sidebar/search-sidebar.effects.spec.ts
rename to src/app/shared/sidebar/search-sidebar.effects.spec.ts
index f34f6b72de..da675a38ce 100644
--- a/src/app/+search-page/search-sidebar/search-sidebar.effects.spec.ts
+++ b/src/app/shared/sidebar/search-sidebar.effects.spec.ts
@@ -3,24 +3,24 @@ import { Observable } from 'rxjs';
import { provideMockActions } from '@ngrx/effects/testing';
import { cold, hot } from 'jasmine-marbles';
import * as fromRouter from '@ngrx/router-store';
-import { SearchSidebarCollapseAction } from './search-sidebar.actions';
-import { SearchSidebarEffects } from './search-sidebar.effects';
+import { SidebarCollapseAction } from './sidebar.actions';
+import { SidebarEffects } from './sidebar-effects.service';
-describe('SearchSidebarEffects', () => {
- let sidebarEffects: SearchSidebarEffects;
+describe('SidebarEffects', () => {
+ let sidebarEffects: SidebarEffects;
let actions: Observable;
const dummyURL = 'http://f4fb15e2-1bd3-4e63-8d0d-486ad8bc714a';
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
- SearchSidebarEffects,
+ SidebarEffects,
provideMockActions(() => actions),
// other providers
],
});
- sidebarEffects = TestBed.get(SearchSidebarEffects);
+ sidebarEffects = TestBed.get(SidebarEffects);
});
describe('routeChange$', () => {
@@ -28,7 +28,7 @@ describe('SearchSidebarEffects', () => {
it('should return a COLLAPSE action in response to an UPDATE_LOCATION action to a new route', () => {
actions = hot('--a-', { a: { type: fromRouter.ROUTER_NAVIGATION, payload: {routerState: {url: dummyURL}} } });
- const expected = cold('--b-', { b: new SearchSidebarCollapseAction() });
+ const expected = cold('--b-', { b: new SidebarCollapseAction() });
expect(sidebarEffects.routeChange$).toBeObservable(expected);
});
diff --git a/src/app/shared/sidebar/sidebar-dropdown.component.html b/src/app/shared/sidebar/sidebar-dropdown.component.html
new file mode 100644
index 0000000000..0c2a1c05d2
--- /dev/null
+++ b/src/app/shared/sidebar/sidebar-dropdown.component.html
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/src/app/shared/sidebar/sidebar-dropdown.component.scss b/src/app/shared/sidebar/sidebar-dropdown.component.scss
new file mode 100644
index 0000000000..1c025095dd
--- /dev/null
+++ b/src/app/shared/sidebar/sidebar-dropdown.component.scss
@@ -0,0 +1,3 @@
+.setting-option {
+ border: 1px solid map-get($theme-colors, light);
+}
diff --git a/src/app/shared/sidebar/sidebar-dropdown.component.ts b/src/app/shared/sidebar/sidebar-dropdown.component.ts
new file mode 100644
index 0000000000..313538eded
--- /dev/null
+++ b/src/app/shared/sidebar/sidebar-dropdown.component.ts
@@ -0,0 +1,16 @@
+import { Component, EventEmitter, Input, Output } from '@angular/core';
+
+@Component({
+ selector: 'ds-sidebar-dropdown',
+ styleUrls: ['./sidebar-dropdown.component.scss'],
+ templateUrl: './sidebar-dropdown.component.html',
+})
+/**
+ * This components renders a sidebar dropdown including the label.
+ * The options should still be provided in the content.
+ */
+export class SidebarDropdownComponent {
+ @Input() id:string;
+ @Input() label:string;
+ @Output() change:EventEmitter = new EventEmitter();
+}
diff --git a/src/app/+search-page/search-sidebar/search-sidebar.effects.ts b/src/app/shared/sidebar/sidebar-effects.service.ts
similarity index 85%
rename from src/app/+search-page/search-sidebar/search-sidebar.effects.ts
rename to src/app/shared/sidebar/sidebar-effects.service.ts
index 1f5fb0ef60..fc6643be4b 100644
--- a/src/app/+search-page/search-sidebar/search-sidebar.effects.ts
+++ b/src/app/shared/sidebar/sidebar-effects.service.ts
@@ -3,14 +3,14 @@ import { Injectable } from '@angular/core';
import { Effect, Actions, ofType } from '@ngrx/effects'
import * as fromRouter from '@ngrx/router-store';
-import { SearchSidebarCollapseAction } from './search-sidebar.actions';
+import { SidebarCollapseAction } from './sidebar.actions';
import { URLBaser } from '../../core/url-baser/url-baser';
/**
* Makes sure that if the user navigates to another route, the sidebar is collapsed
*/
@Injectable()
-export class SearchSidebarEffects {
+export class SidebarEffects {
private previousPath: string;
@Effect() routeChange$ = this.actions$
.pipe(
@@ -19,7 +19,7 @@ export class SearchSidebarEffects {
tap((action) => {
this.previousPath = this.getBaseUrl(action)
}),
- map(() => new SearchSidebarCollapseAction())
+ map(() => new SidebarCollapseAction())
);
constructor(private actions$: Actions) {
diff --git a/src/app/+search-page/search-sidebar/search-sidebar.actions.ts b/src/app/shared/sidebar/sidebar.actions.ts
similarity index 51%
rename from src/app/+search-page/search-sidebar/search-sidebar.actions.ts
rename to src/app/shared/sidebar/sidebar.actions.ts
index 84a34b2790..4a7c85696a 100644
--- a/src/app/+search-page/search-sidebar/search-sidebar.actions.ts
+++ b/src/app/shared/sidebar/sidebar.actions.ts
@@ -1,6 +1,6 @@
import { Action } from '@ngrx/store';
-import { type } from '../../shared/ngrx/type';
+import { type } from '../ngrx/type';
/**
* For each action type in an action group, make a simple
@@ -10,32 +10,32 @@ import { type } from '../../shared/ngrx/type';
* literal types and runs a simple check to guarantee all
* action types in the application are unique.
*/
-export const SearchSidebarActionTypes = {
- COLLAPSE: type('dspace/search-sidebar/COLLAPSE'),
- EXPAND: type('dspace/search-sidebar/EXPAND'),
- TOGGLE: type('dspace/search-sidebar/TOGGLE')
+export const SidebarActionTypes = {
+ COLLAPSE: type('dspace/sidebar/COLLAPSE'),
+ EXPAND: type('dspace/sidebar/EXPAND'),
+ TOGGLE: type('dspace/sidebar/TOGGLE')
};
/* tslint:disable:max-classes-per-file */
/**
* Used to collapse the sidebar
*/
-export class SearchSidebarCollapseAction implements Action {
- type = SearchSidebarActionTypes.COLLAPSE;
+export class SidebarCollapseAction implements Action {
+ type = SidebarActionTypes.COLLAPSE;
}
/**
* Used to expand the sidebar
*/
-export class SearchSidebarExpandAction implements Action {
- type = SearchSidebarActionTypes.EXPAND;
+export class SidebarExpandAction implements Action {
+ type = SidebarActionTypes.EXPAND;
}
/**
* Used to collapse the sidebar when it's expanded and expand it when it's collapsed
*/
-export class SearchSidebarToggleAction implements Action {
- type = SearchSidebarActionTypes.TOGGLE;
+export class SidebarToggleAction implements Action {
+ type = SidebarActionTypes.TOGGLE;
}
/* tslint:enable:max-classes-per-file */
@@ -43,7 +43,7 @@ export class SearchSidebarToggleAction implements Action {
* Export a type alias of all actions in this action group
* so that reducers can easily compose action types
*/
-export type SearchSidebarAction
- = SearchSidebarCollapseAction
- | SearchSidebarExpandAction
- | SearchSidebarToggleAction
+export type SidebarAction
+ = SidebarCollapseAction
+ | SidebarExpandAction
+ | SidebarToggleAction
diff --git a/src/app/+search-page/search-sidebar/search-sidebar.reducer.spec.ts b/src/app/shared/sidebar/sidebar.reducer.spec.ts
similarity index 80%
rename from src/app/+search-page/search-sidebar/search-sidebar.reducer.spec.ts
rename to src/app/shared/sidebar/sidebar.reducer.spec.ts
index dfdead4369..0fbfce84fc 100644
--- a/src/app/+search-page/search-sidebar/search-sidebar.reducer.spec.ts
+++ b/src/app/shared/sidebar/sidebar.reducer.spec.ts
@@ -1,12 +1,12 @@
import * as deepFreeze from 'deep-freeze';
-import { sidebarReducer } from './search-sidebar.reducer';
+import { sidebarReducer } from './sidebar.reducer';
import {
- SearchSidebarCollapseAction, SearchSidebarExpandAction,
- SearchSidebarToggleAction
-} from './search-sidebar.actions';
+ SidebarCollapseAction, SidebarExpandAction,
+ SidebarToggleAction
+} from './sidebar.actions';
-class NullAction extends SearchSidebarCollapseAction {
+class NullAction extends SidebarCollapseAction {
type = null;
constructor() {
@@ -34,7 +34,7 @@ describe('sidebarReducer', () => {
it('should set sidebarCollapsed to true in response to the COLLAPSE action', () => {
const state = { sidebarCollapsed: false };
- const action = new SearchSidebarCollapseAction();
+ const action = new SidebarCollapseAction();
const newState = sidebarReducer(state, action);
expect(newState.sidebarCollapsed).toEqual(true);
@@ -44,7 +44,7 @@ describe('sidebarReducer', () => {
const state = { sidebarCollapsed: false };
deepFreeze([state]);
- const action = new SearchSidebarCollapseAction();
+ const action = new SidebarCollapseAction();
sidebarReducer(state, action);
// no expect required, deepFreeze will ensure an exception is thrown if the state
@@ -53,7 +53,7 @@ describe('sidebarReducer', () => {
it('should set sidebarCollapsed to false in response to the EXPAND action', () => {
const state = { sidebarCollapsed: true };
- const action = new SearchSidebarExpandAction();
+ const action = new SidebarExpandAction();
const newState = sidebarReducer(state, action);
expect(newState.sidebarCollapsed).toEqual(false);
@@ -63,13 +63,13 @@ describe('sidebarReducer', () => {
const state = { sidebarCollapsed: true };
deepFreeze([state]);
- const action = new SearchSidebarExpandAction();
+ const action = new SidebarExpandAction();
sidebarReducer(state, action);
});
it('should flip the value of sidebarCollapsed in response to the TOGGLE action', () => {
const state1 = { sidebarCollapsed: true };
- const action = new SearchSidebarToggleAction();
+ const action = new SidebarToggleAction();
const state2 = sidebarReducer(state1, action);
const state3 = sidebarReducer(state2, action);
@@ -82,7 +82,7 @@ describe('sidebarReducer', () => {
const state = { sidebarCollapsed: true };
deepFreeze([state]);
- const action = new SearchSidebarToggleAction();
+ const action = new SidebarToggleAction();
sidebarReducer(state, action);
});
diff --git a/src/app/shared/sidebar/sidebar.reducer.ts b/src/app/shared/sidebar/sidebar.reducer.ts
new file mode 100644
index 0000000000..05e7d38d48
--- /dev/null
+++ b/src/app/shared/sidebar/sidebar.reducer.ts
@@ -0,0 +1,47 @@
+import { SidebarAction, SidebarActionTypes } from './sidebar.actions';
+
+/**
+ * Interface that represents the state of the sidebar
+ */
+export interface SidebarState {
+ sidebarCollapsed: boolean;
+}
+
+const initialState: SidebarState = {
+ sidebarCollapsed: true
+};
+
+/**
+ * Performs a sidebar action on the current state
+ * @param {SidebarState} state The state before the action is performed
+ * @param {SidebarAction} action The action that should be performed
+ * @returns {SidebarState} The state after the action is performed
+ */
+export function sidebarReducer(state = initialState, action: SidebarAction): SidebarState {
+ switch (action.type) {
+
+ case SidebarActionTypes.COLLAPSE: {
+ return Object.assign({}, state, {
+ sidebarCollapsed: true
+ });
+ }
+
+ case SidebarActionTypes.EXPAND: {
+ return Object.assign({}, state, {
+ sidebarCollapsed: false
+ });
+
+ }
+
+ case SidebarActionTypes.TOGGLE: {
+ return Object.assign({}, state, {
+ sidebarCollapsed: !state.sidebarCollapsed
+ });
+
+ }
+
+ default: {
+ return state;
+ }
+ }
+}
diff --git a/src/app/+search-page/search-sidebar/search-sidebar.service.spec.ts b/src/app/shared/sidebar/sidebar.service.spec.ts
similarity index 61%
rename from src/app/+search-page/search-sidebar/search-sidebar.service.spec.ts
rename to src/app/shared/sidebar/sidebar.service.spec.ts
index 0cccf9ea40..6d8e845836 100644
--- a/src/app/+search-page/search-sidebar/search-sidebar.service.spec.ts
+++ b/src/app/shared/sidebar/sidebar.service.spec.ts
@@ -1,13 +1,13 @@
import { Store } from '@ngrx/store';
-import { SearchSidebarService } from './search-sidebar.service';
+import { SidebarService } from './sidebar.service';
import { AppState } from '../../app.reducer';
import { async, TestBed } from '@angular/core/testing';
import { of as observableOf } from 'rxjs';
-import { SearchSidebarCollapseAction, SearchSidebarExpandAction } from './search-sidebar.actions';
-import { HostWindowService } from '../../shared/host-window.service';
+import { SidebarCollapseAction, SidebarExpandAction } from './sidebar.actions';
+import { HostWindowService } from '../host-window.service';
-describe('SearchSidebarService', () => {
- let service: SearchSidebarService;
+describe('SidebarService', () => {
+ let service: SidebarService;
const store: Store = jasmine.createSpyObj('store', {
/* tslint:disable:no-empty */
dispatch: {},
@@ -35,7 +35,7 @@ describe('SearchSidebarService', () => {
}));
beforeEach(() => {
- service = new SearchSidebarService(store, windowService);
+ service = new SidebarService(store, windowService);
}) ;
describe('when the collapse method is triggered', () => {
@@ -43,8 +43,8 @@ describe('SearchSidebarService', () => {
service.collapse();
});
- it('SearchSidebarCollapseAction should be dispatched to the store', () => {
- expect(store.dispatch).toHaveBeenCalledWith(new SearchSidebarCollapseAction());
+ it('SidebarCollapseAction should be dispatched to the store', () => {
+ expect(store.dispatch).toHaveBeenCalledWith(new SidebarCollapseAction());
});
});
@@ -54,8 +54,8 @@ describe('SearchSidebarService', () => {
service.expand();
});
- it('SearchSidebarExpandAction should be dispatched to the store', () => {
- expect(store.dispatch).toHaveBeenCalledWith(new SearchSidebarExpandAction());
+ it('SidebarExpandAction should be dispatched to the store', () => {
+ expect(store.dispatch).toHaveBeenCalledWith(new SidebarExpandAction());
});
});
diff --git a/src/app/+search-page/search-sidebar/search-sidebar.service.ts b/src/app/shared/sidebar/sidebar.service.ts
similarity index 70%
rename from src/app/+search-page/search-sidebar/search-sidebar.service.ts
rename to src/app/shared/sidebar/sidebar.service.ts
index 7185984538..8e3bbbf117 100644
--- a/src/app/+search-page/search-sidebar/search-sidebar.service.ts
+++ b/src/app/shared/sidebar/sidebar.service.ts
@@ -1,20 +1,20 @@
import { combineLatest as observableCombineLatest, Observable } from 'rxjs';
import { Injectable } from '@angular/core';
-import { SearchSidebarState } from './search-sidebar.reducer';
+import { SidebarState } from './sidebar.reducer';
import { createSelector, select, Store } from '@ngrx/store';
-import { SearchSidebarCollapseAction, SearchSidebarExpandAction } from './search-sidebar.actions';
+import { SidebarCollapseAction, SidebarExpandAction } from './sidebar.actions';
import { AppState } from '../../app.reducer';
-import { HostWindowService } from '../../shared/host-window.service';
+import { HostWindowService } from '../host-window.service';
import { map } from 'rxjs/operators';
-const sidebarStateSelector = (state: AppState) => state.searchSidebar;
-const sidebarCollapsedSelector = createSelector(sidebarStateSelector, (sidebar: SearchSidebarState) => sidebar.sidebarCollapsed);
+const sidebarStateSelector = (state: AppState) => state.sidebar;
+const sidebarCollapsedSelector = createSelector(sidebarStateSelector, (sidebar: SidebarState) => sidebar.sidebarCollapsed);
/**
- * Service that performs all actions that have to do with the search sidebar
+ * Service that performs all actions that have to do with the sidebar
*/
@Injectable()
-export class SearchSidebarService {
+export class SidebarService {
/**
* Emits true is the current screen size is mobile
*/
@@ -47,13 +47,13 @@ export class SearchSidebarService {
* Dispatches a collapse action to the store
*/
public collapse(): void {
- this.store.dispatch(new SearchSidebarCollapseAction());
+ this.store.dispatch(new SidebarCollapseAction());
}
/**
* Dispatches an expand action to the store
*/
public expand(): void {
- this.store.dispatch(new SearchSidebarExpandAction());
+ this.store.dispatch(new SidebarExpandAction());
}
}