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

(-)a/C4/Search.pm (-3 / +9 lines)
Lines 1910-1918 sub searchResults { Link Here
1910
    my ($bibliotag,$bibliosubf)=GetMarcFromKohaField('biblio.biblionumber','');
1910
    my ($bibliotag,$bibliosubf)=GetMarcFromKohaField('biblio.biblionumber','');
1911
1911
1912
    # set stuff for XSLT processing here once, not later again for every record we retrieved
1912
    # set stuff for XSLT processing here once, not later again for every record we retrieved
1913
    my $interface = $is_opac ? 'OPAC' : '';
1913
    my $xslfile;
1914
    my $xslsyspref = $interface . "XSLTResultsDisplay";
1914
    my $xslsyspref;
1915
    my $xslfile = C4::Context->preference($xslsyspref);
1915
    if( $is_opac ){
1916
        $xslsyspref = "OPACXSLTResultsDisplay";
1917
        $xslfile = C4::Context->preference( $xslsyspref );
1918
    } else {
1919
        $xslsyspref = "XSLTResultsDisplay";
1920
        $xslfile = C4::Context->preference( $xslsyspref ) || "default";
1921
    }
1916
    my $lang   = $xslfile ? C4::Languages::getlanguage()  : undef;
1922
    my $lang   = $xslfile ? C4::Languages::getlanguage()  : undef;
1917
    my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef;
1923
    my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef;
1918
1924
(-)a/installer/data/mysql/atomicupdate/bug_22695-remove-non-xslt-results.perl (+6 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( "UPDATE systempreferences SET value = 'default' WHERE variable = 'XSLTResultsDisplay' AND value = ''" );
4
    SetVersion( $DBversion );
5
    print "Upgrade to $DBversion done (Bug 22695 - Remove non-XSLT search results view from the staff client)\n";
6
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref (-2 / +2 lines)
Lines 75-86 Staff Client: Link Here
75
            - 'Display results in the staff client using XSLT stylesheet at: '
75
            - 'Display results in the staff client using XSLT stylesheet at: '
76
            - pref: XSLTResultsDisplay
76
            - pref: XSLTResultsDisplay
77
              class: file
77
              class: file
78
            - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="XSLTResultsDisplay" data-value="">Leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="set_syspref" data-syspref="XSLTResultsDisplay" data-value="default">default</a>" for the default one</li><li> put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language'
78
            - '<br />Options:<ul><li>Enter "<a href="#" class="set_syspref" data-syspref="XSLTResultsDisplay" data-value="default">default</a>" for the default one</li><li>Put a path to define a xslt file</li><li>Put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language'
79
        -
79
        -
80
            - 'Display details in the staff client using XSLT stylesheet at: '
80
            - 'Display details in the staff client using XSLT stylesheet at: '
81
            - pref: XSLTDetailsDisplay
81
            - pref: XSLTDetailsDisplay
82
              class: file
82
              class: file
83
            - '<br />Options:<ul><li>enter "<a href="#" class="set_syspref" data-syspref="XSLTDetailsDisplay" data-value="default">default</a>" for the default one</li><li>put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language'
83
            - '<br />Options:<ul><li>Enter "<a href="#" class="set_syspref" data-syspref="XSLTDetailsDisplay" data-value="default">default</a>" for the default one</li><li>Put a path to define a xslt file</li><li>Put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language'
84
        -
84
        -
85
            - pref: DisplayIconsXSLT
85
            - pref: DisplayIconsXSLT
86
              choices:
86
              choices:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-40 lines)
Lines 400-447 Link Here
400
                                    </div>
400
                                    </div>
401
                                [% END %]
401
                                [% END %]
402
402
403
			    [% IF ( SEARCH_RESULT.XSLTResultsRecord ) %]
404
                [% SEARCH_RESULT.result_number | html %].
403
                [% SEARCH_RESULT.result_number | html %].
405
                [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
404
                [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
406
			    [% ELSE %]
407
                                <p>[% SEARCH_RESULT.result_number | html %].
408
                                 [% biblionumber = SEARCH_RESULT.biblionumber %]
409
410
				[% INCLUDE 'biblio-default-view.inc' %]
411
                                            <b>[% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title | html %][% ELSE %]No title[% END %]</b>
412
                                            </a>
413
                                        [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield | html %][% END %]
414
                                        [% IF ( SEARCH_RESULT.seriestitle ) %][% SEARCH_RESULT.seriestitle | html %][% END %]
415
                                        [% IF ( SEARCH_RESULT.volume ) %][% SEARCH_RESULT.volume | html %][% END %] [% IF ( SEARCH_RESULT.volumeddesc ) %], [% SEARCH_RESULT.volumeddesc | html %][% END %]
416
                                </p>
417
                                [% IF ( SEARCH_RESULT.summary ) %]
418
                                        [% IF ( SEARCH_RESULT.author ) %]
419
                                            <a href="/cgi-bin/koha/catalogue/search.pl?idx=au&amp;q=[% SEARCH_RESULT.author |url %]" title="Search for this Author">[% SEARCH_RESULT.author | html %]</a>
420
                                        [% ELSE %]
421
                                            &nbsp;
422
                                        [% END %]
423
                                    <p>[% SEARCH_RESULT.summary | html %]</p>
424
                                [% ELSE %]
425
                                    <p>
426
                                        [% IF ( SEARCH_RESULT.author ) %]
427
                                            <a href="/cgi-bin/koha/catalogue/search.pl?idx=au&amp;q=[% SEARCH_RESULT.author |url %]" title="Search for this Author">[% SEARCH_RESULT.author | html %]</a>
428
                                        [% ELSE %]
429
                                            &nbsp;
430
                                        [% END %]
431
                                        Description:
432
                                        <span class="results_imprint">[% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place | html %] [% END %]
433
                                        [% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode | html %][% END %] [% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear | html %] [% ELSIF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate | html %][% END %]</span>
434
										[% IF ( SEARCH_RESULT.edition ) %]<span class="results_edition">Edition: [% SEARCH_RESULT.edition | html %]</span>[% END %]
435
                                        <span class="results_physicaldesc">[% IF ( SEARCH_RESULT.pages ) %]: [% SEARCH_RESULT.pages | html %][% END %]
436
                                        [% IF ( SEARCH_RESULT.size ) %] ; [% SEARCH_RESULT.size | html %][% END %]</span> [% IF ( SEARCH_RESULT.isbn ) %]<span class="results_isbn">ISBN: [% SEARCH_RESULT.isbn | replace('\s\|', ', ') | html %]</span>[% END %]
437
                                        <span class="results_itemtype">[% SEARCH_RESULT.description | html %]</span>
438
                                        [% IF ( SEARCH_RESULT.timestamp ) %] <i>(modified on [% SEARCH_RESULT.timestamp | html %])</i>[% END %]
439
                                        [% IF ( SEARCH_RESULT.cn_class ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% SEARCH_RESULT.cn_class |uri %]%22">[% SEARCH_RESULT.cn_class | html %]</a>][% END %]
440
                                    </p>
441
                                    [% IF ( SEARCH_RESULT.searchhighlightblob ) %]<p class="searchhighlightblob">[% SEARCH_RESULT.searchhighlightblob | html %]</p>[% END %]
442
405
443
                                [% END %]
444
                                [% END %]
445
                                  <p class="hold">
406
                                  <p class="hold">
446
407
447
                            [% IF ( SEARCH_RESULT.norequests ) %]
408
                            [% IF ( SEARCH_RESULT.norequests ) %]
448
- 

Return to bug 22695