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

(-)a/C4/XSLT.pm (-3 / +10 lines)
Lines 164-169 sub _get_best_default_xslt_filename { Link Here
164
    return $xslfilename;
164
    return $xslfilename;
165
}
165
}
166
166
167
=head2 get_xslt_sysprefs
168
169
    returns XML xslt sysprefs.
170
171
=cut
172
167
sub get_xslt_sysprefs {
173
sub get_xslt_sysprefs {
168
    my $sysxml = "<sysprefs>\n";
174
    my $sysxml = "<sysprefs>\n";
169
    foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
175
    foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
Lines 263-269 sub XSLTParse4Display { Link Here
263
    my $itemsxml  = buildKohaItemsNamespace($biblionumber, $hidden_items);
269
    my $itemsxml  = buildKohaItemsNamespace($biblionumber, $hidden_items);
264
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
270
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
265
271
266
    $variables ||= {};
272
    my $variables ||= {};
267
    if (C4::Context->preference('OPACShowOpenURL')) {
273
    if (C4::Context->preference('OPACShowOpenURL')) {
268
        my @biblio_itemtypes;
274
        my @biblio_itemtypes;
269
        my $biblio = Koha::Biblios->find($biblionumber);
275
        my $biblio = Koha::Biblios->find($biblionumber);
Lines 416-422 sub CustomXSLTExportList { Link Here
416
                      '/' . C4::Context->preference( $opac ? "opacthemes" : "template") .
422
                      '/' . C4::Context->preference( $opac ? "opacthemes" : "template") .
417
                      '/' . C4::Languages::getlanguage() .
423
                      '/' . C4::Languages::getlanguage() .
418
                      '/xslt/biblioexport';
424
                      '/xslt/biblioexport';
419
    my @files = <$dir/*.xsl>;
425
    my @files = glob qq("$dir/*.xsl");
420
    foreach my $file (@files) {
426
    foreach my $file (@files) {
421
        if ( -f "$file" ) {
427
        if ( -f "$file" ) {
422
            (my $text = $file) =~ s/.*\///g;
428
            (my $text = $file) =~ s/.*\///g;
Lines 433-439 sub CustomXSLTExportList { Link Here
433
            # Get output format
439
            # Get output format
434
            # There should only be one xsl:output node, so taking the first one only is OK
440
            # There should only be one xsl:output node, so taking the first one only is OK
435
            $node = @{$node->findnodes("xsl:output")}[0];
441
            $node = @{$node->findnodes("xsl:output")}[0];
436
            my $outputformat = $node->{"method"} if $node;
442
            my $outputformat= "";
443
            $outputformat = $node->{"method"} if $node;
437
            $outputformat = "txt" if ($outputformat eq "" || $outputformat eq "text");
444
            $outputformat = "txt" if ($outputformat eq "" || $outputformat eq "text");
438
445
439
            my %row = (
446
            my %row = (
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (-1 / +1 lines)
Lines 97-103 CAN_user_serials_create_subscription ) %] Link Here
97
        <li><a href="/cgi-bin/koha/catalogue/export.pl?format=mods&amp;op=export&amp;bib=[% biblionumber | uri %]">MODS (XML)</a></li>
97
        <li><a href="/cgi-bin/koha/catalogue/export.pl?format=mods&amp;op=export&amp;bib=[% biblionumber | uri %]">MODS (XML)</a></li>
98
        <li><a href="/cgi-bin/koha/catalogue/export.pl?format=ris&amp;op=export&amp;bib=[% biblionumber | uri %]">RIS</a></li>
98
        <li><a href="/cgi-bin/koha/catalogue/export.pl?format=ris&amp;op=export&amp;bib=[% biblionumber | uri %]">RIS</a></li>
99
        [% FOREACH filesOption IN filesOptions %]
99
        [% FOREACH filesOption IN filesOptions %]
100
            <li><a href="/cgi-bin/koha/catalogue/export.pl?format=[% filesOption.format %]&amp;op=exportxsl&amp;file=[% filesOption.value %]&amp;bib=[% biblionumber | html %]">[% filesOption.filename %]</a></li>
100
            <li><a href="/cgi-bin/koha/catalogue/export.pl?format=[% filesOption.format | uri %]&amp;op=exportxsl&amp;file=[% filesOption.value | uri %]&amp;bib=[% biblionumber | uri %]">[% filesOption.filename | html %]</a></li>
101
        [% END %]
101
        [% END %]
102
    </ul>
102
    </ul>
103
    </div>
103
    </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc (-1 / +1 lines)
Lines 32-38 Link Here
32
                        <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id | uri %]&amp;shelfid=[% shelf.shelfnumber | uri %]">CSV - [% csv_profile.profile | html %]</a></li>
32
                        <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id | uri %]&amp;shelfid=[% shelf.shelfnumber | uri %]">CSV - [% csv_profile.profile | html %]</a></li>
33
                    [% END %]
33
                    [% END %]
34
                    [% FOREACH xsl_export IN xsl_exports %]
34
                    [% FOREACH xsl_export IN xsl_exports %]
35
                        <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=xsl.[% xsl_export.value %]&amp;shelfid=[% shelf.shelfnumber %]">XSL - [% xsl_export.filename %]</a></li>
35
                        <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=xsl.[% xsl_export.value | uri %]&amp;shelfid=[% shelf.shelfnumber | uri %]">XSL - [% xsl_export.filename | html %]</a></li>
36
                    [% END %]
36
                    [% END %]
37
                </ul>
37
                </ul>
38
        </div>
38
        </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt (-1 / +1 lines)
Lines 57-63 Link Here
57
                                <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=[% csv_profile.export_format_id | uri %]&amp;bib_list=[% bib_list | uri %]">CSV - [% csv_profile.profile | html %]</a></li>
57
                                <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=[% csv_profile.export_format_id | uri %]&amp;bib_list=[% bib_list | uri %]">CSV - [% csv_profile.profile | html %]</a></li>
58
                            [% END %]
58
                            [% END %]
59
                            [% FOREACH xsl_export IN xsl_exports %]
59
                            [% FOREACH xsl_export IN xsl_exports %]
60
                                <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=xsl.[% xsl_export.value %]&amp;bib_list=[% bib_list %]">XSL - [% xsl_export.filename %]</a></li>
60
                                <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=xsl.[% xsl_export.value | uri %]&amp;bib_list=[% bib_list | uri %]">XSL - [% xsl_export.filename | html %]</a></li>
61
                            [% END %]
61
                            [% END %]
62
                            </ul>
62
                            </ul>
63
                        </div>
63
                        </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-1 / +1 lines)
Lines 753-759 Link Here
753
        <option value="marc8">MARC (non-Unicode/MARC-8)</option>
753
        <option value="marc8">MARC (non-Unicode/MARC-8)</option>
754
        <option value="utf8">MARC (Unicode/UTF-8)</option>
754
        <option value="utf8">MARC (Unicode/UTF-8)</option>
755
        [% FOREACH filesOption IN filesOptions %]
755
        [% FOREACH filesOption IN filesOptions %]
756
            <option value="[% filesOption.value %]">[% filesOption.filename %]</option>
756
            <option value="[% filesOption.value | html %]">[% filesOption.filename | html %]</option>
757
        [% END %]</select>
757
        [% END %]</select>
758
        <input type="submit" name="save" value="Download Record" /></td>
758
        <input type="submit" name="save" value="Download Record" /></td>
759
  </tr>
759
  </tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/downloadshelf.tt (-1 / +1 lines)
Lines 37-43 Link Here
37
	    <option value="[% csv_profile.export_format_id | html %]">CSV - [% csv_profile.profile | html %]</option>
37
	    <option value="[% csv_profile.export_format_id | html %]">CSV - [% csv_profile.profile | html %]</option>
38
	    [% END %]
38
	    [% END %]
39
        [% FOREACH xsl_export IN xsl_exports %]
39
        [% FOREACH xsl_export IN xsl_exports %]
40
            <option value="xsl.[% xsl_export.value %]">XSL - [% xsl_export.filename %]</option>
40
            <option value="xsl.[% xsl_export.value | html %]">XSL - [% xsl_export.filename | html %]</option>
41
        [% END %]
41
        [% END %]
42
	</select>
42
	</select>
43
	</li></ol>
43
	</li></ol>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc (-1 / +1 lines)
Lines 80-86 Link Here
80
                                </li>
80
                                </li>
81
                                [% ELSE %]
81
                                [% ELSE %]
82
                                    [% FOREACH filesOption IN filesOptions %]
82
                                    [% FOREACH filesOption IN filesOptions %]
83
                                        <li><a role="menuitem" href="/cgi-bin/koha/opac-export.pl?format=[% filesOption.format %]&amp;op=exportxsl&amp;file=[% filesOption.value %]&amp;bib=[% biblionumber %]">[% filesOption.filename %]</a></li>
83
                                        <li><a role="menuitem" href="/cgi-bin/koha/opac-export.pl?format=[% filesOption.format | html %]&amp;op=exportxsl&amp;file=[% filesOption.value | html %]&amp;bib=[% biblionumber | html %]">[% filesOption.filename | html %]</a></li>
84
                                    [% END %]
84
                                    [% END %]
85
                                [% END %]
85
                                [% END %]
86
                            [% END %]
86
                            [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt (-1 / +1 lines)
Lines 21-27 Link Here
21
                                    <option value="[% csv_profile.export_format_id | html %]">CSV - [% csv_profile.profile | html %]</option>
21
                                    <option value="[% csv_profile.export_format_id | html %]">CSV - [% csv_profile.profile | html %]</option>
22
                                [% END %]
22
                                [% END %]
23
                                [% FOREACH xsl_export IN xsl_exports %]
23
                                [% FOREACH xsl_export IN xsl_exports %]
24
                                    <option value="xsl.[% xsl_export.value %]">XSL - [% xsl_export.filename %]</option>
24
                                    <option value="xsl.[% xsl_export.value | html %]">XSL - [% xsl_export.filename | html %]</option>
25
                                [% END %]
25
                                [% END %]
26
                            </select>
26
                            </select>
27
                            <fieldset class="action">
27
                            <fieldset class="action">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt (-1 / +1 lines)
Lines 60-66 Link Here
60
                                            <option value="[% csv_profile.export_format_id | html %]">CSV - [% csv_profile.profile | html %]</option>
60
                                            <option value="[% csv_profile.export_format_id | html %]">CSV - [% csv_profile.profile | html %]</option>
61
                                            [% END %]
61
                                            [% END %]
62
                                            [% FOREACH xsl_export IN xsl_exports %]
62
                                            [% FOREACH xsl_export IN xsl_exports %]
63
                                                <option value="xsl.[% xsl_export.value %]">XSL - [% xsl_export.filename %]</option>
63
                                                <option value="xsl.[% xsl_export.value | html %]">XSL - [% xsl_export.filename | html %]</option>
64
                                            [% END %]
64
                                            [% END %]
65
                                        </select>
65
                                        </select>
66
                                        <span class="required">Required</span>
66
                                        <span class="required">Required</span>
(-)a/t/db_dependent/XSLT.t (-3 / +2 lines)
Lines 1-5 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
use Test::More tests => 2;
2
use Test::More tests => 1;
3
3
4
use t::lib::Mocks;
4
use t::lib::Mocks;
5
use C4::XSLT;
5
use C4::XSLT;
Lines 35-38 subtest 'CustomXSLTExportList: Caching' => sub { Link Here
35
    is( @$list, $n, 'This list comes from the cache and that is fine' );
35
    is( @$list, $n, 'This list comes from the cache and that is fine' );
36
    $cache->clear_from_cache('CustomXSLTExportListOPAC');
36
    $cache->clear_from_cache('CustomXSLTExportListOPAC');
37
};
37
};
38
$schema->storage->txn_rollback;
38
$schema->storage->txn_rollback;
39
- 

Return to bug 17385