Bugzilla – Attachment 175024 Details for
Bug 37993
Having a single EDI EAN account produces a bad redirect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37993: Replace edi_ean link with dropdown
Bug-37993-Replace-ediean-link-with-dropdown.patch (text/plain), 5.38 KB, created by
Martin Renvoize (ashimema)
on 2024-11-29 09:19:59 UTC
(
hide
)
Description:
Bug 37993: Replace edi_ean link with dropdown
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-11-29 09:19:59 UTC
Size:
5.38 KB
patch
obsolete
>From e16a346026e67596ba2907ca61e7c1cec3707173 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 29 Nov 2024 09:16:35 +0000 >Subject: [PATCH] Bug 37993: Replace edi_ean link with dropdown > >The edi_ean page is a slim page with a single select input for selecting >the appropriate library and ean. This patch replaces the link to that >page with a simple select in the menu on the original page instead. >--- > acqui/basket.pl | 12 ++++++- > .../prog/en/modules/acqui/basket.tt | 33 +++++++++++++++---- > 2 files changed, 37 insertions(+), 8 deletions(-) > >diff --git a/acqui/basket.pl b/acqui/basket.pl >index 1a6ef3ca478..b9715babc85 100755 >--- a/acqui/basket.pl >+++ b/acqui/basket.pl >@@ -94,7 +94,17 @@ my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid ); > my $schema = Koha::Database->new()->schema(); > my $rs = $schema->resultset('VendorEdiAccount')->search( > { vendor_id => $booksellerid, } ); >-$template->param( ediaccount => ($rs->count > 0)); >+my $ediaccount = ( $rs->count > 0 ); >+$template->param( ediaccount => $ediaccount ); >+if ($ediaccount) { >+ my @eans = $schema->resultset('EdifactEan')->search( >+ {}, >+ { >+ join => 'branch', >+ } >+ ); >+ $template->param( eans => \@eans ); >+} > > unless (CanUserManageBasket($loggedinuser, $basket, $userflags)) { > $template->param( >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index b7df301861d..66cbcc6419e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -110,13 +110,32 @@ > [% PROCESS csv_export %] > > [% IF Koha.Preference('EDIFACT') && ediaccount %] >- <div class="btn-group"><form action="/cgi-bin/koha/acqui/edi_ean.pl" method="post"> >- [% INCLUDE 'csrf-token.inc' %] >- <input type="hidden" name="op" value="cud-ediorder" /> >- <input type="hidden" name="basketno" value="[% basketno | html %]" /> >- <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" /> >- <button type="submit" class="btn btn-default" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</button> >- </form></div> >+ <div class="btn-group"> >+ [% IF eans.count == 1 %] >+ <form action="/cgi-bin/koha/acqui/basket.pl" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <input type="hidden" name="op" value="cud-ediorder" /> >+ <input type="hidden" name="basketno" value="[% basketno | html %]" /> >+ <input type="hidden" name="ean" value="[% eans.0 | html %]" /> >+ <button type="submit" class="btn btn-default" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</button> >+ </form> >+ [% ELSE %] >+ <button class="btn btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</button> >+ <ul class="dropdown-menu"> >+ [% FOREACH eanacct IN eans %] >+ <li> >+ <form action="/cgi-bin/koha/acqui/basket.pl" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" /> >+ <input type="hidden" value="cud-ediorder" name="op" /> >+ <input type="hidden" name="ean" value="[% eanacct.ean | html %]"> >+ <button type="submit" class="btn btn-default">[% eanacct.branch.branchname | html %] ([% eanacct.ean | html %]) [% IF eanacct.description %][[% eanacct.description | html %]][% END %]</button> >+ </form> >+ </li> >+ [% END %] >+ </ul> >+ [% END %] >+ </div> > [% END %] > > [% IF ( active && books_loop ) %] >-- >2.47.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37993
:
175024
|
175025
|
175026
|
175027
|
175042
|
175043
|
175044
|
175069
|
175070
|
175072
|
175073
|
175074
|
175075
|
175076
|
175081
|
175132