ExLibrisGroup/primo-explore-devenv

Hi Did somebody install Addon or create "Report Broken Links" in Primo?

Closed this issue · 23 comments

Hi Did somebody install Addon or create "Report Broken Links" in Primo?

image

We have done a local modification that adds "Report Error"-functionality which simply sends some metadata along to a form where the user can submit to our issue management system.

// Add report error button
app.controller('FullViewAfterController', function () {

});
app.component('prmFullViewAfter', {
    bindings: {parentCtrl: '<'},
    template: '<form ng-if="$ctrl.url" id="primo-feedback-form" method="post" action="FORM_TARGET_URL_HERE" target="_blank">' +
              '<input type="hidden" name="language" value="{{$ctrl.lang}}">' +
              '<input type="hidden" value="Primo" name="system">' +
              '<button type="submit" translate="jul.button.report-error"></button>' +
              '<input ng-if="$ctrl.parentCtrl.item.pnx.display.title" type="hidden" value="{{$ctrl.parentCtrl.item.pnx.display.title[0]}}" name="title">' +
              '<input ng-if="$ctrl.parentCtrl.item.pnx.display.publisher" type="hidden" value="{{$ctrl.parentCtrl.item.pnx.display.publisher[0]}}" name="publisher">' +
              '<input ng-if="$ctrl.parentCtrl.item.pnx.display.source" type="hidden" value="{{$ctrl.parentCtrl.item.pnx.display.source[0]}}" name="source">' +
              '<input ng-if="$ctrl.parentCtrl.item.pnx.addata.date" type="hidden" value="{{$ctrl.parentCtrl.item.pnx.addata.date[0]}}" name="date">' +
              '<input ng-if="$ctrl.parentCtrl.item.pnx.display.type" type="hidden" value="{{$ctrl.parentCtrl.item.pnx.display.type[0]}}" name="type">' +
              '<input ng-if="$ctrl.parentCtrl.item.pnx.addata.doi" type="hidden" value="{{$ctrl.parentCtrl.item.pnx.addata.doi[0]}}" name="doi">' +
              '<input ng-if="$ctrl.parentCtrl.item.pnx.display.creator" type="hidden" value="{{$ctrl.parentCtrl.item.pnx.display.creator[0]}}" name="author">' +
              '<input type="hidden" value="{{$ctrl.url}}" name="url"></form>',
    controller: function ($translate) {
        var vm = this;
        vm.lang = $translate.use();
        vm.$onInit = function () {
            vm.url = document.location || '';
        };
    }});

Hi Reedyn, Thank You very much for Your reply,
I understand it is all the code I need? What is the file I Should insert it in?
Is it should work with any version of NODE and NPM and Windows (I mean not just last version of node)?
Thank You.

@antrez770 This code is added to the custom.js file that is in the custom package for Primo. You might want to add some CSS to make it match your local Primo design as well.

NPM/Node versions is only really relevant to running the Primo development environment, if you can do that already then this will code will work.

Reedyn, thank You I will try and write You.
also will You meet any Addon for Accessibility Menu for Primo? Or it is not exist?

I see it is working but is looking like a link to another page, I want to do something like PopUp what appears with the form and You can send data from it.

@antrez770 Popup would be significantly more work, this is just the solution that we have done that works for us.

I don't know of any Accessibility Menu, can you be more specific about what you mean by that?

Yes I know it is more work, I want do this but want see any example. You did the separate page with form right? I Mean Accessibility Menu - Menu what allow to user choice the different options like Grayscale, Big or small text, Contrast and other.

Also how did You do Your solution if You want to place it in Send to line in the Fullpage?
Also if You know ho to do the PopUp or have such link to. Write me please.

@antrez770 The separate page is a PHP form that grabs the submitted metadata from POST variables and adds it as hidden input fields that will then be submitted to our issue management system. It's a very local solution that I doubt would work very well at another institution.

I haven't heard of any Accessibility Menu like that. Most patrons I've come in contact with have browser plugins for that kind of solution (many features such as font scaling already exist in all browsers) so they are not dependent on a solution on any particular website.

Do You know how to place Your solution into Send to - section?
Thank You for answers.

If you add the code to the prmActionListAfter instead of prmFullViewAfter it will appear in the "Send to"-section. You would have to style it with CSS accordingly as well.

Thank You Reedyn for all answers. if I will have any more interest question can I ask You?

I'll do my best to answer if you ask :)

Thank You, and the best way to ask it is here?

@antrez770 you might find these packages useful:

So far a good place to talk about primo development is the IGeLU/ELUNA slack workspace, especially the #primodev channel...not sure who is admin but maybe @noamamit92 could invite you?

Yes thank You

Hi thatbudakguy You ask me about invite me to IGeLU/ELUNA slack workspace should I send You the request from slack?

thatbudakguy could You invite me like You want to IGeLU/ELUNA slack workspace, ?
Also is somebody worked with Alma BIB API ?

@antrez770 I used the Bibs and Courses APIs in primo-explore-course-reserves, though it was technically on the server side using php, e.g. here. There's a bunch of functions in a client-side service that use bib objects here.

I've invited you to the slack so let's take further discussion there and close the issue.

Ok, Thank You, I asked in slack workspace about - "Is somebody knows Accessibility menu plugin for Primo? Or How can I add in right way custom Js files to primo?" But It is look like nobody knows the answer for it.

Hi is somebody can write me the right way add custom JS-code/files to Primo?
Thank You.

gilax commented

Hi @antrez770,
Did you manage adding your custom JS files to Primo?

closing as it seems to be and outdated conversation