Bugzilla – Attachment 48534 Details for
Bug 15932
Moving Authorities actions into a drop-down menu
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15932: Moving Authorities actions into a drop-down menu
Bug-15932-Moving-Authorities-actions-into-a-drop-d.patch (text/plain), 5.13 KB, created by
Frédéric Demians
on 2016-03-02 06:31:47 UTC
(
hide
)
Description:
Bug 15932: Moving Authorities actions into a drop-down menu
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2016-03-02 06:31:47 UTC
Size:
5.13 KB
patch
obsolete
>From 67dba17ea0626253d4e1be379f115a61c6ec69b0 Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Tue, 1 Mar 2016 22:09:59 +0000 >Subject: [PATCH] Bug 15932: Moving Authorities actions into a drop-down menu >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: >1) Go to Authorities and do an authority search (authorities-home.pl) >2) Confirm that the options (Edit, Merge, Delete) are there and behave > as expected. > >Sponsored-by: Catalyst IT >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> >--- > .../en/modules/authorities/searchresultlist.tt | 83 ++++++++++++++-------- > 1 file changed, 53 insertions(+), 30 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >index be2e156..3d89bc8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >@@ -2,8 +2,21 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Authorities › Authority search results</title> > [% INCLUDE 'doc-head-close.inc' %] >-<script type="text/javascript" > >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+[% INCLUDE 'datatables.inc' %] >+<script type="text/javascript"> > //<![CDATA[ >+ >+$(document).ready(function() { >+ $('#auth-search-table').dataTable($.extend(true, {}, dataTablesDefaults, { >+ "autoWidth": false, >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "sPaginationType": "four_button" >+ })); >+}); >+ > function confirm_deletion(id) { > var is_confirmed = confirm(_("Are you sure you want to delete this authority?")); > if (is_confirmed) { >@@ -21,6 +34,7 @@ function confirm_deletion(id) { > + "&resultsperpage=[% resultsperpage %]"; > } > } >+ > function Help() { > newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes'); > } >@@ -34,7 +48,6 @@ function searchauthority() { > Y = document.forms[0].value.value; > window.location="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode="+X+"&value="+Y+"&marclist=&and_or=and&excluding=&operator=contains"; > } >- > //]]> > </script> > [% INCLUDE 'authorities_js.inc' %] >@@ -63,40 +76,50 @@ function searchauthority() { > </p> > > <div id="authorities_searchresultlist_results"> >- <table> >- <tr> >- <th colspan="2">Summary</th> >-[% UNLESS ( isEDITORS ) %] >- <th>Used in</th> >-[% END %] >- [% IF ( CAN_user_editauthorities ) %] >- <th> </th> >- [% END %] >- </tr> >-[% FOREACH resul IN result %] >- [% UNLESS ( loop.odd ) %] >- <tr data-authid="[% resul.authid %]" class="highlight"> >- [% ELSE %] >- <tr data-authid="[% resul.authid %]"> >- [% END %] >+ <table id="auth-search-table"> >+ <thead> >+ <tr> >+ <th colspan="2">Summary</th> >+ [% UNLESS ( isEDITORS ) %] >+ <th>Used in</th> >+ [% END %] >+ [% IF ( CAN_user_editauthorities ) %] >+ <th> </th> >+ [% END %] >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH resul IN result %] >+ [% UNLESS ( loop.odd ) %] >+ <tr data-authid="[% resul.authid %]" class="highlight"> >+ [% ELSE %] >+ <tr data-authid="[% resul.authid %]"> >+ [% END %] > <td>[% PROCESS authresult summary=resul.summary %]</td> > <td><a href="detail.pl?authid=[% resul.authid %]">Details</a></td> >- [% UNLESS ( resul.isEDITORS ) %] >+ [% UNLESS ( resul.isEDITORS ) %] > <td> > <a href="../catalogue/search.pl?type=intranet&op=do_search&idx=an,phr&q=[% resul.authid %]" class="button">[% resul.used %] records(s)</a> > </td> >- [% END %] >- [% IF ( CAN_user_editauthorities ) %] >- <td> >- <a href="/cgi-bin/koha/authorities/authorities.pl?authid=[% resul.authid %]">Edit</a> >- | <a class="merge_auth" href="#merge">Merge</a> >- [% UNLESS ( resul.used ) %] >- | <a href="javascript:confirm_deletion([% resul.authid %])">Delete</a> >- [% END %] >- </td> >- [% END %] >+ [% END %] >+ [% IF ( CAN_user_editauthorities ) %] >+ <td> >+ <div class="dropdown"> >+ <a class="btn btn-mini dropdown-toggle" id="authactions[% resul.authid %]" role="button" data-toggle="dropdown" href="#"> >+ Actions <b class="caret"></b></a> >+ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authactions[% resul.authid %]"> >+ <li><a href="/cgi-bin/koha/authorities/authorities.pl?authid=[% resul.authid %]"><i class="fa fa-pencil"></i> Edit</a></li> >+ <li><a class="merge_auth" href="#merge"><i class="fa fa-compress"></i> Merge</a></li> >+ [% UNLESS ( resul.used ) %] >+ <li><a href="#" onclick='return confirm_deletion("[% resul.authid %]")'><i class="fa fa-times"></i> Delete</a></li> >+ [% END %] >+ </ul> >+ </div> >+ </td> >+ [% END %] > </tr> >-[% END %] >+ [% END %] >+ </tbody> > </table> > </div> > >-- >2.7.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 15932
:
48420
|
48520
|
48534
|
48568
|
48717
|
48823
|
48909
|
49062
|
49407
|
49432
|
49436
|
49464