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

(-)a/C4/XSLT.pm (+7 lines)
Lines 266-271 sub XSLTParse4Display { Link Here
266
            $variables->{OpenURLResolverURL} = $biblio->get_openurl;
266
            $variables->{OpenURLResolverURL} = $biblio->get_openurl;
267
        }
267
        }
268
    }
268
    }
269
270
    if ( C4::Context->userenv ) {
271
        $variables->{logged_in_user_branchcode} = C4::Context->userenv->{branch}
272
    }
273
269
    my $varxml = "<variables>\n";
274
    my $varxml = "<variables>\n";
270
    while (my ($key, $value) = each %$variables) {
275
    while (my ($key, $value) = each %$variables) {
271
        $varxml .= "<variable name=\"$key\">$value</variable>\n";
276
        $varxml .= "<variable name=\"$key\">$value</variable>\n";
Lines 356-361 sub buildKohaItemsNamespace { Link Here
356
            $status = "available";
361
            $status = "available";
357
        }
362
        }
358
        my $homebranch     = xml_escape($branches{$item->homebranch});
363
        my $homebranch     = xml_escape($branches{$item->homebranch});
364
        my $homebranchcode = xml_escape($item->homebranch);
359
        my $holdingbranch  = xml_escape($branches{$item->holdingbranch});
365
        my $holdingbranch  = xml_escape($branches{$item->holdingbranch});
360
        my $location       = xml_escape($item->location && exists $shelflocations->{$item->location} ? $shelflocations->{$item->location} : $item->location);
366
        my $location       = xml_escape($item->location && exists $shelflocations->{$item->location} ? $shelflocations->{$item->location} : $item->location);
361
        my $ccode          = xml_escape($item->ccode    && exists $ccodes->{$item->ccode}            ? $ccodes->{$item->ccode}            : $item->ccode);
367
        my $ccode          = xml_escape($item->ccode    && exists $ccodes->{$item->ccode}            ? $ccodes->{$item->ccode}            : $item->ccode);
Lines 364-369 sub buildKohaItemsNamespace { Link Here
364
        $xml .=
370
        $xml .=
365
            "<item>"
371
            "<item>"
366
          . "<homebranch>$homebranch</homebranch>"
372
          . "<homebranch>$homebranch</homebranch>"
373
          . "<homebranchcode>$homebranchcode</homebranchcode>"
367
          . "<holdingbranch>$holdingbranch</holdingbranch>"
374
          . "<holdingbranch>$holdingbranch</holdingbranch>"
368
          . "<location>$location</location>"
375
          . "<location>$location</location>"
369
          . "<ccode>$ccode</ccode>"
376
          . "<ccode>$ccode</ccode>"
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-3 / +12 lines)
Lines 35-40 Link Here
35
    <xsl:variable name="singleBranchMode" select="marc:sysprefs/marc:syspref[@name='singleBranchMode']"/>
35
    <xsl:variable name="singleBranchMode" select="marc:sysprefs/marc:syspref[@name='singleBranchMode']"/>
36
    <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
36
    <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
37
    <xsl:variable name="BiblioDefaultView" select="marc:sysprefs/marc:syspref[@name='BiblioDefaultView']"/>
37
    <xsl:variable name="BiblioDefaultView" select="marc:sysprefs/marc:syspref[@name='BiblioDefaultView']"/>
38
    <xsl:variable name="logged_in_user_branchcode" select="marc:variables/marc:variable[@name='logged_in_user_branchcode']"/>
38
        <xsl:variable name="leader" select="marc:leader"/>
39
        <xsl:variable name="leader" select="marc:leader"/>
39
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
40
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
40
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
41
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
Lines 1262-1272 Link Here
1262
                            <xsl:when test="$OPACResultsLibrary='homebranch'">
1263
                            <xsl:when test="$OPACResultsLibrary='homebranch'">
1263
                               <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1264
                               <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1264
                                   <span class="ItemSummary">
1265
                                   <span class="ItemSummary">
1265
                                       <span class="ItemBranch"><xsl:value-of select="items:homebranch"/> </span>
1266
                                       <xsl:choose>
1267
                                           <xsl:when test="$logged_in_user_branchcode = items:homebranchcode">
1268
                                               <span class="highlight-row-results">
1269
                                                   <span class="ItemBranch"><xsl:value-of select="items:homebranch"/> </span>
1270
                                               </span>
1271
                                           </xsl:when>
1272
                                           <xsl:otherwise>
1273
                                               <span class="ItemBranch"><xsl:value-of select="items:homebranch"/> </span>
1274
                                           </xsl:otherwise>
1275
                                       </xsl:choose>
1266
                                       <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
1276
                                       <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
1267
                                           <span class="CallNumberAndLabel">
1277
                                           <span class="CallNumberAndLabel">
1268
                                               <span class="LabelCallNumber">Call number: </span>
1278
                                               <span class="LabelCallNumber">Call number: </span>
1269
								   <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
1279
                                               <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
1270
                                           </span>
1280
                                           </span>
1271
                                       </xsl:if>
1281
                                       </xsl:if>
1272
                                       <xsl:text> (</xsl:text>
1282
                                       <xsl:text> (</xsl:text>
1273
- 

Return to bug 11426