forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 2
Fixed all mistakes in the Search page #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
99fc548
Composing of the Item's date was refactored and moved into shared ser…
milanmajchrak 3bd55ba
The item view box was refactored. The item view box is different for …
milanmajchrak 5fd3d07
Show workspace items in the `/mydspace` - there were problem with fil…
milanmajchrak 6b32a3c
Use Vanilla file size in the Item View and search results in the item…
milanmajchrak 8d7596f
Updated sorting option names
milanmajchrak 0edafe1
Updated search filter head messages
milanmajchrak 9e89abf
Defined search options in the themed-search.component.ts following CL…
milanmajchrak c11add3
Default configuration list must be set to null instead of empty array…
milanmajchrak ae0435c
Use homepage configuration which contains searching by dc.date.access…
milanmajchrak 8909333
Updated border in the item view box
milanmajchrak bfe34bf
Updated `Has files` filter messages
milanmajchrak 968923f
Show Item type in the Item view from the `emd.type`
milanmajchrak 005878d
Fixed searching by publisher.
milanmajchrak 06fc443
Added languages for `Community` and `Rights` filtering.
milanmajchrak 4de9eae
Updated `Search all of DSpace` button color.
milanmajchrak 9f0e434
Fixed showing license label icons when there is czech translation.
milanmajchrak 111c904
Updated messages on sidebar search and results header.
milanmajchrak 67b8a82
Updated RSS Feed description button and css
milanmajchrak f83a49d
Prettied Copy button of handle in the Item View page
milanmajchrak 99babfc
Updated favicon icon
milanmajchrak 8101850
Update item view box: Fixed occurrences when the author is null.
milanmajchrak 3869062
Remove `DSpace Repository ::` from the browser page title.
milanmajchrak d9e7ab5
Use `LINDAT/CLARIAH-CZ Repository title prefix`
milanmajchrak 696ee0c
Fixed unit tests
milanmajchrak 254f580
Fixed linting errors
milanmajchrak 98c082d
Commented out check for view options in the Search page - for CLARIN …
milanmajchrak 88999a5
Fixed Verify SSR - do not check if there is DSpace in the title
milanmajchrak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...field-components/clarin-identifier-item-field/clarin-identifier-item-field.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| import { Injectable } from '@angular/core'; | ||
| import { TranslateService } from '@ngx-translate/core'; | ||
| import { Item } from '../core/shared/item.model'; | ||
|
|
||
| const MULTIPLE_DATE_VALUES_SEPARATOR = ','; | ||
|
|
||
| @Injectable() | ||
| export class ClarinDateService { | ||
| constructor(private translateService: TranslateService) {} | ||
|
|
||
| /** | ||
| * Compose date value for the item. The date value could be fetched from the local metadata or from the | ||
| * default metadata. The date value could be a single value or multiple values (local metadata). | ||
| * @param item | ||
| */ | ||
| composeItemDate(item: Item): string { | ||
| let localDateValue = item.allMetadataValues('local.approximateDate.issued'); | ||
| let dateValue = item.allMetadataValues('dc.date.issued'); | ||
|
|
||
| // There is no local date value - show only one date metadata value | ||
| if (localDateValue.length === 0) { | ||
| // Date value is not empty | ||
| if (dateValue.length !== 0) { | ||
| return dateValue[0]; | ||
| } else { | ||
| console.error('There is no date value for the item'); | ||
| return ''; | ||
| } | ||
| } | ||
|
|
||
| // There is local date value - that values could be different and should be shown differently | ||
| localDateValue = localDateValue[0]?.split(MULTIPLE_DATE_VALUES_SEPARATOR); | ||
|
|
||
| if (localDateValue.length === 1) { | ||
| return this.updateOneValue(localDateValue); | ||
| } else { | ||
| return this.updateMoreValues(localDateValue); | ||
| } | ||
| } | ||
|
|
||
| updateOneValue(localDateValue: string[]) { | ||
| const ccaMessage = this.translateService.instant('item.page.date.cca.message'); | ||
| return ccaMessage + ' (' + localDateValue[0] + ')'; | ||
| } | ||
|
|
||
| updateMoreValues(localDateValue: string[]) { | ||
| const composedMessage = this.translateService.instant('item.page.date.composed.message'); | ||
| const dateValues = localDateValue.join(MULTIPLE_DATE_VALUES_SEPARATOR); | ||
| return composedMessage + ' ' + dateValues; | ||
| } | ||
| } |
3 changes: 2 additions & 1 deletion
3
src/app/shared/clarin-item-author-preview/clarin-item-author-preview.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.