Skip to content

Commit 6f1f7ad

Browse files
Mattia VianelliMattia Vianelli
authored andcommitted
DSC-2650 Removed duplicated text and last updated date text, fixed repository name retrieval
1 parent 7f462d2 commit 6f1f7ad

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ <h2 class="mb-3">{{ 'info.end-user-agreement.head' | translate }}</h2>
55
<ds-markdown-viewer [value]="(userAgreementText$ | async)"></ds-markdown-viewer>
66
} @else {
77
<div class="default-agreement-content">
8-
<h1>{{ 'info.end-user-agreement.head' | translate }}</h1>
9-
<p><em>Last updated May 4, 2023</em></p>
108

119
<h2>Agreement to terms</h2>
12-
<p>These Terms of Use constitute a legally binding agreement made between you, whether personally or on behalf of an entity ("you") and {{ 'repository.title' | translate }} ("Company", "we", "us", or "our"), concerning your access to and use of this website as well as any other media form, media channel, mobile website or mobile application related, linked, or otherwise connected thereto (collectively, the "Site"). You agree that by accessing the Site, you have read, understood, and agreed to be bound by all of these Terms of Use and any future amendments thereof.</p>
10+
<p>These Terms of Use constitute a legally binding agreement made between you, whether personally or on behalf of an entity ("you") and {{ repositoryName$ | async }} ("Company", "we", "us", or "our"), concerning your access to and use of this website as well as any other media form, media channel, mobile website or mobile application related, linked, or otherwise connected thereto (collectively, the "Site"). You agree that by accessing the Site, you have read, understood, and agreed to be bound by all of these Terms of Use and any future amendments thereof.</p>
1311
<p>Supplemental terms and conditions or documents that may be posted on the Site from time to time are hereby expressly incorporated herein by reference. We reserve the right, in our sole discretion, to make changes or modifications to these Terms of Use at any time and for any reason. We will alert you about any changes by updating the "Last updated" date of these Terms of Use, and you waive any right to receive specific notice of each such change. Please ensure that you check the applicable Terms every time you use our Site so that you understand which Terms apply. You will be subject to, and will be deemed to have been made aware of and to have accepted, the changes in any revised Terms of Use by your continued use of the Site after the date such revised Terms of Use are posted.</p>
1412
<p>The information provided on the Site is not intended for distribution to or use by any person or entity in any jurisdiction or country where such distribution or use would be contrary to law or regulation or which would subject us to any registration requirement within such jurisdiction or country. Accordingly, those persons who choose to access the Site from other locations do so on their own initiative and are solely responsible for compliance with local laws, if and to the extent local laws are applicable.</p>
1513

src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ import {
1212
import {
1313
BehaviorSubject,
1414
combineLatest,
15+
Observable,
1516
Subscription,
1617
} from 'rxjs';
17-
import { take } from 'rxjs/operators';
18+
import {
19+
map,
20+
take,
21+
} from 'rxjs/operators';
1822

23+
import { Root } from '../../../core/data/root.model';
24+
import { RootDataService } from '../../../core/data/root-data.service';
1925
import { SiteDataService } from '../../../core/data/site-data.service';
2026
import { LocaleService } from '../../../core/locale/locale.service';
2127
import { MetadatumViewModel } from '../../../core/shared/metadata.models';
28+
import { getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators';
2229
import { isNotEmpty } from '../../../shared/empty.util';
2330
import { MarkdownViewerComponent } from '../../../shared/markdown-viewer/markdown-viewer.component';
2431

@@ -45,11 +52,14 @@ export class EndUserAgreementContentComponent implements OnInit, OnDestroy {
4552

4653
userAgreementText$: BehaviorSubject<string | null> = new BehaviorSubject(null);
4754

55+
repositoryName$: Observable<string>;
56+
4857
fallbackText = 'info.end-user-agreement.content.fallback';
4958

5059
constructor(private siteService: SiteDataService,
5160
private localeService: LocaleService,
5261
private translateService: TranslateService,
62+
private rootService: RootDataService,
5363
) {
5464
}
5565

@@ -58,6 +68,11 @@ export class EndUserAgreementContentComponent implements OnInit, OnDestroy {
5868
}
5969

6070
ngOnInit(): void {
71+
this.repositoryName$ = this.rootService.findRoot(true).pipe(
72+
getFirstSucceededRemoteDataPayload(),
73+
map((payload: Root) => payload.dspaceName),
74+
);
75+
6176
const site$ = this.siteService.find().pipe(take(1));
6277
this.subs.push(
6378
combineLatest([site$, this.localeService.getCurrentLanguageCode()]).subscribe(([site, langCode]) => {

0 commit comments

Comments
 (0)