Skip to content

Commit 96fa9f6

Browse files
milanmajchrakPaurikova2vidiecankosarkoMatus Kasak
authored
New Release merge - 2025/July/10 (#912)
* Removed dynamic overflow because every content must be scrollable.. (#716) * add tar for preview (#713) * add tar for preview * UFAL/Enhanced type-bind feature (#714) * The type-bind is loaded from the cfg and correctly rendered * Done some refactoring * Update tests following the type-bind enhancement * Fixed linting error. * Removed unwanted changes and fixed wrong refactored code. * Updated error message when tests failed * Update README.md * UFAL/Show sesznam license on approval page (#722) * Added static files from the SEZNAM license. * Refactored fetching html content from the static files. The logic was moved into the common service. * Show Seznam static license on approval page. * Updated constant name LICENSE_NAME_SEZNAM - added the _CZ to make it more clear that is Czech license * UFAL/share submission by email (#720) * Added share submission button into workspaceitem actions page. * Added notification about the success of the sharing the submission. * Created share submission module, page with routing. That page could access only the administrator. * WIP - created a new page `change-submitter-page`. * Created page when the user could take the workspace item as its own. * Pretified the code and added some docs * Updated tests following the new feature * Fixed unwanted changes, updated docs * UFAL/Autocomplete enhancement (#718) * Added support for searching results from specific solr indexes. Updated autocomplete component to search values from custom solr index. The autocomplete component could have attribute for resolving the custom index from the submission-forms definition. * Show suggestions for `solr-handle_title_ac` and `solr-subject_ac` * Fixed tests * Formatted language suggestions, added docs and fixed tests. * Refactored the code following the review requirements. * Fixed type in the word pretify * UFAL/License page - wrong layout in Firefox (#721) * Removed flex class and used width style instead of col * Removed unsued class * Changed style in the html into classes * Migrated Vanilla cs messages into clarin 7.6.1. cs messages (#669) * Migrated Vanilla cs messages into clarin 7.6.1. cs messages * updated translation * Updated cs localization for subcommunities and subcollections * Changed `prispeveku` to `prispevku` * Updated messages for the 'supervised' and 'claim' sentenses --------- Co-authored-by: Ondrej Kosarko <kosarko@ufal.mff.cuni.cz> * UFAL/Share submission with user not only admin (#728) * The submitter information cannot be displayed in some cases, but show a few information about the Item * Added missing trailing comma * Fixed docs * Updated messages following last commit to upstream. (#731) * Updated dspace prefix to lindat (#734) * Added notification when the shibboleth authentication is failed (#732) * Removed two IT: (#737) 1. Author does not have a two input fields. 2. Test for checking the notice step will be transformed into UI test, because we do not want to keep such specific collection for generic IT. * Update all static licenses (#726) * added licenses from ufal commit dcbe87e02931dee78b13c4b3995a6cef3aeacd32 * added missing static licenses * remove static from licenses path * no_static_ as const * checkstyle * Use NAMESPACES from the .env (#727) * Use NAMESPACES from the .env * Created symbolic link for the tomcat folder * Updated docker compose files - can load more properties from the `.env` * Update deploy.yml to increase timeout (#738) Because some tests were canceled during processing. * Use only 4000, not the {UI_PORT} from the .env because in the container it is always 4000 (#740) * Update docker-compose-rest.yml Uncommented /repository/ namespace in the docker-compose.yml. It is only for one deploy. * Update docker-compose-rest.yml Undo exposing server on the /repository/ path * Use only / and /server namespaces, not the values from the .env because in the container it is always `/` and `/server` (#741) * Expose tomcat `/server` on `/repository/server` * Take a customized docker-compose-rest.yml which exposes the server on /repository/server * Updated a path to take right docker-compose files * Undo using only default namespaced `/` and `/server` * Use custom `docker-compose.yml` from the testing server * UFAL/Shibboleth fixed wrong redirect after login with verification token (#733) * Used hardredirect instead of the standard router.redirect because the user could be stucked on the loading page * Added doc why * Added missing whitespace * Use path `./assets` instead of `/assets` (#742) * new download instruction for cmd using zip from backend (#739) * Get UI base URL from BE (#744) * Check that the custom type bind field in configured in the `submission-forms` when it is configured in the cfg property (#745) * Searching by type is changed to 'type' instead of 'itemtype' because it was changed in the autocomplete enhnancement (#749) * Use `autoLogin` method (#747) * UFAL/Matomo statistics using angulartics2 (#748) * Modified matomo tracking in footer component * Do not use routerless Matomo because we want to track view on every page redirect * The Matomo statistics are tracked properly. * Prettyfied the code * Fix linting error * Fixed unit tests following the matomo statistics update * Fixed linting error * Added a document title in the footer * Added category to the eventTrack because it is required for the Matomo. * Refactored using matomo statistics - added into browser init service, because the Matomo statistics wasn't rendered on production * Changed matomo-settings location --------- Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk> * Update db-import action Try a commit when the import worked. * Update import-db action - use main branch * Added a translation for the searching filter `subjectFirstValue` (redirect from home page). (#752) * Ensure the redirect URL starts with a slash (#753) * Added volume into docker-compose (#754) * UFAL/Load the matomo configuration from the environment (#755) * Added volume into docker-compose * Take a matomo configuration from the environment * Fetch the matomo properties from the config, not from the environment (#756) * Load the szn license in oninit method (#757) * UFAL/Temporary fix for the type-bind. The form automatically refreshes after the type is changed. (#761) * The Save action is automatically dispatched when the type is changed * Updated the handleFormSave method name to `dispatchFormSaveAndReinitialize` * Added missing function to mock object * Execute autoregistration component only in client side (#762) * The Autocomplete Component is dynamically loaded as a standalone component only in the browser using the Loader component. (#763) * UFAL/footer header images (#760) * Footer images upload to assets/images/footer/ and change of images src attributes * Changed src paths to start with ./ --------- Co-authored-by: Juraj Roka <juraj.roka@dataquest.sk> * ufal/customize the footer (#759) * Footer details update by Lindat live instance's footer * Copied UI tests fix from the dtq-dev --------- Co-authored-by: Juraj Roka <juraj.roka@dataquest.sk> Co-authored-by: milanmajchrak <milan.majchrak@dataquest.sk> * Copied fixes from the lindat branch (#770) * Copied PR 769 * Used root URL to compose download URL with namespace (#768) * Cherry-picked docker compose rest * The dtq-dev is run on /repository branch * Waiting for the http://dev-5.pc:8$INSTANCE/server/api changed to http://dev-5.pc:8$INSTANCE/repository/server/api * Added `repository` namespace to discojuice * Run UI integration tests every hour * Update actions/upload-artifact@v3 to v4 Because it was deprecated and UI tests cannot be run * Run build CRON every 4 hours * Update deploy.yml - changed runner * Update deploy.yml - updated runner everywhere * Update deploy.yml - use `dspace-dep-1` runner again * Fixed failing Integration tests (#773) * Commented out sometimes failing accessibility tests and added wait method to the submission ui test * Cherry picked fix for unique artifact name. --------- Co-authored-by: Tim Donohue <tim.donohue@lyrasis.org> * Update import action.yml - use `/repository` namespace in the import action * Merge pull request DSpace#2694 from hutattedonmyarm/dspace-7_x (#777) [Port dspace-7_x] Enable type-bind for checkbox inputs during submission Co-authored-by: Tim Donohue <tim.donohue@lyrasis.org> * Update build.yml - added a option to manually run build action * save logs * missing $ * print log file name for check * removed superfluous space * renamed log file -> added 'log' at the end of the name * Ufal/License issues (#779) * Fixed pagination when searching licenses by the name. * Fixed Editing license: 1. wrong checked checkboxes for the required info and extended license labels and removed errors from the console. * Update action.yml - defined log_file * Update action.yml - log import into a specific path * Update action.yml - continuously copy logs from the import into another file * Update action.yml - import logging - show path info * Update action.yml - log import - copy logs after they are created * Update action.yml - Start appending when the first file is added to the __logs folder * Added a new workflow which runs a build workflow in every customer * Fixed copying of the import logs to the dev machine (#786) * The copying of the import logs are not creating a new `tail` job every 2s * Call the import every week (#787) * UFAL/Use namespace in the redirect URL (#794) * Use current activated route as a parameter to the `createUrlTree` to compose correct redirect url (#796) * UFAL/Fixed CMD download command - added name (#798) * UFAL/Fixed editing the license - required info is removed/added following the checked checkbox Co-authored-by: Juraj Roka <juraj.roka@dataquest.sk> * UFAL/Copy the refbox content correctly (#801) * Copy the refbox content correctly * Added missing parts of the modal * UFAL/The current version redirect - get the base href using the DOCUMENT (#800) * Get the base href using the DOCUMENT * UFAL/Start the handle server before tomca * Sync with ufal main (#799) * Merge pull request #7 from uib-ub/fix-warnings Address warnings in dockerfiles and composer files * Show resource id (not handle id) in manage handles (ufal#22) * show the resourceId in handle-table * show the resourceId and handle id in edit-handle --------- Co-authored-by: Marvin <linosnchena@gmail.com> * use i18n --------- Co-authored-by: Marvin <linosnchena@gmail.com> * UFAL/Edit item - fixed license redirect Co-authored-by: Juraj Roka <juraj.roka@dataquest.sk> * Add custom dimension (handle) to pageTrack of matomo (#823) * Add custom dimension (handle) to pageTrack of matomo This extends/overrides the pageTrack/eventTrack methods of angulartics matomo plugin and hooks into the event tracking (view-tracker.component) that's there for DSpace internal statistics. * Fix linting issues and PR review comments * Fix tests - misconfigured test env * UFAL/Change menu options redirects (#816) * Change menu options redirects * Fix some menu options redirects by Coderabbit's nitpick comments * Adding cs/en by current language and translating slugs in About-menu * Unit tests - Edit of component.spec file * Typos in comments * UFAL/Preview - fixed loading files (#825) * Show loading icon when loading the files with a asking to contant the administrator when it took so long * The (listOfFiles | async) could be null add a `?` check after it. * UFAL/Handle table issues - Fixed table responsivity and searching (#822) * Fixed table responsivity and searching * Move `table-responsive` to div because it ensures more consistent responsiveness across browsers * Use `combineLatest` because it is more common for RxJS, refactor if condition * UFAL/Redirect to `/lindat` after clicking on the Lindat icon in the home page (#828) * Redirect to `/lindat` after clicking on the Lindat icon in the home page * Update deploy.yml - use correct deploy action for the weekly import * UFAL/Menu options links edit (#832) * Changed the getLangCodeIfCzech links * Changed the dropdown-menu and services links * Ufal dtq sync (#836) * Creating docker-compose file useful for building clarin-dspace on MAC computers (cherry picked from commit 7de4761) * Add link to communities and collections on home page (cherry picked from commit 4673e39) --------- Co-authored-by: Milan Kuchtiak <mkuchtiak@Milans-MacBook-Pro.local> * UFAL/Updated the no file preview message and refactored some code (#837) * Updated the no file preview message and refactored some code. * Added a non null check when accessing the object properties and the message is refactored. * Run Python import weekly * UFAL/Added spacing between clarin & dspace logo (#848) * Added spacing between clarin & dspace logo * Spacing is prettier and when clarin logo is removed, dspace logo is centered * Ufal/seznam license request (#844) * Fix of unwanted Seznam Dataset License request while using other licenses * ZCU-PUB/Fixed encoding of the filename from the URL (#838) (#851) * Added an URL serializer to fix encoding of the special characters from the URL e.g., `[`, `(` because the filename wasn't properly parsed * Added some unit tests for encoding the bitstream filename url * UFAL/Do not mount the Solr configs; copy them each time instead. (#850) * UFAL/Fix the bulk access (#852) * Do not use the clarin item view box for the bulk access * Removed unused import * Clarify the `showClarinViewBox` is boolean * Use the constant for the hardcoded bulk access list id * Ufal dtq sync 2025 05 14 (#855) * Create Acknowledgment-ReadMe.md Acnkowledgment of NRP project (cherry picked from commit ad889b2) * Video files previews This uses the thumbnail as poster (if available) and correctly sets the source of the video currently only works for anonymously accessible files. (cherry picked from commit 4832c2f) * Handle video previews for restricted items append a shortlived token at the right time (error, seeking, stalled) (cherry picked from commit 2c12d7d) * Display only ORIGINAL bitstreams Thumbnails, when available, should be shown istead of the generic MIME_TYPE_IMAGE. Content of the TEXT bundle should not be shown at all this is usually automatically extracted "text layer" of a PDF, useful for indexing, but don't want people downloading it. (cherry picked from commit 3862442) * fix linter and test errors (cherry picked from commit f852096) * Code review follow up the listOfFiles should really not contain files from "TEXT" or "THUMBNAIL" bundles. * code review unsubscribe error$, seeking$ and $stalled * code review - thumbnail might be undefined * code review - consistent formatting * UFAL/Do not add `dtoken` into the URL if it is null (#860) (#861) * UFAL/Added same spacing styles via bootstrap as in login page (#862) * UFAL/Fixed editing of extended license labels * UFAL/License agreement page component errors (#867) * Design fix - added spaces between links * Fix of firstMedataValue null properties * UFAL/Ask Only Once license not downloading bitstream without page reload after agreeing (#874) * Changed logic (condition) of retrieving file download link * Saved the original logic, but changed caching parameter * The filename wasn't properly encoded when it has ?sequence...&isAllowed in the URL, because that query part of the URL was encoded as the filename. (#873) * UI tests for each customer (#865) * Playright after deploy running here * Using different token * Corrected path in copying json file * Checkout only branch in UI tests not master * Added copilot changes --------- Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk> * Ufal dtq sync062025 (#877) * use `$DSPACE_REST_NAMESPACE` for the webapps symlink (cherry picked from commit 9ea936e) * Licenses sync (cherry picked from commit 4ee2f1c) * update header/footer based on latest lindat-common 3.5.0 (cherry picked from commit 7b2f299) * expose both tcp & udp ports of the handle server (cherry picked from commit 46bc936) * Update docker-compose-rest.yml replace ../webapps with /usr/local/tomcat/webapps --------- Co-authored-by: Ondrej Kosarko <okosarko@lindat-repository-ng.services.ufal.cloud> Co-authored-by: Ondrej Kosarko <okosarko@lindat.mff.cuni.cz> * UFAL/License Administration Labels & Required Info checkboxes should work properly (#881) * hotfix - finding index of unchecked box properly to formName arg * UFAL/Searching problems in Manage Handles table (#882) * locked searchbar when searchOption is not picked * edited Resource Type search option to not be case-sensitive * edited Resource Type search option to show nothing when there is no match * try to set lowercase constants without toLowerCase method * Added full list of handles for empty Resource Type search option * refactored empty searchQueries handling and added comment for invalid resourcetype search inputs * Updating UI tests after import (#887) Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk> * UFAL/Show openaire input field every time the EU funding type is selected (#897) * Show openaire input field every time the EU type is selected * UFAL/Publisher search redirect not work #880 (#904) Co-authored-by: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com> * Ufal/commits from ok lindat (#903) * copied static content that was not already in cs/. Otherwise license page (when without .html) might show an error when UI is in Czech and there's no translation. (cherry picked from commit 9e7eea0) * Update header.component.html I'm expecting the image to take me to lindat.cz. There's no other obvious way to navigate out of the repository * This is the change from ufal/clarin-dspace@5fc2414 but applied on v7 * Adding a note about the proprietor change --------- Co-authored-by: Ondrej Kosarko <kosarko@ufal.mff.cuni.cz> Co-authored-by: Michal Kren <michkren@gmail.com> * UFAL/show-no-spinner-when-item-has-no-files (#902) * show msg about no files when item has no files, show no spinenr * check if files are array * check files size * fix error * optimize template with hasNoFiles flag * used behaviourSubject for hasNoFiles / aynchronous * Trigger automated ui tests (#905) * Created trigger for running UI tests for each customer daily * Corrected spaces * Changed name of the tests --------- Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk> * UFAL/License agreement loading spinner after submitting (#892) * Added loading spinner icon after 'I agree' button is clicked * Removed type annotation and rephrased comment * Changes isLoading to async object * Edited loading spinner visibility method - consistency fix * UFAL/User cannot see his submission (#910) * The user always see it's submissions page --------- Co-authored-by: Paurikova2 <michaela.paurikova@dataquest.sk> --------- Co-authored-by: Paurikova2 <107862249+Paurikova2@users.noreply.github.com> Co-authored-by: Jozef Misutka <332350+vidiecan@users.noreply.github.com> Co-authored-by: Ondrej Kosarko <kosarko@ufal.mff.cuni.cz> Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk> Co-authored-by: jurinecko <95219754+jr-rk@users.noreply.github.com> Co-authored-by: Juraj Roka <juraj.roka@dataquest.sk> Co-authored-by: Tim Donohue <tim.donohue@lyrasis.org> Co-authored-by: Paurikova2 <michaela.paurikova@dataquest.sk> Co-authored-by: Ondřej Košarko <ko_ok@centrum.cz> Co-authored-by: Marvin <linosnchena@gmail.com> Co-authored-by: Milan Kuchtiak <mkuchtiak@Milans-MacBook-Pro.local> Co-authored-by: Kasinhou <129340513+Kasinhou@users.noreply.github.com> Co-authored-by: Ondrej Kosarko <okosarko@lindat-repository-ng.services.ufal.cloud> Co-authored-by: Ondrej Kosarko <okosarko@lindat.mff.cuni.cz> Co-authored-by: Michal Kren <michkren@gmail.com>
1 parent 7c9405f commit 96fa9f6

File tree

71 files changed

+21248
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+21248
-60
lines changed

.github/workflows/deploy.yml

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -224,37 +224,34 @@ jobs:
224224
if: inputs.IMPORT
225225
timeout-minutes: 45
226226
steps:
227-
- name: run playwright
228-
run: |
229-
# wait until FE stabilizes a bit
230-
sleep 3m
231-
232-
curl -H "Accept: application/vnd.github.everest-preview+json" \
233-
-H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \
234-
--request POST \
235-
https://api.github.com/repos/dataquest-dev/\
236-
dspace-ui-tests/actions/workflows/cron-test.yml/dispatches \
237-
--data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null
238-
239-
# wait for it to start
240-
sleep 30s
227+
- name: Checkout Playwright tests
228+
uses: actions/checkout@v4
229+
with:
230+
repository: dataquest-dev/dspace-ui-tests
231+
path: dspace-ui-tests
232+
token: ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}
241233

242-
# get result of last job
243-
RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
234+
- name: Checkout main repository
235+
uses: actions/checkout@v4
236+
with:
237+
path: this-repository
244238

245-
# while job did not finish, sleep
246-
while [[ $RES == 'null' ]]; do
247-
sleep 10s
248-
RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
249-
done;
239+
- name: Copy customer config to UI tests repository for merging
240+
run: |
241+
cp this-repository/config/config.lindat.ui.tests.json dspace-ui-tests/customer-constants/
250242
251-
echo $RES
252-
# if last result is not success, return -1 and fail
253-
if [[ $RES != \"success\" ]]; then
243+
- name: test
244+
working-directory: dspace-ui-tests/scripts
245+
env:
246+
HOME_URL: https://dev-5.pc:8443/repository/
247+
NAME: LINDAT
248+
run: |
249+
./test.sh
254250
255-
echo "playwright tests have failed! check appropriate action run in the dspace-ui-tests repository"
256-
exit 1
257-
fi;
251+
- uses: mazoea/ga-maz/end@master
252+
with:
253+
CHOWN_DIR: ./
254+
if: ${{ always() }}
258255

259256
rest-tests-after-import8:
260257
runs-on: ubuntu-latest
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Playwright tests
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
7+
jobs:
8+
playwright-tests:
9+
runs-on: dspace-test-1
10+
timeout-minutes: 45
11+
steps:
12+
- name: Checkout Playwright tests
13+
uses: actions/checkout@v4
14+
with:
15+
repository: dataquest-dev/dspace-ui-tests
16+
path: dspace-ui-tests
17+
token: ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}
18+
19+
- name: Checkout main repository
20+
uses: actions/checkout@v4
21+
with:
22+
path: this-repository
23+
24+
- name: Copy customer config to UI tests repository for merging
25+
run: |
26+
cp this-repository/config/config.lindat.ui.tests.json dspace-ui-tests/customer-constants/
27+
28+
- name: test
29+
working-directory: dspace-ui-tests/scripts
30+
env:
31+
HOME_URL: https://dev-5.pc:8443/repository/
32+
NAME: LINDAT
33+
run: |
34+
./test.sh
35+
36+
- uses: mazoea/ga-maz/end@master
37+
with:
38+
CHOWN_DIR: ./
39+
if: ${{ always() }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Trigger UI Tests for All Customer Branches
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
schedule:
7+
- cron: '0 5 * * *'
8+
9+
permissions:
10+
actions: write # Grants permission to trigger workflows
11+
contents: read # Access to repository contents
12+
13+
jobs:
14+
trigger-builds:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Get and Trigger Customer Branch UI Tests
21+
run: |
22+
# Authenticate with GitHub CLI using the token
23+
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
24+
25+
git fetch --prune origin
26+
BRANCHES=$(git ls-remote --heads origin | awk -F'/' '{print $3"/"$4}' | grep '^customer/')
27+
for branch in $(echo "$BRANCHES" | sed -e 's/[\[\]"]//g' -e 's/,/\n/g'); do
28+
echo "Triggering UI tests for branch: $branch"
29+
gh workflow run playwright-tests.yml --ref $branch
30+
done

src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,14 @@ <h2 id="header" class="border-bottom pb-2">{{'clarin.license.agreement.title' |
8888
</div>
8989
<div class="row pt-3">
9090
<div class="col-12">
91-
<button class="btn btn-success max-width" [disabled]="error$.value.length !== 0" (click)="accept()">
91+
<button class="btn btn-success max-width" [disabled]="error$.value.length !== 0 || (isLoading | async)" (click)="accept()">
9292
{{'clarin.license.agreement.button.agree' | translate}}
93+
<span
94+
*ngIf="isLoading | async"
95+
class="ml-1 spinner-border spinner-border-sm"
96+
role="status"
97+
aria-hidden="true"
98+
></span>
9399
</button>
94100
</div>
95101
</div>

src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, Input, OnInit } from '@angular/core';
22
import { Bitstream } from '../../core/shared/bitstream.model';
33
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
4-
import { switchMap, take } from 'rxjs/operators';
4+
import { finalize, switchMap, take } from 'rxjs/operators';
55
import { followLink } from '../../shared/utils/follow-link-config.model';
66
import { ClarinUserRegistration } from '../../core/shared/clarin/clarin-user-registration.model';
77
import { ClarinUserMetadata } from '../../core/shared/clarin/clarin-user-metadata.model';
@@ -122,6 +122,11 @@ export class ClarinLicenseAgreementPageComponent implements OnInit {
122122
*/
123123
licenseContentSeznam: BehaviorSubject<string> = new BehaviorSubject<string>('');
124124

125+
/**
126+
* Indicates when the submission is in progress and resets after completion
127+
*/
128+
isLoading: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
129+
125130
constructor(
126131
protected clarinLicenseResourceMappingService: ClarinLicenseResourceMappingService,
127132
protected configurationDataService: ConfigurationDataService,
@@ -186,6 +191,8 @@ export class ClarinLicenseAgreementPageComponent implements OnInit {
186191
return;
187192
}
188193

194+
this.isLoading.next(true);
195+
189196
const requestId = this.requestService.generateRequestId();
190197
// Response type must be `text` because it throws response as error byd status code is 200 (Success).
191198
const requestOptions: HttpOptions = Object.create({
@@ -216,7 +223,7 @@ export class ClarinLicenseAgreementPageComponent implements OnInit {
216223
const response = this.rdbService.buildFromRequestUUID(requestId);
217224
// Process response
218225
response
219-
.pipe(getFirstCompletedRemoteData())
226+
.pipe(getFirstCompletedRemoteData(), finalize(() => this.isLoading.next(false)))
220227
.subscribe(responseRD$ => {
221228
if (hasFailed(responseRD$.state)) {
222229
this.notificationService.error(

src/app/core/roles/role.service.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Injectable } from '@angular/core';
22

3-
import { Observable, of as observableOf } from 'rxjs';
4-
import { distinctUntilChanged } from 'rxjs/operators';
3+
import { Observable, of, of as observableOf } from 'rxjs';
54

65
import { RoleType } from './role-types';
76
import { CollectionDataService } from '../data/collection-data.service';
@@ -24,9 +23,8 @@ export class RoleService {
2423
* Check if current user is a submitter
2524
*/
2625
isSubmitter(): Observable<boolean> {
27-
return this.collectionService.hasAuthorizedCollection().pipe(
28-
distinctUntilChanged()
29-
);
26+
// TODO find a way to check if user has submitted items, not just if they have a collection with the submitter role
27+
return of(true);
3028
}
3129

3230
/**
Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
<!-- Loading Spinner -->
2-
<div *ngIf="(listOfFiles | async)?.length === 0" class="d-flex flex-column justify-content-center align-items-center my-3">
3-
<div class="spinner-border text-primary" role="status"></div>
4-
<div class="px-4 pt-2">{{'item.preview.loading-files' | translate}}
5-
<a *ngIf="emailToContact" [href]="'mailto:' + emailToContact" class="email-text">{{ emailToContact }}</a>
1+
<ng-container *ngIf="(listOfFiles | async) as files; else loading">
2+
<!-- Show "No files" message -->
3+
<div *ngIf="(hasNoFiles | async)" class="text-center text-muted my-3">
4+
{{ 'item.view.box.no-files.message' | translate }}
65
</div>
7-
</div>
8-
<div *ngFor="let file of (listOfFiles | async)">
9-
<ds-file-description [fileInput] = 'file'></ds-file-description>
10-
</div>
6+
7+
<!-- Show list of files -->
8+
<div *ngFor="let file of files">
9+
<ds-file-description [fileInput]="file"></ds-file-description>
10+
</div>
11+
</ng-container>
12+
13+
<!-- Spinner shown only while listOfFiles is null or undefined -->
14+
<ng-template #loading>
15+
<div class="d-flex flex-column justify-content-center align-items-center my-3">
16+
<div class="spinner-border text-primary" role="status"></div>
17+
<div class="px-4 pt-2">
18+
{{ 'item.preview.loading-files' | translate }}
19+
<a *ngIf="emailToContact" [href]="'mailto:' + emailToContact" class="email-text">
20+
{{ emailToContact }}
21+
</a>
22+
</div>
23+
</div>
24+
</ng-template>

src/app/item-page/simple/field-components/preview-section/preview-section.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export class PreviewSectionComponent implements OnInit {
1616

1717
listOfFiles: BehaviorSubject<MetadataBitstream[]> = new BehaviorSubject<MetadataBitstream[]>([] as any);
1818
emailToContact: string;
19+
hasNoFiles: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
1920

2021
constructor(protected registryService: RegistryService,
2122
private configService: ConfigurationDataService) {} // Modified
@@ -26,11 +27,10 @@ export class PreviewSectionComponent implements OnInit {
2627
.pipe(getAllSucceededRemoteListPayload())
2728
.subscribe((data: MetadataBitstream[]) => {
2829
this.listOfFiles.next(data);
30+
this.hasNoFiles.next(!Array.isArray(data) || data.length === 0);
2931
});
3032
this.configService.findByPropertyName('lr.help.mail')?.subscribe(remoteData => {
3133
this.emailToContact = remoteData.payload?.values?.[0];
3234
});
3335
}
34-
35-
3636
}

src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-complex.model.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ export class DynamicComplexModel extends DynamicConcatModel {
109109
// remove undefined values
110110
values = values.filter(v => v);
111111

112-
// if funding type is `EU`
113-
let isEUFund = false;
114112
values.forEach((val, index) => {
115113
if (val.value) {
116114
// do not set value if it bigger than allowed length
@@ -123,13 +121,8 @@ export class DynamicComplexModel extends DynamicConcatModel {
123121
if (this.name === SPONSOR_METADATA_NAME) {
124122
// if funding type is `EU`
125123
if (index === FUNDING_TYPE_INDEX && DEFAULT_EU_FUNDING_TYPES.includes(val.value)) {
126-
isEUFund = true;
127-
}
128-
// if funding type is `EU` and input field is `openaire_id` -> show `openaire_id` readonly input field
129-
if (index === EU_IDENTIFIER_INDEX && isEUFund && val.value.includes(EU_PROJECT_PREFIX)) {
124+
// Show EU identifier input field
130125
(this.get(EU_IDENTIFIER_INDEX) as DsDynamicInputModel).hidden = false;
131-
} else {
132-
(this.get(EU_IDENTIFIER_INDEX) as DsDynamicInputModel).hidden = true;
133126
}
134127
}
135128
} else if (hasValue((this.get(index) as DsDynamicInputModel))) {
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<div id="faq-like">
2+
<p><h1 id="anchor">LINDAT Web Crawl Licence</h1></p>
3+
<div>(2024/12/13)</div>
4+
<hr></hr>
5+
<div class="well">
6+
<h2>License Terms</h2>
7+
<p>LINDAT Web Crawl Licence (further as “Agreement”) between The
8+
publisher of the dataset (“The Publisher”) and The user of the dataset
9+
(“The User”).</p>
10+
<p>The User agrees to use the collection data set collected by The
11+
Publisher (the "Collection"). The User agrees to abide by the following
12+
understandings, terms and conditions. These understandings, terms and
13+
conditions apply equally to all or to part of the Collection, including
14+
any updates or new versions of the Collection supplied under this
15+
Agreement.</p>
16+
<p><h3 id="anchor-1">Copyright</h3></p>
17+
<p>The Collection has been obtained by crawling the Internet. Due to the
18+
size of the Collection it has not been practicable to obtain permission
19+
from copyright owners to provide the Collection for the uses permitted
20+
under this Agreement (“Permitted Uses”).</p>
21+
<p>The User understands that all the documents in the Collection are
22+
documents which have been at some time made publicly available on the
23+
Internet and which have been collected using a process which respects
24+
the commonly accepted methods (such as robots.txt) for indicating that
25+
the documents should not be so collected.</p>
26+
<p>Owners of copyright in individual documents may choose to request
27+
deletion of these documents from the Collection.</p>
28+
<p>The limitation on permitted use contained in the following section is
29+
intended to reduce the risk of any action being brought by copyright
30+
owners, but if this happens The User agrees to bear all associated
31+
liability.</p>
32+
<p><h3 id="anchor-2">Permitted Uses</h3></p>
33+
<p>The Collection may only be used for research and development of
34+
natural-language processing, information-retrieval or
35+
document-understanding systems.</p>
36+
<p>Summaries, analyses and interpretations of the linguistic properties
37+
of the Collection may be derived and published, provided it is not
38+
possible to reconstruct the Collection from these summaries.</p>
39+
<p>Small excerpts of the Collection may be displayed to others or
40+
published in a scientific or technical context, solely for the purpose
41+
of describing the research and development carried out and related
42+
issues.</p>
43+
<p>All efforts must be made not to infringe the rights of any third
44+
party including, but not limited to, the authors and publishers of any
45+
excerpts used in accordance with the clauses above in this “Permitted
46+
Uses” section.</p>
47+
<p>The User must make sure that they only display the Collection to or
48+
share the Collection with persons who also signed this Agreement with
49+
The Publisher.</p>
50+
<p><h3 id="anchor-3">Agreement to Delete Data on Request</h3></p>
51+
<p>The User undertakes to delete within thirty days of receiving notice
52+
all copies of any nominated document that is part of the Collection
53+
whenever requested to do so by either The Publisher or by the owner of
54+
copyright for the particular document.</p>
55+
<p><h3 id="anchor-4">No Warranty</h3></p>
56+
<p>The Collection is provided "as is", without warranty of any kind,
57+
express or implied, including but not limited to the warranties of
58+
merchantability, fitness for a particular purpose and noninfringement.
59+
In no event shall The Publisher be liable for any claim, damages or
60+
other liability, whether in an action of contract, tort or otherwise,
61+
arising in any way of the use of the Collection.</p>
62+
<p><h3 id="anchor-5">Termination</h3></p>
63+
<p>Either The Publisher or The User may terminate this Agreement at any time
64+
by notifying the other party in writing. On termination of the Agreement
65+
The User shall destroy all copies of the Collection.</p>
66+
<p><h3 id="anchor-6">Applicable Law</h3></p>
67+
<p>This Agreement is governed by the laws of the Czech Republic.</p>
68+
</div>
69+
</div>

0 commit comments

Comments
 (0)