Skip to content

Commit

Permalink
WR444476: Fix the AUT 7.4 DSpace frontUI codebase to work with PR DSp…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexklbuckley committed Oct 14, 2024
1 parent c263e25 commit 0765b33
Show file tree
Hide file tree
Showing 11 changed files with 374 additions and 283 deletions.
301 changes: 301 additions & 0 deletions config/config.development.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,301 @@
# NOTE: will log all redux actions and transfers in console
debug: false

# Angular Universal server settings
# NOTE: these settings define where Node.js will start your UI application. Therefore, these
# "ui" settings usually specify a localhost port/URL which is later proxied to a public URL (using Apache or similar)
ui:
ssl: false
host: localhost
port: 4000
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: /
# The rateLimiter settings limit each IP to a 'max' of 500 requests per 'windowMs' (1 minute).
rateLimiter:
windowMs: 60000 # 1 minute
max: 500 # limit each IP to 500 requests per windowMs
# Trust X-FORWARDED-* headers from proxies (default = true)
useProxies: true

# The REST API server settings
# NOTE: these settings define which (publicly available) REST API to use. They are usually
# 'synced' with the 'dspace.server.url' setting in your backend's local.cfg.
rest:
ssl: true
host: openrepositorydev.aut.ac.nz
port: 443
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: /server

# Caching settings
cache:
# NOTE: how long should objects be cached for by default
msToLive:
default: 900000 # 15 minutes
control: max-age=60 # revalidate browser
autoSync:
defaultTime: 0
maxBufferSize: 100
timePerMethod:
PATCH: 3 # time in seconds

# Authentication settings
auth:
# Authentication UI settings
ui:
# the amount of time before the idle warning is shown
timeUntilIdle: 900000 # 15 minutes
# the amount of time the user has to react after the idle warning is shown before they are logged out.
idleGracePeriod: 300000 # 5 minutes
# Authentication REST settings
rest:
# If the rest token expires in less than this amount of time, it will be refreshed automatically.
# This is independent from the idle warning.
timeLeftBeforeTokenRefresh: 120000 # 2 minutes

# Form settings
form:
# NOTE: Map server-side validators to comparative Angular form validators
validatorMap:
required: required
regex: pattern

# Notification settings
notifications:
rtl: false
position:
- top
- right
maxStack: 8
# NOTE: after how many seconds notification is closed automatically. If set to zero notifications are not closed automatically
timeOut: 5000 # 5 second
clickToClose: true
# NOTE: 'fade' | 'fromTop' | 'fromRight' | 'fromBottom' | 'fromLeft' | 'rotate' | 'scale'
animate: scale

# Submission settings
submission:
autosave:
# NOTE: which metadata trigger an autosave
metadata: []
# NOTE: after how many time (milliseconds) submission is saved automatically
# eg. timer: 5 * (1000 * 60); // 5 minutes
timer: 0
icons:
metadata:
# NOTE: example of configuration
# # NOTE: metadata name
# - name: dc.author
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
# style: fas fa-user
- name: dc.author
style: fas fa-user
# default configuration
- name: default
style: ''
authority:
confidence:
# NOTE: example of configuration
# # NOTE: confidence value
# - name: dc.author
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
# style: fa-user
- value: 600
style: text-success
- value: 500
style: text-info
- value: 400
style: text-warning
# default configuration
- value: default
style: text-muted

# Default Language in which the UI will be rendered if the user's browser language is not an active language
defaultLanguage: en

# Languages. DSpace Angular holds a message catalog for each of the following languages.
# When set to active, users will be able to switch to the use of this language in the user interface.
languages:
- code: en
label: English
active: true
- code: cs
label: Čeština
active: true
- code: de
label: Deutsch
active: true
- code: es
label: Español
active: true
- code: fr
label: Français
active: true
- code: gd
label: Gàidhlig
active: true
- code: lv
label: Latviešu
active: true
- code: hu
label: Magyar
active: true
- 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: sv
label: Svenska
active: true
- code: tr
label: Türkçe
active: true
- code: kk
label: Қазақ
active: true
- code: bn
label: বাংলা
active: true
- code: hi
label: हिंदी
active: true
- code: el
label: Ελληνικά
active: true

# Browse-By Pages
browseBy:
# Amount of years to display using jumps of one year (current year - oneYearLimit)
oneYearLimit: 10
# Limit for years to display using jumps of five years (current year - fiveYearLimit)
fiveYearLimit: 30
# The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items)
defaultLowerLimit: 1900
# If true, thumbnail images for items will be added to BOTH search and browse result lists.
showThumbnails: true
# 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.
pageSize: 20

communityList:
# No. of communities to list per expansion (show more)
pageSize: 20

homePage:
recentSubmissions:
# The number of item showing in recent submission components
pageSize: 5
# Sort record of recent submission
sortField: 'dc.date.accessioned'
topLevelCommunityList:
# No. of communities to list per page on the home page
# This will always round to the nearest number from the list of page sizes. e.g. if you set it to 7 it'll use 10
pageSize: 5

# Item Config
item:
edit:
undoTimeout: 10000 # 10 seconds
# Show the item access status label in items lists
showAccessStatuses: false

# Collection Page Config
collection:
edit:
undoTimeout: 10000 # 10 seconds

# Theme Config
themes:
# Add additional themes here. In the case where multiple themes match a route, the first one
# in this list will get priority. It is advisable to always have a theme that matches
# every route as the last one
#
# # A theme with a handle property will match the community, collection or item with the given
# # handle, and all collections and/or items within it
# - name: 'custom',
# handle: '10673/1233'
#
# # A theme with a regex property will match the route using a regular expression. If it
# # matches the route for a community or collection it will also apply to all collections
# # and/or items within it
# - name: 'custom',
# regex: 'collections\/e8043bc2.*'
#
# # A theme with a uuid property will match the community, collection or item with the given
# # ID, and all collections and/or items within it
# - name: 'custom',
# uuid: '0958c910-2037-42a9-81c7-dca80e3892b4'
#
# # The extends property specifies an ancestor theme (by name). Whenever a themed component is not found
# # in the current theme, its ancestor theme(s) will be checked recursively before falling back to default.
# - name: 'custom-A',
# extends: 'custom-B',
# # Any of the matching properties above can be used
# handle: '10673/34'
#
# - name: 'custom-B',
# extends: 'custom',
# handle: '10673/12'
#
- name: aut
- name: custom
uuid: 5b7854aa-901e-4c5c-a457-7928503cb23f
# # A theme with only a name will match every route
# name: 'custom'
#
# # This theme will use the default bootstrap styling for DSpace components
# - name: BASE_THEME_NAME
#
# - name: dspace
# headTags:
# - tagName: link
# attributes:
# rel: icon
# href: assets/dspace/images/favicons/favicon.ico
# sizes: any
# - tagName: link
# attributes:
# rel: icon
# href: assets/dspace/images/favicons/favicon.svg
# type: image/svg+xml
# - tagName: link
# attributes:
# rel: apple-touch-icon
# href: assets/dspace/images/favicons/apple-touch-icon.png
# - tagName: link
# attributes:
# rel: manifest
# href: assets/dspace/images/favicons/manifest.webmanifest

# The default bundles that should always be displayed as suggestions when you upload a new bundle
bundle:
standardBundles: [ ORIGINAL, THUMBNAIL, LICENSE ]

# Whether to enable media viewer for image and/or video Bitstreams (i.e. Bitstreams whose MIME type starts with 'image' or 'video').
# For images, this enables a gallery viewer where you can zoom or page through images.
# For videos, this enables embedded video streaming
mediaViewer:
image: false
video: false

# Whether the end user agreement is required before users use the repository.
# If enabled, the user will be required to accept the agreement before they can use the repository.
# And whether the privacy statement should exist or not.
info:
enableEndUserAgreement: true
enablePrivacyStatement: true

# Whether to enable Markdown (https://commonmark.org/) and MathJax (https://www.mathjax.org/)
# display in supported metadata fields. By default, only dc.description.abstract is supported.
markdown:
enabled: false
mathjax: false
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { EntityTypeDataService } from '../../core/data/entity-type-data.service'
import { ItemType } from '../../core/shared/item-relationships/item-type.model';
import { MetadataValue } from '../../core/shared/metadata.models';
import { getFirstSucceededRemoteListPayload } from '../../core/shared/operators';
import { collectionFormEntityTypeSelectionConfig, collectionFormModels, } from './collection-form.models';
import { collectionFormEntityTypeSelectionConfig, collectionFormModels } from './collection-form.models';
import { NONE_ENTITY_TYPE } from '../../core/shared/item-relationships/item-type.resource-type';

/**
Expand Down Expand Up @@ -92,7 +92,6 @@ export class CollectionFormComponent extends ComColFormComponent<Collection> imp
this.entityTypeSelection.disabled = true;
}
});

this.formModel = [...collectionFormModels, this.entityTypeSelection];

super.ngOnInit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const administratorStyleFormModels: DynamicFormControlModel[] = [
new DynamicTextAreaModel({
id: 'css',
name: 'dspace.collection.css',
spellCheck: environment.form.spellCheck,
}),
];

Expand Down Expand Up @@ -54,5 +53,5 @@ export const collectionFormModels: DynamicFormControlModel[] = [
new DynamicTextAreaModel({
id: 'license',
name: 'dc.rights.license',
})
}),
];
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { NgModule } from '@angular/core';

import { CollectionFormComponent } from './collection-form.component';
import { CollectionStylesFormComponent } from './collection-form.styles';
import { SharedModule } from '../../shared/shared.module';
import { ComcolModule } from '../../shared/comcol/comcol.module';
import { FormModule } from '../../shared/form/form.module';
Expand All @@ -13,9 +14,11 @@ import { FormModule } from '../../shared/form/form.module';
],
declarations: [
CollectionFormComponent,
CollectionStylesFormComponent,
],
exports: [
CollectionFormComponent
CollectionFormComponent,
CollectionStylesFormComponent,
]
})
export class CollectionFormModule {
Expand Down
Loading

0 comments on commit 0765b33

Please sign in to comment.