Add the PNX creator field to records in the Collection Discovery interface
The brief display of the items records in the Collection Discovery interface contains only the document type and the document title, We propose to add at least the creator PNX field to give the user more information about the document without having to open the full display. Ideally, we would like to be able to customize whjch fields appear in the brief display as we already do for the brief display in the result list.
-
Annette Guignard commented
We have used customizing to display year and first author. However, I would be great, if the display of fields could be managed via configuration.
-
Manu Schwendener commented
NERS 8196, open for voting now.
-
Manu Schwendener commented
Updated code via Laura Percival and Jens Weber in the Primo mailing list, showing author and date.
=> The change may take some time to show up, check again on the next day.
Javascript:
app.component('prmGalleryItemAfter', {
bindings: {
parentCtrl: '<'
},
controller: function () {
var $ctrl = this;
$ctrl.$onInit = function () {
try {
$ctrl.author = $ctrl.parentCtrl.item.pnx.addata.au[0];
} catch (e) {
$ctrl.author = '';
}
try {
$ctrl.date = $ctrl.parentCtrl.item.pnx.display.creationdate[0];
} catch (e) {
$ctrl.date = '';
}
$ctrl.hasDate = !!$ctrl.date;
$ctrl.hasAuthor = !!$ctrl.author;
};
},
template: `
<div ng-if="$ctrl.hasDate">{{$ctrl.date}}</div>
<div ng-if="$ctrl.hasAuthor">{{$ctrl.author}}</div>
`,
});---
CSS:
prm-gallery-item-after {
padding: 20px 15px;
display: block;
margin-top: -30px;
}prm-gallery-item-after div {
margin-bottom: -40px;
margin-top: -20px;
}.is-grid-view prm-gallery-item .collection-element {
padding: 15px;
}prm-gallery-item .collection-element .item-title {
padding-bottom: 30px;
} -
Manu Schwendener commented
> Ideally, we would like to be able to customize whIch fields appear in the brief
> displayI agree.
Plus votes from
https://ideas.exlibrisgroup.com/forums/308176-primo/suggestions/41120584-collection-discovery-tiles-should-display-the-pub
and
https://ideas.exlibrisgroup.com/forums/308176-primo/suggestions/45164350-collection-discovery -
Manu Schwendener commented
For author, there is a workaround code for CSS and js, via Primo mailing list in September 2021
CSS
/* Galleries: Display Author in box*/
prm-gallery-item-after {
padding: 20px 15px;
display: block;
margin-top: -30px;}prm-gallery-item-after div {margin-top: -30px;}
.is-grid-view prm-gallery-item .collection-element {
background: #fff;
font-size: 0.9em ;
padding: 15px;}prm-gallery-item .collection-element .item-title {
background: none;
padding-top: 10px;
padding-bottom: 30px;
font-size: 1.1em ;
}prm-gallery-item .collection-element .resource-type {
color: #685E5E ;
background: none;}
/* Galleries: Display Author in box END */---
js
/* Galleries: Display Author */
app.component('prmGalleryItemAfter', {
bindings: {
parentCtrl: '<'
},
controller: function() {
var vm = this;
vm.showAuthor = function() {
vm.author = vm.parentCtrl.item.pnx.addata.au[0] || '';
if (vm.author !== '') {
return true;
}
};
},
template: '<div ng-if="$ctrl.showAuthor();">{{$ctrl.author}}</div>'
});
/* Galleries: Display Author END */ -
Anna-Maria Soja commented
Great idea - thank you
-
Manu Schwendener commented
+1