Merge remote-tracking branch 'upstream/main' into w2p-88300_issue-1379

This commit is contained in:
Yana De Pauw
2022-04-05 15:02:08 +03:00
81 changed files with 7729 additions and 597 deletions

View File

@@ -208,7 +208,7 @@ After you have installed all dependencies you can now run the app. Run `yarn run
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.
To build the app for production and start the server run:
To build the app for production and start the server (in one command) run:
```bash
yarn start
@@ -222,6 +222,10 @@ yarn run build:prod
```
This will build the application and put the result in the `dist` folder. You can copy this folder to wherever you need it for your application server. If you will be using the built-in Express server, you'll also need a copy of the `node_modules` folder tucked inside your copy of `dist`.
After building the app for production, it can be started by running:
```bash
yarn run serve:ssr
```
### Running the application with Docker
NOTE: At this time, we do not have production-ready Docker images for DSpace.
@@ -283,11 +287,29 @@ E2E tests (aka integration tests) use [Cypress.io](https://www.cypress.io/). Con
The test files can be found in the `./cypress/integration/` folder.
Before you can run e2e tests, two things are required:
1. You MUST have a running backend (i.e. REST API). By default, the e2e tests look for this at http://localhost:8080/server/ or whatever `rest` backend is defined in your `config.prod.yml` or `config.yml`. You may override this using env variables, see [Configuring](#configuring).
2. Your backend MUST include our Entities Test Data set. Some tests run against a (currently hardcoded) Community/Collection/Item UUID. These UUIDs are all valid for our Entities Test Data set. The Entities Test Data set may be installed easily via Docker, see https://github.com/DSpace/DSpace/tree/main/dspace/src/main/docker-compose#ingest-option-2-ingest-entities-test-data
Before you can run e2e tests, two things are REQUIRED:
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo REST API (https://api7.dspace.org/server/), as that server is uncontrolled and may have content added/removed at any time.
* After starting up your backend on localhost, make sure either your `config.prod.yml` or `config.dev.yml` has its `rest` settings defined to use that localhost backend.
* If you'd prefer, you may instead use environment variables as described at [Configuring](#configuring). For example:
```
DSPACE_REST_SSL = false
DSPACE_REST_HOST = localhost
DSPACE_REST_PORT = 8080
```
2. Your backend MUST include our [Entities Test Data set](https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data). Some tests run against a specific Community/Collection/Item UUID. These UUIDs are all valid for our Entities Test Data set.
* (Recommended) The Entities Test Data set may be installed easily via Docker, see https://github.com/DSpace/DSpace/tree/main/dspace/src/main/docker-compose#ingest-option-2-ingest-entities-test-data
* Alternatively, the Entities Test Data set may be installed via a simple SQL import (e. g. `psql -U dspace < dspace7-entities-data.sql`). See instructions in link above.
Run `ng e2e` to kick off the tests. This will start Cypress and allow you to select the browser you wish to use, as well as whether you wish to run all tests or an individual test file. Once you click run on test(s), this opens the [Cypress Test Runner](https://docs.cypress.io/guides/core-concepts/test-runner) to run your test(s) and show you the results.
After performing the above setup, you can run the e2e tests using
```
ng e2e
````
NOTE: By default these tests will run against the REST API backend configured via environment variables or in `config.prod.yml`. If you'd rather it use `config.dev.yml`, just set the NODE_ENV environment variable like this:
```
NODE_ENV=development ng e2e
```
The `ng e2e` command will start Cypress and allow you to select the browser you wish to use, as well as whether you wish to run all tests or an individual test file. Once you click run on test(s), this opens the [Cypress Test Runner](https://docs.cypress.io/guides/core-concepts/test-runner) to run your test(s) and show you the results.
#### Writing E2E Tests

View File

@@ -148,6 +148,9 @@ languages:
- code: fi
label: Suomi
active: true
- code: bn
label: বাংলা
active: true
# Browse-By Pages
browseBy:

View File

@@ -6,5 +6,20 @@
"pluginsFile": "cypress/plugins/index.ts",
"fixturesFolder": "cypress/fixtures",
"baseUrl": "http://localhost:4000",
"retries": 2
"retries": {
"runMode": 2,
"openMode": 0
},
"env": {
"DSPACE_TEST_ADMIN_USER": "dspacedemo+admin@gmail.com",
"DSPACE_TEST_ADMIN_PASSWORD": "dspace",
"DSPACE_TEST_COMMUNITY": "0958c910-2037-42a9-81c7-dca80e3892b4",
"DSPACE_TEST_COLLECTION": "282164f5-d325-4740-8dd1-fa4d6d3e7200",
"DSPACE_TEST_ENTITY_PUBLICATION": "e98b0f27-5c19-49a0-960d-eb6ad5287067",
"DSPACE_TEST_SEARCH_TERM": "test",
"DSPACE_TEST_SUBMIT_COLLECTION_NAME": "Sample Collection",
"DSPACE_TEST_SUBMIT_COLLECTION_UUID": "9d8334e9-25d3-4a67-9cea-3dffdef80144",
"DSPACE_TEST_SUBMIT_USER": "dspacedemo+submit@gmail.com",
"DSPACE_TEST_SUBMIT_USER_PASSWORD": "dspace"
}
}

View File

@@ -16,8 +16,8 @@ describe('Homepage', () => {
it('should have a working search box', () => {
const queryString = 'test';
cy.get('ds-search-form input[name="query"]').type(queryString);
cy.get('ds-search-form button.search-button').click();
cy.get('[data-test="search-box"]').type(queryString);
cy.get('[data-test="search-button"]').click();
cy.url().should('include', '/search');
cy.url().should('include', 'query=' + encodeURI(queryString));
});

View File

@@ -0,0 +1,126 @@
import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER, TEST_ENTITY_PUBLICATION } from 'cypress/support';
const page = {
openLoginMenu() {
// Click the "Log In" dropdown menu in header
cy.get('ds-themed-navbar [data-test="login-menu"]').click();
},
openUserMenu() {
// Once logged in, click the User menu in header
cy.get('ds-themed-navbar [data-test="user-menu"]').click();
},
submitLoginAndPasswordByPressingButton(email, password) {
// Enter email
cy.get('ds-themed-navbar [data-test="email"]').type(email);
// Enter password
cy.get('ds-themed-navbar [data-test="password"]').type(password);
// Click login button
cy.get('ds-themed-navbar [data-test="login-button"]').click();
},
submitLoginAndPasswordByPressingEnter(email, password) {
// In opened Login modal, fill out email & password, then click Enter
cy.get('ds-themed-navbar [data-test="email"]').type(email);
cy.get('ds-themed-navbar [data-test="password"]').type(password);
cy.get('ds-themed-navbar [data-test="password"]').type('{enter}');
},
submitLogoutByPressingButton() {
// This is the POST command that will actually log us out
cy.intercept('POST', '/server/api/authn/logout').as('logout');
// Click logout button
cy.get('ds-themed-navbar [data-test="logout-button"]').click();
// Wait until above POST command responds before continuing
// (This ensures next action waits until logout completes)
cy.wait('@logout');
}
};
describe('Login Modal', () => {
it('should login when clicking button & stay on same page', () => {
const ENTITYPAGE = '/entities/publication/' + TEST_ENTITY_PUBLICATION;
cy.visit(ENTITYPAGE);
// Login menu should exist
cy.get('ds-log-in').should('exist');
// Login, and the <ds-log-in> tag should no longer exist
page.openLoginMenu();
cy.get('.form-login').should('be.visible');
page.submitLoginAndPasswordByPressingButton(TEST_ADMIN_USER, TEST_ADMIN_PASSWORD);
cy.get('ds-log-in').should('not.exist');
// Verify we are still on the same page
cy.url().should('include', ENTITYPAGE);
// Open user menu, verify user menu & logout button now available
page.openUserMenu();
cy.get('ds-user-menu').should('be.visible');
cy.get('ds-log-out').should('be.visible');
});
it('should login when clicking enter key & stay on same page', () => {
cy.visit('/home');
// Open login menu in header & verify <ds-log-in> tag is visible
page.openLoginMenu();
cy.get('.form-login').should('be.visible');
// Login, and the <ds-log-in> tag should no longer exist
page.submitLoginAndPasswordByPressingEnter(TEST_ADMIN_USER, TEST_ADMIN_PASSWORD);
cy.get('.form-login').should('not.exist');
// Verify we are still on homepage
cy.url().should('include', '/home');
// Open user menu, verify user menu & logout button now available
page.openUserMenu();
cy.get('ds-user-menu').should('be.visible');
cy.get('ds-log-out').should('be.visible');
});
it('should support logout', () => {
// First authenticate & access homepage
cy.login(TEST_ADMIN_USER, TEST_ADMIN_PASSWORD);
cy.visit('/');
// Verify ds-log-in tag doesn't exist, but ds-log-out tag does exist
cy.get('ds-log-in').should('not.exist');
cy.get('ds-log-out').should('exist');
// Click logout button
page.openUserMenu();
page.submitLogoutByPressingButton();
// Verify ds-log-in tag now exists
cy.get('ds-log-in').should('exist');
cy.get('ds-log-out').should('not.exist');
});
it('should allow new user registration', () => {
cy.visit('/');
page.openLoginMenu();
// Registration link should be visible
cy.get('ds-themed-navbar [data-test="register"]').should('be.visible');
// Click registration link & you should go to registration page
cy.get('ds-themed-navbar [data-test="register"]').click();
cy.location('pathname').should('eq', '/register');
cy.get('ds-register-email').should('exist');
});
it('should allow forgot password', () => {
cy.visit('/');
page.openLoginMenu();
// Forgot password link should be visible
cy.get('ds-themed-navbar [data-test="forgot"]').should('be.visible');
// Click link & you should go to Forgot Password page
cy.get('ds-themed-navbar [data-test="forgot"]').click();
cy.location('pathname').should('eq', '/forgot');
cy.get('ds-forgot-email').should('exist');
});
});

View File

@@ -0,0 +1,149 @@
import { Options } from 'cypress-axe';
import { TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD, TEST_SUBMIT_COLLECTION_NAME } from 'cypress/support';
import { testA11y } from 'cypress/support/utils';
describe('My DSpace page', () => {
it('should display recent submissions and pass accessibility tests', () => {
cy.login(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);
cy.visit('/mydspace');
cy.get('ds-my-dspace-page').should('exist');
// At least one recent submission should be displayed
cy.get('[data-test="list-object"]').should('be.visible');
// Click each filter toggle to open *every* filter
// (As we want to scan filter section for accessibility issues as well)
cy.get('.filter-toggle').click({ multiple: true });
// Analyze <ds-my-dspace-page> for accessibility issues
testA11y(
{
include: ['ds-my-dspace-page'],
exclude: [
['nouislider'] // Date filter slider is missing ARIA labels. Will be fixed by #1175
],
},
{
rules: {
// Search filters fail these two "moderate" impact rules
'heading-order': { enabled: false },
'landmark-unique': { enabled: false }
}
} as Options
);
});
it('should have a working detailed view that passes accessibility tests', () => {
cy.login(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);
cy.visit('/mydspace');
cy.get('ds-my-dspace-page').should('exist');
// Click button in sidebar to display detailed view
cy.get('ds-search-sidebar [data-test="detail-view"]').click();
cy.get('ds-object-detail').should('exist');
// Analyze <ds-search-page> for accessibility issues
testA11y('ds-my-dspace-page',
{
rules: {
// Search filters fail these two "moderate" impact rules
'heading-order': { enabled: false },
'landmark-unique': { enabled: false }
}
} as Options
);
});
// NOTE: Deleting existing submissions is exercised by submission.spec.ts
it('should let you start a new submission & edit in-progress submissions', () => {
cy.login(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);
cy.visit('/mydspace');
// Open the New Submission dropdown
cy.get('#dropdownSubmission').click();
// Click on the "Item" type in that dropdown
cy.get('#entityControlsDropdownMenu button[title="none"]').click();
// This should display the <ds-create-item-parent-selector> (popup window)
cy.get('ds-create-item-parent-selector').should('be.visible');
// Type in a known Collection name in the search box
cy.get('ds-authorized-collection-selector input[type="search"]').type(TEST_SUBMIT_COLLECTION_NAME);
// Click on the button matching that known Collection name
cy.get('ds-authorized-collection-selector button[title="' + TEST_SUBMIT_COLLECTION_NAME + '"]').click();
// New URL should include /workspaceitems, as we've started a new submission
cy.url().should('include', '/workspaceitems');
// The Submission edit form tag should be visible
cy.get('ds-submission-edit').should('be.visible');
// A Collection menu button should exist & its value should be the selected collection
cy.get('#collectionControlsMenuButton span').should('have.text', TEST_SUBMIT_COLLECTION_NAME);
// Now that we've created a submission, we'll test that we can go back and Edit it.
// Get our Submission URL, to parse out the ID of this new submission
cy.location().then(fullUrl => {
// This will be the full path (/workspaceitems/[id]/edit)
const path = fullUrl.pathname;
// Split on the slashes
const subpaths = path.split('/');
// Part 2 will be the [id] of the submission
const id = subpaths[2];
// Click the "Save for Later" button to save this submission
cy.get('button#saveForLater').click();
// "Save for Later" should send us to MyDSpace
cy.url().should('include', '/mydspace');
// Close any open notifications, to make sure they don't get in the way of next steps
cy.get('[data-dismiss="alert"]').click({multiple: true});
// This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// On MyDSpace, find the submission we just created via its ID
cy.get('[data-test="search-box"]').type(id);
cy.get('[data-test="search-button"]').click();
// Wait for search results to come back from the above GET command
cy.wait('@search-results');
// Click the Edit button for this in-progress submission
cy.get('#edit_' + id).click();
// Should send us back to the submission form
cy.url().should('include', '/workspaceitems/' + id + '/edit');
// Discard our new submission by clicking Discard in Submission form & confirming
cy.get('button#discard').click();
cy.get('button#discard_submit').click();
// Discarding should send us back to MyDSpace
cy.url().should('include', '/mydspace');
});
});
it('should let you import from external sources', () => {
cy.login(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);
cy.visit('/mydspace');
// Open the New Import dropdown
cy.get('#dropdownImport').click();
// Click on the "Item" type in that dropdown
cy.get('#importControlsDropdownMenu button[title="none"]').click();
// New URL should include /import-external, as we've moved to the import page
cy.url().should('include', '/import-external');
// The external import searchbox should be visible
cy.get('ds-submission-import-external-searchbar').should('be.visible');
});
});

View File

@@ -1,49 +1,66 @@
import { TEST_SEARCH_TERM } from 'cypress/support';
const page = {
fillOutQueryInNavBar(query) {
// Click the magnifying glass
cy.get('.navbar-container #search-navbar-container form a').click();
cy.get('ds-themed-navbar [data-test="header-search-icon"]').click();
// Fill out a query in input that appears
cy.get('.navbar-container #search-navbar-container form input[name = "query"]').type(query);
cy.get('ds-themed-navbar [data-test="header-search-box"]').type(query);
},
submitQueryByPressingEnter() {
cy.get('.navbar-container #search-navbar-container form input[name = "query"]').type('{enter}');
cy.get('ds-themed-navbar [data-test="header-search-box"]').type('{enter}');
},
submitQueryByPressingIcon() {
cy.get('.navbar-container #search-navbar-container form .submit-icon').click();
cy.get('ds-themed-navbar [data-test="header-search-icon"]').click();
}
};
describe('Search from Navigation Bar', () => {
// NOTE: these tests currently assume this query will return results!
const query = 'test';
const query = TEST_SEARCH_TERM;
it('should go to search page with correct query if submitted (from home)', () => {
cy.visit('/');
// This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// Run the search
page.fillOutQueryInNavBar(query);
page.submitQueryByPressingEnter();
// New URL should include query param
cy.url().should('include', 'query=' + query);
// Wait for search results to come back from the above GET command
cy.wait('@search-results');
// At least one search result should be displayed
cy.get('ds-item-search-result-list-element').should('be.visible');
cy.get('[data-test="list-object"]').should('be.visible');
});
it('should go to search page with correct query if submitted (from search)', () => {
cy.visit('/search');
// This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// Run the search
page.fillOutQueryInNavBar(query);
page.submitQueryByPressingEnter();
// New URL should include query param
cy.url().should('include', 'query=' + query);
// Wait for search results to come back from the above GET command
cy.wait('@search-results');
// At least one search result should be displayed
cy.get('ds-item-search-result-list-element').should('be.visible');
cy.get('[data-test="list-object"]').should('be.visible');
});
it('should allow user to also submit query by clicking icon', () => {
cy.visit('/');
// This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// Run the search
page.fillOutQueryInNavBar(query);
page.submitQueryByPressingIcon();
// New URL should include query param
cy.url().should('include', 'query=' + query);
// Wait for search results to come back from the above GET command
cy.wait('@search-results');
// At least one search result should be displayed
cy.get('ds-item-search-result-list-element').should('be.visible');
cy.get('[data-test="list-object"]').should('be.visible');
});
});

View File

@@ -1,31 +1,27 @@
import { Options } from 'cypress-axe';
import { TEST_SEARCH_TERM } from 'cypress/support';
import { testA11y } from 'cypress/support/utils';
describe('Search Page', () => {
// unique ID of the search form (for selecting specific elements below)
const SEARCHFORM_ID = '#search-form';
it('should contain query value when navigating to page with query parameter', () => {
const queryString = 'test query';
cy.visit('/search?query=' + queryString);
cy.get(SEARCHFORM_ID + ' input[name="query"]').should('have.value', queryString);
});
it('should redirect to the correct url when query was set and submit button was triggered', () => {
const queryString = 'Another interesting query string';
cy.visit('/search');
// Type query in searchbox & click search button
cy.get(SEARCHFORM_ID + ' input[name="query"]').type(queryString);
cy.get(SEARCHFORM_ID + ' button.search-button').click();
cy.get('[data-test="search-box"]').type(queryString);
cy.get('[data-test="search-button"]').click();
cy.url().should('include', 'query=' + encodeURI(queryString));
});
it('should pass accessibility tests', () => {
cy.visit('/search');
it('should load results and pass accessibility tests', () => {
cy.visit('/search?query=' + TEST_SEARCH_TERM);
cy.get('[data-test="search-box"]').should('have.value', TEST_SEARCH_TERM);
// <ds-search-page> tag must be loaded
cy.get('ds-search-page').should('exist');
// At least one search result should be displayed
cy.get('[data-test="list-object"]').should('be.visible');
// Click each filter toggle to open *every* filter
// (As we want to scan filter section for accessibility issues as well)
cy.get('.filter-toggle').click({ multiple: true });
@@ -48,16 +44,18 @@ describe('Search Page', () => {
);
});
it('should pass accessibility tests in Grid view', () => {
cy.visit('/search');
it('should have a working grid view that passes accessibility tests', () => {
cy.visit('/search?query=' + TEST_SEARCH_TERM);
// Click to display grid view
// TODO: These buttons should likely have an easier way to uniquely select
cy.get('#search-sidebar-content > ds-view-mode-switch > .btn-group > [href="/search?view=grid"] > .fas').click();
// Click button in sidebar to display grid view
cy.get('ds-search-sidebar [data-test="grid-view"]').click();
// <ds-search-page> tag must be loaded
cy.get('ds-search-page').should('exist');
// At least one grid object (card) should be displayed
cy.get('[data-test="grid-object"]').should('be.visible');
// Analyze <ds-search-page> for accessibility issues
testA11y('ds-search-page',
{

View File

@@ -0,0 +1,134 @@
import { Options } from 'cypress-axe';
import { TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD, TEST_SUBMIT_COLLECTION_NAME, TEST_SUBMIT_COLLECTION_UUID } from 'cypress/support';
import { testA11y } from 'cypress/support/utils';
describe('New Submission page', () => {
// NOTE: We already test that new submissions can be started from MyDSpace in my-dspace.spec.ts
it('should create a new submission when using /submit path & pass accessibility', () => {
cy.login(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);
// Test that calling /submit with collection & entityType will create a new submission
cy.visit('/submit?collection=' + TEST_SUBMIT_COLLECTION_UUID + '&entityType=none');
// Should redirect to /workspaceitems, as we've started a new submission
cy.url().should('include', '/workspaceitems');
// The Submission edit form tag should be visible
cy.get('ds-submission-edit').should('be.visible');
// A Collection menu button should exist & it's value should be the selected collection
cy.get('#collectionControlsMenuButton span').should('have.text', TEST_SUBMIT_COLLECTION_NAME);
// 4 sections should be visible by default
cy.get('div#section_traditionalpageone').should('be.visible');
cy.get('div#section_traditionalpagetwo').should('be.visible');
cy.get('div#section_upload').should('be.visible');
cy.get('div#section_license').should('be.visible');
// Discard button should work
// Clicking it will display a confirmation, which we will confirm with another click
cy.get('button#discard').click();
cy.get('button#discard_submit').click();
});
it('should block submission & show errors if required fields are missing', () => {
cy.login(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);
// Create a new submission
cy.visit('/submit?collection=' + TEST_SUBMIT_COLLECTION_UUID + '&entityType=none');
// Attempt an immediate deposit without filling out any fields
cy.get('button#deposit').click();
// A warning alert should display.
cy.get('ds-notification div.alert-warning').should('be.visible');
// First section should have an exclamation error in the header
// (as it has required fields)
cy.get('div#traditionalpageone-header i.fa-exclamation-circle').should('be.visible');
// Title field should have class "is-invalid" applied, as it's required
cy.get('input#dc_title').should('have.class', 'is-invalid');
// Date Year field should also have "is-valid" class
cy.get('input#dc_date_issued_year').should('have.class', 'is-invalid');
// FINALLY, cleanup after ourselves. This also exercises the MyDSpace delete button.
// Get our Submission URL, to parse out the ID of this submission
cy.location().then(fullUrl => {
// This will be the full path (/workspaceitems/[id]/edit)
const path = fullUrl.pathname;
// Split on the slashes
const subpaths = path.split('/');
// Part 2 will be the [id] of the submission
const id = subpaths[2];
// Even though form is incomplete, the "Save for Later" button should still work
cy.get('button#saveForLater').click();
// "Save for Later" should send us to MyDSpace
cy.url().should('include', '/mydspace');
// A success alert should be visible
cy.get('ds-notification div.alert-success').should('be.visible');
// Now, dismiss any open alert boxes (may be multiple, as tests run quickly)
cy.get('[data-dismiss="alert"]').click({multiple: true});
// This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// On MyDSpace, find the submission we just saved via its ID
cy.get('[data-test="search-box"]').type(id);
cy.get('[data-test="search-button"]').click();
// Wait for search results to come back from the above GET command
cy.wait('@search-results');
// Delete our created submission & confirm deletion
cy.get('button#delete_' + id).click();
cy.get('button#delete_confirm').click();
});
});
it('should allow for deposit if all required fields completed & file uploaded', () => {
cy.login(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);
// Create a new submission
cy.visit('/submit?collection=' + TEST_SUBMIT_COLLECTION_UUID + '&entityType=none');
// Fill out all required fields (Title, Date)
cy.get('input#dc_title').type('DSpace logo uploaded via e2e tests');
cy.get('input#dc_date_issued_year').type('2022');
// Confirm the required license by checking checkbox
// (NOTE: requires "force:true" cause Cypress claims this checkbox is covered by its own <span>)
cy.get('input#granted').check( {force: true} );
// Before using Cypress drag & drop, we have to manually trigger the "dragover" event.
// This ensures our UI displays the dropzone that covers the entire submission page.
// (For some reason Cypress drag & drop doesn't trigger this even itself & upload won't work without this trigger)
cy.get('ds-uploader').trigger('dragover');
// This is the POST command that will upload the file
cy.intercept('POST', '/server/api/submission/workspaceitems/*').as('upload');
// Upload our DSpace logo via drag & drop onto submission form
// cy.get('div#section_upload')
cy.get('div.ds-document-drop-zone').selectFile('src/assets/images/dspace-logo.png', {
action: 'drag-drop'
});
// Wait for upload to complete before proceeding
cy.wait('@upload');
// Close the upload success notice
cy.get('[data-dismiss="alert"]').click({multiple: true});
// Wait for deposit button to not be disabled & click it.
cy.get('button#deposit').should('not.be.disabled').click();
// No warnings should exist. Instead, just successful deposit alert is displayed
cy.get('ds-notification div.alert-warning').should('not.exist');
cy.get('ds-notification div.alert-success').should('be.visible');
});
});

View File

@@ -1,15 +1,34 @@
const fs = require('fs');
// Plugins enable you to tap into, modify, or extend the internal behavior of Cypress
// For more info, visit https://on.cypress.io/plugins-api
module.exports = (on, config) => {
// Define "log" and "table" tasks, used for logging accessibility errors during CI
// Borrowed from https://github.com/component-driven/cypress-axe#in-cypress-plugins-file
on('task', {
// Define "log" and "table" tasks, used for logging accessibility errors during CI
// Borrowed from https://github.com/component-driven/cypress-axe#in-cypress-plugins-file
log(message: string) {
console.log(message);
return null;
},
table(message: string) {
console.table(message);
return null;
},
// Cypress doesn't have access to the running application in Node.js.
// So, it's not possible to inject or load the AppConfig or environment of the Angular UI.
// Instead, we'll read our running application's config.json, which contains the configs &
// is regenerated at runtime each time the Angular UI application starts up.
readUIConfig() {
// Check if we have a config.json in the src/assets. If so, use that.
// This is where it's written when running "ng e2e" or "yarn serve"
if (fs.existsSync('./src/assets/config.json')) {
return fs.readFileSync('./src/assets/config.json', 'utf8');
// Otherwise, check the dist/browser/assets
// This is where it's written when running "serve:ssr", which is what CI uses to start the frontend
} else if (fs.existsSync('./dist/browser/assets/config.json')) {
return fs.readFileSync('./dist/browser/assets/config.json', 'utf8');
}
return null;
}
});

View File

@@ -1,43 +1,83 @@
// ***********************************************
// This example namespace declaration will help
// with Intellisense and code completion in your
// IDE or Text Editor.
// This File is for Custom Cypress commands.
// See docs at https://docs.cypress.io/api/cypress-api/custom-commands
// ***********************************************
// declare namespace Cypress {
// interface Chainable<Subject = any> {
// customCommand(param: any): typeof customCommand;
// }
// }
//
// function customCommand(param: any): void {
// console.warn(param);
// }
//
// NOTE: You can use it like so:
// Cypress.Commands.add('customCommand', customCommand);
//
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add("login", (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
import { AuthTokenInfo, TOKENITEM } from 'src/app/core/auth/models/auth-token-info.model';
import { FALLBACK_TEST_REST_BASE_URL } from '.';
// Declare Cypress namespace to help with Intellisense & code completion in IDEs
// ALL custom commands MUST be listed here for code completion to work
// tslint:disable-next-line:no-namespace
declare global {
namespace Cypress {
interface Chainable<Subject = any> {
/**
* Login to backend before accessing the next page. Ensures that the next
* call to "cy.visit()" will be authenticated as this user.
* @param email email to login as
* @param password password to login as
*/
login(email: string, password: string): typeof login;
}
}
}
/**
* Login user via REST API directly, and pass authentication token to UI via
* the UI's dsAuthInfo cookie.
* @param email email to login as
* @param password password to login as
*/
function login(email: string, password: string): void {
// Cypress doesn't have access to the running application in Node.js.
// So, it's not possible to inject or load the AppConfig or environment of the Angular UI.
// Instead, we'll read our running application's config.json, which contains the configs &
// is regenerated at runtime each time the Angular UI application starts up.
cy.task('readUIConfig').then((str: string) => {
// Parse config into a JSON object
const config = JSON.parse(str);
// Find the URL of our REST API. Have a fallback ready, just in case 'rest.baseUrl' cannot be found.
let baseRestUrl = FALLBACK_TEST_REST_BASE_URL;
if (!config.rest.baseUrl) {
console.warn("Could not load 'rest.baseUrl' from config.json. Falling back to " + FALLBACK_TEST_REST_BASE_URL);
} else {
console.log("Found 'rest.baseUrl' in config.json. Using this REST API for login: " + config.rest.baseUrl);
baseRestUrl = config.rest.baseUrl;
}
// To login via REST, first we have to do a GET to obtain a valid CSRF token
cy.request( baseRestUrl + '/api/authn/status' )
.then((response) => {
// We should receive a CSRF token returned in a response header
expect(response.headers).to.have.property('dspace-xsrf-token');
const csrfToken = response.headers['dspace-xsrf-token'];
// Now, send login POST request including that CSRF token
cy.request({
method: 'POST',
url: baseRestUrl + '/api/authn/login',
headers: { 'X-XSRF-TOKEN' : csrfToken},
form: true, // indicates the body should be form urlencoded
body: { user: email, password: password }
}).then((resp) => {
// We expect a successful login
expect(resp.status).to.eq(200);
// We expect to have a valid authorization header returned (with our auth token)
expect(resp.headers).to.have.property('authorization');
// Initialize our AuthTokenInfo object from the authorization header.
const authheader = resp.headers.authorization as string;
const authinfo: AuthTokenInfo = new AuthTokenInfo(authheader);
// Save our AuthTokenInfo object to our dsAuthInfo UI cookie
// This ensures the UI will recognize we are logged in on next "visit()"
cy.setCookie(TOKENITEM, JSON.stringify(authinfo));
});
});
});
}
// Add as a Cypress command (i.e. assign to 'cy.login')
Cypress.Commands.add('login', login);

View File

@@ -13,14 +13,51 @@
// https://on.cypress.io/configuration
// ***********************************************************
// When a command from ./commands is ready to use, import with `import './commands'` syntax
// import './commands';
// Import all custom Commands (from commands.ts) for all tests
import './commands';
// Import Cypress Axe tools for all tests
// https://github.com/component-driven/cypress-axe
import 'cypress-axe';
// Runs once before the first test in each "block"
before(() => {
// Pre-agree to all Klaro cookies by setting the klaro-anonymous cookie
// This just ensures it doesn't get in the way of matching other objects in the page.
cy.setCookie('klaro-anonymous', '{%22authentication%22:true%2C%22preferences%22:true%2C%22acknowledgement%22:true%2C%22google-analytics%22:true}');
});
// For better stability between tests, we visit "about:blank" (i.e. blank page) after each test.
// This ensures any remaining/outstanding XHR requests are killed, so they don't affect the next test.
// Borrowed from: https://glebbahmutov.com/blog/visit-blank-page-between-tests/
afterEach(() => {
cy.window().then((win) => {
win.location.href = 'about:blank';
});
});
// Global constants used in tests
export const TEST_COLLECTION = '282164f5-d325-4740-8dd1-fa4d6d3e7200';
export const TEST_COMMUNITY = '0958c910-2037-42a9-81c7-dca80e3892b4';
export const TEST_ENTITY_PUBLICATION = 'e98b0f27-5c19-49a0-960d-eb6ad5287067';
// May be overridden in our cypress.json config file using specified environment variables.
// Default values listed here are all valid for the Demo Entities Data set available at
// https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
// (This is the data set used in our CI environment)
// NOTE: FALLBACK_TEST_REST_BASE_URL is only used if Cypress cannot read the REST API BaseURL
// from the Angular UI's config.json. See 'getBaseRESTUrl()' in commands.ts
export const FALLBACK_TEST_REST_BASE_URL = 'http://localhost:8080/server';
// Admin account used for administrative tests
export const TEST_ADMIN_USER = Cypress.env('DSPACE_TEST_ADMIN_USER') || 'dspacedemo+admin@gmail.com';
export const TEST_ADMIN_PASSWORD = Cypress.env('DSPACE_TEST_ADMIN_PASSWORD') || 'dspace';
// Community/collection/publication used for view/edit tests
export const TEST_COLLECTION = Cypress.env('DSPACE_TEST_COLLECTION') || '282164f5-d325-4740-8dd1-fa4d6d3e7200';
export const TEST_COMMUNITY = Cypress.env('DSPACE_TEST_COMMUNITY') || '0958c910-2037-42a9-81c7-dca80e3892b4';
export const TEST_ENTITY_PUBLICATION = Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION') || 'e98b0f27-5c19-49a0-960d-eb6ad5287067';
// Search term (should return results) used in search tests
export const TEST_SEARCH_TERM = Cypress.env('DSPACE_TEST_SEARCH_TERM') || 'test';
// Collection used for submission tests
export const TEST_SUBMIT_COLLECTION_NAME = Cypress.env('DSPACE_TEST_SUBMIT_COLLECTION_NAME') || 'Sample Collection';
export const TEST_SUBMIT_COLLECTION_UUID = Cypress.env('DSPACE_TEST_SUBMIT_COLLECTION_UUID') || '9d8334e9-25d3-4a67-9cea-3dffdef80144';
export const TEST_SUBMIT_USER = Cypress.env('DSPACE_TEST_SUBMIT_USER') || 'dspacedemo+submit@gmail.com';
export const TEST_SUBMIT_USER_PASSWORD = Cypress.env('DSPACE_TEST_SUBMIT_USER_PASSWORD') || 'dspace';

View File

@@ -35,6 +35,6 @@ services:
tar xvfz /tmp/assetstore.tar.gz
fi
/dspace/bin/dspace index-discovery
/dspace/bin/dspace index-discovery -b
/dspace/bin/dspace oai import
/dspace/bin/dspace oai clean-cache

View File

@@ -20,7 +20,7 @@ services:
environment:
# This LOADSQL should be kept in sync with the URL in DSpace/DSpace
# This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
- LOADSQL=https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-2021-04-14.sql
- LOADSQL=https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-data.sql
dspace:
### OVERRIDE default 'entrypoint' in 'docker-compose-rest.yml' ####
# Ensure that the database is ready BEFORE starting tomcat

View File

@@ -63,7 +63,7 @@ services:
# This LOADSQL should be kept in sync with the LOADSQL in
# https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/db.entities.yml
# This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
LOADSQL: https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-2021-04-14.sql
LOADSQL: https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-data.sql
PGDATA: /pgdata
image: dspace/dspace-postgres-pgcrypto:loadsql
networks:

View File

@@ -147,7 +147,7 @@
"cross-env": "^7.0.3",
"css-loader": "3.4.0",
"cssnano": "^4.1.10",
"cypress": "8.6.0",
"cypress": "9.5.1",
"cypress-axe": "^0.13.0",
"debug-loader": "^0.0.1",
"deep-freeze": "0.0.1",

View File

@@ -31,7 +31,6 @@
[sortConfig]="(currentSort$ |async)"
[type]="startsWithType"
[startsWithOptions]="startsWithOptions"
[enableArrows]="true"
(prev)="goPrev()"
(next)="goNext()">
</ds-browse-by>

View File

@@ -6,7 +6,7 @@
<a *ngIf="linkType != linkTypes.None"
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="card-img-top full-width">
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
<div>
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
</ds-thumbnail>
@@ -37,7 +37,7 @@
<div *ngIf="linkType != linkTypes.None" class="text-center">
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="lead btn btn-primary viewButton">View</a>
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
</div>
</div>
</ds-truncatable>

View File

@@ -6,7 +6,7 @@
<a *ngIf="linkType != linkTypes.None"
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="card-img-top full-width">
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
<div>
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
</ds-thumbnail>
@@ -37,7 +37,7 @@
<div *ngIf="linkType != linkTypes.None" class="text-center">
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="lead btn btn-primary viewButton">View</a>
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
</div>
</div>
</ds-truncatable>

View File

@@ -6,7 +6,7 @@
<a *ngIf="linkType != linkTypes.None"
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="card-img-top full-width">
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
<div>
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
</ds-thumbnail>
@@ -41,7 +41,7 @@
<div *ngIf="linkType != linkTypes.None" class="text-center">
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="lead btn btn-primary viewButton">View</a>
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
</div>
</div>
</ds-truncatable>

View File

@@ -6,7 +6,7 @@
<a *ngIf="linkType != linkTypes.None"
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="card-img-top full-width">
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
<div>
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
</ds-thumbnail>
@@ -43,7 +43,7 @@
<div *ngIf="linkType != linkTypes.None" class="text-center">
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="lead btn btn-primary viewButton">View</a>
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
</div>
</div>
</ds-truncatable>

View File

@@ -6,7 +6,7 @@
<a *ngIf="linkType != linkTypes.None"
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="card-img-top full-width">
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
<div>
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
</ds-thumbnail>
@@ -37,7 +37,7 @@
<div *ngIf="linkType != linkTypes.None" class="text-center">
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="lead btn btn-primary viewButton">View</a>
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
</div>
</div>
</ds-truncatable>

View File

@@ -6,7 +6,7 @@
<a *ngIf="linkType != linkTypes.None"
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="card-img-top full-width">
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
<div>
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
</ds-thumbnail>
@@ -31,7 +31,7 @@
<div *ngIf="linkType != linkTypes.None" class="text-center">
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="lead btn btn-primary viewButton">View</a>
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
</div>
</div>
</ds-truncatable>

View File

@@ -24,9 +24,10 @@
<div class="{{columnSizes.columns[3].buildClasses()}} row-element d-flex align-items-center">
<div class="text-center w-100">
<div class="btn-group relationship-action-buttons">
<a [href]="bitstream?._links?.content?.href"
<a *ngIf="bitstreamDownloadUrl != null" [href]="bitstreamDownloadUrl"
class="btn btn-outline-primary btn-sm"
title="{{'item.edit.bitstreams.edit.buttons.download' | translate}}">
title="{{'item.edit.bitstreams.edit.buttons.download' | translate}}"
data-test="download-button">
<i class="fas fa-download fa-fw"></i>
</a>
<button [routerLink]="['/bitstreams/', bitstream.id, 'edit']" class="btn btn-outline-primary btn-sm"

View File

@@ -10,6 +10,8 @@ import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model'
import { ResponsiveTableSizes } from '../../../../shared/responsive-table-sizes/responsive-table-sizes';
import { ResponsiveColumnSizes } from '../../../../shared/responsive-table-sizes/responsive-column-sizes';
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils';
import { getBitstreamDownloadRoute } from '../../../../app-routing-paths';
import { By } from '@angular/platform-browser';
let comp: ItemEditBitstreamComponent;
let fixture: ComponentFixture<ItemEditBitstreamComponent>;
@@ -29,6 +31,10 @@ const bitstream = Object.assign(new Bitstream(), {
name: 'Fake Bitstream',
bundleName: 'ORIGINAL',
description: 'Description',
_links: {
content: { href: 'content-link' }
},
format: createSuccessfulRemoteDataObject$(format)
});
const fieldUpdate = {
@@ -116,4 +122,19 @@ describe('ItemEditBitstreamComponent', () => {
expect(comp.canUndo()).toEqual(false);
});
});
describe('when the component loads', () => {
it('should contain download button with a valid link to the bitstreams download page', () => {
fixture.detectChanges();
const downloadBtnHref = fixture.debugElement.query(By.css('[data-test="download-button"]')).nativeElement.getAttribute('href');
expect(downloadBtnHref).toEqual(comp.bitstreamDownloadUrl);
});
});
describe('when the bitstreamDownloadUrl property gets populated', () => {
it('should contain the bitstream download page route', () => {
expect(comp.bitstreamDownloadUrl).not.toEqual(bitstream._links.content.href);
expect(comp.bitstreamDownloadUrl).toEqual(getBitstreamDownloadRoute(bitstream));
});
});
});

View File

@@ -9,6 +9,7 @@ import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model'
import { getRemoteDataPayload, getFirstSucceededRemoteData } from '../../../../core/shared/operators';
import { ResponsiveTableSizes } from '../../../../shared/responsive-table-sizes/responsive-table-sizes';
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
import { getBitstreamDownloadRoute } from '../../../../app-routing-paths';
@Component({
selector: 'ds-item-edit-bitstream',
@@ -52,6 +53,11 @@ export class ItemEditBitstreamComponent implements OnChanges, OnInit {
*/
bitstreamName: string;
/**
* The bitstream's download url
*/
bitstreamDownloadUrl: string;
/**
* The format of the bitstream
*/
@@ -73,6 +79,7 @@ export class ItemEditBitstreamComponent implements OnChanges, OnInit {
ngOnChanges(changes: SimpleChanges): void {
this.bitstream = cloneDeep(this.fieldUpdate.field) as Bitstream;
this.bitstreamName = this.dsoNameService.getName(this.bitstream);
this.bitstreamDownloadUrl = getBitstreamDownloadRoute(this.bitstream);
this.format$ = this.bitstream.format.pipe(
getFirstSucceededRemoteData(),
getRemoteDataPayload()

View File

@@ -4,19 +4,21 @@
<ds-item-alerts [item]="item"></ds-item-alerts>
<ds-item-versions-notice [item]="item"></ds-item-versions-notice>
<ds-view-tracker [object]="item"></ds-view-tracker>
<div class="d-flex flex-row">
<ds-item-page-title-field class="mr-auto" [item]="item"></ds-item-page-title-field>
<div class="pl-2">
<ds-dso-page-edit-button [pageRoute]="itemPageRoute$ | async" [dso]="item" [tooltipMsg]="'item.page.edit'"></ds-dso-page-edit-button>
<div *ngIf="!item.isWithdrawn || (isAdmin$|async)" class="full-item-info">
<div class="d-flex flex-row">
<ds-item-page-title-field class="mr-auto" [item]="item"></ds-item-page-title-field>
<div class="pl-2">
<ds-dso-page-edit-button [pageRoute]="itemPageRoute$ | async" [dso]="item"
[tooltipMsg]="'item.page.edit'"></ds-dso-page-edit-button>
</div>
</div>
</div>
<div class="simple-view-link my-3" *ngIf="!fromWfi">
<a class="btn btn-outline-primary" [routerLink]="[(itemPageRoute$ | async)]">
{{"item.page.link.simple" | translate}}
</a>
</div>
<table class="table table-responsive table-striped">
<tbody>
<div class="simple-view-link my-3" *ngIf="!fromWfi">
<a class="btn btn-outline-primary" [routerLink]="[(itemPageRoute$ | async)]">
{{"item.page.link.simple" | translate}}
</a>
</div>
<table class="table table-responsive table-striped">
<tbody>
<ng-container *ngFor="let mdEntry of (metadata$ | async) | keyvalue">
<tr *ngFor="let mdValue of mdEntry.value">
<td>{{mdEntry.key}}</td>
@@ -24,14 +26,16 @@
<td>{{mdValue.language}}</td>
</tr>
</ng-container>
</tbody>
</table>
<ds-item-page-full-file-section [item]="item"></ds-item-page-full-file-section>
<ds-item-page-collections [item]="item"></ds-item-page-collections>
<ds-item-versions class="mt-2" [item]="item"></ds-item-versions>
<div class="button-row bottom" *ngIf="fromWfi">
<div class="text-right">
<button class="btn btn-outline-secondary mr-1" (click)="back()"><i class="fas fa-arrow-left"></i> {{'item.page.return' | translate}}</button>
</tbody>
</table>
<ds-item-page-full-file-section [item]="item"></ds-item-page-full-file-section>
<ds-item-page-collections [item]="item"></ds-item-page-collections>
<ds-item-versions class="mt-2" [item]="item"></ds-item-versions>
<div class="button-row bottom" *ngIf="fromWfi">
<div class="text-right">
<button class="btn btn-outline-secondary mr-1" (click)="back()"><i
class="fas fa-arrow-left"></i> {{'item.page.return' | translate}}</button>
</div>
</div>
</div>
</div>

View File

@@ -11,12 +11,15 @@ import { ActivatedRouteStub } from '../../shared/testing/active-router.stub';
import { VarDirective } from '../../shared/utils/var.directive';
import { RouterTestingModule } from '@angular/router/testing';
import { Item } from '../../core/shared/item.model';
import { of as observableOf } from 'rxjs';
import { BehaviorSubject, of as observableOf } from 'rxjs';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { By } from '@angular/platform-browser';
import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
import { AuthService } from '../../core/auth/auth.service';
import { createPaginatedList } from '../../shared/testing/utils.test';
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
import { createRelationshipsObservable } from '../simple/item-types/shared/item.component.spec';
import { RemoteData } from '../../core/data/remote-data';
const mockItem: Item = Object.assign(new Item(), {
bundles: createSuccessfulRemoteDataObject$(createPaginatedList([])),
@@ -30,6 +33,13 @@ const mockItem: Item = Object.assign(new Item(), {
}
});
const mockWithdrawnItem: Item = Object.assign(new Item(), {
bundles: createSuccessfulRemoteDataObject$(createPaginatedList([])),
metadata: [],
relationships: createRelationshipsObservable(),
isWithdrawn: true
});
const metadataServiceStub = {
/* tslint:disable:no-empty */
processRemoteData: () => {
@@ -44,6 +54,7 @@ describe('FullItemPageComponent', () => {
let authService: AuthService;
let routeStub: ActivatedRouteStub;
let routeData;
let authorizationDataService: AuthorizationDataService;
@@ -61,6 +72,10 @@ describe('FullItemPageComponent', () => {
data: observableOf(routeData)
});
authorizationDataService = jasmine.createSpyObj('authorizationDataService', {
isAuthorized: observableOf(false),
});
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot({
loader: {
@@ -74,6 +89,7 @@ describe('FullItemPageComponent', () => {
{ provide: ItemDataService, useValue: {} },
{ provide: MetadataService, useValue: metadataServiceStub },
{ provide: AuthService, useValue: authService },
{ provide: AuthorizationDataService, useValue: authorizationDataService },
],
schemas: [NO_ERRORS_SCHEMA]
@@ -111,4 +127,53 @@ describe('FullItemPageComponent', () => {
expect(simpleViewBtn).toBeFalsy();
});
}));
describe('when the item is withdrawn and the user is an admin', () => {
beforeEach(() => {
comp.isAdmin$ = observableOf(true);
comp.itemRD$ = new BehaviorSubject<RemoteData<Item>>(createSuccessfulRemoteDataObject(mockWithdrawnItem));
fixture.detectChanges();
});
it('should display the item', () => {
const objectLoader = fixture.debugElement.query(By.css('.full-item-info'));
expect(objectLoader.nativeElement).toBeDefined();
});
});
describe('when the item is withdrawn and the user is not an admin', () => {
beforeEach(() => {
comp.itemRD$ = new BehaviorSubject<RemoteData<Item>>(createSuccessfulRemoteDataObject(mockWithdrawnItem));
fixture.detectChanges();
});
it('should not display the item', () => {
const objectLoader = fixture.debugElement.query(By.css('.full-item-info'));
expect(objectLoader).toBeNull();
});
});
describe('when the item is not withdrawn and the user is an admin', () => {
beforeEach(() => {
comp.isAdmin$ = observableOf(true);
comp.itemRD$ = new BehaviorSubject<RemoteData<Item>>(createSuccessfulRemoteDataObject(mockItem));
fixture.detectChanges();
});
it('should display the item', () => {
const objectLoader = fixture.debugElement.query(By.css('.full-item-info'));
expect(objectLoader.nativeElement).toBeDefined();
});
});
describe('when the item is not withdrawn and the user is not an admin', () => {
beforeEach(() => {
comp.itemRD$ = new BehaviorSubject<RemoteData<Item>>(createSuccessfulRemoteDataObject(mockItem));
fixture.detectChanges();
});
it('should display the item', () => {
const objectLoader = fixture.debugElement.query(By.css('.full-item-info'));
expect(objectLoader.nativeElement).toBeDefined();
});
});
});

View File

@@ -15,6 +15,7 @@ import { fadeInOut } from '../../shared/animations/fade';
import { hasValue } from '../../shared/empty.util';
import { AuthService } from '../../core/auth/auth.service';
import { Location } from '@angular/common';
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
/**
@@ -46,8 +47,9 @@ export class FullItemPageComponent extends ItemPageComponent implements OnInit,
router: Router,
items: ItemDataService,
authService: AuthService,
authorizationService: AuthorizationDataService,
private _location: Location) {
super(route, router, items, authService);
super(route, router, items, authService, authorizationService);
}
/*** AoT inheritance fix, will hopefully be resolved in the near future **/

View File

@@ -4,7 +4,7 @@
<ds-item-alerts [item]="item"></ds-item-alerts>
<ds-item-versions-notice [item]="item"></ds-item-versions-notice>
<ds-view-tracker [object]="item"></ds-view-tracker>
<ds-listable-object-component-loader [object]="item" [viewMode]="viewMode"></ds-listable-object-component-loader>
<ds-listable-object-component-loader *ngIf="!item.isWithdrawn || (isAdmin$|async)" [object]="item" [viewMode]="viewMode"></ds-listable-object-component-loader>
<ds-item-versions class="mt-2" [item]="item" [displayActions]="false"></ds-item-versions>
</div>
</div>

View File

@@ -21,6 +21,7 @@ import {
} from '../../shared/remote-data.utils';
import { AuthService } from '../../core/auth/auth.service';
import { createPaginatedList } from '../../shared/testing/utils.test';
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
const mockItem: Item = Object.assign(new Item(), {
bundles: createSuccessfulRemoteDataObject$(createPaginatedList([])),
@@ -28,10 +29,18 @@ const mockItem: Item = Object.assign(new Item(), {
relationships: createRelationshipsObservable()
});
const mockWithdrawnItem: Item = Object.assign(new Item(), {
bundles: createSuccessfulRemoteDataObject$(createPaginatedList([])),
metadata: [],
relationships: createRelationshipsObservable(),
isWithdrawn: true
});
describe('ItemPageComponent', () => {
let comp: ItemPageComponent;
let fixture: ComponentFixture<ItemPageComponent>;
let authService: AuthService;
let authorizationDataService: AuthorizationDataService;
const mockMetadataService = {
/* tslint:disable:no-empty */
@@ -48,6 +57,9 @@ describe('ItemPageComponent', () => {
isAuthenticated: observableOf(true),
setRedirectUrl: {}
});
authorizationDataService = jasmine.createSpyObj('authorizationDataService', {
isAuthorized: observableOf(false),
});
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot({
@@ -63,6 +75,7 @@ describe('ItemPageComponent', () => {
{ provide: MetadataService, useValue: mockMetadataService },
{ provide: Router, useValue: {} },
{ provide: AuthService, useValue: authService },
{ provide: AuthorizationDataService, useValue: authorizationDataService },
],
schemas: [NO_ERRORS_SCHEMA]
@@ -102,4 +115,53 @@ describe('ItemPageComponent', () => {
});
});
describe('when the item is withdrawn and the user is an admin', () => {
beforeEach(() => {
comp.isAdmin$ = observableOf(true);
comp.itemRD$ = createSuccessfulRemoteDataObject$(mockWithdrawnItem);
fixture.detectChanges();
});
it('should display the item', () => {
const objectLoader = fixture.debugElement.query(By.css('ds-listable-object-component-loader'));
expect(objectLoader.nativeElement).toBeDefined();
});
});
describe('when the item is withdrawn and the user is not an admin', () => {
beforeEach(() => {
comp.itemRD$ = createSuccessfulRemoteDataObject$(mockWithdrawnItem);
fixture.detectChanges();
});
it('should not display the item', () => {
const objectLoader = fixture.debugElement.query(By.css('ds-listable-object-component-loader'));
expect(objectLoader).toBeNull();
});
});
describe('when the item is not withdrawn and the user is an admin', () => {
beforeEach(() => {
comp.isAdmin$ = observableOf(true);
comp.itemRD$ = createSuccessfulRemoteDataObject$(mockItem);
fixture.detectChanges();
});
it('should display the item', () => {
const objectLoader = fixture.debugElement.query(By.css('ds-listable-object-component-loader'));
expect(objectLoader.nativeElement).toBeDefined();
});
});
describe('when the item is not withdrawn and the user is not an admin', () => {
beforeEach(() => {
comp.itemRD$ = createSuccessfulRemoteDataObject$(mockItem);
fixture.detectChanges();
});
it('should display the item', () => {
const objectLoader = fixture.debugElement.query(By.css('ds-listable-object-component-loader'));
expect(objectLoader.nativeElement).toBeDefined();
});
});
});

View File

@@ -13,6 +13,8 @@ import { getAllSucceededRemoteDataPayload, redirectOn4xx } from '../../core/shar
import { ViewMode } from '../../core/shared/view-mode.model';
import { AuthService } from '../../core/auth/auth.service';
import { getItemPageRoute } from '../item-page-routing-paths';
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
import { FeatureID } from '../../core/data/feature-authorization/feature-id';
/**
* This component renders a simple item page.
@@ -48,11 +50,17 @@ export class ItemPageComponent implements OnInit {
*/
itemPageRoute$: Observable<string>;
/**
* Whether the current user is an admin or not
*/
isAdmin$: Observable<boolean>;
constructor(
protected route: ActivatedRoute,
private router: Router,
private items: ItemDataService,
private authService: AuthService,
private authorizationService: AuthorizationDataService
) { }
/**
@@ -67,5 +75,7 @@ export class ItemPageComponent implements OnInit {
getAllSucceededRemoteDataPayload(),
map((item) => getItemPageRoute(item))
);
this.isAdmin$ = this.authorizationService.isAuthorized(FeatureID.AdministratorOf);
}
}

View File

@@ -8,7 +8,7 @@
<div class="add w-100" display="dynamic" placement="bottom-right"
ngbDropdown
*ngIf="(moreThanOne$ | async)">
<button class="btn btn-lg btn-outline-primary mt-1 ml-2" id="dropdownSubmission" ngbDropdownToggle
<button class="btn btn-lg btn-outline-primary mt-1 ml-2" id="dropdownImport" ngbDropdownToggle
type="button" [disabled]="!(initialized$|async)"
attr.aria-label="{{'mydspace.new-submission-external' | translate}}"
title="{{'mydspace.new-submission-external' | translate}}">
@@ -17,8 +17,8 @@
</button>
<div ngbDropdownMenu
class="dropdown-menu"
id="entityControlsDropdownMenu"
aria-labelledby="dropdownSubmission">
id="importControlsDropdownMenu"
aria-labelledby="dropdownImport">
<ds-entity-dropdown [isSubmission]="false" (selectionChange)="openPage($event)"></ds-entity-dropdown>
</div>
</div>

View File

@@ -10,7 +10,7 @@
flex: initial;
}
#entityControlsDropdownMenu {
#importControlsDropdownMenu {
min-width: 18rem;
box-shadow: $btn-focus-box-shadow;
}

View File

@@ -7,7 +7,9 @@
ngbDropdown
*ngIf="(moreThanOne$ | async)">
<button class="btn btn-lg btn-primary mt-1 ml-2" id="dropdownSubmission" ngbDropdownToggle
type="button" [disabled]="!(initialized$|async)">
type="button" [disabled]="!(initialized$|async)"
attr.aria-label="{{'mydspace.new-submission' | translate}}"
title="{{'mydspace.new-submission' | translate}}">
<i class="fa fa-plus-circle" aria-hidden="true"></i>
<span class="caret"></span>
</button>

View File

@@ -3,8 +3,8 @@
<form [formGroup]="searchForm" (ngSubmit)="onSubmit(searchForm.value)" autocomplete="on">
<input #searchInput [@toggleAnimation]="isExpanded" [attr.aria-label]="('nav.search' | translate)" name="query"
formControlName="query" type="text" placeholder="{{searchExpanded ? ('nav.search' | translate) : ''}}"
class="d-inline-block bg-transparent position-absolute form-control dropdown-menu-right p-1">
<a class="submit-icon" [routerLink]="" (click)="searchExpanded ? onSubmit(searchForm.value) : expand()">
class="d-inline-block bg-transparent position-absolute form-control dropdown-menu-right p-1" data-test="header-search-box">
<a class="submit-icon" [routerLink]="" (click)="searchExpanded ? onSubmit(searchForm.value) : expand()" data-test="header-search-icon">
<em class="fas fa-search fa-lg fa-fw"></em>
</a>
</form>

View File

@@ -1,4 +1,4 @@
<div *ngIf="!dismissed" class="alert {{type}} alert-dismissible fade show w-100" role="alert" [@enterLeave]="animate">
<div *ngIf="!dismissed" class="alert {{type}} alert-dismissible fade show w-100 p-3" role="alert" [@enterLeave]="animate">
<span *ngIf="content" [innerHTML]="content | translate"></span>
<ng-content></ng-content>

View File

@@ -1,7 +1,7 @@
<ul class="navbar-nav" [ngClass]="{'mr-auto': (isXsOrSm$ | async)}">
<li *ngIf="!(isAuthenticated | async) && !(isXsOrSm$ | async) && (showAuth | async)" class="nav-item"
(click)="$event.stopPropagation();">
<div ngbDropdown #loginDrop display="dynamic" placement="bottom-right" class="d-inline-block" @fadeInOut>
<div ngbDropdown #loginDrop display="dynamic" placement="bottom-right" class="d-inline-block" data-test="login-menu" @fadeInOut>
<a href="javascript:void(0);" class="dropdownLogin px-1 " [attr.aria-label]="'nav.login' |translate" (click)="$event.preventDefault()" ngbDropdownToggle>
{{ 'nav.login' | translate }}
</a>
@@ -17,7 +17,7 @@
{{ 'nav.login' | translate }}<span class="sr-only">(current)</span>
</a>
</li>
<li *ngIf="(isAuthenticated | async) && !(isXsOrSm$ | async) && (showAuth | async)" class="nav-item">
<li *ngIf="(isAuthenticated | async) && !(isXsOrSm$ | async) && (showAuth | async)" class="nav-item" data-test="user-menu">
<div ngbDropdown display="dynamic" placement="bottom-right" class="d-inline-block" @fadeInOut>
<a href="javascript:void(0);" role="button" [attr.aria-label]="'nav.logout' |translate" (click)="$event.preventDefault()" [title]="'nav.logout' | translate" class="px-1" ngbDropdownToggle>
<i class="fas fa-user-circle fa-lg fa-fw"></i></a>

View File

@@ -1,46 +1,19 @@
<ng-container *ngVar="(objects$ | async) as objects">
<h3 [ngClass]="{'sr-only': parentname }" >{{title | translate}}</h3>
<h3 [ngClass]="{'sr-only': parentname }">{{title | translate}}</h3>
<ng-container *ngComponentOutlet="getStartsWithComponent(); injector: objectInjector;"></ng-container>
<div *ngIf="objects?.hasSucceeded && !objects?.isLoading && objects?.payload?.page.length > 0" @fadeIn>
<div *ngIf="!enableArrows">
<ds-viewable-collection
[config]="paginationConfig"
[sortConfig]="sortConfig"
[objects]="objects">
</ds-viewable-collection>
</div>
<div *ngIf="enableArrows">
<div class="row">
<div class="col-12">
<div *ngIf="shouldDisplayResetButton$ |async" class="d-inline-block float-left reset">
<a class="btn btn-secondary" [routerLink]="[]"
[queryParams]="{startsWith: null, value: null}" queryParamsHandling="merge"><i class="fas fa-arrow-left"></i> {{'browse.back.all-results' | translate}}</a>
</div>
<div *ngIf="!hideGear" ngbDropdown #paginationControls="ngbDropdown" placement="bottom-right" class="d-inline-block float-right">
<button class="btn btn-secondary" id="paginationControls" [title]="'pagination.options.description' | translate" [attr.aria-label]="'pagination.options.description' | translate" ngbDropdownToggle><i class="fas fa-cog" aria-hidden="true"></i></button>
<div id="paginationControlsDropdownMenu" aria-labelledby="paginationControls" ngbDropdownMenu>
<h6 class="dropdown-header">{{ 'pagination.results-per-page' | translate}}</h6>
<button class="dropdown-item page-size-change" *ngFor="let item of paginationConfig?.pageSizeOptions" (click)="doPageSizeChange(item)"><i [ngClass]="{'invisible': item != paginationConfig?.pageSize}" class="fas fa-check" aria-hidden="true"></i> {{item}} </button>
<h6 class="dropdown-header">{{ 'pagination.sort-direction' | translate}}</h6>
<button class="dropdown-item sort-direction-change" *ngFor="let direction of (sortDirections | dsKeys)" (click)="doSortDirectionChange(direction.value)"><i [ngClass]="{'invisible': direction.value !== sortConfig?.direction}" class="fas fa-check" aria-hidden="true"></i> {{'sorting.' + direction.key | translate}} </button>
</div>
</div>
</div>
<div *ngIf="shouldDisplayResetButton$ |async" class="mb-2 reset">
<a class="btn btn-secondary" [routerLink]="[]"
[queryParams]="{startsWith: null, value: null}" queryParamsHandling="merge"><i class="fas fa-arrow-left"></i> {{'browse.back.all-results' | translate}}</a>
</div>
<ul class="list-unstyled">
<li *ngFor="let object of objects?.payload?.page" class="mt-4 mb-4">
<ds-listable-object-component-loader [object]="object" [viewMode]="viewMode"></ds-listable-object-component-loader>
</li>
</ul>
<div>
<button id="nav-prev" type="button" class="btn btn-outline-primary float-left" (click)="goPrev()" [disabled]="objects?.payload?.currentPage <= 1"><i class="fas fa-angle-left"></i> {{'browse.previous.button' |translate}}</button>
<button id="nav-next" type="button" class="btn btn-outline-primary float-right" (click)="goNext()" [disabled]="objects?.payload?.currentPage >= objects?.payload?.totalPages">
<span [ngbTooltip]="objects?.payload?.currentPage >= objects?.payload?.totalPages ? getTranslation('browse.next.button.disabled.tooltip') : null">
<i class="fas fa-angle-right"></i> {{'browse.next.button' |translate}}
</span>
</button>
</div>
</div>
<ds-viewable-collection
[config]="paginationConfig"
[sortConfig]="sortConfig"
[showPaginator]="showPaginator"
[objects]="objects"
(prev)="goPrev()"
(next)="goNext()">
</ds-viewable-collection>
</div>
<ds-loading *ngIf="!objects || objects?.isLoading" message="{{'loading.browse-by' | translate}}"></ds-loading>
<ds-error *ngIf="objects?.hasFailed" message="{{'error.browse-by' | translate}}"></ds-error>
@@ -55,3 +28,4 @@
</div>
</div>
</ng-container>

View File

@@ -4,20 +4,17 @@ import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { By } from '@angular/platform-browser';
import { Component, NO_ERRORS_SCHEMA } from '@angular/core';
import { of as observableOf } from 'rxjs';
import { SharedModule } from '../shared.module';
import { CommonModule } from '@angular/common';
import { Item } from '../../core/shared/item.model';
import { buildPaginatedList } from '../../core/data/paginated-list.model';
import { PageInfo } from '../../core/shared/page-info.model';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { StoreModule } from '@ngrx/store';
import { TranslateLoaderMock } from '../mocks/translate-loader.mock';
import { RouterTestingModule } from '@angular/router/testing';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { PaginationComponentOptions } from '../pagination/pagination-component-options.model';
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
import { createSuccessfulRemoteDataObject$ } from '../remote-data.utils';
import { storeModuleConfig } from '../../app.reducer';
import { PaginationService } from '../../core/pagination/pagination.service';
import { PaginationServiceStub } from '../testing/pagination-service.stub';
import { ListableObjectComponentLoaderComponent } from '../object-collection/shared/listable-object/listable-object-component-loader.component';
@@ -30,6 +27,9 @@ import {
import { BrowseEntry } from '../../core/shared/browse-entry.model';
import { ITEM } from '../../core/shared/item.resource-type';
import { ThemeService } from '../theme-support/theme.service';
import { SelectableListService } from '../object-list/selectable-list/selectable-list.service';
import { HostWindowServiceStub } from '../testing/host-window-service.stub';
import { HostWindowService } from '../host-window.service';
import SpyObj = jasmine.SpyObj;
@listableObjectComponent(BrowseEntry, ViewMode.ListElement, DEFAULT_CONTEXT, 'custom')
@@ -37,7 +37,8 @@ import SpyObj = jasmine.SpyObj;
selector: 'ds-browse-entry-list-element',
template: ''
})
class MockThemedBrowseEntryListElementComponent {}
class MockThemedBrowseEntryListElementComponent {
}
import { RouteService } from '../../core/services/route.service';
import { routeServiceStub } from '../testing/route-service.stub';
@@ -85,10 +86,7 @@ describe('BrowseByComponent', () => {
TestBed.configureTestingModule({
imports: [
CommonModule,
TranslateModule.forRoot(),
SharedModule,
NgbModule,
StoreModule.forRoot({}, storeModuleConfig),
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
@@ -96,14 +94,16 @@ describe('BrowseByComponent', () => {
}
}),
RouterTestingModule,
BrowserAnimationsModule
NoopAnimationsModule
],
declarations: [],
providers: [
{provide: PaginationService, useValue: paginationService},
{provide: MockThemedBrowseEntryListElementComponent},
{ provide: PaginationService, useValue: paginationService },
{ provide: MockThemedBrowseEntryListElementComponent },
{ provide: ThemeService, useValue: themeService },
{provide: RouteService, useValue: routeServiceStub}
{provide: RouteService, useValue: routeServiceStub},
{ provide: SelectableListService, useValue: {} },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(800) },
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
@@ -132,66 +132,7 @@ describe('BrowseByComponent', () => {
expect(fixture.debugElement.query(By.css('ds-viewable-collection'))).toBeDefined();
});
describe('when enableArrows is true and objects are defined', () => {
beforeEach(() => {
comp.enableArrows = true;
comp.objects$ = mockItemsRD$;
comp.paginationConfig = paginationConfig;
comp.sortConfig = Object.assign(new SortOptions('dc.title', SortDirection.ASC));
fixture.detectChanges();
});
describe('when clicking the previous arrow button', () => {
beforeEach(() => {
spyOn(comp.prev, 'emit');
fixture.debugElement.query(By.css('#nav-prev')).triggerEventHandler('click', null);
fixture.detectChanges();
});
it('should emit a signal to the EventEmitter', () => {
expect(comp.prev.emit).toHaveBeenCalled();
});
});
describe('when clicking the next arrow button', () => {
beforeEach(() => {
spyOn(comp.next, 'emit');
fixture.debugElement.query(By.css('#nav-next')).triggerEventHandler('click', null);
fixture.detectChanges();
});
it('should emit a signal to the EventEmitter', () => {
expect(comp.next.emit).toHaveBeenCalled();
});
});
describe('when clicking a different page size', () => {
beforeEach(() => {
spyOn(comp.pageSizeChange, 'emit');
fixture.debugElement.query(By.css('.page-size-change')).triggerEventHandler('click', null);
fixture.detectChanges();
});
it('should call the updateRoute method from the paginationService', () => {
expect(paginationService.updateRoute).toHaveBeenCalledWith('test-pagination', {pageSize: paginationConfig.pageSizeOptions[0]});
});
});
describe('when clicking a different sort direction', () => {
beforeEach(() => {
spyOn(comp.sortDirectionChange, 'emit');
fixture.debugElement.query(By.css('.sort-direction-change')).triggerEventHandler('click', null);
fixture.detectChanges();
});
it('should call the updateRoute method from the paginationService', () => {
expect(paginationService.updateRoute).toHaveBeenCalledWith('test-pagination', {sortDirection: 'ASC'});
});
});
});
describe('when enableArrows is true and browseEntries are provided', () => {
describe('when showPaginator is true and browseEntries are provided', () => {
let browseEntries;
beforeEach(() => {
@@ -212,7 +153,7 @@ describe('BrowseByComponent', () => {
}),
];
comp.enableArrows = true;
comp.showPaginator = true;
comp.objects$ = createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), browseEntries));
comp.paginationConfig = paginationConfig;
comp.sortConfig = Object.assign(new SortOptions('dc.title', SortDirection.ASC));

View File

@@ -71,30 +71,30 @@ export class BrowseByComponent implements OnInit {
/**
* Whether or not the pagination should be rendered as simple previous and next buttons instead of the normal pagination
*/
@Input() enableArrows = false;
@Input() showPaginator = false;
/**
* If enableArrows is set to true, should it hide the options gear?
* It is used to hide or show gear
*/
@Input() hideGear = false;
/**
* If enableArrows is set to true, emit when the previous button is clicked
* Emits event when prev button clicked
*/
@Output() prev = new EventEmitter<boolean>();
/**
* If enableArrows is set to true, emit when the next button is clicked
* Emits event when next button clicked
*/
@Output() next = new EventEmitter<boolean>();
/**
* If enableArrows is set to true, emit when the page size is changed
* Emits event when page size is changed
*/
@Output() pageSizeChange = new EventEmitter<number>();
/**
* If enableArrows is set to true, emit when the sort direction is changed
* Emits event when page sort direction is changed
*/
@Output() sortDirectionChange = new EventEmitter<SortDirection>();
@@ -116,7 +116,6 @@ export class BrowseByComponent implements OnInit {
public constructor(private injector: Injector,
protected paginationService: PaginationService,
private routeService: RouteService,
protected translate: TranslateService
) {
}
@@ -175,8 +174,4 @@ export class BrowseByComponent implements OnInit {
);
}
getTranslation(key: string): Observable<string> {
return this.translate.instant(key);
}
}

View File

@@ -5,6 +5,7 @@
</legend>
<ds-number-picker
tabindex="1"
[id]="model.id + '_year'"
[disabled]="model.disabled"
[min]="minYear"
[max]="maxYear"
@@ -21,6 +22,7 @@
<ds-number-picker
tabindex="2"
[id]="model.id + '_month'"
[min]="minMonth"
[max]="maxMonth"
[name]="'month'"
@@ -36,6 +38,7 @@
<ds-number-picker
tabindex="3"
[id]="model.id + '_day'"
[min]="minDay"
[max]="maxDay"
[name]="'day'"

View File

@@ -1,8 +1,13 @@
<div>
<div *ngIf="item && !item.isDiscoverable" class="private-warning">
<ds-alert [type]="AlertTypeEnum.Warning" [content]="'item.alerts.private' | translate"></ds-alert>
</div>
<div *ngIf="item && item.isWithdrawn" class="withdrawn-warning">
<ds-alert [type]="AlertTypeEnum.Warning" [content]="'item.alerts.withdrawn' | translate"></ds-alert>
</div>
<div *ngIf="item && !item.isDiscoverable" class="private-warning">
<ds-alert [type]="AlertTypeEnum.Warning" [content]="'item.alerts.private' | translate"></ds-alert>
</div>
<div *ngIf="item && item.isWithdrawn" class="withdrawn-warning">
<ds-alert [type]="AlertTypeEnum.Warning">
<div class="d-flex justify-content-between flex-wrap">
<span class="align-self-center">{{'item.alerts.withdrawn' | translate}}</span>
<a routerLink="/home" class="btn btn-primary btn-sm">{{"404.link.home-page" | translate}}</a>
</div>
</ds-alert>
</div>
</div>

View File

@@ -8,6 +8,6 @@
</ng-container>
<div class="dropdown-divider"></div>
<a class="dropdown-item" *ngIf="canRegister$ | async" [routerLink]="[getRegisterRoute()]">{{"login.form.new-user" | translate}}</a>
<a class="dropdown-item" [routerLink]="[getForgotRoute()]">{{"login.form.forgot-password" | translate}}</a>
<a class="dropdown-item" *ngIf="canRegister$ | async" [routerLink]="[getRegisterRoute()]" data-test="register">{{"login.form.new-user" | translate}}</a>
<a class="dropdown-item" [routerLink]="[getForgotRoute()]" data-test="forgot">{{"login.form.forgot-password" | translate}}</a>
</div>

View File

@@ -9,7 +9,8 @@
formControlName="email"
placeholder="{{'login.form.email' | translate}}"
required
type="email">
type="email"
data-test="email">
<label class="sr-only">{{"login.form.password" | translate}}</label>
<input [attr.aria-label]="'login.form.password' |translate"
autocomplete="off"
@@ -17,12 +18,13 @@
placeholder="{{'login.form.password' | translate}}"
formControlName="password"
required
type="password">
type="password"
data-test="password">
<div *ngIf="(error | async) && hasError" class="alert alert-danger" role="alert"
@fadeOut>{{ (error | async) | translate }}</div>
<div *ngIf="(message | async) && hasMessage" class="alert alert-info" role="alert"
@fadeOut>{{ (message | async) | translate }}</div>
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit"
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit" data-test="login-button"
[disabled]="!form.valid"><i class="fas fa-sign-in-alt"></i> {{"login.form.submit" | translate}}</button>
</form>

View File

@@ -2,5 +2,5 @@
<div *ngIf="(error | async)" class="alert alert-danger" role="alert" @fadeOut>{{ error | async }}</div>
<button class="btn btn-lg btn-primary btn-block mt-3" (click)="logOut()"><i class="fas fa-sign-out-alt"></i> {{"logout.form.submit" | translate}}</button>
<button class="btn btn-lg btn-primary btn-block mt-3" (click)="logOut()" data-test="logout-button"><i class="fas fa-sign-out-alt"></i> {{"logout.form.submit" | translate}}</button>
</div>

View File

@@ -1,4 +1,5 @@
<a class="btn btn-primary mt-1 mb-3"
id="{{'edit_' + object.id}}"
ngbTooltip="{{'submission.workflow.generic.edit-help' | translate}}"
[routerLink]="['/workspaceitems/' + object.id + '/edit']"
role="button">
@@ -6,6 +7,7 @@
</a>
<button type="button"
id="{{'delete_' + object.id}}"
class="btn btn-danger mt-1 mb-3"
ngbTooltip="{{'submission.workflow.generic.delete-help' | translate}}"
(click)="$event.preventDefault();confirmDiscard(content)">
@@ -16,7 +18,7 @@
<ng-template #content let-c="close" let-d="dismiss">
<div class="modal-header">
<h4 class="modal-title text-danger">{{'submission.general.discard.confirm.title' | translate}}</h4>
<button type="button" class="close" aria-label="Close" (click)="d('cancel')">
<button type="button" id="delete_close" class="close" aria-label="Close" (click)="d('cancel')">
<span aria-hidden="true">&times;</span>
</button>
</div>
@@ -24,7 +26,7 @@
<p>{{'submission.general.discard.confirm.info' | translate}}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="c('cancel')">{{'submission.general.discard.confirm.cancel' | translate}}</button>
<button type="button" class="btn btn-danger" (click)="c('ok')">{{'submission.general.discard.confirm.submit' | translate}}</button>
<button type="button" id="delete_cancel" class="btn btn-secondary" (click)="c('cancel')">{{'submission.general.discard.confirm.cancel' | translate}}</button>
<button type="button" id="delete_confirm"class="btn btn-danger" (click)="c('ok')">{{'submission.general.discard.confirm.submit' | translate}}</button>
</div>
</ng-template>

View File

@@ -9,6 +9,7 @@
<span class="sr-only">Increment</span>
</button>
<input
id="{{id}}"
type="text"
class="form-control d-inline-block text-center"
maxlength="{{size}}"
@@ -22,7 +23,7 @@
[readonly]="disabled"
[disabled]="disabled"
[ngClass]="{'is-invalid': invalid}"
aria-label="name"
title="{{placeholder}}"
>
<button
class="btn btn-link-focus"

View File

@@ -48,6 +48,7 @@ describe('NumberPickerComponent test suite', () => {
[disabled]="disabled"
[min]="min"
[max]="max"
[id]="'ds_test_field'"
[name]="'test'"
[size]="size"
[(ngModel)]="initValue"

View File

@@ -12,7 +12,7 @@ import { isEmpty } from '../empty.util';
})
export class NumberPickerComponent implements OnInit, ControlValueAccessor {
@Input() id: string;
@Input() step: number;
@Input() min: number;
@Input() max: number;

View File

@@ -6,6 +6,7 @@
[linkType]="linkType"
[context]="context"
[hidePaginationDetail]="hidePaginationDetail"
[showPaginator]="showPaginator"
(paginationChange)="onPaginationChange($event)"
(pageChange)="onPageChange($event)"
(pageSizeChange)="onPageSizeChange($event)"
@@ -19,6 +20,8 @@
[importConfig]="importConfig"
(importObject)="importObject.emit($event)"
(contentChange)="contentChange.emit()"
(prev)="goPrev()"
(next)="goNext()"
*ngIf="(currentMode$ | async) === viewModeEnum.ListElement">
</ds-object-list>
@@ -29,6 +32,7 @@
[linkType]="linkType"
[context]="context"
[hidePaginationDetail]="hidePaginationDetail"
[showPaginator]="showPaginator"
(paginationChange)="onPaginationChange($event)"
(pageChange)="onPageChange($event)"
(pageSizeChange)="onPageSizeChange($event)"
@@ -44,6 +48,7 @@
[linkType]="linkType"
[context]="context"
[hidePaginationDetail]="hidePaginationDetail"
[showPaginator]="showPaginator"
*ngIf="(currentMode$ | async) === viewModeEnum.DetailedListElement">
</ds-object-detail>

View File

@@ -88,6 +88,11 @@ export class ObjectCollectionComponent implements OnInit {
*/
@Input() hidePaginationDetail = false;
/**
* Whether or not the pagination should be rendered as simple previous and next buttons instead of the normal pagination
*/
@Input() showPaginator = true;
/**
* the page info of the list
*/
@@ -122,6 +127,16 @@ export class ObjectCollectionComponent implements OnInit {
*/
@Output() sortFieldChange: EventEmitter<string> = new EventEmitter<string>();
/**
* If showPaginator is set to true, emit when the previous button is clicked
*/
@Output() prev = new EventEmitter<boolean>();
/**
* If showPaginator is set to true, emit when the next button is clicked
*/
@Output() next = new EventEmitter<boolean>();
/**
* Emits the current view mode
*/
@@ -192,4 +207,18 @@ export class ObjectCollectionComponent implements OnInit {
this.paginationChange.emit(event);
}
/**
* Go to the previous page
*/
goPrev() {
this.prev.emit(true);
}
/**
* Go to the next page
*/
goNext() {
this.next.emit(true);
}
}

View File

@@ -3,14 +3,19 @@
[pageInfoState]="objects?.payload"
[collectionSize]="objects?.payload?.totalElements"
[sortOptions]="sortConfig"
[objects]="objects"
[hideGear]="hideGear"
[hidePaginationDetail]="hidePaginationDetail"
[hidePagerWhenSinglePage]="hidePagerWhenSinglePage"
[showPaginator]="showPaginator"
(pageChange)="onPageChange($event)"
(pageSizeChange)="onPageSizeChange($event)"
(sortDirectionChange)="onSortDirectionChange($event)"
(sortFieldChange)="onSortFieldChange($event)"
(paginationChange)="onPaginationChange($event)">
(paginationChange)="onPaginationChange($event)"
(prev)="goPrev()"
(next)="goNext()"
>
<div class="row mt-2" *ngIf="objects?.hasSucceeded" @fadeIn>
<div class="col"
*ngFor="let object of objects?.payload?.page">

View File

@@ -66,6 +66,21 @@ export class ObjectDetailComponent {
*/
@Input() context: Context;
/**
* Whether or not the pagination should be rendered as simple previous and next buttons instead of the normal pagination
*/
@Input() showPaginator = true;
/**
* If showPaginator is set to true, emit when the previous button is clicked
*/
@Output() prev = new EventEmitter<boolean>();
/**
* If showPaginator is set to true, emit when the next button is clicked
*/
@Output() next = new EventEmitter<boolean>();
/**
* The list of objects to paginate
*/
@@ -168,4 +183,18 @@ export class ObjectDetailComponent {
this.paginationChange.emit(event);
}
/**
* Go to the previous page
*/
goPrev() {
this.prev.emit(true);
}
/**
* Go to the next page
*/
goNext() {
this.next.emit(true);
}
}

View File

@@ -1,5 +1,5 @@
<div class="card">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="card-img-top">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="card-img-top" [attr.title]="'search.results.view-result' | translate">
<ds-thumbnail [thumbnail]="(object.logo | async)?.payload" [limitWidth]="false">
</ds-thumbnail>
</a>
@@ -11,7 +11,7 @@
<h4 class="card-title">{{object.name}}</h4>
<p *ngIf="object.shortDescription" class="card-text">{{object.shortDescription}}</p>
<div *ngIf="linkType != linkTypes.None" class="text-center">
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="lead btn btn-primary viewButton">View</a>
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
</div>
</div>
</div>

View File

@@ -4,6 +4,7 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
import { By } from '@angular/platform-browser';
import { Collection } from '../../../core/shared/collection.model';
import { LinkService } from '../../../core/cache/builders/link.service';
import { TranslateModule } from '@ngx-translate/core';
let collectionGridElementComponent: CollectionGridElementComponent;
let fixture: ComponentFixture<CollectionGridElementComponent>;
@@ -37,6 +38,9 @@ const linkService = jasmine.createSpyObj('linkService', {
describe('CollectionGridElementComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot()
],
declarations: [CollectionGridElementComponent],
providers: [
{ provide: 'objectElementProvider', useValue: (mockCollectionWithAbstract) },

View File

@@ -1,5 +1,5 @@
<div class="card">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', object.id]" class="card-img-top">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', object.id]" class="card-img-top" [attr.title]="'search.results.view-result' | translate">
<ds-thumbnail [thumbnail]="(object.logo | async)?.payload" [limitWidth]="false">
</ds-thumbnail>
</a>
@@ -11,7 +11,7 @@
<h4 class="card-title">{{object.name}}</h4>
<p *ngIf="object.shortDescription" class="card-text">{{object.shortDescription}}</p>
<div *ngIf="linkType != linkTypes.None" class="text-center">
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', object.id]" class="lead btn btn-primary viewButton">View</a>
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', object.id]" class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
</div>
</div>
</div>

View File

@@ -4,6 +4,7 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
import { By } from '@angular/platform-browser';
import { Community } from '../../../core/shared/community.model';
import { LinkService } from '../../../core/cache/builders/link.service';
import { TranslateModule } from '@ngx-translate/core';
let communityGridElementComponent: CommunityGridElementComponent;
let fixture: ComponentFixture<CommunityGridElementComponent>;
@@ -37,6 +38,9 @@ const linkService = jasmine.createSpyObj('linkService', {
describe('CommunityGridElementComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot()
],
declarations: [CommunityGridElementComponent],
providers: [
{ provide: 'objectElementProvider', useValue: (mockCommunityWithAbstract) },

View File

@@ -4,16 +4,21 @@
[collectionSize]="objects?.payload?.totalElements"
[sortOptions]="sortConfig"
[hideGear]="hideGear"
[objects]="objects"
[hidePagerWhenSinglePage]="hidePagerWhenSinglePage"
[hidePaginationDetail]="hidePaginationDetail"
[showPaginator]="showPaginator"
(pageChange)="onPageChange($event)"
(pageSizeChange)="onPageSizeChange($event)"
(sortDirectionChange)="onSortDirectionChange($event)"
(sortFieldChange)="onSortFieldChange($event)"
(paginationChange)="onPaginationChange($event)">
(paginationChange)="onPaginationChange($event)"
(prev)="goPrev()"
(next)="goNext()"
>
<div class="card-columns row" *ngIf="objects?.hasSucceeded">
<div class="card-column col col-sm-6 col-lg-4" *ngFor="let column of (columns$ | async)" @fadeIn>
<div class="card-element" *ngFor="let object of column">
<div class="card-element" *ngFor="let object of column" data-test="grid-object">
<ds-listable-object-component-loader [object]="object" [viewMode]="viewMode" [context]="context" [linkType]="linkType"></ds-listable-object-component-loader>
</div>
</div>
@@ -22,3 +27,4 @@
<ds-loading *ngIf="objects.isLoading" message="{{'loading.objects' | translate}}"></ds-loading>
</ds-pagination>

View File

@@ -49,6 +49,11 @@ export class ObjectGridComponent implements OnInit {
*/
@Input() sortConfig: SortOptions;
/**
* Whether or not the pagination should be rendered as simple previous and next buttons instead of the normal pagination
*/
@Input() showPaginator = true;
/**
* The whether or not the gear is hidden
*/
@@ -134,6 +139,17 @@ export class ObjectGridComponent implements OnInit {
* Event's payload equals to the newly selected sort field.
*/
@Output() sortFieldChange: EventEmitter<string> = new EventEmitter<string>();
/**
* If showPaginator is set to true, emit when the previous button is clicked
*/
@Output() prev = new EventEmitter<boolean>();
/**
* If showPaginator is set to true, emit when the next button is clicked
*/
@Output() next = new EventEmitter<boolean>();
data: any = {};
columns$: Observable<ListableObject[]>;
@@ -225,4 +241,18 @@ export class ObjectGridComponent implements OnInit {
this.paginationChange.emit(event);
}
/**
* Go to the previous page
*/
goPrev() {
this.prev.emit(true);
}
/**
* Go to the next page
*/
goNext() {
this.next.emit(true);
}
}

View File

@@ -1,5 +1,5 @@
<div class="card">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', dso.id]" class="card-img-top">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', dso.id]" class="card-img-top" [attr.title]="'search.results.view-result' | translate">
<ds-thumbnail [thumbnail]="(dso.logo | async)?.payload" [limitWidth]="false">
</ds-thumbnail>
</a>
@@ -12,7 +12,7 @@
<h4 class="card-title">{{dso.name}}</h4>
<p *ngIf="dso.shortDescription" class="card-text">{{dso.shortDescription}}</p>
<div *ngIf="linkType != linkTypes.None" class="text-center">
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', dso.id]" class="lead btn btn-primary viewButton">View</a>
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', dso.id]" class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
</div>
</div>
<ng-content></ng-content>

View File

@@ -20,6 +20,7 @@ import { TruncatePipe } from '../../../utils/truncate.pipe';
import { CollectionSearchResultGridElementComponent } from './collection-search-result-grid-element.component';
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { LinkService } from '../../../../core/cache/builders/link.service';
import { TranslateModule } from '@ngx-translate/core';
let collectionSearchResultGridElementComponent: CollectionSearchResultGridElementComponent;
let fixture: ComponentFixture<CollectionSearchResultGridElementComponent>;
@@ -60,6 +61,9 @@ const linkService = jasmine.createSpyObj('linkService', {
describe('CollectionSearchResultGridElementComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot()
],
declarations: [CollectionSearchResultGridElementComponent, TruncatePipe],
providers: [
{ provide: TruncatableService, useValue: truncatableServiceStub },

View File

@@ -1,5 +1,5 @@
<div class="card">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', dso.id]" class="card-img-top">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', dso.id]" class="card-img-top" [attr.title]="'search.results.view-result' | translate">
<ds-thumbnail [thumbnail]="(dso.logo | async)?.payload" [limitWidth]="false">
</ds-thumbnail>
</a>
@@ -12,7 +12,7 @@
<h4 class="card-title">{{dso.name}}</h4>
<p *ngIf="dso.shortDescription" class="card-text">{{dso.shortDescription}}</p>
<div *ngIf="linkType != linkTypes.None" class="text-center">
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', dso.id]" class="lead btn btn-primary viewButton">View</a>
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', dso.id]" class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
</div>
</div>
<ng-content></ng-content>

View File

@@ -20,6 +20,7 @@ import { TruncatePipe } from '../../../utils/truncate.pipe';
import { CommunitySearchResultGridElementComponent } from './community-search-result-grid-element.component';
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { LinkService } from '../../../../core/cache/builders/link.service';
import { TranslateModule } from '@ngx-translate/core';
let communitySearchResultGridElementComponent: CommunitySearchResultGridElementComponent;
let fixture: ComponentFixture<CommunitySearchResultGridElementComponent>;
@@ -60,6 +61,9 @@ const linkService = jasmine.createSpyObj('linkService', {
describe('CommunitySearchResultGridElementComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot()
],
declarations: [CommunitySearchResultGridElementComponent, TruncatePipe],
providers: [
{ provide: TruncatableService, useValue: truncatableServiceStub },

View File

@@ -4,7 +4,7 @@
<ng-content></ng-content>
</div>
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="card-img-top full-width">
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
<div>
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
</ds-thumbnail>
@@ -37,7 +37,7 @@
</p>
<div *ngIf="linkType != linkTypes.None" class="text-center">
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
class="lead btn btn-primary viewButton">View</a>
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
</div>
</div>
</ds-truncatable>

View File

@@ -4,6 +4,7 @@ import { TestBed, waitForAsync } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { Store } from '@ngrx/store';
import { TranslateModule } from '@ngx-translate/core';
import { Observable, of as observableOf } from 'rxjs';
import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service';
import { ObjectCacheService } from '../../../../../core/cache/object-cache.service';
@@ -99,7 +100,10 @@ export function getEntityGridElementTestComponent(component, searchResultWithMet
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [NoopAnimationsModule],
imports: [
NoopAnimationsModule,
TranslateModule.forRoot()
],
declarations: [component, TruncatePipe],
providers: [
{ provide: TruncatableService, useValue: truncatableServiceStub },

View File

@@ -2,17 +2,22 @@
[paginationOptions]="config"
[pageInfoState]="objects?.payload"
[collectionSize]="objects?.payload?.totalElements"
[objects]="objects"
[sortOptions]="sortConfig"
[hideGear]="hideGear"
[hidePagerWhenSinglePage]="hidePagerWhenSinglePage"
[hidePaginationDetail]="hidePaginationDetail"
[showPaginator]="showPaginator"
(pageChange)="onPageChange($event)"
(pageSizeChange)="onPageSizeChange($event)"
(sortDirectionChange)="onSortDirectionChange($event)"
(sortFieldChange)="onSortFieldChange($event)"
(paginationChange)="onPaginationChange($event)">
(paginationChange)="onPaginationChange($event)"
(prev)="goPrev()"
(next)="goNext()"
>
<ul *ngIf="objects?.hasSucceeded" class="list-unstyled" [ngClass]="{'ml-4': selectable}">
<li *ngFor="let object of objects?.payload?.page; let i = index; let last = last" class="mt-4 mb-4 d-flex" [class.border-bottom]="hasBorder && !last">
<li *ngFor="let object of objects?.payload?.page; let i = index; let last = last" class="mt-4 mb-4 d-flex" [class.border-bottom]="hasBorder && !last" data-test="list-object">
<ds-selectable-list-item-control *ngIf="selectable" [index]="i"
[object]="object"
[selectionConfig]="selectionConfig"

View File

@@ -76,11 +76,26 @@ export class ObjectListComponent {
*/
@Input() importConfig: { importLabel: string };
/**
* Whether or not the pagination should be rendered as simple previous and next buttons instead of the normal pagination
*/
@Input() showPaginator = true;
/**
* Emit when one of the listed object has changed.
*/
@Output() contentChange = new EventEmitter<any>();
/**
* If showPaginator is set to true, emit when the previous button is clicked
*/
@Output() prev = new EventEmitter<boolean>();
/**
* If showPaginator is set to true, emit when the next button is clicked
*/
@Output() next = new EventEmitter<boolean>();
/**
* The current listable objects
*/
@@ -192,4 +207,18 @@ export class ObjectListComponent {
onPaginationChange(event) {
this.paginationChange.emit(event);
}
/**
* Go to the previous page
*/
goPrev() {
this.prev.emit(true);
}
/**
* Go to the next page
*/
goNext() {
this.next.emit(true);
}
}

View File

@@ -20,16 +20,34 @@
</div>
<ng-content></ng-content>
<div *ngIf="shouldShowBottomPager |async" class="pagination justify-content-center clearfix bottom">
<ngb-pagination [boundaryLinks]="paginationOptions.boundaryLinks"
[collectionSize]="collectionSize"
[disabled]="paginationOptions.disabled"
[ellipses]="paginationOptions.ellipses"
[maxSize]="(isXs)?5:paginationOptions.maxSize"
[page]="(currentPage$|async)"
(pageChange)="doPageChange($event)"
[pageSize]="(pageSize$ |async)"
[rotate]="paginationOptions.rotate"
[size]="(isXs)?'sm':paginationOptions.size"></ngb-pagination>
<div *ngIf="shouldShowBottomPager | async">
<div *ngIf="showPaginator" class="pagination justify-content-center clearfix bottom">
<ngb-pagination [boundaryLinks]="paginationOptions.boundaryLinks"
[collectionSize]="collectionSize"
[disabled]="paginationOptions.disabled"
[ellipses]="paginationOptions.ellipses"
[maxSize]="(isXs)?5:paginationOptions.maxSize"
[page]="(currentPage$|async)"
(pageChange)="doPageChange($event)"
[pageSize]="(pageSize$ |async)"
[rotate]="paginationOptions.rotate"
[size]="(isXs)?'sm':paginationOptions.size">
</ngb-pagination>
</div>
<div *ngIf="!showPaginator" class="d-flex justify-content-between">
<button id="nav-prev" type="button" class="btn btn-outline-primary float-left"
(click)="goPrev()"
[disabled]="objects?.payload?.currentPage <= 1">
<i class="fas fa-angle-left"></i> {{'pagination.previous.button' |translate}}
</button>
<button id="nav-next" type="button" class="btn btn-outline-primary float-right"
(click)="goNext()"
[disabled]="objects?.payload?.currentPage >= objects?.payload?.totalPages">
<span [ngbTooltip]="objects?.payload?.currentPage >= objects?.payload?.totalPages ? ('browse.next.button.disabled.tooltip' |translate) : null">
<i class="fas fa-angle-right"></i> {{'pagination.next.button' |translate}}
</span>
</button>
</div>
</div>
</div>

View File

@@ -177,132 +177,206 @@ describe('Pagination component', () => {
}));
// synchronous beforeEach
beforeEach(() => {
html = `
<ds-pagination #p='paginationComponent'
[paginationOptions]='paginationOptions'
[sortOptions]='sortOptions'
[collectionSize]='collectionSize'
(pageChange)='pageChanged($event)'
(pageSizeChange)='pageSizeChanged($event)'>
<ul>
<li *ngFor='let item of collection | paginate: { itemsPerPage: paginationOptions.pageSize,
currentPage: paginationOptions.currentPage, totalItems: collectionSize }'> {{item}} </li>
</ul>
</ds-pagination>`;
describe('when showPaginator is false', () => {
// synchronous beforeEach
beforeEach(() => {
html = `
<ds-pagination #p='paginationComponent'
[paginationOptions]='paginationOptions'
[sortOptions]='sortOptions'
[collectionSize]='collectionSize'
(pageChange)='pageChanged($event)'
(pageSizeChange)='pageSizeChanged($event)'
>
<ul>
<li *ngFor='let item of collection | paginate: { itemsPerPage: paginationOptions.pageSize,
currentPage: paginationOptions.currentPage, totalItems: collectionSize }'> {{item}} </li>
</ul>
</ds-pagination>`;
testFixture = createTestComponent(html, TestComponent) as ComponentFixture<TestComponent>;
testComp = testFixture.componentInstance;
});
testFixture = createTestComponent(html, TestComponent) as ComponentFixture<TestComponent>;
testComp = testFixture.componentInstance;
it('should create Pagination Component', inject([PaginationComponent], (app: PaginationComponent) => {
expect(app).toBeDefined();
}));
});
it('should render', () => {
expect(testComp.paginationOptions.id).toEqual('test');
expect(testComp.paginationOptions.currentPage).toEqual(1);
expect(testComp.paginationOptions.pageSize).toEqual(10);
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '» Next']);
});
it('should create Pagination Component', inject([PaginationComponent], (app: PaginationComponent) => {
expect(app).toBeDefined();
}));
it('should render', () => {
expect(testComp.paginationOptions.id).toEqual('test');
expect(testComp.paginationOptions.currentPage).toEqual(1);
expect(testComp.paginationOptions.pageSize).toEqual(10);
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '» Next']);
});
it('should render and respond to page change', () => {
testComp.collectionSize = 30;
testFixture.detectChanges();
currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {currentPage: 3}));
testFixture.detectChanges();
expectPages(testFixture, ['« Previous', '1', '2', '+3', '-» Next']);
currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {currentPage: 2}));
testFixture.detectChanges();
expectPages(testFixture, ['« Previous', '1', '+2', '3', '» Next']);
});
it('should render and respond to collectionSize change', () => {
testComp.collectionSize = 30;
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '» Next']);
testComp.collectionSize = 40;
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '4', '» Next']);
});
it('should render and respond to pageSize change', () => {
const paginationComponent: PaginationComponent = testFixture.debugElement.query(By.css('ds-pagination')).references.p;
testComp.collectionSize = 30;
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '» Next']);
currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {pageSize: 5}));
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '4', '5', '6', '» Next']);
currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {pageSize: 10}));
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '» Next']);
currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {pageSize: 20}));
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '» Next']);
});
it('should emit pageSizeChange event with correct value', fakeAsync(() => {
const paginationComponent: PaginationComponent = testFixture.debugElement.query(By.css('ds-pagination')).references.p;
spyOn(testComp, 'pageSizeChanged');
testComp.pageSizeChanged(5);
tick();
expect(testComp.pageSizeChanged).toHaveBeenCalledWith(5);
}));
it('should call the updateRoute method on the paginationService with the correct params', fakeAsync(() => {
testComp.collectionSize = 60;
changePage(testFixture, 3);
tick();
expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ page: '3'}), {}, false);
changePage(testFixture, 0);
tick();
expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ page: '2'}), {}, false);
}));
it('should set correct pageSize route parameters', fakeAsync(() => {
routerStub = testFixture.debugElement.injector.get(Router) as any;
testComp.collectionSize = 60;
changePageSize(testFixture, '20');
tick();
expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ pageId: 'test', page: 1, pageSize: 20}), {}, false);
}));
it('should respond to windows resize', () => {
const paginationComponent: PaginationComponent = testFixture.debugElement.query(By.css('ds-pagination')).references.p;
hostWindowServiceStub = testFixture.debugElement.injector.get(HostWindowService) as any;
hostWindowServiceStub.setWidth(400);
hostWindowServiceStub.isXs().subscribe((status) => {
paginationComponent.isXs = status;
it('should render and respond to page change', () => {
testComp.collectionSize = 30;
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '4', '5', '-...', '10', '» Next']);
de = testFixture.debugElement.query(By.css('ul.pagination'));
expect(de.nativeElement.classList.contains('pagination-sm')).toBeTruthy();
currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {currentPage: 3}));
testFixture.detectChanges();
expectPages(testFixture, ['« Previous', '1', '2', '+3', '-» Next']);
currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {currentPage: 2}));
testFixture.detectChanges();
expectPages(testFixture, ['« Previous', '1', '+2', '3', '» Next']);
});
it('should render and respond to collectionSize change', () => {
testComp.collectionSize = 30;
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '» Next']);
testComp.collectionSize = 40;
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '4', '» Next']);
});
it('should render and respond to pageSize change', () => {
const paginationComponent: PaginationComponent = testFixture.debugElement.query(By.css('ds-pagination')).references.p;
testComp.collectionSize = 30;
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '» Next']);
currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {pageSize: 5}));
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '4', '5', '6', '» Next']);
currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {pageSize: 10}));
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '» Next']);
currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {pageSize: 20}));
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '» Next']);
});
it('should emit pageSizeChange event with correct value', fakeAsync(() => {
const paginationComponent: PaginationComponent = testFixture.debugElement.query(By.css('ds-pagination')).references.p;
spyOn(testComp, 'pageSizeChanged');
testComp.pageSizeChanged(5);
tick();
expect(testComp.pageSizeChanged).toHaveBeenCalledWith(5);
}));
it('should call the updateRoute method on the paginationService with the correct params', fakeAsync(() => {
testComp.collectionSize = 60;
changePage(testFixture, 3);
tick();
expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ page: '3'}), {}, false);
changePage(testFixture, 0);
tick();
expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ page: '2'}), {}, false);
}));
it('should set correct pageSize route parameters', fakeAsync(() => {
routerStub = testFixture.debugElement.injector.get(Router) as any;
testComp.collectionSize = 60;
changePageSize(testFixture, '20');
tick();
expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ pageId: 'test', page: 1, pageSize: 20}), {}, false);
}));
it('should respond to windows resize', () => {
const paginationComponent: PaginationComponent = testFixture.debugElement.query(By.css('ds-pagination')).references.p;
hostWindowServiceStub = testFixture.debugElement.injector.get(HostWindowService) as any;
hostWindowServiceStub.setWidth(400);
hostWindowServiceStub.isXs().subscribe((status) => {
paginationComponent.isXs = status;
testFixture.detectChanges();
expectPages(testFixture, ['-« Previous', '+1', '2', '3', '4', '5', '-...', '10', '» Next']);
de = testFixture.debugElement.query(By.css('ul.pagination'));
expect(de.nativeElement.classList.contains('pagination-sm')).toBeTruthy();
});
});
});
describe('when showPaginator is true', () => {
// synchronous beforeEach
beforeEach(() => {
html = `
<ds-pagination #p='paginationComponent'
[paginationOptions]='paginationOptions'
[sortOptions]='sortOptions'
[collectionSize]='collectionSize'
(pageChange)='pageChanged($event)'
(pageSizeChange)='pageSizeChanged($event)'
[showPaginator]='false'
[objects]='objects'
(prev)="goPrev()"
(next)="goNext()"
>
<ul>
<li *ngFor='let item of collection | paginate: { itemsPerPage: paginationOptions.pageSize,
currentPage: paginationOptions.currentPage, totalItems: collectionSize }'> {{item}} </li>
</ul>
</ds-pagination>`;
testFixture = createTestComponent(html, TestComponent) as ComponentFixture<TestComponent>;
testComp = testFixture.componentInstance;
});
beforeEach(() => {
testComp.showPaginator = false;
testFixture.detectChanges();
});
describe('when clicking the previous arrow button', () => {
beforeEach(() => {
spyOn(testComp, 'goPrev');
testFixture.detectChanges();
});
it('should call goPrev method', () => {
const prev = testFixture.debugElement.query(By.css('#nav-prev'));
testFixture.detectChanges();
prev.triggerEventHandler('click', null);
expect(testComp.goPrev).toHaveBeenCalled();
});
});
describe('when clicking the next arrow button', () => {
beforeEach(() => {
spyOn(testComp, 'goNext');
testFixture.detectChanges();
});
it('should call goNext method', () => {
const next = testFixture.debugElement.query(By.css('#nav-next'));
testFixture.detectChanges();
next.triggerEventHandler('click', null);
expect(testComp.goNext).toHaveBeenCalled();
});
});
describe('check for prev and next button', () => {
it('shoud have a previous button', () => {
const prev = testFixture.debugElement.query(By.css('#nav-prev'));
testFixture.detectChanges();
expect(prev).toBeTruthy();
});
it('shoud have a next button', () => {
const next = testFixture.debugElement.query(By.css('#nav-next'));
testFixture.detectChanges();
expect(next).toBeTruthy();
});
});
});
});
// declare a test component
@@ -313,11 +387,19 @@ class TestComponent {
collectionSize: number;
paginationOptions = new PaginationComponentOptions();
sortOptions = new SortOptions('dc.title', SortDirection.ASC);
showPaginator: boolean;
objects = {
payload: {
currentPage: 2,
totalPages: 100
}
};
constructor() {
this.collection = Array.from(new Array(100), (x, i) => `item ${i + 1}`);
this.collectionSize = 100;
this.paginationOptions.id = 'test';
this.showPaginator = false;
}
pageChanged(page) {
@@ -327,4 +409,12 @@ class TestComponent {
pageSizeChanged(pageSize) {
this.paginationOptions.pageSize = pageSize;
}
goPrev() {
this.objects.payload.currentPage --;
}
goNext() {
this.objects.payload.currentPage ++;
}
}

View File

@@ -19,7 +19,11 @@ import { SortDirection, SortOptions } from '../../core/cache/models/sort-options
import { hasValue } from '../empty.util';
import { PageInfo } from '../../core/shared/page-info.model';
import { PaginationService } from '../../core/pagination/pagination.service';
import { map } from 'rxjs/operators';
import { map, take } from 'rxjs/operators';
import { RemoteData } from '../../core/data/remote-data';
import { PaginatedList } from '../../core/data/paginated-list.model';
import { ListableObject } from '../object-collection/shared/listable-object.model';
import { ViewMode } from '../../core/shared/view-mode.model';
/**
* The default pagination controls component.
@@ -33,6 +37,11 @@ import { map } from 'rxjs/operators';
encapsulation: ViewEncapsulation.Emulated
})
export class PaginationComponent implements OnDestroy, OnInit {
/**
* ViewMode that should be passed to {@link ListableObjectComponentLoaderComponent}.
*/
viewMode: ViewMode = ViewMode.ListElement;
/**
* Number of items in collection.
*/
@@ -53,6 +62,26 @@ export class PaginationComponent implements OnDestroy, OnInit {
*/
@Input() sortOptions: SortOptions;
/**
* Whether or not the pagination should be rendered as simple previous and next buttons instead of the normal pagination
*/
@Input() showPaginator = true;
/**
* The current pagination configuration
*/
@Input() config?: PaginationComponentOptions;
/**
* The list of listable objects to render in this component
*/
@Input() objects: RemoteData<PaginatedList<ListableObject>>;
/**
* The current sorting configuration
*/
@Input() sortConfig: SortOptions;
/**
* An event fired when the page is changed.
* Event's payload equals to the newly selected page.
@@ -163,6 +192,15 @@ export class PaginationComponent implements OnDestroy, OnInit {
*/
private subs: Subscription[] = [];
/**
* If showPaginator is set to true, emit when the previous button is clicked
*/
@Output() prev = new EventEmitter<boolean>();
/**
* If showPaginator is set to true, emit when the next button is clicked
*/
@Output() next = new EventEmitter<boolean>();
/**
* Method provided by Angular. Invoked after the constructor.
*/
@@ -347,4 +385,31 @@ export class PaginationComponent implements OnDestroy, OnInit {
map((hasMultiplePages) => hasMultiplePages || !this.hidePagerWhenSinglePage)
);
}
/**
* Go to the previous page
*/
goPrev() {
this.prev.emit(true);
this.updatePagination(-1);
}
/**
* Go to the next page
*/
goNext() {
this.next.emit(true);
this.updatePagination(1);
}
/**
* Update page when next or prev button is clicked
* @param value
*/
updatePagination(value: number) {
this.paginationService.getCurrentPagination(this.id, this.paginationOptions).pipe(take(1)).subscribe((currentPaginationOptions) => {
this.updateParams({page: (currentPaginationOptions.currentPage + value).toString()});
});
}
}

View File

@@ -4,10 +4,10 @@
<div *ngIf="showScopeSelector === true" class="input-group-prepend">
<button class="scope-button btn btn-outline-secondary text-truncate" [ngbTooltip]="(selectedScope | async)?.name" type="button" (click)="openScopeModal()">{{(selectedScope | async)?.name || ('search.form.scope.all' | translate)}}</button>
</div>
<input type="text" [(ngModel)]="query" name="query" class="form-control" attr.aria-label="{{ searchPlaceholder }}"
<input type="text" [(ngModel)]="query" name="query" class="form-control" attr.aria-label="{{ searchPlaceholder }}" data-test="search-box"
[placeholder]="searchPlaceholder">
<span class="input-group-append">
<button type="submit" class="search-button btn btn-{{brandColor}}"><i class="fas fa-search"></i> {{ ('search.form.search' | translate) }}</button>
<button type="submit" class="search-button btn btn-{{brandColor}}" data-test="search-button"><i class="fas fa-search"></i> {{ ('search.form.search' | translate) }}</button>
</span>
</div>
</div>

View File

@@ -28,4 +28,13 @@
.noUi-connect {
background: var(--ds-slider-color);
}
.noUi-target {
padding: 0 calc((var(--ds-slider-handle-width) / 2) - 1.5px);
margin: 0 1px;
}
.noUi-connect {
margin: 0 calc(-1 * (var(--ds-slider-handle-width) / 2));
width: calc(100% + var(--ds-slider-handle-width));
}
}

View File

@@ -6,7 +6,8 @@
(click)="switchViewTo(viewModeEnum.ListElement)"
routerLinkActive="active"
[class.active]="currentMode === viewModeEnum.ListElement"
class="btn btn-secondary">
class="btn btn-secondary"
data-test="list-view">
<i class="fas fa-list" title="{{'search.view-switch.show-list' | translate}}"></i>
</a>
<a *ngIf="isToShow(viewModeEnum.GridElement)"
@@ -16,7 +17,8 @@
(click)="switchViewTo(viewModeEnum.GridElement)"
routerLinkActive="active"
[class.active]="currentMode === viewModeEnum.GridElement"
class="btn btn-secondary">
class="btn btn-secondary"
data-test="grid-view">
<i class="fas fa-th-large" title="{{'search.view-switch.show-grid' | translate}}"></i>
</a>
<a *ngIf="isToShow(viewModeEnum.DetailedListElement)"
@@ -26,7 +28,8 @@
(click)="switchViewTo(viewModeEnum.DetailedListElement)"
routerLinkActive="active"
[class.active]="currentMode === viewModeEnum.DetailedListElement"
class="btn btn-secondary">
class="btn btn-secondary"
data-test="detail-view">
<i class="far fa-square" title="{{'search.view-switch.show-detail' | translate}}"></i>
</a>
</div>

View File

@@ -2,6 +2,7 @@
<div class="col">
<button *ngIf="(showDepositAndDiscard | async)"
type="button"
id="discard"
class="btn btn-danger"
[disabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
(click)="$event.preventDefault();confirmDiscard(content)">
@@ -40,6 +41,7 @@
</button>
<button *ngIf="(showDepositAndDiscard | async)"
type="button"
id="deposit"
class="btn btn-success"
[disabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
(click)="deposit($event)">
@@ -60,7 +62,7 @@
<p>{{'submission.general.discard.confirm.info' | translate}}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="c('cancel')">{{'submission.general.discard.confirm.cancel' | translate}}</button>
<button type="button" class="btn btn-danger" (click)="c('ok')">{{'submission.general.discard.confirm.submit' | translate}}</button>
<button type="button" id="discard_cancel" class="btn btn-secondary" (click)="c('cancel')">{{'submission.general.discard.confirm.cancel' | translate}}</button>
<button type="button" id="discard_submit" class="btn btn-danger" (click)="c('ok')">{{'submission.general.discard.confirm.submit' | translate}}</button>
</div>
</ng-template>

6129
src/assets/i18n/bn.json5 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
"401.help": "Sie sind nicht berechtigt, auf diese Seite zuzugreifen. Mit dem Link unten kommen Sie zurück zur Startseite.",
// "401.link.home-page": "Take me to the home page",
"401.link.home-page": "Bringe mich zur Startseite",
"401.link.home-page": "Zur Startseite",
// "401.unauthorized": "unauthorized",
"401.unauthorized": "unautorisiert",
@@ -12,10 +12,10 @@
// "403.help": "You don't have permission to access this page. You can use the button below to get back to the home page.",
"403.help": "Sie haben keine Berechtigung, auf diese Seite zuzugreifen. Mit dem Link unten kommen Sie zurück zur Startseite.",
"403.help": "Sie sind nicht berechtigt, auf diese Seite zuzugreifen. Über den Button unten auf der Seite gelangen Sie zurück zur Startseite.",
// "403.link.home-page": "Take me to the home page",
"403.link.home-page": "Bringe mich zur Startseite",
"403.link.home-page": "Zur Startseite",
// "403.forbidden": "forbidden",
"403.forbidden": "verboten",
@@ -23,22 +23,22 @@
// "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": "Die Seite, die Sie aufrufen wollten, konnte nicht gefunden werden. Sie könnte verschoben oder gelöscht worden sein. Mit dem Link unten kommen Sie zurück zur Startseite. ",
"404.help": "Die Seite konnte nicht gefunden werden. Eventuell wurde sie verschoben oder gelöscht. Über den Button unten auf der Seite gelangen Sie zurück zur Startseite.",
// "404.link.home-page": "Take me to the home page",
"404.link.home-page": "Zurück zur Startseite",
"404.link.home-page": "Zur Startseite",
// "404.page-not-found": "page not found",
"404.page-not-found": "Seite nicht gefunden",
// "admin.curation-tasks.breadcrumbs": "System curation tasks",
"admin.curation-tasks.breadcrumbs": "Datenpflegeroutinen",
"admin.curation-tasks.breadcrumbs": "Wartungsarbeiten",
// "admin.curation-tasks.title": "System curation tasks",
"admin.curation-tasks.title": "Datenpflegeroutinen",
"admin.curation-tasks.title": "Wartungsarbeiten",
// "admin.curation-tasks.header": "System curation tasks",
"admin.curation-tasks.header": "Datenpflegeroutinen",
"admin.curation-tasks.header": "Wartungsarbeiten",
// "admin.registries.bitstream-formats.breadcrumbs": "Format registry",
"admin.registries.bitstream-formats.breadcrumbs": "Referenzliste der Dateiformate",
@@ -47,10 +47,10 @@
"admin.registries.bitstream-formats.create.breadcrumbs": "Dateiformat",
// "admin.registries.bitstream-formats.create.failure.content": "An error occurred while creating the new bitstream format.",
"admin.registries.bitstream-formats.create.failure.content": "Ein Fehler ist beim Anlegen eines neuen Dateiformates aufgetreten.",
"admin.registries.bitstream-formats.create.failure.content": "Beim Anlegen eines neuen Dateiformates ist ein Fehler aufgetreten.",
// "admin.registries.bitstream-formats.create.failure.head": "Failure",
"admin.registries.bitstream-formats.create.failure.head": "Fehler",
"admin.registries.bitstream-formats.create.failure.head": "Aktion fehlgeschlagen",
// "admin.registries.bitstream-formats.create.head": "Create Bitstream format",
"admin.registries.bitstream-formats.create.head": "Neues Dateiformat anlegen",
@@ -62,19 +62,19 @@
"admin.registries.bitstream-formats.create.success.content": "Das neue Dateiformat wurde erfolgreich angelegt.",
// "admin.registries.bitstream-formats.create.success.head": "Success",
"admin.registries.bitstream-formats.create.success.head": "Erfolg",
"admin.registries.bitstream-formats.create.success.head": "Aktion erfolgreich",
// "admin.registries.bitstream-formats.delete.failure.amount": "Failed to remove {{ amount }} format(s)",
"admin.registries.bitstream-formats.delete.failure.amount": "{{ amount }} Format(e) konnte(n) nicht gelöscht werden",
"admin.registries.bitstream-formats.delete.failure.amount": "{{ amount }} Dateiformat(e) konnte(n) nicht gelöscht werden.",
// "admin.registries.bitstream-formats.delete.failure.head": "Failure",
"admin.registries.bitstream-formats.delete.failure.head": "Fehler",
// "admin.registries.bitstream-formats.delete.success.amount": "Successfully removed {{ amount }} format(s)",
"admin.registries.bitstream-formats.delete.success.amount": "{{ amount }} Format(e) erfolgreich gelöscht",
"admin.registries.bitstream-formats.delete.success.amount": "{{ amount }} Dateiformat(e) wurden erfolgreich gelöscht.",
// "admin.registries.bitstream-formats.delete.success.head": "Success",
"admin.registries.bitstream-formats.delete.success.head": "Erfolg",
"admin.registries.bitstream-formats.delete.success.head": "Aktion erfolgreich",
// "admin.registries.bitstream-formats.description": "This list of bitstream formats provides information about known formats and their support level.",
"admin.registries.bitstream-formats.description": "Die Liste der Dateiformate enthält Informationen über bekannte Formate und deren Unterstützungsgrad.",
@@ -89,19 +89,19 @@
"admin.registries.bitstream-formats.edit.description.label": "Beschreibung",
// "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": "Extensionen sind Dateieindungen, welche zur Identifizierung der Formate von hochgeladenen Dateien dienen. Sie können mehrere Endungen pro Format angeben.",
"admin.registries.bitstream-formats.edit.extensions.hint": "Hier können Sie Endungen angeben, anhand derer das Format hochgeladener Dateien automatisch erkannt wird. Sie können mehrere Endungen pro Dateiformat angeben.",
// "admin.registries.bitstream-formats.edit.extensions.label": "File extensions",
"admin.registries.bitstream-formats.edit.extensions.label": "Dateiendungen",
// "admin.registries.bitstream-formats.edit.extensions.placeholder": "Enter a file extension without the dot",
"admin.registries.bitstream-formats.edit.extensions.placeholder": "Geben Sie die Endung des Dateinamens ohne Punkt ein",
"admin.registries.bitstream-formats.edit.extensions.placeholder": "Bitte geben Sie die Dateiendung ohne Punkt ein.",
// "admin.registries.bitstream-formats.edit.failure.content": "An error occurred while editing the bitstream format.",
"admin.registries.bitstream-formats.edit.failure.content": "Ein Fehler ist beim Editieren des Dateiformates",
"admin.registries.bitstream-formats.edit.failure.content": "Beim Bearbeiten des Dateiformats ist ein Fehler aufgetreten.",
// "admin.registries.bitstream-formats.edit.failure.head": "Failure",
"admin.registries.bitstream-formats.edit.failure.head": "Fehler",
"admin.registries.bitstream-formats.edit.failure.head": "Aktion fehlgeschlagen",
// "admin.registries.bitstream-formats.edit.head": "Bitstream format: {{ format }}",
"admin.registries.bitstream-formats.edit.head": "Dateiformat: {{ format }}",
@@ -110,13 +110,13 @@
"admin.registries.bitstream-formats.edit.internal.hint": "Dateiformate, die als intern gekennzeichnet sind, dienen administrativen Zwecken und bleiben dem:der Endnutzer:in verborgen.",
// "admin.registries.bitstream-formats.edit.internal.label": "Internal",
"admin.registries.bitstream-formats.edit.internal.label": "Intern",
"admin.registries.bitstream-formats.edit.internal.label": "intern",
// "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": "Der MIME Typ dieses Formates. Er muss nicht einzigartig sein.",
"admin.registries.bitstream-formats.edit.mimetype.hint": "MIME-Type dieses Dateiformats. Ein MIME-Type kann auch mehreren Dateiformaten zugeordnet werden.",
// "admin.registries.bitstream-formats.edit.mimetype.label": "MIME Type",
"admin.registries.bitstream-formats.edit.mimetype.label": "MIME Typ",
"admin.registries.bitstream-formats.edit.mimetype.label": "MIME-Type",
// "admin.registries.bitstream-formats.edit.shortDescription.hint": "A unique name for this format, (e.g. Microsoft Word XP or Microsoft Word 2000)",
"admin.registries.bitstream-formats.edit.shortDescription.hint": "Ein eindeutiger Name für dieses Format, (z.B. Microsoft Word XP oder Microsoft Word 2000)",
@@ -128,10 +128,10 @@
"admin.registries.bitstream-formats.edit.success.content": "Das Dateiformat wurde erfolgreich bearbeitet.",
// "admin.registries.bitstream-formats.edit.success.head": "Success",
"admin.registries.bitstream-formats.edit.success.head": "Erfolg",
"admin.registries.bitstream-formats.edit.success.head": "Aktion erfolgreich",
// "admin.registries.bitstream-formats.edit.supportLevel.hint": "The level of support your institution pledges for this format.",
"admin.registries.bitstream-formats.edit.supportLevel.hint": "Der Unterstützungsgrad den Ihre Einrichtung für dieses Format anbietet.",
"admin.registries.bitstream-formats.edit.supportLevel.hint": "Der Unterstützungsgrad, den Ihre Einrichtung für dieses Format anbietet",
// "admin.registries.bitstream-formats.edit.supportLevel.label": "Support level",
"admin.registries.bitstream-formats.edit.supportLevel.label": "Unterstützungsgrad",
@@ -146,13 +146,13 @@
"admin.registries.bitstream-formats.table.delete": "Auswahl löschen",
// "admin.registries.bitstream-formats.table.deselect-all": "Deselect all",
"admin.registries.bitstream-formats.table.deselect-all": "Alle abwählen",
"admin.registries.bitstream-formats.table.deselect-all": "Nichts auswählen",
// "admin.registries.bitstream-formats.table.internal": "internal",
"admin.registries.bitstream-formats.table.internal": "intern",
// "admin.registries.bitstream-formats.table.mimetype": "MIME Type",
"admin.registries.bitstream-formats.table.mimetype": "MIME Typ",
"admin.registries.bitstream-formats.table.mimetype": "MIME-Type",
// "admin.registries.bitstream-formats.table.name": "Name",
"admin.registries.bitstream-formats.table.name": "Name",
@@ -199,7 +199,7 @@
"admin.registries.metadata.head": "Metadatenreferenzliste",
// "admin.registries.metadata.schemas.no-items": "No metadata schemas to show.",
"admin.registries.metadata.schemas.no-items": "Es gibt keinen Metadatenschemata in der Referenzliste.",
"admin.registries.metadata.schemas.no-items": "Es gibt keine Metadatenschemata in der Referenzliste.",
// "admin.registries.metadata.schemas.table.delete": "Delete selected",
"admin.registries.metadata.schemas.table.delete": "Auswahl löschen",
@@ -261,7 +261,7 @@
"admin.registries.schema.notification.created": "\"{{prefix}}\" wurde erfolgreich angelegt.",
// "admin.registries.schema.notification.deleted.failure": "Failed to delete {{amount}} metadata schemas",
"admin.registries.schema.notification.deleted.failure": "{{amount}} Metadatenschema(ta) konnte(n) nicht gelöscht werden",
"admin.registries.schema.notification.deleted.failure": "{{amount}} Metadatenschema(ta) konnte(n) nicht gelöscht werden.",
// "admin.registries.schema.notification.deleted.success": "Successfully deleted {{amount}} metadata schemas",
"admin.registries.schema.notification.deleted.success": "{{amount}} Metadatenschema(ta) wurde(n) gelöscht.",
@@ -368,37 +368,37 @@
"admin.access-control.epeople.form.email": "E-Mail-Adresse",
// "admin.access-control.epeople.form.emailHint": "Must be valid e-mail address",
"admin.access-control.epeople.form.emailHint": "Muss eine gültige E-Mail-Adresse sein",
"admin.access-control.epeople.form.emailHint": "Bitte geben Sie eine gültige E-Mail-Adresse an.",
// "admin.access-control.epeople.form.canLogIn": "Can log in",
"admin.access-control.epeople.form.canLogIn": "Darf sich anmelden",
// "admin.access-control.epeople.form.requireCertificate": "Requires certificate",
"admin.access-control.epeople.form.requireCertificate": "Zertifikat benötigt",
"admin.access-control.epeople.form.requireCertificate": "Es wird ein Zertifikat benötigt.",
// "admin.access-control.epeople.form.notification.created.success": "Successfully created EPerson \"{{name}}\"",
"admin.access-control.epeople.form.notification.created.success": "Person \"{{name}}\" erfolgreich erstellt",
"admin.access-control.epeople.form.notification.created.success": "Die Person \"{{name}}\" wurde erstellt.",
// "admin.access-control.epeople.form.notification.created.failure": "Failed to create EPerson \"{{name}}\"",
"admin.access-control.epeople.form.notification.created.failure": "Person \"{{name}}\" konnte nicht erstellt werden",
"admin.access-control.epeople.form.notification.created.failure": "Die Person \"{{name}}\" konnte nicht erstellt werden.",
// "admin.access-control.epeople.form.notification.created.failure.emailInUse": "Failed to create EPerson \"{{name}}\", email \"{{email}}\" already in use.",
"admin.access-control.epeople.form.notification.created.failure.emailInUse": "Person \"{{name}}\" konnte nicht erstellt werden, E-Mail \"{{email}}\" wird bereits verwendet.",
"admin.access-control.epeople.form.notification.created.failure.emailInUse": "Die Person \"{{name}}\" konnte nicht erstellt werden, weil die E-Mail-Adresse \"{{email}}\" bereits verwendet wird.",
// "admin.access-control.epeople.form.notification.edited.failure.emailInUse": "Failed to edit EPerson \"{{name}}\", email \"{{email}}\" already in use.",
"admin.access-control.epeople.form.notification.edited.failure.emailInUse": "Person \"{{name}}\" konnte nicht bearbeitet werden, E-Mail \"{{email}}\" wird bereits verwendet.",
"admin.access-control.epeople.form.notification.edited.failure.emailInUse": "Die Person \"{{name}}\" konnte nicht bearbeitet werden, weil die E-Mail-Adresse \"{{email}}\" bereits verwendet wird.",
// "admin.access-control.epeople.form.notification.edited.success": "Successfully edited EPerson \"{{name}}\"",
"admin.access-control.epeople.form.notification.edited.success": "Person \"{{name}}\" erfolgreich bearbeitet",
"admin.access-control.epeople.form.notification.edited.success": "Die Person \"{{name}}\" wurde erfolgreich bearbeitet.",
// "admin.access-control.epeople.form.notification.edited.failure": "Failed to edit EPerson \"{{name}}\"",
"admin.access-control.epeople.form.notification.edited.failure": "Person \"{{name}}\" konnte nicht bearbeitet werden",
"admin.access-control.epeople.form.notification.edited.failure": "Die Person \"{{name}}\" konnte nicht bearbeitet werden.",
// "admin.access-control.epeople.form.notification.deleted.success": "Successfully deleted EPerson \"{{name}}\"",
"admin.access-control.epeople.form.notification.deleted.success": "Person \"{{name}}\" erfolgreich gelöscht",
"admin.access-control.epeople.form.notification.deleted.success": "Die Person \"{{name}}\" wurde gelöscht.",
// "admin.access-control.epeople.form.notification.deleted.failure": "Failed to delete EPerson \"{{name}}\"",
"admin.access-control.epeople.form.notification.deleted.failure": "Person \"{{name}}\" konnte nicht gelöscht werden",
"admin.access-control.epeople.form.notification.deleted.failure": "Die Person \"{{name}}\" konnte nicht gelöscht werden.",
// "admin.access-control.epeople.form.groupsEPersonIsMemberOf": "Member of these groups:",
"admin.access-control.epeople.form.groupsEPersonIsMemberOf": "Mitglied dieser Gruppen:",
@@ -410,7 +410,7 @@
"admin.access-control.epeople.form.table.name": "Name",
// "admin.access-control.epeople.form.memberOfNoGroups": "This EPerson is not a member of any groups",
"admin.access-control.epeople.form.memberOfNoGroups": "Diese Person ist kein Mitglied von einer Gruppe",
"admin.access-control.epeople.form.memberOfNoGroups": "Diese Person ist kein Mitglied einer Gruppe.",
// "admin.access-control.epeople.form.goToGroups": "Add to groups",
"admin.access-control.epeople.form.goToGroups": "Zu Gruppen hinzufügen",
@@ -573,16 +573,16 @@
"admin.access-control.groups.form.members-list.table.edit.buttons.remove": "Mitglieder mit dem Namen \"{{name}}\" entfernen",
// "admin.access-control.groups.form.members-list.notification.success.addMember": "Successfully added member: \"{{name}}\"",
"admin.access-control.groups.form.members-list.notification.success.addMember": "Mitglied: \"{{name}}\" erfolgreich hinzugefügt",
"admin.access-control.groups.form.members-list.notification.success.addMember": "Das Mitglied \"{{name}}\" wurde hinzugefügt.",
// "admin.access-control.groups.form.members-list.notification.failure.addMember": "Failed to add member: \"{{name}}\"",
"admin.access-control.groups.form.members-list.notification.failure.addMember": "Mitglied: \"{{name}}\" konnte nicht hinzugefügt werden",
"admin.access-control.groups.form.members-list.notification.failure.addMember": "Das Mitglied \"{{name}}\" konnte nicht hinzugefügt werden.",
// "admin.access-control.groups.form.members-list.notification.success.deleteMember": "Successfully deleted member: \"{{name}}\"",
"admin.access-control.groups.form.members-list.notification.success.deleteMember": "Mitglied: \"{{name}}\" erfolgreich gelöscht",
"admin.access-control.groups.form.members-list.notification.success.deleteMember": "Das Mitglied \"{{name}}\" wurde gelöscht.",
// "admin.access-control.groups.form.members-list.notification.failure.deleteMember": "Failed to delete member: \"{{name}}\"",
"admin.access-control.groups.form.members-list.notification.failure.deleteMember": "Mitglied: \"{{name}}\" konnte nicht gelöscht werden",
"admin.access-control.groups.form.members-list.notification.failure.deleteMember": "Das Mitglied \"{{name}}\" konnte nicht gelöscht werden.",
// "admin.access-control.groups.form.members-list.table.edit.buttons.add": "Add member with name \"{{name}}\"",
"admin.access-control.groups.form.members-list.table.edit.buttons.add": "Mitglied mit dem Namen \"{{name}}\" hinzufügen",
@@ -654,7 +654,7 @@
"admin.access-control.groups.form.subgroups-list.no-items": "Keine Gruppen gefunden, die dies in ihrem Namen oder als UUID haben",
// "admin.access-control.groups.form.subgroups-list.no-subgroups-yet": "No subgroups in group yet.",
"admin.access-control.groups.form.subgroups-list.no-subgroups-yet": "Noch keine Untergruppen in der Gruppe.",
"admin.access-control.groups.form.subgroups-list.no-subgroups-yet": "Die Gruppe hat noch keine Untergruppen.",
// "admin.access-control.groups.form.return": "Return to groups",
"admin.access-control.groups.form.return": "Zurück zu den Gruppen",
@@ -662,7 +662,7 @@
// "admin.search.breadcrumbs": "Administrative Search",
"admin.search.breadcrumbs": "Administrative Suche",
"admin.search.breadcrumbs": "Admin-Suche",
// "admin.search.collection.edit": "Edit",
"admin.search.collection.edit": "Bearbeiten",
@@ -677,10 +677,10 @@
"admin.search.item.edit": "Bearbeiten",
// "admin.search.item.make-private": "Make Private",
"admin.search.item.make-private": "Privat stellen",
"admin.search.item.make-private": "Verbergen",
// "admin.search.item.make-public": "Make Public",
"admin.search.item.make-public": "Öffentlich stellen",
"admin.search.item.make-public": "Öffentlich anzeigen",
// "admin.search.item.move": "Move",
"admin.search.item.move": "Verschieben",
@@ -692,22 +692,22 @@
"admin.search.item.withdraw": "Zurückziehen",
// "admin.search.title": "Administrative Search",
"admin.search.title": "Administrative Suche",
"admin.search.title": "Admin-Suche",
// "administrativeView.search.results.head": "Administrative Search",
"administrativeView.search.results.head": "Administrative Suche",
"administrativeView.search.results.head": "Admin-Suche",
// "admin.workflow.breadcrumbs": "Administer Workflow",
"admin.workflow.breadcrumbs": "Geschäftsgänge verwalten",
"admin.workflow.breadcrumbs": "Workflows verwalten",
// "admin.workflow.title": "Administer Workflow",
"admin.workflow.title": "Geschäftsgänghe verwalten",
"admin.workflow.title": "Workflows verwalten",
// "admin.workflow.item.workflow": "Workflow",
"admin.workflow.item.workflow": "Geschäftsgänge",
"admin.workflow.item.workflow": "Workflows",
// "admin.workflow.item.delete": "Delete",
"admin.workflow.item.delete": "Löschen",
@@ -727,13 +727,13 @@
"admin.metadata-import.page.header": "Metadaten importieren",
// "admin.metadata-import.page.help": "You can drop or browse CSV files that contain batch metadata operations on files here",
"admin.metadata-import.page.help": "Zum Importieren von Metadaten im Batch-Verfahren, wählen Sie eine CSV-Datei zum Hochladen aus, oder ziehen Sie diese in das Browser-Fenster",
"admin.metadata-import.page.help": "Um Metadaten im Batch-Verfahren zu importieren, wählen Sie bitte eine CSV-Datei zum Hochladen aus oder ziehen Sie diese ins Browser-Fenster.",
// "admin.metadata-import.page.dropMsg": "Drop a metadata CSV to import",
"admin.metadata-import.page.dropMsg": "Ziehen Sie eine CSV-Datei mit Metadaten zum Importieren in das Browser-Fenster",
"admin.metadata-import.page.dropMsg": "Ziehen Sie eine CSV-Datei mit Metadaten zum Importieren in das Browser-Fenster.",
// "admin.metadata-import.page.dropMsgReplace": "Drop to replace the metadata CSV to import",
"admin.metadata-import.page.dropMsgReplace": "Legen Sie ab, um die CSV-Datei für den Import zu ersetzen.",
"admin.metadata-import.page.dropMsgReplace": "Legen Sie eine neue CSV-Datei hier ab, um die Importdatei zu ersetzen.",
// "admin.metadata-import.page.button.return": "Return",
"admin.metadata-import.page.button.return": "Zurück",
@@ -742,7 +742,7 @@
"admin.metadata-import.page.button.proceed": "Fortfahren",
// "admin.metadata-import.page.error.addFile": "Select file first!",
"admin.metadata-import.page.error.addFile": "Zuerst Datei auswählen!",
"admin.metadata-import.page.error.addFile": "Bitte wählen Sie zuerst eine Datei aus.",
@@ -751,7 +751,7 @@
"auth.errors.invalid-user": "Passwort oder E-Mail-Adresse ungültig.",
// "auth.messages.expired": "Your session has expired. Please log in again.",
"auth.messages.expired": "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an.",
"auth.messages.expired": "Ihre Sitzung ist abgelaufen. Bitte melden Sie sich erneut an.",
@@ -759,7 +759,7 @@
"bitstream.edit.bitstream": "Bitstream: ",
// "bitstream.edit.form.description.hint": "Optionally, provide a brief description of the file, for example \"<i>Main article</i>\" or \"<i>Experiment data readings</i>\".",
"bitstream.edit.form.description.hint": "Optional können Sie eine kurze Beschreibung der Datei angeben, zum Beispiel \"<i>Main article</i>\" oder \"<i>Experiment data readings</i>\".",
"bitstream.edit.form.description.hint": "Hier können Sie eine kurze Beschreibung der Datei angeben, zum Beispiel \"<i>Artikel</i>\" oder \"<i>Tabellenhanhang</i>\".",
// "bitstream.edit.form.description.label": "Description",
"bitstream.edit.form.description.label": "Beschreibung",
@@ -769,7 +769,7 @@
// "bitstream.edit.form.embargo.label": "Embargo until specific date",
"bitstream.edit.form.embargo.label": "Embargo bis zu einem bestimmten Datum",
"bitstream.edit.form.embargo.label": "Sperrfrist",
// "bitstream.edit.form.fileName.hint": "Change the filename for the bitstream. Note that this will change the display bitstream URL, but old links will still resolve as long as the sequence ID does not change.",
"bitstream.edit.form.fileName.hint": "Ändern Sie den Dateinamen für die Datei. Beachten Sie, dass sich dadurch die angezeigte Datei-URL ändert, aber alte Links weiterhin funktionieren, solange sich die Sequenz-ID nicht ändert.",
@@ -793,7 +793,7 @@
"bitstream.edit.form.selectedFormat.label": "Ausgewähltes Format",
// "bitstream.edit.form.selectedFormat.unknown": "Format not in list",
"bitstream.edit.form.selectedFormat.unknown": "Format nicht in der Liste",
"bitstream.edit.form.selectedFormat.unknown": "Anderes Format",
// "bitstream.edit.notifications.error.format.title": "An error occurred saving the bitstream's format",
"bitstream.edit.notifications.error.format.title": "Beim Speichern des Dateiformats ist ein Fehler aufgetreten",
@@ -846,10 +846,10 @@
"browse.metadata.dateissued.breadcrumbs": "Auflistung nach Datum",
// "browse.metadata.subject.breadcrumbs": "Browse by Subject",
"browse.metadata.subject.breadcrumbs": "Auflistung nach Schlagwort",
"browse.metadata.subject.breadcrumbs": "Schlagwörter",
// "browse.metadata.title.breadcrumbs": "Browse by Title",
"browse.metadata.title.breadcrumbs": "Auflistung nach Titel",
"browse.metadata.title.breadcrumbs": "Titel",
// "browse.startsWith.choose_start": "(Choose start)",
"browse.startsWith.choose_start": "(Startpunkt wählen)",
@@ -1023,7 +1023,7 @@
"collection.edit.logo.label": "Sammlungslogo",
// "collection.edit.logo.notifications.add.error": "Uploading Collection logo failed. Please verify the content before retrying.",
"collection.edit.logo.notifications.add.error": "Hochladen des Sammlungslogos fehlgeschlagen. Bitte überprüfen Sie den Inhalt, bevor Sie es nochmal versuchen.",
"collection.edit.logo.notifications.add.error": "Hochladen des Sammlungslogos fehlgeschlagen. Bitte überprüfen Sie den Inhalt, bevor Sie es erneut versuchen.",
// "collection.edit.logo.notifications.add.success": "Upload Collection logo successful.",
"collection.edit.logo.notifications.add.success": "Sammlungslogo erfolgreich hochgeladen.",
@@ -1038,7 +1038,7 @@
"collection.edit.logo.notifications.delete.error.title": "Fehler beim Löschen des Logos",
// "collection.edit.logo.upload": "Drop a Collection Logo to upload",
"collection.edit.logo.upload": "Ziehen Sie ein Logo herüber, um es hochzuladen",
"collection.edit.logo.upload": "Ziehen Sie ein Logo herüber, um es hochzuladen.",
@@ -1090,10 +1090,10 @@
"collection.edit.tabs.source.form.metadataConfigId": "Metadatenformat",
// "collection.edit.tabs.source.form.oaiSetId": "OAI specific set id",
"collection.edit.tabs.source.form.oaiSetId": "OAI spezifische Set-ID",
"collection.edit.tabs.source.form.oaiSetId": "OAI-spezifische Set-ID",
// "collection.edit.tabs.source.form.oaiSource": "OAI Provider",
"collection.edit.tabs.source.form.oaiSource": "OAI Anbieter",
"collection.edit.tabs.source.form.oaiSource": "OAI-Anbieter",
// "collection.edit.tabs.source.form.options.harvestType.METADATA_AND_BITSTREAMS": "Harvest metadata and bitstreams (requires ORE support)",
"collection.edit.tabs.source.form.options.harvestType.METADATA_AND_BITSTREAMS": "Bezieht Metadaten und Dateien (ORE-Schnittstelle erforderlich)",
@@ -1108,7 +1108,7 @@
"collection.edit.tabs.source.head": "Herkunft des Inhalts",
// "collection.edit.tabs.source.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button",
"collection.edit.tabs.source.notifications.discarded.content": "Die Änderungen wurden verworfen. Um die Änderungen wieder einzusetzen klicken Sie auf den 'Rückgängig' Knopf",
"collection.edit.tabs.source.notifications.discarded.content": "Die Änderungen wurden verworfen. Bitte klicken Sie auf \"Rückgängig\", um sie wieder einzusetzen.",
// "collection.edit.tabs.source.notifications.discarded.title": "Changed discarded",
"collection.edit.tabs.source.notifications.discarded.title": "Änderungen verworfen",
@@ -1120,7 +1120,7 @@
"collection.edit.tabs.source.notifications.invalid.title": "Metadaten ungültig",
// "collection.edit.tabs.source.notifications.saved.content": "Your changes to this collection's content source were saved.",
"collection.edit.tabs.source.notifications.saved.content": "Ihre Änderunge bezüglich der Quelle für den Inhalt der Sammlung wurden gespeichert.",
"collection.edit.tabs.source.notifications.saved.content": "Die Quelle für den Inhalt der Sammlung wurde geändert.",
// "collection.edit.tabs.source.notifications.saved.title": "Content Source saved",
"collection.edit.tabs.source.notifications.saved.title": "Bezugsquelle für den Inhalt gespeichert",
@@ -1287,7 +1287,7 @@
"community.edit.logo.label": "Bereichslogo",
// "community.edit.logo.notifications.add.error": "Uploading Community logo failed. Please verify the content before retrying.",
"community.edit.logo.notifications.add.error": "Hochladen des Bereichslogos fehlgeschlagen. Bitte überprüfen Sie den Inhalt bevor Sie es noch einmal versuchen.",
"community.edit.logo.notifications.add.error": "Hochladen des Bereichslogos fehlgeschlagen. Bitte überprüfen Sie den Inhalt bevor Sie es erneut versuchen.",
// "community.edit.logo.notifications.add.success": "Upload Community logo successful.",
"community.edit.logo.notifications.add.success": "Hochladen des Bereichslogos erfolgreich.",
@@ -1469,10 +1469,10 @@
// "cookies.consent.accept-all": "Accept all",
"cookies.consent.accept-all": "Alle annehmen",
"cookies.consent.accept-all": "Alle Cookies akzeptieren",
// "cookies.consent.accept-selected": "Accept selected",
"cookies.consent.accept-selected": "Ausgewählte annehmen",
"cookies.consent.accept-selected": "Nur ausgewählte Cookies akzeptieren",
// "cookies.consent.app.opt-out.description": "This app is loaded by default (but you can opt out)",
"cookies.consent.app.opt-out.description": "Diese App wird standardmäßig geladen (Sie können dies jedoch deaktivieren)",
@@ -1868,16 +1868,16 @@
"form.group-collapse-help": "Zum Zusammenfalten bitte hier klicken",
// "form.group-expand": "Expand",
"form.group-expand": "Auffalten",
"form.group-expand": "Ausklappen",
// "form.group-expand-help": "Click here to expand and add more elements",
"form.group-expand-help": "Zum Ausklappen und Hinzufügen von weiteren Elementen klicken Sie hier",
"form.group-expand-help": "Zum Ausklappen und Hinzufügen weiterer Elemente klicken Sie bitte hier.",
// "form.last-name": "Last name",
"form.last-name": "Nachname",
// "form.loading": "Loading...",
"form.loading": "Am Laden ...",
"form.loading": "Lädt...",
// "form.lookup": "Lookup",
"form.lookup": "Nachschlagen",
@@ -1986,7 +1986,7 @@
// "item.badge.private": "Private",
"item.badge.private": "Privat",
"item.badge.private": "Verborgen",
// "item.badge.withdrawn": "Withdrawn",
"item.badge.withdrawn": "Zurückgezogen",
@@ -2080,7 +2080,7 @@
"item.edit.bitstreams.headers.name": "Name",
// "item.edit.bitstreams.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button",
"item.edit.bitstreams.notifications.discarded.content": "Ihre Änderungen wurden verworfen. Um Ihre Änderungen wiederherzustellen, klicken Sie auf die Schaltfläche 'Rückgängig'",
"item.edit.bitstreams.notifications.discarded.content": "Ihre Änderungen wurden verworfen. Um sie wiederherzustellen, klicken Sie bitte auf \"Rückgängig\".",
// "item.edit.bitstreams.notifications.discarded.title": "Changes discarded",
"item.edit.bitstreams.notifications.discarded.title": "Änderungen verworfen",
@@ -2241,7 +2241,7 @@
"item.edit.metadata.metadatafield.invalid": "Bitte wählen Sie ein gültiges Metadatenfeld",
// "item.edit.metadata.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button",
"item.edit.metadata.notifications.discarded.content": "Ihre Änderungen wurden verworfen. Um diese wieder anzuwenden, klicken Sie auf den 'Rückgängig machen' Knopf",
"item.edit.metadata.notifications.discarded.content": "Ihre Änderungen wurden verworfen. Um sie wiederherzustellen, klicken Sie bitte auf \"Rückgängig\".",
// "item.edit.metadata.notifications.discarded.title": "Changed discarded",
"item.edit.metadata.notifications.discarded.title": "Änderungen verworfen",
@@ -2325,7 +2325,7 @@
"item.edit.private.cancel": "Abbrechen",
// "item.edit.private.confirm": "Make it Private",
"item.edit.private.confirm": "Privat machen",
"item.edit.private.confirm": "Verbergen",
// "item.edit.private.description": "Are you sure this item should be made private in the archive?",
"item.edit.private.description": "Wollen Sie dieses Item als privat markieren.",
@@ -2365,7 +2365,7 @@
"item.edit.reinstate.cancel": "Abbrechen",
// "item.edit.reinstate.confirm": "Reinstate",
"item.edit.reinstate.confirm": "Reinstantiieren",
"item.edit.reinstate.confirm": "Wiederherstellen",
// "item.edit.reinstate.description": "Are you sure this item should be reinstated to the archive?",
"item.edit.reinstate.description": "Sind Sie sicher, dass das Item reinstantiiert werden soll?",
@@ -2397,7 +2397,7 @@
"item.edit.relationships.no-relationships": "Keine Beziehungen",
// "item.edit.relationships.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button",
"item.edit.relationships.notifications.discarded.content": "Ihre Änderungen wurden verworfen. Um sie dennoch anzuwenden klicken Sie auf den 'Rückgängig machen' Knopf",
"item.edit.relationships.notifications.discarded.content": "Ihre Änderungen wurden verworfen. Um sie wiederherzustellen, klicken Sie bitte auf \"Rückgängig\".",
// "item.edit.relationships.notifications.discarded.title": "Changes discarded",
"item.edit.relationships.notifications.discarded.title": "Änderungen verworfen",
@@ -2477,7 +2477,7 @@
"item.edit.tabs.status.buttons.move.label": "Item in eine andere Sammlung verschieben",
// "item.edit.tabs.status.buttons.private.button": "Make it private...",
"item.edit.tabs.status.buttons.private.button": "Privat machen...",
"item.edit.tabs.status.buttons.private.button": "Verbergen",
// "item.edit.tabs.status.buttons.private.label": "Make item private",
"item.edit.tabs.status.buttons.private.label": "Item privat machen",
@@ -2489,7 +2489,7 @@
"item.edit.tabs.status.buttons.public.label": "Item öffentlich machen",
// "item.edit.tabs.status.buttons.reinstate.button": "Reinstate...",
"item.edit.tabs.status.buttons.reinstate.button": "Reinstantiieren...",
"item.edit.tabs.status.buttons.reinstate.button": "Wiederherstellen...",
// "item.edit.tabs.status.buttons.reinstate.label": "Reinstate item into the repository",
"item.edit.tabs.status.buttons.reinstate.label": "Item wieder ins Repositorium einsetzen",
@@ -2780,7 +2780,7 @@
"journal.page.titleprefix": "Zeitschrift: ",
// "journal.search.results.head": "Journal Search Results",
"journal.search.results.head": "Zeitschrift Suchergebenisse",
"journal.search.results.head": "Suchergebnisse für Zeitschriften",
// "journal.search.title": "DSpace Angular :: Journal Search",
"journal.search.title": "DSpace Angular :: Zeitschriftensuche",
@@ -2788,7 +2788,7 @@
// "journalissue.listelement.badge": "Journal Issue",
"journalissue.listelement.badge": "Zeitschriftenausgabe",
"journalissue.listelement.badge": "Zeitschriftenheft",
// "journalissue.page.description": "Description",
"journalissue.page.description": "Beschreibeung",
@@ -2812,7 +2812,7 @@
"journalissue.page.number": "Zählung",
// "journalissue.page.titleprefix": "Journal Issue: ",
"journalissue.page.titleprefix": "Zeitschriftenausgabe: ",
"journalissue.page.titleprefix": "Zeitschriftenheft:",
@@ -2925,7 +2925,7 @@
// "logout.form.header": "Log out from DSpace",
"logout.form.header": "Aus dem Repositorium abmelden",
"logout.form.header": "Abmelden",
// "logout.form.submit": "Log out",
"logout.form.submit": "Abmelden",
@@ -2969,7 +2969,7 @@
"menu.section.browse_community_by_author": "Nach Autor:in",
// "menu.section.browse_community_by_issue_date": "By Issue Date",
"menu.section.browse_community_by_issue_date": "Nach Erscheinungsdateum",
"menu.section.browse_community_by_issue_date": "Nach Erscheinungsdatum",
// "menu.section.browse_community_by_title": "By Title",
"menu.section.browse_community_by_title": "Nach Titel",
@@ -3200,7 +3200,7 @@
"mydspace.messages.no-content": "Kein Inhalt.",
// "mydspace.messages.no-messages": "No messages yet.",
"mydspace.messages.no-messages": "Noch keine Nachrichten.",
"mydspace.messages.no-messages": "Es sind noch keine Nachrichten vorhanden.",
// "mydspace.messages.send-btn": "Send",
"mydspace.messages.send-btn": "Senden",
@@ -3359,7 +3359,7 @@
// "pagination.results-per-page": "Results Per Page",
"pagination.results-per-page": "Anzeige pro Seite",
"pagination.results-per-page": "Treffer pro Seite",
// "pagination.showing.detail": "{{ range }} of {{ total }}",
"pagination.showing.detail": "{{ range }} von {{ total }}",
@@ -3587,10 +3587,10 @@
"profile.metadata.form.label.lastname": "Nachname",
// "profile.metadata.form.label.phone": "Contact Telephone",
"profile.metadata.form.label.phone": "Kontakt Telefon",
"profile.metadata.form.label.phone": "Telefonnummer",
// "profile.metadata.form.notifications.success.content": "Your changes to the profile were saved.",
"profile.metadata.form.notifications.success.content": "Ihre Änderungen am Profil wurden gespeichert.",
"profile.metadata.form.notifications.success.content": "Ihre Profiländerungen wurden gespeichert.",
// "profile.metadata.form.notifications.success.title": "Profile saved",
"profile.metadata.form.notifications.success.title": "Profil gespeichert",
@@ -3617,10 +3617,10 @@
"profile.security.form.label.passwordrepeat": "Zum Bestätigen erneut eingeben",
// "profile.security.form.notifications.success.content": "Your changes to the password were saved.",
"profile.security.form.notifications.success.content": "Ihre Änderungen am Passwort wurden gespeichert.",
"profile.security.form.notifications.success.content": "Ihr geändertes Passwort wurde gespeichert.",
// "profile.security.form.notifications.success.title": "Password saved",
"profile.security.form.notifications.success.title": "Password gespeichert",
"profile.security.form.notifications.success.title": "Passwort gespeichert",
// "profile.security.form.notifications.error.title": "Error changing passwords",
"profile.security.form.notifications.error.title": "Fehler beim Ändern von Passwörtern",
@@ -3727,7 +3727,7 @@
"register-page.create-profile.identification.last-name.error": "Bitte geben Sie einen Nachnamen ein",
// "register-page.create-profile.identification.contact": "Contact Telephone",
"register-page.create-profile.identification.contact": "Kontakt Telefon",
"register-page.create-profile.identification.contact": "Telefonnummer",
// "register-page.create-profile.identification.language": "Language",
"register-page.create-profile.identification.language": "Sprache",
@@ -3760,7 +3760,7 @@
"register-page.create-profile.submit.error.content": "Bei der Registrierung eines neuen Accounts ist ein Fehler aufgetreten.",
// "register-page.create-profile.submit.error.head": "Registration failed",
"register-page.create-profile.submit.error.head": "Registrierung fehlgeschlagen.",
"register-page.create-profile.submit.error.head": "Registrierung fehlgeschlagen",
// "register-page.create-profile.submit.success.content": "The registration was successful. You have been logged in as the created user.",
"register-page.create-profile.submit.success.content": "Die Registrierung war erfolgreich. Sie wurden als der:die angelegte Benutzer:in angemeldet.",
@@ -3817,16 +3817,16 @@
"relationships.isAuthorOf": "Autor:innen",
// "relationships.isAuthorOf.Person": "Authors (persons)",
"relationships.isAuthorOf.Person": "AutorInnen (Personen)",
"relationships.isAuthorOf.Person": "Autor:innen (Personen)",
// "relationships.isAuthorOf.OrgUnit": "Authors (organizational units)",
"relationships.isAuthorOf.OrgUnit": "Autor:innen (Organisationseinheiten)",
// "relationships.isIssueOf": "Journal Issues",
"relationships.isIssueOf": "Zeitschriftenausgaben",
"relationships.isIssueOf": "Zeitschriftenhefte",
// "relationships.isJournalIssueOf": "Journal Issue",
"relationships.isJournalIssueOf": "Zeitschriftenausgabe",
"relationships.isJournalIssueOf": "Zeitschriftenheft",
// "relationships.isJournalOf": "Journals",
"relationships.isJournalOf": "Zeitschriften",
@@ -3894,7 +3894,7 @@
"resource-policies.create.page.title": "Eine neue Ressourcen-Richtlinie erstellen",
// "resource-policies.delete.btn": "Delete selected",
"resource-policies.delete.btn": "Ausgewählte löschen",
"resource-policies.delete.btn": "Markierte löschen",
// "resource-policies.delete.btn.title": "Delete selected resource policies",
"resource-policies.delete.btn.title": "Ausgewählte Ressourcen-Richtlinien löschen",
@@ -4040,13 +4040,13 @@
"search.filters.applied.f.dateSubmitted": "Datum der Einreichung",
// "search.filters.applied.f.discoverable": "Private",
"search.filters.applied.f.discoverable": "Privat",
"search.filters.applied.f.discoverable": "Verborgen",
// "search.filters.applied.f.entityType": "Item Type",
"search.filters.applied.f.entityType": "Item-Typ",
// "search.filters.applied.f.has_content_in_original_bundle": "Has files",
"search.filters.applied.f.has_content_in_original_bundle": "Hat Dateien",
"search.filters.applied.f.has_content_in_original_bundle": "Dateien dazu vorhanden?",
// "search.filters.applied.f.itemtype": "Type",
"search.filters.applied.f.itemtype": "Typ",
@@ -4126,7 +4126,7 @@
"search.filters.filter.dateSubmitted.placeholder": "Datum der Einreichung",
// "search.filters.filter.discoverable.head": "Private",
"search.filters.filter.discoverable.head": "Privat",
"search.filters.filter.discoverable.head": "Verborgen",
// "search.filters.filter.withdrawn.head": "Withdrawn",
"search.filters.filter.withdrawn.head": "Zurückgezogen",
@@ -4215,7 +4215,7 @@
// "search.filters.entityType.JournalIssue": "Journal Issue",
"search.filters.entityType.JournalIssue": "Zeitschriftenausgabe",
"search.filters.entityType.JournalIssue": "Zeitschriftenheft",
// "search.filters.entityType.JournalVolume": "Journal Volume",
"search.filters.entityType.JournalVolume": "Zeitschriftenband",
@@ -4302,10 +4302,10 @@
"search.view-switch.show-detail": "Detailanzeige",
// "search.view-switch.show-grid": "Show as grid",
"search.view-switch.show-grid": "Anzeige als Raster",
"search.view-switch.show-grid": "Als Raster anzeigen",
// "search.view-switch.show-list": "Show as list",
"search.view-switch.show-list": "Anzeige als Liste",
"search.view-switch.show-list": "Als Liste anzeigen",
@@ -4465,7 +4465,7 @@
"submission.sections.describe.relationship-lookup.external-source.import-button-title.Journal": "Zeitschrift importieren",
// "submission.sections.describe.relationship-lookup.external-source.import-button-title.Journal Issue": "Import remote journal issue",
"submission.sections.describe.relationship-lookup.external-source.import-button-title.Journal Issue": "Zeitschriftenausgabe importieren",
"submission.sections.describe.relationship-lookup.external-source.import-button-title.Journal Issue": "Zeitschriftenheft importieren",
// "submission.sections.describe.relationship-lookup.external-source.import-button-title.Journal Volume": "Import remote journal volume",
"submission.sections.describe.relationship-lookup.external-source.import-button-title.Journal Volume": "Zeitschriftenband importieren",
@@ -4489,7 +4489,7 @@
"submission.sections.describe.relationship-lookup.external-source.import-modal.cancel": "Abbrechen",
// "submission.sections.describe.relationship-lookup.external-source.import-modal.collection": "Select a collection to import new entries to",
"submission.sections.describe.relationship-lookup.external-source.import-modal.collection": "Wählen Sie eine Sammlung, um neue Einträge dorthin zu importieren",
"submission.sections.describe.relationship-lookup.external-source.import-modal.collection": "Wählen Sie eine Sammlung, um neue Einträge dorthin zu importieren.",
// "submission.sections.describe.relationship-lookup.external-source.import-modal.entities": "Entities",
"submission.sections.describe.relationship-lookup.external-source.import-modal.entities": "Entitäten",
@@ -4519,7 +4519,7 @@
"submission.sections.describe.relationship-lookup.external-source.import-modal.import": "Import",
// "submission.sections.describe.relationship-lookup.external-source.import-modal.Journal.title": "Import Remote Journal",
"submission.sections.describe.relationship-lookup.external-source.import-modal.Journal.title": "Zeitschrift von externer Quelle importieren",
"submission.sections.describe.relationship-lookup.external-source.import-modal.Journal.title": "Zeitschrift aus externer Quelle importieren",
// "submission.sections.describe.relationship-lookup.external-source.import-modal.Journal.added.local-entity": "Successfully added local journal to the selection",
"submission.sections.describe.relationship-lookup.external-source.import-modal.Journal.added.local-entity": "Lokale Zeitschrift wurde erfolgreich zur Auswahl hinzugefügt",
@@ -4549,7 +4549,7 @@
"submission.sections.describe.relationship-lookup.external-source.import-modal.select": "Wählen Sie einen lokalen Treffer aus:",
// "submission.sections.describe.relationship-lookup.search-tab.deselect-all": "Deselect all",
"submission.sections.describe.relationship-lookup.search-tab.deselect-all": "Alle abwählen",
"submission.sections.describe.relationship-lookup.search-tab.deselect-all": "Nichts auswählen",
// "submission.sections.describe.relationship-lookup.search-tab.deselect-page": "Deselect page",
"submission.sections.describe.relationship-lookup.search-tab.deselect-page": "Seite abwählen",
@@ -4642,9 +4642,9 @@
"submission.sections.describe.relationship-lookup.selection-tab.tab-title": "Aktuelle Auswahl ({{ count }})",
// "submission.sections.describe.relationship-lookup.title.isJournalIssueOfPublication": "Journal Issues",
"submission.sections.describe.relationship-lookup.title.isJournalIssueOfPublication": "Zeitschriftenausgaben",
"submission.sections.describe.relationship-lookup.title.isJournalIssueOfPublication": "Zeitschriftenhefte",
// "submission.sections.describe.relationship-lookup.title.JournalIssue": "Journal Issues",
"submission.sections.describe.relationship-lookup.title.JournalIssue": "Zeitschriftenausgaben",
"submission.sections.describe.relationship-lookup.title.JournalIssue": "Zeitschriftenhefte",
// "submission.sections.describe.relationship-lookup.title.isJournalVolumeOfPublication": "Journal Volumes",
"submission.sections.describe.relationship-lookup.title.isJournalVolumeOfPublication": "Zeitschriftenbände",
@@ -4765,7 +4765,7 @@
"submission.sections.describe.relationship-lookup.selection-tab.title.arxiv": "Suchergebnisse",
// "submission.sections.describe.relationship-lookup.name-variant.notification.content": "Would you like to save \"{{ value }}\" as a name variant for this person so you and others can reuse it for future submissions? If you don\'t you can still use it for this submission.",
"submission.sections.describe.relationship-lookup.name-variant.notification.content": "Möchten Sie \"{{ value }}\" als Namesvariante für diese Person speichern? So können Sie und andere diese bei zukünftigen Veröffentlichungen verwenden. Wenn Sie das nicht tun, können Sie die Variante immer noch für diese Veröffentlichung verwenden.",
"submission.sections.describe.relationship-lookup.name-variant.notification.content": "Möchten Sie die Namensvariante \"{{ value }}\" speichern, damit sie bei zukünftigen Veröffentlichungen erneut verwendet werden kann? Sie können die Variante bei dieser Veröffentlichung auch verwenden, ohne sie zu speichern.",
// "submission.sections.describe.relationship-lookup.name-variant.notification.confirm": "Save a new name variant",
"submission.sections.describe.relationship-lookup.name-variant.notification.confirm": "Als Namensvariante speichern",
@@ -4813,7 +4813,7 @@
"submission.sections.general.discard_success_notice": "Einreichung erfolgreich verworfen.",
// "submission.sections.general.metadata-extracted": "New metadata have been extracted and added to the <strong>{{sectionId}}</strong> section.",
"submission.sections.general.metadata-extracted": "Neue Metainformation wurden extrahier unt dem Bereich <strong>{{sectionId}}</strong> zugeordnet.",
"submission.sections.general.metadata-extracted": "Neue Metadaten wurden extrahiert und dem Bereich <strong>{{sectionId}}</strong> zugeordnet.",
// "submission.sections.general.metadata-extracted-new-section": "New <strong>{{sectionId}}</strong> section has been added to submission.",
"submission.sections.general.metadata-extracted-new-section": "Neuer Bereich <strong>{{sectionId}}</strong> wurde zur Einreichung hinzugefügt.",
@@ -4854,7 +4854,7 @@
"submission.sections.submit.progressbar.describe.steptwo": "Beschreiben",
// "submission.sections.submit.progressbar.detect-duplicate": "Potential duplicates",
"submission.sections.submit.progressbar.detect-duplicate": "Mögliche Dubletten",
"submission.sections.submit.progressbar.detect-duplicate": "Doppelter Eintrag?",
// "submission.sections.submit.progressbar.license": "Deposit license",
"submission.sections.submit.progressbar.license": "Einreichlizenz",
@@ -4898,7 +4898,7 @@
"submission.sections.upload.form.group-label": "Gruppe",
// "submission.sections.upload.form.group-required": "Group is required.",
"submission.sections.upload.form.group-required": "Gruppe ist erforderlich",
"submission.sections.upload.form.group-required": "Bitte geben Sie eine Gruppe an.",
// "submission.sections.upload.form.until-label": "Grant access until",
"submission.sections.upload.form.until-label": "Zugriff gewährt bis",
@@ -4994,7 +4994,7 @@
"submission.workflow.tasks.claimed.return": "Zurück in den gemeinsamen Aufgabenbereich",
// "submission.workflow.tasks.claimed.return_help": "Return the task to the pool so that another user may perform the task.",
"submission.workflow.tasks.claimed.return_help": "Aufgabe in den gemeinsamen Aufgabenbereich überführen, so dass ein anderer Bearbeiter die Aufgabe übernehmen kann.",
"submission.workflow.tasks.claimed.return_help": "Aufgabe in den Aufgabenpool zurückgeben, so dass jemand Anderes die Aufgabe übernehmen kann",
@@ -5016,7 +5016,7 @@
"submission.workflow.tasks.pool.claim": "Übernehmen",
// "submission.workflow.tasks.pool.claim_help": "Assign this task to yourself.",
"submission.workflow.tasks.pool.claim_help": "Aufgabe übernehmen.",
"submission.workflow.tasks.pool.claim_help": "Aufgabe übernehmen",
// "submission.workflow.tasks.pool.hide-detail": "Hide detail",
"submission.workflow.tasks.pool.hide-detail": "Details verbergen",
@@ -5058,13 +5058,13 @@
"uploader.browse": "stöbern",
// "uploader.drag-message": "Drag & Drop your files here",
"uploader.drag-message": "Ziehen Sie Ihre Dateien hierhin",
"uploader.drag-message": "Bitte ziehen Sie Ihre Dateien hierhin.",
// "uploader.or": ", or ",
"uploader.or": ", oder",
// "uploader.processing": "Processing",
"uploader.processing": "Bearbeitung läuft",
"uploader.processing": "In Arbeit...",
// "uploader.queue-length": "Queue length",
"uploader.queue-length": "Länge der Warteschlange",

View File

@@ -491,9 +491,9 @@
"admin.search.item.edit": "Edit",
"admin.search.item.make-private": "Make Private",
"admin.search.item.make-private": "Make non-discoverable",
"admin.search.item.make-public": "Make Public",
"admin.search.item.make-public": "Make discoverable",
"admin.search.item.move": "Move",
@@ -680,11 +680,11 @@
"browse.metadata.title.breadcrumbs": "Browse by Title",
"browse.next.button": "Next",
"pagination.next.button": "Next",
"browse.next.button.disabled.tooltip": "No more pages of results",
"pagination.previous.button": "Previous",
"browse.previous.button": "Previous",
"pagination.next.button.disabled.tooltip": "No more pages of results",
"browse.startsWith.choose_start": "(Choose start)",
@@ -1627,7 +1627,7 @@
"item.alerts.private": "This item is private",
"item.alerts.private": "This item is non-discoverable",
"item.alerts.withdrawn": "This item has been withdrawn",
@@ -1639,7 +1639,7 @@
"item.badge.private": "Private",
"item.badge.private": "Non-discoverable",
"item.badge.withdrawn": "Withdrawn",
@@ -1878,29 +1878,29 @@
"item.edit.private.cancel": "Cancel",
"item.edit.private.confirm": "Make it Private",
"item.edit.private.confirm": "Make it non-discoverable",
"item.edit.private.description": "Are you sure this item should be made private in the archive?",
"item.edit.private.description": "Are you sure this item should be made non-discoverable in the archive?",
"item.edit.private.error": "An error occurred while making the item private",
"item.edit.private.error": "An error occurred while making the item non-discoverable",
"item.edit.private.header": "Make item private: {{ id }}",
"item.edit.private.header": "Make item non-discoverable: {{ id }}",
"item.edit.private.success": "The item is now private",
"item.edit.private.success": "The item is now non-discoverable",
"item.edit.public.cancel": "Cancel",
"item.edit.public.confirm": "Make it Public",
"item.edit.public.confirm": "Make it discoverable",
"item.edit.public.description": "Are you sure this item should be made public in the archive?",
"item.edit.public.description": "Are you sure this item should be made discoverable in the archive?",
"item.edit.public.error": "An error occurred while making the item public",
"item.edit.public.error": "An error occurred while making the item discoverable",
"item.edit.public.header": "Make item public: {{ id }}",
"item.edit.public.header": "Make item discoverable: {{ id }}",
"item.edit.public.success": "The item is now public",
"item.edit.public.success": "The item is now discoverable",
@@ -1984,13 +1984,13 @@
"item.edit.tabs.status.buttons.move.label": "Move item to another collection",
"item.edit.tabs.status.buttons.private.button": "Make it private...",
"item.edit.tabs.status.buttons.private.button": "Make it non-discoverable...",
"item.edit.tabs.status.buttons.private.label": "Make item private",
"item.edit.tabs.status.buttons.private.label": "Make item non-discoverable",
"item.edit.tabs.status.buttons.public.button": "Make it public...",
"item.edit.tabs.status.buttons.public.button": "Make it discoverable...",
"item.edit.tabs.status.buttons.public.label": "Make item public",
"item.edit.tabs.status.buttons.public.label": "Make item discoverable",
"item.edit.tabs.status.buttons.reinstate.button": "Reinstate...",
@@ -3205,7 +3205,7 @@
"search.filters.applied.f.dateSubmitted": "Date submitted",
"search.filters.applied.f.discoverable": "Private",
"search.filters.applied.f.discoverable": "Non-discoverable",
"search.filters.applied.f.entityType": "Item Type",
@@ -3283,7 +3283,7 @@
"search.filters.filter.dateSubmitted.label": "Search date submitted",
"search.filters.filter.discoverable.head": "Private",
"search.filters.filter.discoverable.head": "Non-discoverable",
"search.filters.filter.withdrawn.head": "Withdrawn",
@@ -3412,6 +3412,8 @@
"search.results.empty": "Your search returned no results.",
"search.results.view-result": "View",
"default.search.results.head": "Search Results",

View File

@@ -182,7 +182,8 @@ export class DefaultAppConfig implements AppConfig {
{ code: 'nl', label: 'Nederlands', active: true },
{ code: 'pt-PT', label: 'Português', active: true },
{ code: 'pt-BR', label: 'Português do Brasil', active: true },
{ code: 'fi', label: 'Suomi', active: true }
{ code: 'fi', label: 'Suomi', active: true },
{ code: 'bn', label: 'বাংলা', active: true }
];
// Browse-By Pages

View File

@@ -178,6 +178,10 @@ export const environment: BuildConfig = {
code: 'lv',
label: 'Latviešu',
active: true,
}, {
code: 'bn',
label: 'বাংলা',
active: true,
}],
// Browse-By Pages

View File

@@ -1451,7 +1451,7 @@
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==
"@cypress/request@^2.88.6":
"@cypress/request@^2.88.10":
version "2.88.10"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.10.tgz#b66d76b07f860d3a4b8d7a0604d020c662752cce"
integrity sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==
@@ -2190,10 +2190,10 @@
"@types/mime" "^1"
"@types/node" "*"
"@types/sinonjs__fake-timers@^6.0.2":
version "6.0.4"
resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.4.tgz#0ecc1b9259b76598ef01942f547904ce61a6a77d"
integrity sha512-IFQTJARgMUBF+xVd2b+hIgXWrZEjND3vJtRCvIelcFB5SIXfjV4bOHbHJ0eXKh+0COrBRc8MqteKAz/j88rE0A==
"@types/sinonjs__fake-timers@8.1.1":
version "8.1.1"
resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz#b49c2c70150141a15e0fa7e79cf1f92a72934ce3"
integrity sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==
"@types/sizzle@^2.3.2":
version "2.3.3"
@@ -3456,7 +3456,7 @@ buffer@^4.3.0:
ieee754 "^1.1.4"
isarray "^1.0.0"
buffer@^5.5.0:
buffer@^5.5.0, buffer@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
@@ -3883,15 +3883,14 @@ cli-spinners@^2.5.0:
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d"
integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==
cli-table3@~0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.0.tgz#b7b1bc65ca8e7b5cef9124e13dc2b21e2ce4faee"
integrity sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==
cli-table3@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.1.tgz#36ce9b7af4847f288d3cdd081fbd09bf7bd237b8"
integrity sha512-w0q/enDHhPLq44ovMGdQeeDLvwxwavsJX7oQGYt/LrBlYsyaxyDnp6z3QzFut/6kLLKnlcUVJLrpB7KBfgG/RA==
dependencies:
object-assign "^4.1.0"
string-width "^4.2.0"
optionalDependencies:
colors "^1.1.2"
colors "1.4.0"
cli-truncate@^2.1.0:
version "2.1.0"
@@ -4951,24 +4950,25 @@ cypress-axe@^0.13.0:
resolved "https://registry.yarnpkg.com/cypress-axe/-/cypress-axe-0.13.0.tgz#3234e1a79a27701f2451fcf2f333eb74204c7966"
integrity sha512-fCIy7RiDCm7t30U3C99gGwQrUO307EYE1QqXNaf9ToK4DVqW8y5on+0a/kUHMrHdlls2rENF6TN9ZPpPpwLrnw==
cypress@8.6.0:
version "8.6.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.6.0.tgz#8d02fa58878b37cfc45bbfce393aa974fa8a8e22"
integrity sha512-F7qEK/6Go5FsqTueR+0wEw2vOVKNgk5847Mys8vsWkzPoEKdxs+7N9Y1dit+zhaZCLtMPyrMwjfA53ZFy+lSww==
cypress@9.5.1:
version "9.5.1"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.5.1.tgz#51162f3688cedf5ffce311b914ef49a7c1ece076"
integrity sha512-H7lUWB3Svr44gz1rNnj941xmdsCljXoJa2cDneAltjI9leKLMQLm30x6jLlpQ730tiVtIbW5HdUmBzPzwzfUQg==
dependencies:
"@cypress/request" "^2.88.6"
"@cypress/request" "^2.88.10"
"@cypress/xvfb" "^1.2.4"
"@types/node" "^14.14.31"
"@types/sinonjs__fake-timers" "^6.0.2"
"@types/sinonjs__fake-timers" "8.1.1"
"@types/sizzle" "^2.3.2"
arch "^2.2.0"
blob-util "^2.0.2"
bluebird "^3.7.2"
buffer "^5.6.0"
cachedir "^2.3.0"
chalk "^4.1.0"
check-more-types "^2.24.0"
cli-cursor "^3.1.0"
cli-table3 "~0.6.0"
cli-table3 "~0.6.1"
commander "^5.1.0"
common-tags "^1.8.0"
dayjs "^1.10.4"
@@ -4991,12 +4991,11 @@ cypress@8.6.0:
ospath "^1.2.2"
pretty-bytes "^5.6.0"
proxy-from-env "1.0.0"
ramda "~0.27.1"
request-progress "^3.0.0"
semver "^7.3.2"
supports-color "^8.1.1"
tmp "~0.2.1"
untildify "^4.0.0"
url "^0.11.0"
yauzl "^2.10.0"
d@1, d@^1.0.1:
@@ -11611,11 +11610,6 @@ raf-schd@^4.0.2:
resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.3.tgz#5d6c34ef46f8b2a0e880a8fcdb743efc5bfdbc1a"
integrity sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==
ramda@~0.27.1:
version "0.27.1"
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9"
integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==
randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"