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

(-)a/C4/XSLT.pm (-4 / +14 lines)
Lines 197-237 sub XSLTParse4Display { Link Here
197
    $lang ||= C4::Languages::getlanguage();
197
    $lang ||= C4::Languages::getlanguage();
198
198
199
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
199
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
200
        my $htdocs;
200
        my ( $htdocs, $theme, $xslfile, $interface );
201
        my $theme;
202
        my $xslfile;
203
        if ($xslsyspref eq "XSLTDetailsDisplay") {
201
        if ($xslsyspref eq "XSLTDetailsDisplay") {
204
            $htdocs  = C4::Context->config('intrahtdocs');
202
            $htdocs  = C4::Context->config('intrahtdocs');
205
            $theme   = C4::Context->preference("template");
203
            $theme   = C4::Context->preference("template");
206
            $xslfile = C4::Context->preference('marcflavour') .
204
            $xslfile = C4::Context->preference('marcflavour') .
207
                       "slim2intranetDetail.xsl";
205
                       "slim2intranetDetail.xsl";
206
            $interface = 'intranet';
208
        } elsif ($xslsyspref eq "XSLTResultsDisplay") {
207
        } elsif ($xslsyspref eq "XSLTResultsDisplay") {
209
            $htdocs  = C4::Context->config('intrahtdocs');
208
            $htdocs  = C4::Context->config('intrahtdocs');
210
            $theme   = C4::Context->preference("template");
209
            $theme   = C4::Context->preference("template");
211
            $xslfile = C4::Context->preference('marcflavour') .
210
            $xslfile = C4::Context->preference('marcflavour') .
212
                        "slim2intranetResults.xsl";
211
                        "slim2intranetResults.xsl";
212
            $interface = 'intranet';
213
        } elsif ($xslsyspref eq "OPACXSLTDetailsDisplay") {
213
        } elsif ($xslsyspref eq "OPACXSLTDetailsDisplay") {
214
            $htdocs  = C4::Context->config('opachtdocs');
214
            $htdocs  = C4::Context->config('opachtdocs');
215
            $theme   = C4::Context->preference("opacthemes");
215
            $theme   = C4::Context->preference("opacthemes");
216
            $xslfile = C4::Context->preference('marcflavour') .
216
            $xslfile = C4::Context->preference('marcflavour') .
217
                       "slim2OPACDetail.xsl";
217
                       "slim2OPACDetail.xsl";
218
            $interface = 'opac';
218
        } elsif ($xslsyspref eq "OPACXSLTResultsDisplay") {
219
        } elsif ($xslsyspref eq "OPACXSLTResultsDisplay") {
219
            $htdocs  = C4::Context->config('opachtdocs');
220
            $htdocs  = C4::Context->config('opachtdocs');
220
            $theme   = C4::Context->preference("opacthemes");
221
            $theme   = C4::Context->preference("opacthemes");
221
            $xslfile = C4::Context->preference('marcflavour') .
222
            $xslfile = C4::Context->preference('marcflavour') .
222
                       "slim2OPACResults.xsl";
223
                       "slim2OPACResults.xsl";
224
            $interface = 'opac';
223
        } elsif ($xslsyspref eq 'XSLTListsDisplay') {
225
        } elsif ($xslsyspref eq 'XSLTListsDisplay') {
224
            # Lists default to *Results.xslt
226
            # Lists default to *Results.xslt
225
            $htdocs  = C4::Context->config('intrahtdocs');
227
            $htdocs  = C4::Context->config('intrahtdocs');
226
            $theme   = C4::Context->preference("template");
228
            $theme   = C4::Context->preference("template");
227
            $xslfile = C4::Context->preference('marcflavour') .
229
            $xslfile = C4::Context->preference('marcflavour') .
228
                        "slim2intranetResults.xsl";
230
                        "slim2intranetResults.xsl";
231
            $interface = 'intranet';
229
        } elsif ($xslsyspref eq 'OPACXSLTListsDisplay') {
232
        } elsif ($xslsyspref eq 'OPACXSLTListsDisplay') {
230
            # Lists default to *Results.xslt
233
            # Lists default to *Results.xslt
231
            $htdocs  = C4::Context->config('opachtdocs');
234
            $htdocs  = C4::Context->config('opachtdocs');
232
            $theme   = C4::Context->preference("opacthemes");
235
            $theme   = C4::Context->preference("opacthemes");
233
            $xslfile = C4::Context->preference('marcflavour') .
236
            $xslfile = C4::Context->preference('marcflavour') .
234
                       "slim2OPACResults.xsl";
237
                       "slim2OPACResults.xsl";
238
            $interface = 'opac';
239
        }
240
241
        # Dealing with dev installs here
242
        if ( C4::Context->config('dev_install') && $interface ) {
243
            # /kohadevbox/koha/koha-tmpl/intranet-tmpl
244
            # /kohadevbox/koha/koha-tmpl/opac-tmpl
245
            $htdocs = sprintf "%s/koha-tmpl/%s-tmpl", C4::Context->config('intranetdir'), $interface;
235
        }
246
        }
236
        $xslfilename = _get_best_default_xslt_filename($htdocs, $theme, $lang, $xslfile);
247
        $xslfilename = _get_best_default_xslt_filename($htdocs, $theme, $lang, $xslfile);
237
    }
248
    }
238
- 

Return to bug 24852