Skip to content

Commit

Permalink
Merged in task/dspace-cris-2023_02_x/DSC-1864_re-worked (pull request D…
Browse files Browse the repository at this point in the history
…Space#2394)

[DSC-1864] Merge tag 'dspace-7.6.2' into task/dspace-cris-2023_02_x/DSC-1864_re-worked

Approved-by: Andrea Barbasso
  • Loading branch information
atarix83 authored and Andrea Barbasso committed Oct 22, 2024
2 parents 84f9750 + fb6df80 commit 0507d46
Show file tree
Hide file tree
Showing 157 changed files with 27,550 additions and 8,409 deletions.
141 changes: 133 additions & 8 deletions config/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ universal:
# 'synced' with the 'dspace.server.url' setting in your backend's local.cfg.
rest:
ssl: true
host: demo.dspace.org
host: dspacecris7.4science.cloud
port: 443
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: /server
Expand Down Expand Up @@ -82,7 +82,7 @@ cache:
anonymousCache:
# Maximum number of pages to cache. Default is zero (0) which means anonymous user cache is disabled.
# As all pages are cached in server memory, increasing this value will increase memory needs.
# Individual cached pages are usually small (<100KB), so a value of max=1000 would only require ~100MB of memory.
# Individual cached pages are usually small (<100KB), so a value of max=1000 would only require ~100MB of memory.
max: 0
# Amount of time after which cached pages are considered stale (in ms). After becoming stale, the cached
# copy is automatically refreshed on the next request.
Expand Down Expand Up @@ -134,10 +134,10 @@ notifications:
submission:
autosave:
# NOTE: which metadata trigger an autosave
metadata: []
metadata: ['dc.title', 'dc.identifier.doi', 'dc.identifier.pmid', 'dc.identifier.arxiv', 'dc.identifier.patentno', 'dc.identifier.scopus', 'dc.identifier.isi', 'dcterms.dateSubmitted', 'dc.identifier.applicationnumber']
# NOTE: after how many time (milliseconds) submission is saved automatically
# eg. timer: 5 * (1000 * 60); // 5 minutes
timer: 0
timer: 300000
icons:
metadata:
# NOTE: example of configuration
Expand All @@ -146,7 +146,17 @@ submission:
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
# style: fas fa-user
- name: dc.author
style: fas fa-user
style: "fas fa-user"
- name: dc.contributor.author
style: "fas fa-user"
- name: dc.contributor.editor
style: "fas fa-user"
- name: oairecerif.author.affiliation
style: "fas fa-university"
- name: oairecerif.editor.affiliation
style: "fas fa-university"
- name: dc.relation.grantno
style: "fas fa-info-circle"
# default configuration
- name: default
style: ''
Expand All @@ -160,12 +170,23 @@ submission:
- value: 600
style: text-success
- value: 500
style: text-info
- value: 400
style: text-warning
- value: 400
style: text-danger
- value: 300
style: text-dark
- value: 200
style: text-dark
- value: 100
style: text-dark
# default configuration
- value: default
style: text-muted
detectDuplicate:
# NOTE: list of additional item metadata to show for duplicate match presentation list
metadataDetailsList:
- label: 'Document type'
name: dc.type

# Default Language in which the UI will be rendered if the user's browser language is not an active language
defaultLanguage: en
Expand Down Expand Up @@ -218,6 +239,9 @@ languages:
- code: kk
label: Қазақ
active: true
- code: it
label: Italiano
active: true
- code: lv
label: Latviešu
active: true
Expand Down Expand Up @@ -261,8 +285,12 @@ browseBy:
fiveYearLimit: 30
# The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items)
defaultLowerLimit: 1900
# Whether to add item badges to BOTH browse and search result lists.
showLabels: true
# If true, thumbnail images for items will be added to BOTH search and browse result lists.
showThumbnails: true
# Whether to add item thumbnail images to BOTH browse and search result lists.
showMetrics: false
# The number of entries in a paginated browse results list.
# Rounded to the nearest size in the list of selectable sizes on the
# settings menu.
Expand Down Expand Up @@ -294,6 +322,19 @@ item:
# Rounded to the nearest size in the list of selectable sizes on the
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
pageSize: 5
# The maximum number of metadata values to add to the metatag list of the item page
metatagLimit: 20
# The maximum number of values for repeatable metadata to show in the full item
metadataLimit: 20

# When the search results are retrieved, for each item type the metadata with a valid authority value are inspected.
# Referenced items will be fetched with a find all by id strategy to avoid individual rest requests
# to efficiently display the search results.
followAuthorityMetadata:
- type: Publication
metadata: dc.contributor.author
- type: Product
metadata: dc.contributor.author

# Collection Page Config
collection:
Expand Down Expand Up @@ -359,6 +400,10 @@ themes:
attributes:
rel: manifest
href: assets/dspace/images/favicons/manifest.webmanifest
- tagName: link
attributes:
rel: stylesheet
href: "https://fonts.googleapis.com/icon?family=Material+Icons"

# The default bundles that should always be displayed as suggestions when you upload a new bundle
bundle:
Expand Down Expand Up @@ -392,7 +437,87 @@ vocabularies:
vocabulary: 'srsc'
enabled: true

# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query.
# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query.
comcolSelectionSort:
sortField: 'dc.title'
sortDirection: 'ASC'

crisLayout:
urn:
- name: doi
baseUrl: "https://doi.org/"
- name: hdl
baseUrl: "https://hdl.handle.net/"
- name: scopus
baseUrl: "https://www.scopus.com/authid/detail.uri?authorId="
- name: researcherid
baseUrl: "http://www.researcherid.com/rid/"
- name: mailto
baseUrl: "mailto:"
crisRef:
- entityType: PRIVATE
entityStyle:
"dc.contributor.author":
icon: fa fa-user
style: text-muted
- entityType: DEFAULT
entityStyle:
default:
icon: fa fa-user
style: text-info
- entityType: PERSON
entityStyle:
person:
icon: fa fa-user
style: text-success
personStaff:
icon: fa fa-user
style: text-danger
default:
icon: fa fa-user
style: text-info
- entityType: ORGUNIT
entityStyle:
default:
icon: fa fa-university
style: text-success
- entityType: PROJECT
entityStyle:
default:
icon: fas fa-project-diagram
style: text-success
crisRefStyleMetadata:
default: cris.entity.style
itemPage:
OrgUnit:
orientation: vertical
Project:
orientation: vertical
default:
orientation: horizontal
metadataBox:
defaultMetadataLabelColStyle: "col-3"
defaultMetadataValueColStyle: "col-9"

layout:
navbar:
# If true, show the "Community and Collections" link in the navbar; otherwise, show it in the admin sidebar
showCommunityCollection: true

cms:
metadataList: ['cris.cms.home-header', 'cris.cms.home-news', 'cris.cms.footer']

addToAnyPlugin:
scriptUrl: "https://static.addtoany.com/menu/page.js"
socialNetworksEnabled: true
buttons:
- facebook
- twitter
- linkedin
- email
- copy_link
showPlusButton: true
showCounters: true
title: DSpace CRIS 7 demo
# The link to be shown in the shared post, if different from document.location.origin (optional)
# link: https://dspacecris7.4science.cloud/
2 changes: 1 addition & 1 deletion cypress/e2e/collection-statistics.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Collection Statistics Page', () => {
xdescribe('Collection Statistics Page', () => {
const COLLECTIONSTATISTICSPAGE = '/statistics/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION'));

it('should load if you click on "Statistics" from a Collection page', () => {
Expand Down
9 changes: 8 additions & 1 deletion cypress/e2e/community-page.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { testA11y } from 'cypress/support/utils';
import { Options } from 'cypress-axe';

describe('Community Page', () => {

Expand All @@ -9,6 +10,12 @@ describe('Community Page', () => {
cy.get('ds-community-page').should('be.visible');

// Analyze <ds-community-page> for accessibility issues
testA11y('ds-community-page');
testA11y('ds-community-page',
{
rules: {
'heading-order': { enabled: false }
}
} as Options
);
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/community-statistics.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Community Statistics Page', () => {
xdescribe('Community Statistics Page', () => {
const COMMUNITYSTATISTICSPAGE = '/statistics/communities/'.concat(Cypress.env('DSPACE_TEST_COMMUNITY'));

it('should load if you click on "Statistics" from a Community page', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/item-page.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { testA11y } from 'cypress/support/utils';

describe('Item Page', () => {
xdescribe('Item Page', () => {
const ITEMPAGE = '/items/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'));
const ENTITYPAGE = '/entities/publication/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'));

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/item-statistics.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Item Statistics Page', () => {
xdescribe('Item Statistics Page', () => {
const ITEMSTATISTICSPAGE = '/statistics/items/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'));

it('should load if you click on "Statistics" from an Item/Entity page', () => {
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/login-modal.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const page = {

describe('Login Modal', () => {
it('should login when clicking button & stay on same page', () => {
const ENTITYPAGE = '/entities/publication/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'));
cy.visit(ENTITYPAGE);
const COLLECTIONPAGE = '/collections/'.concat(Cypress.env('TEST_COLLECTION'));
cy.visit(COLLECTIONPAGE);

// Login menu should exist
cy.get('ds-log-in').should('exist');
Expand All @@ -50,7 +50,7 @@ describe('Login Modal', () => {
cy.get('ds-log-in').should('not.exist');

// Verify we are still on the same page
cy.url().should('include', ENTITYPAGE);
cy.url().should('include', COLLECTIONPAGE);

// Open user menu, verify user menu & logout button now available
page.openUserMenu();
Expand Down
5 changes: 2 additions & 3 deletions cypress/e2e/search-page.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Options } from 'cypress-axe';
import { testA11y } from 'cypress/support/utils';

describe('Search Page', () => {
Expand Down Expand Up @@ -45,13 +44,13 @@ describe('Search Page', () => {
cy.get('[data-test="grid-object"]').should('be.visible');

// Analyze <ds-search-page> for accessibility issues
testA11y('ds-search-page',
/* testA11y('ds-search-page',
{
rules: {
// Card titles fail this test currently
'heading-order': { enabled: false }
}
} as Options
);
);*/
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/submission.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { testA11y } from 'cypress/support/utils';
//import { TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD, TEST_SUBMIT_COLLECTION_NAME, TEST_SUBMIT_COLLECTION_UUID, TEST_ADMIN_USER, TEST_ADMIN_PASSWORD } from 'cypress/support/e2e';
import { Options } from 'cypress-axe';

describe('New Submission page', () => {
xdescribe('New Submission page', () => {

// NOTE: We already test that new Item submissions can be started from MyDSpace in my-dspace.spec.ts
it('should create a new submission when using /submit path & pass accessibility', () => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"@angular-eslint/eslint-plugin-template": "15.2.1",
"@angular-eslint/schematics": "15.2.1",
"@angular-eslint/template-parser": "15.2.1",
"@angular/cli": "^16.0.4",
"@angular/cli": "^15.2.6",
"@angular/compiler-cli": "^15.2.8",
"@angular/language-service": "^15.2.8",
"@cypress/schematic": "^1.5.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
<div class="sidebar-section">
<a class="nav-item d-flex flex-row flex-nowrap sidebar-section-wrapper"
[ngClass]="{ disabled: isDisabled }"
role="menuitem"
[attr.aria-disabled]="isDisabled"
[attr.aria-labelledby]="adminMenuSectionTitleId(section.id)"
[title]="('menu.section.icon.' + section.id) | translate"
[routerLink]="itemModel.link"
<div>
<a class="sidebar-section-wrapper"
[ngClass]="{ disabled: isDisabled }"
role="menuitem"
[attr.aria-disabled]="isDisabled"
[attr.aria-labelledby]="adminMenuSectionTitleId(section.id)"
[routerLink]="itemModel.link"
[queryParams]="itemModel.queryParams"
(keyup.space)="navigate($event)"
(keyup.enter)="navigate($event)"
href="javascript:void(0);"
>
<div class="sidebar-fixed-element-wrapper" data-test="sidebar-section-icon" aria-hidden="true">
<i class="fas fa-{{section.icon}} fa-fw"></i>
(keyup.space)="navigate($event)"
(keyup.enter)="navigate($event)"
href="javascript:void(0);"
>
<div class="sidebar-fixed-element-wrapper" data-test="sidebar-section-icon" aria-hidden="true">
<i class="fas fa-{{section.icon}} fa-fw"></i>
</div>
<div class="sidebar-collapsible-element-outer-wrapper">
<div class="sidebar-collapsible-element-inner-wrapper sidebar-item">
<span [id]="adminMenuSectionTitleId(section.id)">{{itemModel.text | translate}}</span>
</div>
<div class="sidebar-collapsible-element-outer-wrapper">
<div class="sidebar-collapsible-element-inner-wrapper sidebar-item">
<span [id]="adminMenuSectionTitleId(section.id)">{{itemModel.text | translate}}</span>
</div>
</div>
</a>
</div>
</a>
</div>

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="container">
<div class="d-flex justify-content-between">
<h1 class="h2">{{'bitstream.download.page' | translate:{ bitstream: dsoNameService.getName((bitstream$ | async)) } }}</h1>
<h1 class="h3">{{'bitstream.download.page' | translate:{ bitstream: dsoNameService.getName((bitstream$ | async)) } }}</h1>
<div class="pt-3">
<button *ngIf="hasHistory" (click)="back()" class="btn btn-outline-secondary">
<i class="fas fa-arrow-left"></i> {{'bitstream.download.page.back' | translate}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { SortDirection } from '../../core/cache/models/sort-options.model';
import { SearchManager } from '../../core/browse/search-manager';
import { cold } from 'jasmine-marbles';


describe('BrowseByDatePageComponent', () => {
let comp: BrowseByDatePageComponent;
let fixture: ComponentFixture<BrowseByDatePageComponent>;
Expand Down
Loading

0 comments on commit 0507d46

Please sign in to comment.