Commit dd506ab
* Clarin9/Point LINDAT header menu to the portal site links (#876)
The dspace-theme header (the active LINDAT/CLARIAH-CZ theme) linked the main
menu entries to in-app routes (routerLink="community-list", "education",
"projects", "tools", "en/services", "partners"...). Those resolve under the
/repository base href, so the top navigation no longer pointed at the
LINDAT/CLARIAH-CZ portal as in the v7 production theme, failing:
- homePage: "menu options should have correct target links"
Restore the absolute portal targets (/services/catalog, /#education,
/en/services, /partners, ...) with their Czech equivalents, matching the v7
theme. The "Repository" entry keeps routerLink="home" (it links back into the
app).
Re-add the locale helpers the template needs (getLangCode, getLangCodeIfCzech,
translateSlug). In v9 LocaleService#getCurrentLanguageCode is asynchronous, so
the current language is read synchronously from TranslateService#currentLang
for use in the href bindings.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Clarin9/Keep the /repository base path when redirecting legacy bitstream URLs (#876)
legacyBitstreamURLRedirectGuard built the redirect target with
`new URL(getBitstreamDownloadRoute(payload), HardRedirectService.getBaseUrl())`.
getBitstreamDownloadRoute returns a leading-slash path (/bitstreams/<id>/download),
so resolving it against a base URL keeps only the origin and drops the
/repository namespace; getBaseUrl() (environment.ui.baseUrl) could also carry
the internal SSR host. The old-style bitstream URL therefore redirected to a
broken location (e.g. http://.../bitstreams/<id>/download without /repository,
which returns 404), failing:
- itemPage: "old bitstream url should redirect to the download page"
Redirect to a namespace-prefixed, root-relative path instead
(`<nameSpace>/bitstreams/<id>/download`) so the browser/SSR resolves it against
the current origin and the target stays inside the app when it is mounted under
a sub-path. Works for a root deployment too (empty namespace).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Address Copilot review: normalize header UI language to en/cs
getLangCode() returned TranslateService.currentLang verbatim. The deployment
enables many languages (config.yml doesn't override the default list) and the
language can be browser-negotiated, so a non-en/cs UI language (e.g. 'de'/'fr')
produced malformed LINDAT portal links such as '/de/sluzby' (foreign locale +
Czech-only slug from translateSlug).
Normalize getLangCode() to the two languages the portal supports: 'cs' for
Czech, 'en' for everything else. English and Czech behaviour is unchanged (so
the menu-links test and v7 parity hold); other locales now fall back to
well-formed English portal links. Also drops the now-unused environment import.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Trim header locale-helper comments to one-liners
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Move header language helpers to the base component (as in dtq-dev)
Match the dtq-dev structure: getLangCode/getLangCodeIfCzech/translateSlug now
live in the base header component (src/app/header/header.component.ts) and the
themed dspace header just extends it, instead of carrying the helpers itself.
getLangCode() again follows the current/system UI language (read synchronously
from TranslateService, falling back to the configured language before one is
set) rather than being pinned to en/cs. This restores the dtq-dev behaviour.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Shorten the legacy-bitstream-redirect comment
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 36ccc41 commit dd506ab
4 files changed
Lines changed: 52 additions & 15 deletions
File tree
- src
- app
- bitstream-page
- header
- themes/dspace/app/header
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| |||
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
66 | 97 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
49 | | - | |
| 49 | + | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
| 53 | + | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
0 commit comments