Bug 20797: (follow-up) Conditionally link
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Thu, 7 Jun 2018 10:14:50 +0000 (11:14 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Sat, 13 Oct 2018 11:54:57 +0000 (08:54 -0300)
We don't want to display the link to the biblio if the biblio_id is null

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt

index fb58033..b6e46ee 100644 (file)
 
         // Our 'render' function for biblio_id
         var createBiblioLink = function(data, type, row) {
-            return '<a title="' + _("View biblio details") + '" ' +
+            return (row.biblio_id) ?
+                '<a title="' + _("View biblio details") + '" ' +
                 'href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' +
                 row.biblio_id + '">' +
                 row.biblio_id +
-                '</a>';
+                '</a>' : '';
         };
 
         // Our 'render' function for the library name