View | Details | Raw Unified | Return to bug 19368
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/BugUndef-SerialSortIgnoreWords.sql (+1 lines)
Line 0 Link Here
1
INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('SerialSortIgnoreWords','',NULL,'Words to ignore in serial search','Free');
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 487-492 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
487
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
487
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
488
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
488
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
489
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
489
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
490
('SerialSortIgnoreWords','des du de la le les leur d l an a the',NULL,'Words to ignore in serial search','Free'),
490
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
491
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
491
('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'),
492
('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'),
492
('ShelfBrowserUsesCcode','1','0','Use the item collection code when finding items for the shelf browser.','YesNo'),
493
('ShelfBrowserUsesCcode','1','0','Use the item collection code when finding items for the shelf browser.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref (+5 lines)
Lines 56-58 Serials: Link Here
56
            yes: Make
56
            yes: Make
57
            no: Do not make
57
            no: Do not make
58
        - previous serial automatically available when receiving a new serial issue. The previous issue can also be set to another item type when receiving a new one. Please note that the item-level_itypes syspref must be set to specific item.
58
        - previous serial automatically available when receiving a new serial issue. The previous issue can also be set to another item type when receiving a new one. Please note that the item-level_itypes syspref must be set to specific item.
59
    -
60
        - 'Ignore the following words when sorting the serial search result table (separate words with spaces) :'
61
        - pref: SerialSortIgnoreWords
62
          class: free
63
    -
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt (-1 / +5 lines)
Lines 111-116 Link Here
111
                <table id="osrlt">
111
                <table id="osrlt">
112
                  <thead>
112
                  <thead>
113
                    <tr>
113
                    <tr>
114
                        <th>Sort</th>
114
                        <th>ISSN</th>
115
                        <th>ISSN</th>
115
                        <th class="anti-the">Title</th>
116
                        <th class="anti-the">Title</th>
116
                        <th>Notes</th>
117
                        <th>Notes</th>
Lines 136-148 Link Here
136
                      [% FOR field IN additional_fields_for_subscription %]
137
                      [% FOR field IN additional_fields_for_subscription %]
137
                        <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 6 %]" placeholder="Search [% field.name %]" /></td>
138
                        <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 6 %]" placeholder="Search [% field.name %]" /></td>
138
                      [% END %]
139
                      [% END %]
139
                      <td></td>
140
                      <td colspan="2"></td>
140
                    </tr>
141
                    </tr>
141
                  </tfoot>
142
                  </tfoot>
142
                  <tbody>
143
                  <tbody>
143
                    [% FOREACH subscription IN openedsubscriptions %]
144
                    [% FOREACH subscription IN openedsubscriptions %]
144
                    [% UNLESS subscription.cannotdisplay %]
145
                    [% UNLESS subscription.cannotdisplay %]
145
                      <tr>
146
                      <tr>
147
                        <td>[% IF ( subscription.titlesort ) %][% subscription.titlesort %][% END %]</td>
146
                        <td>
148
                        <td>
147
                        [% IF ( subscription.issn ) %][% subscription.issn %]
149
                        [% IF ( subscription.issn ) %][% subscription.issn %]
148
                        [% END %]
150
                        [% END %]
Lines 430-435 Link Here
430
            var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
432
            var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
431
                "sPaginationType": "four_button",
433
                "sPaginationType": "four_button",
432
                "aoColumnDefs": [
434
                "aoColumnDefs": [
435
                    { 'visible' : false, "targets" : 0},
436
                    { "iDataSort" : 0, 'aTargets' : [ 2 ] },
433
                    { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
437
                    { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
434
                    { "sType": "title-string", "aTargets" : [ "title-string" ] },
438
                    { "sType": "title-string", "aTargets" : [ "title-string" ] },
435
                    { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
439
                    { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
(-)a/serials/serials-search.pl (-4 / +24 lines)
Lines 37-42 use C4::Output; Link Here
37
use C4::Serials;
37
use C4::Serials;
38
use Koha::AdditionalField;
38
use Koha::AdditionalField;
39
39
40
use Encode;
41
use Unicode::Normalize;
42
40
use Koha::DateUtils;
43
use Koha::DateUtils;
41
44
42
my $query         = new CGI;
45
my $query         = new CGI;
Lines 119-129 if ($routing) { Link Here
119
    }
122
    }
120
}
123
}
121
124
125
#sort stopword by  string length
126
my @sortedstopword = sort{ length $b <=> length $a } split ( / / ,C4::Context->preference("SerialSortIgnoreWords"));
127
my $subsctitle;
122
my (@openedsubscriptions, @closedsubscriptions);
128
my (@openedsubscriptions, @closedsubscriptions);
123
for my $sub ( @subscriptions ) {
129
for my $sub ( @subscriptions ) {
124
    unless ( $sub->{closed} ) {
130
    $subsctitle = $sub->{title} ? ucfirst($sub->{title}): '' ;
125
        push @openedsubscriptions, $sub
131
    if ($subsctitle){
126
            unless $sub->{cannotdisplay};
132
        $subsctitle = NFKD($subsctitle);
133
        $subsctitle =~ s/\p{NonspacingMark}//g;
134
        foreach my $stop (@sortedstopword){
135
            my $ucfirststop = ucfirst($stop);
136
            $subsctitle =~ s/$ucfirststop'//;
137
            $subsctitle =~ s/$ucfirststop //;
138
        }
139
    }
140
    $subsctitle =~ s/^\s+//;
141
    $sub->{titlesort} = ucfirst($subsctitle);
142
143
    warn $subsctitle;
144
145
     unless ( $sub->{closed} ) {
146
         push @openedsubscriptions, $sub
147
             unless $sub->{cannotdisplay};
127
    } else {
148
    } else {
128
        push @closedsubscriptions, $sub
149
        push @closedsubscriptions, $sub
129
            unless $sub->{cannotdisplay};
150
            unless $sub->{cannotdisplay};
130
- 

Return to bug 19368