Bugzilla – Attachment 135115 Details for
Bug 30333
Move view actions on acquisitions receipt summary page into menu
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30333: Move view actions on acquisitions receipt summary page into menu
Bug-30333-Move-view-actions-on-acquisitions-receip.patch (text/plain), 6.32 KB, created by
Jonathan Druart
on 2022-05-18 14:01:50 UTC
(
hide
)
Description:
Bug 30333: Move view actions on acquisitions receipt summary page into menu
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-05-18 14:01:50 UTC
Size:
6.32 KB
patch
obsolete
>From 1fb8b05f79ab41edb2604788fa6d3ce273fbd27f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 22 Mar 2022 11:25:12 +0000 >Subject: [PATCH] Bug 30333: Move view actions on acquisitions receipt summary > page into menu > >This patch moves the "views" group of links (MARC, Card, and Order) into >a menu button. The patch also makes some corrections to the modal markup >and handling to fix a display error. > >To test you must have a basket or baskets with multiple titles on order, >both received and pending. > >- Apply the patch and go to Acquisitions -> Vendor -> Receive shipment > -> Receive a new shipment (or open an existing invoice). >- In the list of pending orders: > - Test the 'View' menu for multiple titles. The 'Order,' 'MARC,' and > 'Card' menu items should work correctly. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/en/modules/acqui/parcel.tt | 51 +++++++++++-------- > 1 file changed, 29 insertions(+), 22 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >index bbc9b3dc632..ad59bd9a30a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -121,7 +121,7 @@ > <th>Basket group</th> > <th>Order line</th> > <th>Summary</th> >- <th>More</th> >+ <th>View</th> > <th>Replacement price</th> > <th>Quantity</th> > <th>Unit cost</th> >@@ -298,22 +298,22 @@ > [% ELSE %]There are no received orders.[% END %] > </div> > >-<div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true"> >- <div class="modal-dialog"> >- <div class="modal-content"> >- <div class="modal-header"> >- <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> >- <h3 id="dataPreviewLabel">MARC preview</h3> >- </div> >- <div class="modal-body"> >- <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div> >- </div> >- <div class="modal-footer"> >- <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button> >- </div> >- </div> >- </div> >-</div> >+<div class="modal" id="dataPreview" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel"> >+ <div class="modal-dialog modal-wide" role="document"> >+ <div class="modal-content"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> >+ <h3 id="dataPreviewLabel">MARC previews</h3> >+ </div> >+ <div class="modal-body"> >+ <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div> >+ </div> >+ <div class="modal-footer"> >+ <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button> >+ </div> >+ </div> <!-- /.modal-content --> >+ </div> <!-- /.modal-dialog --> >+</div> <!-- /.modal --> > > [% IF (invoiceclosedate) %] > <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid | uri %]">View invoice</a> >@@ -343,7 +343,6 @@ > [% Asset.js("js/acquisitions-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] > [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %] >- <style>#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style> > <script> > dt_overwrite_html_sorting_localeCompare(); > var columns_filter = {}; >@@ -519,9 +518,17 @@ > { > "data": "", > "render": function(data, type, row, meta) { >- var result = '<a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=' + encodeURIComponent(row.order_id) + '" class="previewData">' + _("Order") + '</a><br>' >- + '<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("MARC") + '</a><br>' >- + '<a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("Card") + '</a>'; >+ var result = '<div class="btn-group dropup">'; >+ result += '<button id="view' + row.order_id + '" type="button" class="btn btn-default btn-xs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">'; >+ result += ' <i class="fa fa-eye" aria-hidden="true"></i> ' + _("View"); >+ result += ' <span class="caret"></span> '; >+ result += '</button>'; >+ result += '<ul class="dropdown-menu" aria-labelledby="view' + row.order_id + '">'; >+ result += '<li><a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=' + encodeURIComponent(row.order_id) + '" class="previewData">' + _("Order") + '</a></li>'; >+ result += '<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("MARC") + '</a></li>'; >+ result += '<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("Card") + '</a></li>'; >+ result += '</ul>'; >+ result += '</div>'; > return result; > }, > "orderable": false, >@@ -642,7 +649,7 @@ > var page = $(this).attr("href"); > $("#dataPreviewLabel").text(ltitle); > $("#dataPreview .modal-body").load(page + " div"); >- $('#dataPreview').modal({show:true}); >+ $('#dataPreview').modal("show"); > }); > > $("#dataPreview").on("hidden.bs.modal", function(){ >-- >2.25.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 30333
:
132022
|
135011
| 135115