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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc (-30 lines)
Lines 57-91 Link Here
57
        <li>
57
        <li>
58
            <div id="export">
58
            <div id="export">
59
                <div class="dropdown">
59
                <div class="dropdown">
60
<<<<<<< HEAD
61
                    <a id="format" class="btn btn-link btn-lg dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-fw fa-download" aria-hidden="true"></i> Save record <b class="caret"></b></a>
62
                    <div class="dropdown-menu dropdown-menu-right" aria-labelledby="format">
63
                        [% FOREACH option IN export_options %]
64
                            [% IF option == 'dc' %]
65
                                <a class="dropdown-item" href="#" data-toggle="modal" data-target="#exportModal_">Dublin Core</a>
66
                            [% ELSE %]
67
                                <a class="dropdown-item" href="/cgi-bin/koha/opac-export.pl?op=export&amp;bib=[% biblio.biblionumber | html %]&amp;format=[% option | html %]">
68
                                    [% SWITCH option %]
69
                                        [% CASE 'bibtex' %]BIBTEX
70
                                        [% CASE 'endnote' %]EndNote
71
                                        [% CASE 'marcxml' %]MARCXML
72
                                        [% CASE 'marc8' %]MARC (non-Unicode/MARC-8)
73
                                        [% CASE 'utf8' %]MARC (Unicode/UTF-8)
74
                                        [% CASE 'marcstd' %]MARC (Unicode/UTF-8, Standard)
75
                                        [% CASE 'mods' %]MODS (XML)
76
                                        [% CASE 'ris' %]RIS
77
                                        [% CASE 'isbd' %]ISBD
78
                                    [% END %]
79
                                </a>
80
                            [% END %]
81
                            [% FOREACH filesOption IN filesOptions %]
82
                                <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
                            [% END %]
84
                        [% END %]
85
                    </div> <!-- /.dropdown-menu -->
86
                </div> <!-- /.dropdown -->
87
            </div> <!-- /#export -->
88
=======
89
                    <a id="format" class="btn btn-link btn-lg dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-fw fa-download"></i> Save record <b class="caret"></b></a>
60
                    <a id="format" class="btn btn-link btn-lg dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-fw fa-download"></i> Save record <b class="caret"></b></a>
90
                        <ul class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
61
                        <ul class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
91
                            [% FOREACH option IN export_options %]
62
                            [% FOREACH option IN export_options %]
Lines 116-122 Link Here
116
                        </ul>
87
                        </ul>
117
                </div>
88
                </div>
118
            </div>
89
            </div>
119
>>>>>>> Bug 17385: Add tests for CustomXSLTExportList
120
        </li>
90
        </li>
121
    [% END %]
91
    [% END %]
122
92
(-)a/t/XSLT.t (-4 / +3 lines)
Lines 73-81 is(find_and_slurp($dir, 'test', 'fr-FR'), 'Theme test, language en', 'Fell ba Link Here
73
is(find_and_slurp($dir, 'nope', 'es-ES'), 'Theme prog, language es-ES', 'Fell back to prog/es-ES for nope/es-ES');
73
is(find_and_slurp($dir, 'nope', 'es-ES'), 'Theme prog, language es-ES', 'Fell back to prog/es-ES for nope/es-ES');
74
is(find_and_slurp($dir, 'nope', 'fr-FR'), 'Theme prog, language en',    'Fell back to prog/en for nope/fr-FR');
74
is(find_and_slurp($dir, 'nope', 'fr-FR'), 'Theme prog, language en',    'Fell back to prog/en for nope/fr-FR');
75
75
76
my $matching_string = q{<syspref name="singleBranchMode">0</syspref>};
76
my $matching_string = q{<syspref name="singleBranchMode">[0|1]</syspref>};
77
my $sysprefs_xml = C4::XSLT::get_xslt_sysprefs();
77
my $sysprefs_xml = C4::XSLT::get_xslt_sysprefs();
78
ok( $sysprefs_xml =~ m/$matching_string/, 'singleBranchMode has a value of 0');
78
ok( $sysprefs_xml =~ m/$matching_string/, 'singleBranchMode has no value');
79
79
80
t::lib::Mocks::mock_config('opachtdocs', "$dir");
80
t::lib::Mocks::mock_config('opachtdocs', "$dir");
81
make_path("$dir/bootstrap/en/xslt/biblioexport");
81
make_path("$dir/bootstrap/en/xslt/biblioexport");
Lines 106-109 close $fh; Link Here
106
my @custom_xslts = @{C4::XSLT::CustomXSLTExportList(1)};
106
my @custom_xslts = @{C4::XSLT::CustomXSLTExportList(1)};
107
ok((scalar @custom_xslts) == 2, "CustomXSLTExportList finds custom XSLTs");
107
ok((scalar @custom_xslts) == 2, "CustomXSLTExportList finds custom XSLTs");
108
ok($custom_xslts[0]->{filename} eq "Export 01", "Title is specified in root node");
108
ok($custom_xslts[0]->{filename} eq "Export 01", "Title is specified in root node");
109
ok($custom_xslts[1]->{filename} eq "export_02", "Title is filename if not specified");
109
ok($custom_xslts[1]->{filename} eq "export_02", "Title is filename if not specified");
110
- 

Return to bug 17385