Bug 24877: Add link from vendor to linked subscriptions
authorKatrin Fischer <katrin.fischer.83@web.de>
Fri, 13 Mar 2020 20:52:24 +0000 (20:52 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 24 Mar 2020 11:28:32 +0000 (11:28 +0000)
Koha shows the number of subscriptions linked to a vendor,
but there is no way to look them up. This adds a link to the
subscription search with the vendor name, so there is an easy way
to find the subscriptions.

To test:
- Be superlibrarian or have serials permission
- Make sure you have one or more subscriptions linked to vendors
- Go to the vendor's detail page in acquisitions
- Verify the number of subscriptions is now a link
- Verify the search results are correct when clicking on it
- Remove permissions (no serials, not superlibrarian)
- Verify now the number shows, but is not linked

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt

index 88dede5..3cea6c7 100644 (file)
 
                 <div class="subscription-details">
                     <h2>Subscription details</h2>
-                    <p><strong>Number of subscriptions: </strong>[% subscriptioncount | html %]</p>
+                    <p><strong>Number of subscriptions: </strong>
+                        [% IF (  CAN_user_serials ) %]
+                            <a href="/cgi-bin/koha/serials/serials-search.pl?bookseller_filter=[% name | uri %]&searched=1">[% subscriptioncount | html %]</a>
+                        [% ELSE %]
+                            [% subscriptioncount | html %]
+                        [% END %]
+                    </p>
                 </div>
 
             </div>