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 476-481 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
476
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
476
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
477
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
477
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
478
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
478
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
479
('SerialSortIgnoreWords','des du de la le les leur d l an a the',NULL,'Words to ignore in serial search','Free'),
479
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
480
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
480
('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'),
481
('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'),
481
('ShelfBrowserUsesCcode','1','0','Use the item collection code when finding items for the shelf browser.','YesNo'),
482
('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 / +6 lines)
Lines 13-18 Link Here
13
    var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
13
    var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
14
        "sPaginationType": "four_button",
14
        "sPaginationType": "four_button",
15
        "aoColumnDefs": [
15
        "aoColumnDefs": [
16
            { 'visible' : false, "targets" : 0},
17
            { "iDataSort" : 0, 'aTargets' : [ 2 ] },
16
            { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
18
            { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
17
            { "sType": "title-string", "aTargets" : [ "title-string" ] },
19
            { "sType": "title-string", "aTargets" : [ "title-string" ] },
18
            { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
20
            { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
Lines 36-41 Link Here
36
      return confirm(_("Are you sure you want to reopen this subscription?"));
38
      return confirm(_("Are you sure you want to reopen this subscription?"));
37
    });
39
    });
38
 });
40
 });
41
  $
39
 //]]>
42
 //]]>
40
</script>
43
</script>
41
<style type="text/css">input.dt-filter { width : 100%; font-size : 85%; }</style>
44
<style type="text/css">input.dt-filter { width : 100%; font-size : 85%; }</style>
Lines 142-147 Link Here
142
                <table id="osrlt">
145
                <table id="osrlt">
143
                  <thead>
146
                  <thead>
144
                    <tr>
147
                    <tr>
148
                        <th>Sort</th>
145
                        <th>ISSN</th>
149
                        <th>ISSN</th>
146
                        <th class="anti-the">Title</th>
150
                        <th class="anti-the">Title</th>
147
                        <th>Notes</th>
151
                        <th>Notes</th>
Lines 167-179 Link Here
167
                      [% FOR field IN additional_fields_for_subscription %]
171
                      [% FOR field IN additional_fields_for_subscription %]
168
                        <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 6 %]" placeholder="Search [% field.name %]" /></td>
172
                        <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 6 %]" placeholder="Search [% field.name %]" /></td>
169
                      [% END %]
173
                      [% END %]
170
                      <td></td>
174
                      <td colspan="2"></td>
171
                    </tr>
175
                    </tr>
172
                  </tfoot>
176
                  </tfoot>
173
                  <tbody>
177
                  <tbody>
174
                    [% FOREACH subscription IN openedsubscriptions %]
178
                    [% FOREACH subscription IN openedsubscriptions %]
175
                    [% UNLESS subscription.cannotdisplay %]
179
                    [% UNLESS subscription.cannotdisplay %]
176
                      <tr>
180
                      <tr>
181
                        <td>[% IF ( subscription.titlesort ) %][% subscription.titlesort %][% END %]</td>
177
                        <td>
182
                        <td>
178
                        [% IF ( subscription.issn ) %][% subscription.issn %]
183
                        [% IF ( subscription.issn ) %][% subscription.issn %]
179
                        [% END %]
184
                        [% END %]
(-)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