Bugzilla – Attachment 154909 Details for
Bug 15222
Add to cart option/other list options missing from OPAC lists display
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15222: Add to cart option/other list options missing from OPAC lists display
Bug-15222-Add-to-cart-optionother-list-options-mis.patch (text/plain), 3.85 KB, created by
Owen Leonard
on 2023-08-29 16:46:37 UTC
(
hide
)
Description:
Bug 15222: Add to cart option/other list options missing from OPAC lists display
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-08-29 16:46:37 UTC
Size:
3.85 KB
patch
obsolete
>From cf886098db51e5eb0e470d56b7effe3225047edc Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 29 Aug 2023 16:23:52 +0000 >Subject: [PATCH] Bug 15222: Add to cart option/other list options missing from > OPAC lists display > >This patch adds the option to add titles to the cart or a list from the >view of a list's contents. > >To test you should have at least one public list with titles added. >Apply the patch and go to the OPAC. > >- View a public list. >- In the toolbar at the top of the table of titles you should see "Add > to cart" and "Add to list." The controls should be disabled. >- Check checkboxes for one or more titles on the list. >- The controls should now be enabled. >- Clicking the "Add to cart" button should add the selected titles to > the cart. >- If you are not logged into the OPAC, clicking the "Add to list" button > should trigger an alert, "You must be logged in..." >- Log in to the OPAC and view the list again. >- Confirm that the "Add to list" control should trigger a popup allowing > you to add your selected titles to an existing or a new list. >--- > .../bootstrap/en/modules/opac-shelves.tt | 31 ++++++++++++++++++- > 1 file changed, 30 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index 2220bf124a..6a3bd7fd20 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -365,6 +365,14 @@ > </span> > [% END %] > >+ [% IF Koha.Preference( 'opacbookbag' ) == 1 %] >+ <a href="#" class="btn btn-link listaddtocart disabled"><i class="fa fa-shopping-cart" aria-hidden="true"></i> Add to cart</a> >+ [% END %] >+ >+ [% IF Koha.Preference('virtualshelves') %] >+ <a href="#" class="btn btn-link addtolist disabled"><i class="fa fa-list" aria-hidden="true"></i> Add to list</a> >+ [% END %] >+ > [% IF ( TagsInputEnabled && loggedinusername ) %] > <span id="addtags"> > <a id="tagsel_tag" href="#" class="btn btn-link disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a> >@@ -383,7 +391,7 @@ > </div> <!-- / .selections-toolbar --> > </div> <!-- /#floating --> > >- <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform"> >+ <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="bookbag_form"> > [% IF can_manage_shelf %] > <input type="hidden" name="op" value="remove_biblios" /> > <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> >@@ -1079,6 +1087,27 @@ $(function() { > $("#download_list").submit(); > }); > >+ $(".listaddtocart").on("click", function(e){ >+ e.preventDefault(); >+ addMultiple(); >+ }); >+ >+ $(".addtolist").on("click", function(e){ >+ e.preventDefault(); >+ cartList(); >+ }); >+ >+ function cartList(){ >+ [% IF ( loggedinusername ) %] >+ if (vShelfAdd()) { >+ Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd()); >+ } >+ [% ELSE %] >+ alert(_("You must be logged in to create or add to lists")); >+ [% END %] >+ return false; >+ } >+ > }); // document.ready > > function sortMenu( sorting_form ){ >-- >2.30.2
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 15222
:
154909
|
155181
|
156014
|
156572