Commit 731311b
authored
ADAPT port of the dtq-dev ROR display cluster (FE side of the ROR feature):
- a9fc7f5 (#1339): authority-based publisher search links + ROR icon on the
CLARIN item page untyped field and the search-result card.
- 0ac3e53 (#1337): form.other-information.ror-id / .location i18n labels.
Runtime:
- clarin-shared-util.ts: new buildAuthoritySearchFilter(searchType, mdValue) centralises
the authority-vs-equals operator logic; loadItemAuthors refactored onto it
(behaviour-preserving). isEmpty added to the empty.util import.
- clarin-generic-item-field: getLinkToSearch rewritten to resolve the full MetadataValue
via allMetadata()[index] (so a ROR authority is used); getMetadataValue removed. HTML:
ROR <img> added inside the type==='search' anchor, guarded by
mdValue.authority && fields includes dc.publisher/creativework.publisher.
- clarin-item-box-view: publisherMd via allMetadata(['dc.publisher','creativework.publisher']);
hasPublisherRorAuthority flag; publisherRedirectLink via the helper. HTML: [href]->[attr.href]
(no transient broken link before assignBaseUrl resolves) + @if(hasPublisherRorAuthority) ROR icon.
v9 adaptations:
- Templates rewritten to @if (v9 is @if-migrated; fork used *ngIf); BS4 ml-1 -> BS5 ms-1.
- item-box-view: did NOT drag in the fork pre-image's metadataLangToBcp47 line (that comes
from the not-yet-ported a11y commit d154682).
- ror-icon.svg: kept the existing vanilla blob (24735df), NOT the fork blob (add/add).
- i18n: location BEFORE orcid, ror-id AFTER orcid (en) / AFTER other-names (cs), commented-
English + Czech pair convention. Hand-merged into the CLARIN-modified json5.
- Specs (all 3 dropped by the v9 squash) restored & adapted to standalone TestBed:
clarin-shared-util.spec.ts (7 tests), clarin-generic-item-field.component.spec.ts
(7 tests incl. the AC5 negative-icon rendering test: no ROR icon on dc.subject),
clarin-item-box-view.component.spec.ts (10 tests, +provideRouter for the standalone
routerLink). Karma: 24/24 green. lint:nobuild: 0 errors.
Cluster: BE 00501a2db0 (SimpleRORAuthority) is already deployed (merged BE-3 #1381), so the
feature is live-verifiable. Without an authority the FE degrades to the equals fallback.
Fulfils CLARIN_V9_POST_SNAPSHOT_SYNC_ACCEPTANCE.md §5 / a9fc7f5 + 0ac3e53 (FE-3, Vlna 3).
1 parent 10a4e27 commit 731311b
10 files changed
Lines changed: 464 additions & 43 deletions
File tree
- src
- app
- item-page/simple/field-components/clarin-generic-item-field
- assets/i18n
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
Lines changed: 125 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 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 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
Lines changed: 9 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | 176 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | 177 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
198 | 184 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 185 | + | |
| 186 | + | |
207 | 187 | | |
208 | 188 | | |
209 | 189 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments