Bug 11214: improve create/edit routing list links in serial collection page
When a subscription has no routing list yet, the page
serials/subscription-detail.pl shows in left menu : "Create routing list".
In serials/serials-collection.pl page, the link in table is always
"Edit routing list", even when there is no routing list.
This patch adds a conditionnal link "Edit routing list"/"Create routing
list" into serials/serials-collection.pl page.
Test plan :
- Create a subscription no. 1 without routing list and a subscription
no. 2 with a routing list
- Go to serials/serials-collection.pl of subscription no. 1
=> You see "Create routing list" link
- Click on link
=> You see "Create routing list for"
- Go to serials/serials-collection.pl of subscription no. 2
=> You see "Edit routing list" link
- Click on link
=> You see "Edit routing list for ..."
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Functional and automated tests pass. Passes koha-qa.pl.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
With the patch applied the serial collection page shows the
right link depending on the existance of a routing list.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0c631934de)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
This commit is contained in:
parent
704462e888
commit
04be64ec3e
|
|
@ -140,7 +140,11 @@ $(document).ready(function() {
|
|||
[% IF ( routing && CAN_user_serials_routing ) %]
|
||||
<td>
|
||||
[% UNLESS subscription.closed %]
|
||||
<a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit routing list</a>
|
||||
[% IF ( subscription.hasRouting ) %]
|
||||
<a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit routing list</a>
|
||||
[% ELSE %]
|
||||
<a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&op=new">Create routing list</a>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</td>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ if (@subscriptionid){
|
|||
my $numberpattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subs->{numberpattern});
|
||||
$subs->{frequency} = $frequency;
|
||||
$subs->{numberpattern} = $numberpattern;
|
||||
$subs->{'hasRouting'} = check_routing($subscriptionid);
|
||||
push @$subscriptiondescs,$subs;
|
||||
my $tmpsubscription= GetFullSubscription($subscriptionid);
|
||||
@subscriptioninformation=(@$tmpsubscription,@subscriptioninformation);
|
||||
|
|
|
|||
Loading…
Reference in New Issue