Bugzilla – Attachment 113346 Details for
Bug 19368
Add syspref to ignore words when sorting serials
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19368 - Syspref now SortIgnoreArticles, used in datatables.inc
Bug-19368---Syspref-now-SortIgnoreArticles-used-in.patch (text/plain), 7.95 KB, created by
Séverine Queune
on 2020-11-10 11:25:20 UTC
(
hide
)
Description:
Bug 19368 - Syspref now SortIgnoreArticles, used in datatables.inc
Filename:
MIME Type:
Creator:
Séverine Queune
Created:
2020-11-10 11:25:20 UTC
Size:
7.95 KB
patch
obsolete
>From 23fcd1501e56231e49d24ea4730dd66f7112d90c Mon Sep 17 00:00:00 2001 >From: Charles Farmer <charles.farmer@inLibro.com> >Date: Mon, 16 Apr 2018 15:37:58 -0400 >Subject: [PATCH] Bug 19368 - Syspref now SortIgnoreArticles, used in > datatables.inc >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >--- > .../atomicupdate/Bug19368_SortIgnoreArticles.sql | 1 + > .../BugUndef-SerialSortIgnoreWords.sql | 1 - > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > .../intranet-tmpl/prog/en/includes/datatables.inc | 31 +++++++++++++++++++++- > .../en/modules/admin/preferences/searching.pref | 6 ++++- > .../opac-tmpl/bootstrap/en/includes/datatables.inc | 5 ++-- > serials/serials-search.pl | 2 +- > 7 files changed, 41 insertions(+), 7 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/Bug19368_SortIgnoreArticles.sql > delete mode 100644 installer/data/mysql/atomicupdate/BugUndef-SerialSortIgnoreWords.sql > >diff --git a/installer/data/mysql/atomicupdate/Bug19368_SortIgnoreArticles.sql b/installer/data/mysql/atomicupdate/Bug19368_SortIgnoreArticles.sql >new file mode 100644 >index 0000000..40485b8 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug19368_SortIgnoreArticles.sql >@@ -0,0 +1 @@ >+INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SortIgnoreArticles','a an the',NULL,'Articles to ignore in when sorting','Free'); >diff --git a/installer/data/mysql/atomicupdate/BugUndef-SerialSortIgnoreWords.sql b/installer/data/mysql/atomicupdate/BugUndef-SerialSortIgnoreWords.sql >deleted file mode 100644 >index 893b943..0000000 >--- a/installer/data/mysql/atomicupdate/BugUndef-SerialSortIgnoreWords.sql >+++ /dev/null >@@ -1 +0,0 @@ >-INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SerialSortIgnoreWords','',NULL,'Words to ignore in serial search','Free'); >\ No newline at end of file >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index d8587d8..3d71dec 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -591,7 +591,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'), > ('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'), > ('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'), >-('SerialSortIgnoreWords','',NULL,'Words to ignore in serial search','Free'), > ('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'), > ('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'), > ('ShelfBrowserUsesCcode','1','0','Use the item collection code when finding items for the shelf browser.','YesNo'), >@@ -608,6 +607,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('SMSSendPassword', '', '', 'Password used to send SMS messages', 'free'), > ('SMSSendUsername', '', '', 'Username/Login used to send SMS messages', 'free'), > ('SocialNetworks','0','','Enable/Disable social networks links in opac detail pages','YesNo'), >+('SortIgnoreArticles','',NULL,'Words to ignore in serial search','Free'), > ('SpecifyDueDate','1','','Define whether to display \"Specify Due Date\" form in Circulation','YesNo'), > ('SpecifyReturnDate',1,'','Define whether to display \"Specify Return Date\" form in Circulation','YesNo'), > ('SpineLabelAutoPrint','0','','If this setting is turned on, a print dialog will automatically pop up for the quick spine label printer.','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >index a545868..f1b8dcc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >@@ -1,5 +1,34 @@ >-[% USE raw %] >+[% USE Koha %] > [% USE Asset %] > [% INCLUDE 'format_price.inc' %] > [% Asset.js("lib/datatables/datatables.min.js") | $raw %] >+[% Asset.js("lib/jquery/plugins/jquery.dataTables.min.js") | $raw %] >+[% Asset.js("lib/jquery/plugins/dataTables.buttons.min.js") | $raw %] >+[% Asset.js("lib/jquery/plugins/buttons.colVis.min.js") | $raw %] >+[% Asset.js("lib/jquery/plugins/jszip.min.js") | $raw %] >+[% Asset.js("lib/jquery/plugins/buttons.print.min.js") | $raw %] >+[% Asset.js("lib/jquery/plugins/buttons.html5.min.js") | $raw %] >+<script type="text/javascript"> >+//<![CDATA[ >+ var MSG_DT_FIRST = _("First"); >+ var MSG_DT_LAST = _("Last"); >+ var MSG_DT_NEXT = _("Next"); >+ var MSG_DT_PREVIOUS = _("Previous"); >+ var MSG_DT_EMPTY_TABLE = _("No data available in table"); >+ var MSG_DT_INFO = _("Showing _START_ to _END_ of _TOTAL_"); >+ var MSG_DT_INFO_EMPTY = _("No entries to show"); >+ var MSG_DT_INFO_FILTERED = _("(filtered from _MAX_ total entries)"); >+ var MSG_DT_LENGTH_MENU = _("Show _MENU_ entries"); >+ var MSG_DT_LOADING_RECORDS = _("Loading..."); >+ var MSG_DT_PROCESSING = _("Processing..."); >+ var MSG_DT_SEARCH = _("Search:"); >+ var MSG_DT_ZERO_RECORDS = _("No matching records found"); >+ var MSG_DT_ALL = _("All"); >+ var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = "[% Koha.Preference('SortIgnoreArticles') %]"; >+ var MSG_DT_COPY_TITLE = _("Copy to clipboard"); >+ var MSG_DT_COPY_KEYS = _("Press ctrl or â + C to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape."); >+ var MSG_DT_COPY_SUCCESS_ONE = _("Copied one row to clipboard"); >+ var MSG_DT_COPY_SUCCESS_X = _("Copied %d rows to clipboard"); >+//]]> >+</script> > [% Asset.js("js/datatables.js") | $raw %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >index 2e66ecc..a3ae6b6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >@@ -86,7 +86,11 @@ Searching: > yes: Enable > no: Disable > - "browsing search results from the bibliographic record detail page in staff interface." >- Search form: >+ - >+ - 'Ignore the following words when sorting the serial search result table (separate words with spaces) :' >+ - pref: SortIgnoreArticles >+ class: free >+ Search Form: > - > - pref : LoadSearchHistoryToTheFirstLoggedUser > default: 0 >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/datatables.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/datatables.inc >index c8f18ec..09c22e5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/datatables.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/datatables.inc >@@ -21,6 +21,7 @@ > var MSG_DT_COPIED_ONE_ROW = _("Copied one row to clipboard"); > var MSG_CLEAR_FILTER = _("Clear filter"); > var MSG_DT_ALL = _("All"); >- var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the"); >+ var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = "[% Koha.Preference('SortIgnoreArticles') %]"; >+//]]> > </script> >-[% Asset.js("js/datatables.js") | $raw %] >+[% Asset.js("js/datatables.js") %] >diff --git a/serials/serials-search.pl b/serials/serials-search.pl >index 3fd8ba4..0557887 100755 >--- a/serials/serials-search.pl >+++ b/serials/serials-search.pl >@@ -158,7 +158,7 @@ else > } > > #sort stopword by string length >-my @sortedstopword = sort{ length $b <=> length $a } split ( / / ,C4::Context->preference("SerialSortIgnoreWords")); >+my @sortedstopword = sort{ length $b <=> length $a } split ( / / ,C4::Context->preference("SortIgnoreArticles")); > my $subsctitle; > my (@openedsubscriptions, @closedsubscriptions); > for my $sub ( @subscriptions ) { >-- >2.1.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 19368
:
67373
|
67447
|
67580
|
67581
|
67612
|
69005
|
70051
|
70052
|
70053
|
70125
|
71962
|
71963
|
71964
|
71965
|
72043
|
72044
|
72045
|
72046
|
72047
|
72655
|
72656
|
72657
|
72658
|
72659
|
74262
|
74263
|
74264
|
74265
|
74266
|
90915
|
90916
|
90918
|
90919
|
90920
|
90921
|
113018
|
113019
|
113020
|
113021
|
113022
|
113023
|
113344
|
113345
|
113346
|
113347
|
113348
|
113349
|
118963
|
118964
|
118965
|
118966
|
118967
|
118968
|
124090
|
124091
|
124092
|
124093
|
124094
|
124095
|
124096
|
124097
|
124104
|
124105
|
124106
|
124107
|
124108
|
124109
|
124110
|
124111