-
Notifications
You must be signed in to change notification settings - Fork 13
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
document: display cover thumbnail #438
document: display cover thumbnail #438
Conversation
fdb748e
to
49c663c
Compare
a0459ae
to
a35bd56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comment are cosmetics ;-)
...ts/admin/src/app/record/detail-view/document-detail-view/document-detail-view.component.html
Outdated
Show resolved
Hide resolved
...ts/admin/src/app/record/detail-view/document-detail-view/document-detail-view.component.html
Outdated
Show resolved
Hide resolved
for (const identifier of this.record.metadata.identifiedBy) { | ||
if (identifier.type === 'bf:Isbn') { | ||
this.isbn = identifier.value; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.isbn = this.record.metadata.identifyBy
.filter(id => id.type === 'bf:Isbn') // keep only isbn
.map(id => id.value) // get identifier value
.find() // return the first array value or undefined if array is empty
To be tested in real situation. For my point of view, it's more javascript minded (and if I had a good memory, it's more efficient for CPU)
projects/shared/src/lib/view/thumbnail/thumbnail.component.html
Outdated
Show resolved
Hide resolved
<header class="col-10"> | ||
<div class="row mt-3 mb-3"> | ||
<div class="col-2"> | ||
<shared-thumbnail [record]="record"></shared-thumbnail> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the class parameter to be more flexible. The CSS definition stays in the main application.
...ts/admin/src/app/record/detail-view/document-detail-view/document-detail-view.component.html
Outdated
Show resolved
Hide resolved
...ts/admin/src/app/record/detail-view/document-detail-view/document-detail-view.component.html
Outdated
Show resolved
Hide resolved
projects/public-search/src/app/document-brief/document-brief.component.html
Show resolved
Hide resolved
projects/public-search/src/app/document-brief/document-brief.component.html
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it cover thumbnail? If so, the commit title could be amended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're closing rero/rero-ils#1396
a35bd56
to
d396d5b
Compare
f1167d4
to
d31713a
Compare
7b435c5
to
9b7994c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit message approved.
9b7994c
to
34e1b07
Compare
34e1b07
to
118659a
Compare
* Moves thumbnail logic in 'shared' library as it's used in both admin and public-search projects. * Adds thumbnails in professional brief and detailed view. * Moves 'type' field below the thumbnail in admin detailed view. * Closes rero/rero-ils#1188. Co-Authored-by: Alicia Zangger <alicia.zangger@rero.ch>
118659a
to
5190a04
Compare
and public-search projects.
Co-Authored-by: Alicia Zangger alicia.zangger@rero.ch
Why are you opening this PR?
To display thumbnails in brief and detail views of both admin and public parts of the application.
This is a part of US1812.
Dependencies
My PR depends on
rero-ils#<xx>
's PR(s):N/A
How to test?
Checkout this PR locally.
npm i
to install shared librarynpm run start-admin-proxy
to check admin partnpm run start-public-search-proxy
to check public partCheck thumbnail display in both projects and both views (brief and detailed) on localhost:4200.
Code review check list