diff --git a/languages/en.ini b/languages/en.ini index 506a169dc8478f84210aa00050f319d1c95f583c..9e4ac65559400b4975b82fe0701e028e22c53423 100644 --- a/languages/en.ini +++ b/languages/en.ini @@ -386,6 +386,7 @@ Go = "Go" Go to Standard View = "Go to Standard View" google_map_cluster = "Cluster" google_map_cluster_points = "Cluster Points" +go_to_list = "Go To List" Grid = "Grid" Group = "Group" group_AND = "ALL Groups" diff --git a/module/VuFind/src/VuFind/Controller/CartController.php b/module/VuFind/src/VuFind/Controller/CartController.php index a4b48af277aed744ec2d6550d5938f90a4765594..555440a412ec8a68f774c84a90d3ebe3e17e50bf 100644 --- a/module/VuFind/src/VuFind/Controller/CartController.php +++ b/module/VuFind/src/VuFind/Controller/CartController.php @@ -385,10 +385,17 @@ class CartController extends AbstractBase if ($this->formWasSubmitted('submit')) { $this->favorites() ->saveBulk($this->getRequest()->getPost()->toArray(), $user); - $this->flashMessenger()->addMessage('bulk_save_success', 'success'); $list = $this->params()->fromPost('list'); + $listUrl = $this->url()->fromRoute('userList', ['id' => $list]); + $message = [ + 'html' => true, + 'msg' => $this->translate('bulk_save_success') . '. ' + . '<a href="' . $listUrl . '">' + . $this->translate('go_to_list') . '</a>.' + ]; + $this->flashMessenger()->addMessage($message, 'success'); if (!empty($list)) { - return $this->redirect()->toRoute('userList', ['id' => $list]); + return $listUrl; } else { return $this->redirectToSource(); } diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index 829aa9d2eba21473e8dd8286138f1f50bfe50206..3085d266afd324b541be9ba10f7b1d650fd806a8 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -442,8 +442,10 @@ $(document).ready(function() { location.reload(); }); Lightbox.addFormCallback('bulkSave', function(html) { + var listID = $('<div>'+html+'</div>').find('[name="listID"]'); + var listUrl = VuFind.getPath() + '/MyResearch/MyList/'+listID.val(); Lightbox.addCloseAction(refreshPageForLogin); - Lightbox.success(VuFind.translate('bulk_save_success')); + Lightbox.success(VuFind.translate('bulk_save_success') + '. <a href="'+listUrl+'">' + VuFind.translate('go_to_list') + '</a>.'); }); Lightbox.addFormCallback('bulkRecord', function(html) { Lightbox.close();