Bugzilla – Attachment 48529 Details for
Bug 15952
Moving cataloging search actions into a drop-down menu
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15952: Moving cataloging search actions into a drop-down menu
Bug-15952-Moving-cataloging-search-actions-into-a-.patch (text/plain), 8.01 KB, created by
Aleisha Amohia
on 2016-03-01 23:16:54 UTC
(
hide
)
Description:
Bug 15952: Moving cataloging search actions into a drop-down menu
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-03-01 23:16:54 UTC
Size:
8.01 KB
patch
obsolete
>From bd4651352a1a0f0c907deaf3ebce27f040cb4f59 Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Tue, 1 Mar 2016 23:09:39 +0000 >Subject: [PATCH] Bug 15952: Moving cataloging search actions into a drop-down > menu > >To test: >1) Go to Cataloging and do a search in the catalog and reservoir (cataloguing/addbooks.pl) >2) Confirm that for the results found in catalog, the options (MARC and Card preview, Edit biblio, Add/edit items) are there and behave as expected. >3) Confirm that for the results found in reservoir, the options (MARC and Card preview, Add biblio) are there and behave as expected. >4) Set user permissions so that the user cannot edit the catalog or items. (editcatalogue -> edit_catalogue and edit_items) >5) Confirm that you no longer see the options to edit or add items/biblio in either table. > >Sponsored-by: Catalyst IT >--- > .../prog/en/modules/cataloguing/addbooks.tt | 75 +++++++++++++++----- > 1 file changed, 58 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >index 1a60e7e..efbfe23 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -1,5 +1,7 @@ > [% USE Koha %] > [% INCLUDE 'doc-head-open.inc' %] >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+[% INCLUDE 'datatables.inc' %] > <title>Koha › Cataloging</title> > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript"> >@@ -41,6 +43,22 @@ > $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); > }); > >+ $('#reservoir_search_table').dataTable($.extend(true, {}, dataTablesDefaults, { >+ "autoWidth": false, >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "sPaginationType": "four_button" >+ })); >+ >+ $('#catalogue_search_table').dataTable($.extend(true, {}, dataTablesDefaults, { >+ "autoWidth": false, >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "sPaginationType": "four_button" >+ })); >+ > }); > > /* this function open a popup to search on z3950 server. */ >@@ -132,16 +150,17 @@ > </div> > <div class="pages">[% pagination_bar %]</div> > <div class="searchresults"> >- <table> >+ <table id="catalogue_search_table"> >+ <thead> > <tr> > <th> </th> > <th>Title</th> > <th>Location</th> >- <th>Preview</th> >- [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<th> </th>[% ELSE %][% END %] >- [% IF ( CAN_user_editcatalogue_edit_items ) %]<th> </th>[% END %] >+ <th> </th> > </tr> >- [% FOREACH resultsloo IN resultsloop %] >+ </thead> >+ <tbody> >+ [% FOREACH resultsloo IN resultsloop %] > [% IF ( loop.even ) %] > <tr class="highlight"> > [% ELSE %] >@@ -199,12 +218,22 @@ > [% IF ( resultsloo.notforloancount ) %] Not for loan ([% resultsloo.notforloancount %])[% END %] > </span> > </td> >- <td> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% resultsloo.biblionumber %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% resultsloo.biblionumber %]" class="previewData">Card</a> >+ <td> >+ <div class="dropdown"> >+ <a class="btn btn-mini dropdown-toggle" id="cataloguesearchactions[% resultsloo.biblionumber %]" role="button" data-toggle="dropdown" href="#"> >+ Actions <b class="caret"></b> >+ </a> >+ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="cataloguesearchactions[% resultsloo.biblionumber %]"> >+ <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% resultsloo.biblionumber %]" class="previewData"><i class="fa fa-eye"></i> MARC preview</a></li> >+ <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% resultsloo.biblionumber %]" class="previewData"><i class="fa fa-eye"></i> Card preview</a></li> >+ [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% resultsloo.biblionumber %]"><i class="fa fa-pencil"></i> Edit biblio</a></li>[% END %] >+ [% IF ( CAN_user_editcatalogue_edit_items ) %]<li><a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% resultsloo.biblionumber %]"><i class="fa fa-plus"></i> Add/Edit items</a></li>[% END %] >+ </ul> >+ </div> > </td> >- [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% resultsloo.biblionumber %]">Edit biblio</a></td>[% END %] >- [% IF ( CAN_user_editcatalogue_edit_items ) %]<td><a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% resultsloo.biblionumber %]">Add/Edit items</a></td>[% END %] > </tr> > [% END %] >+ </tbody> > </table> > </div> > [% ELSE %] >@@ -220,16 +249,18 @@ > <div id="searchresult-breeding"> > <h3>Biblios in reservoir</h3> > [% IF ( breeding_loop ) %] >- <table> >+ <table id="reservoir_search_table"> >+ <thead> > <tr> > <th>Title</th> > <th>ISBN</th> > <th>Date</th> > <th>Edition</th> > <th>Coming from</th> >- <th>Preview</th> >- [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<th> </th>[% END %] >+ <th> </th> > </tr> >+ </thead> >+ <tbody> > [% FOREACH breeding_loo IN breeding_loop %] > [% IF ( loop.odd ) %] > <tr> >@@ -242,13 +273,23 @@ > <td>[% breeding_loo.copyrightdate %]</td> > <td>[% breeding_loo.edition %]</td> > <td>[% breeding_loo.file %]</td> >- <td> <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.id %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.id %]" class="previewData">Card</a> >- </td> >- [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<td> >- <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?breedingid=[% breeding_loo.id %]">Add biblio</a> >- </td>[% END %] >- </tr> >+ <td> >+ <div class="dropdown"> >+ <a class="btn btn-mini dropdown-toggle" id="reservoirsearchactions[% breeding_loo.id %]" role="button" data-toggle="dropdown" href="#"> >+ Actions <b class="caret"></b> >+ </a> >+ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="reservoirsearchactions[% breeding_loo.id %]"> >+ <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.id %]" class="previewData"><i class="fa fa-eye"></i> MARC preview</a></li> >+ <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.id %]" class="previewData"><i class="fa fa-eye"></i> Card preview</a></li> >+ [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] >+ <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?breedingid=[% breeding_loo.id %]"><i class="fa fa-plus"></i> Add biblio</a></li> >+ [% END %] >+ </ul> >+ </div> >+ </td> >+ </tr> > [% END %] >+ </tbody> > </table> > [% ELSE %] > <p>None</p> >-- >1.7.10.4
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 15952
:
48529
|
48537
|
48566
|
48567
|
49058
|
49153
|
49213
|
49214