[%- END %]
</select>
[%- END %]
+
+
+[% # PINES Customization for New Library Materials
+ # Build second org selector that uses shortname instead of id
+
+BLOCK build_org_selector_newitems;
+ node_stack = [{org => org_unit || ctx.aouct_tree || ctx.aou_tree}];
+ inherited_vis = ctx.get_cgf('opac.org_unit.non_inherited_visibility').enabled == 'f';
+
+ IF !name;
+ name = loc_name;
+ END;
+ IF !value;
+ value = loc_value;
+ END;
+
+ # if the selected org unit is out of hiding scope,
+ # disable the ou-hide scoping altogether.
+ hiding_disabled = ctx.org_hiding_disabled(value);
+
+ -%]
+
+ <select id='newbook_selector'
+ title='[% arialabel || l("Select Library") %]'
+ class="org_selector_dropdown"
+ onchange="location = '/opac/extras/browse/html-full/item-age/' +
+ this.options[this.selectedIndex].value + '/1/20';">
+ <option value="" class="org_unit" disabled selected="selected">Choose a library to see newly purchased items</option>
+ [%-
+ WHILE node_stack.size > 0;
+ node = node_stack.pop();
+ org_unit = node.org;
+ loc_grp = node.loc_grp;
+ ou_id = org_unit.id;
+ css_class = '';
+ disabled = '';
+ selected = '';
+ visible = org_unit.opac_visible == 't';
+
+ # org and all children are invisible.
+ NEXT IF !visible AND inherited_vis AND !ctx.is_staff;
+
+ IF !loc_grp; # processing an org unit
+
+ top_loc_groups = [];
+ IF show_loc_groups;
+ # add the location groups that sort below the child org units
+ FOR grp IN ctx.copy_location_groups.$ou_id.reverse;
+ IF grp.top == 't';
+ top_loc_groups.push(grp);
+ ELSE;
+ node_stack.push({org => org_unit, loc_grp => grp});
+ END;
+ END;
+ END;
+
+ # add the child org units
+ FOR child IN org_unit.children.reverse;
+ node_stack.push({org => child});
+ END;
+
+ # add the location groups that sort to the top
+ # above the child org units
+ FOR grp IN top_loc_groups;
+ node_stack.push({org => org_unit, loc_grp => grp});
+ END;
+
+ END;
+
+ # org is not publicly visible (though its children may be).
+ NEXT UNLESS ctx.is_staff OR visible;
+
+ # org is not within hiding scope (though its children may be).
+ NEXT UNLESS hiding_disabled OR ctx.org_within_hiding_scope(ou_id);
+
+ node_value = ou_id;
+ IF loc_grp;
+ node_value = node_value _ ':' _ loc_grp.id;
+ css_class = 'class="loc_grp"';
+ ELSE;
+ css_class = 'class="org_unit"';
+ END;
+
+ IF can_have_vols_only AND org_unit.ou_type.can_have_vols != 't';
+ disabled = 'disabled="disabled"';
+ ELSIF node_value == value;
+ selected = 'selected="selected"';
+ END;
+
+ IF can_have_users_only AND org_unit.ou_type.can_have_users != 't';
+ disabled = 'disabled="disabled"';
+ ELSIF node_value == value;
+ selected = 'selected="selected"';
+ END;
+
+ IF hold_pickup_lib AND ctx.get_org_setting(
+ org_unit.id, 'opac.holds.org_unit_not_pickup_lib');
+ disabled = 'disabled="disabled"';
+ END;
+
+ # caller provided a list of valid org units.
+ # all orgs not in the list are marked invalid.
+ IF valid_org_list AND
+ !valid_org_list.grep('^' _ org_unit.id _ '$').size;
+ disabled = 'disabled="disabled"';
+ selected = '';
+ END;
+
+ pad_depth = 0;
+
+ # copy loc groups appear as children of the owning org unit
+ SET pad_depth = pad_depth + 1 IF loc_grp;
+
+ # determine the depth by calculating the distance from the root
+ porg = ctx.get_aou(org_unit.parent_ou);
+ WHILE porg;
+ SET pad_depth = pad_depth + 1 IF porg.opac_visible == 't' OR ctx.is_staff;
+ porg = ctx.get_aou(porg.parent_ou);
+ END;
+
+ pad_depth = pad_depth * 5;
+ display_name = loc_grp ? loc_grp.name : org_unit.name %]
+ [% IF node_value == 1 %]
+ [% display_name = "All PINES Libraries" %]
+ [% END %]
+
+ <option value='[% org_unit.shortname %]' [% selected %] [% disabled %] [% css_class %]>
+ [% ' ' FOR [0..pad_depth]; display_name | html %]
+ </option>
+
+ [%- END %]
+ </select>
+[%- END %]
+
<xsl:variable name="t-results">Results</xsl:variable>
<xsl:variable name="t-resultsto">to</xsl:variable>
<xsl:variable name="t-resultsof">of</xsl:variable>
- <xsl:variable name="t-resultstitle">Search Results</xsl:variable> <!-- used in case of absent title -->
+ <xsl:variable name="t-resultstitle">Newly Purchased Library Materials</xsl:variable> <!-- used in case of absent title -->
<xsl:variable name="t-resultsfor">Search Results for</xsl:variable> <!-- used in case of absent title but query is known -->
<!-- next 2 vars are text links to previous and next result pages; entitles should be double-escaped as shown -->
<xsl:variable name="t-prevlink">&#171; previous</xsl:variable>
<xsl:variable name="t-onlineresources">On-line resources: </xsl:variable>
<xsl:variable name="t-untitleditem">(untitled)</xsl:variable> <!-- text of untitled items when the title needs to be shown) -->
<xsl:variable name="t-entrylink">view full entry</xsl:variable> <!-- text of the link to the full entry (used with <content src="" /> in atom) -->
- <xsl:variable name="t-authors">by</xsl:variable> <!-- label before one or more author/contributors (eg the 'by' in 'by Joe'); leave blank to not show authors -->
- <xsl:variable name="t-categories">Subjects:</xsl:variable> <!-- label before one or more categories; leave blank to not show categories -->
- <xsl:variable name="t-source">from</xsl:variable> <!-- label of source (e.g. 'from' or 'via' in English); leave blank to not show sources -->
- <xsl:variable name="t-comments">comments</xsl:variable> <!-- leave blank to not show link to comments -->
- <xsl:variable name="t-download">download</xsl:variable> <!-- leave this or t-enclosure blank to not show link to enclosures -->
- <xsl:variable name="t-enclosure">enclosure</xsl:variable> <!-- text of untitled enclosures; leave this or t-download blank to not show link to enclosures -->
+ <xsl:variable name="t-authors">By</xsl:variable> <!-- label before one or more author/contributors (eg the 'by' in 'by Joe'); leave blank to not show authors -->
+ <xsl:variable name="t-categories"></xsl:variable> <!-- label before one or more categories; leave blank to not show categories -->
+ <xsl:variable name="t-source"></xsl:variable> <!-- label of source (e.g. 'from' or 'via' in English); leave blank to not show sources -->
+ <xsl:variable name="t-comments"></xsl:variable> <!-- leave blank to not show link to comments -->
+ <xsl:variable name="t-download"></xsl:variable> <!-- leave this or t-enclosure blank to not show link to enclosures -->
+ <xsl:variable name="t-enclosure"></xsl:variable> <!-- text of untitled enclosures; leave this or t-download blank to not show link to enclosures -->
<!-- END SETTINGS -->
<xsl:variable name="htmllink" select="(atom:link[@rel='alternate' or not(@rel)]/@href | link | rss1:link)[1]" />
<h1>
+ <a href="/"><img src="/report-creator/images/PINESLogo.gif" style="margin:5px 20px 0px 5px;border:0px;height:40px;" /></a>
<!--
<xsl:choose>
<xsl:when test="$htmllink">
<xsl:when test="$items">
<!-- display the search numbers -->
<p class="nav">
+ <!-- PINES Results display doesn't work
<xsl:value-of select="concat($t-results,' ')" />
<xsl:choose>
- <xsl:when test="$statedStartIndex>0"><xsl:value-of select="$statedStartIndex" /></xsl:when>
+ <xsl:when test="$statedStartIndex >0"><xsl:value-of select="$statedStartIndex" /></xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="concat(' ', $t-resultsto, ' ')" />
<xsl:value-of select="$endIndex" />
<xsl:if test="$totalresults>0"><xsl:value-of select="concat(' ', $t-resultsof, ' ')" /><xsl:number value="$totalresults" grouping-size="3" grouping-separator="," /></xsl:if>
<xsl:if test="string-length($navnext)>0 or string-length($navprev)>0"> | </xsl:if>
- <xsl:if test="string-length($navprev)>0">
+ -->
+ <xsl:if test="string-length($navprev)>0">
<a class="x-escape" href="{$navprev}" rel="previous"><xsl:value-of select="$t-prevlink" disable-output-escaping="yes" /></a>
<xsl:if test="string-length($navnext)>0"> | </xsl:if>
</xsl:if>
<dl><xsl:apply-templates select="$items" /></dl>
<!-- result navigation -->
<p class="nav">
+ <!-- PINES Results display doesn't work
<xsl:value-of select="concat($t-results,' ')" />
<xsl:choose>
<xsl:when test="$statedStartIndex>0"><xsl:value-of select="$statedStartIndex" /></xsl:when>
<xsl:value-of select="$endIndex" />
<xsl:if test="$totalresults>0"><xsl:value-of select="concat(' ', $t-resultsof, ' ')" /><xsl:number value="$totalresults" grouping-size="3" grouping-separator="," /></xsl:if>
<xsl:if test="string-length($navnext)>0 or string-length($navprev)>0"> | </xsl:if>
+ -->
<xsl:if test="string-length($navprev)>0">
<a class="x-escape" href="{$navprev}" rel="previous"><xsl:value-of select="$t-prevlink" disable-output-escaping="yes" /></a>
<xsl:if test="string-length($navnext)>0"> | </xsl:if>
<!-- display the copyright -->
<xsl:variable name="rights" select="(atom:rights[not(@type) or @type='' or @type='text' or @type='html' or @type='xhtml'] | copyright | dc:rights)[1]" />
<div id="footer">
+ <!-- PINES HIDE
<xsl:if test="$rights"><p><xsl:call-template name="showtext"><xsl:with-param name="node" select="$rights" /></xsl:call-template></p></xsl:if>
<p><small>This XSLT is © <a href="http://a9.com/">A9.com, Inc</a> with modifications for <a href="http://open-ils.org">OpenILS/Evergreen</a> © <a href="http://www.georgialibraries.org">GPLS</a>; see <a href="http://opensearch.a9.com/docs/stylesheet.jsp">full details</a>.</small></p>
+ -->
</div>
</body>
</xsl:if>
</xsl:template>
+ <!-- PINES: Use TCN instead of ISBN
<xsl:template match="dc:identifier">
<xsl:attribute name="src">
<xsl:choose>
<xsl:choose>
<xsl:when test="substring-before($isbnraw,' ')">
<xsl:variable name="isbntrimmed"><xsl:value-of select="substring-before($isbnraw,' ')"/></xsl:variable>
- <xsl:value-of select="concat('/opac/extras/ac/jacket/small/',$isbntrimmed)"/>
+ <xsl:value-of select="concat('/opac/extras/ac/jacket/medium/',$isbntrimmed)"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="concat('/opac/extras/ac/jacket/small/',$isbnraw)"/>
+ <xsl:value-of select="concat('/opac/extras/ac/jacket/medium/',$isbnraw)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:attribute>
</xsl:template>
+ -->
+ <xsl:template match="dc:identifier">
+ <xsl:attribute name="src">
+ <xsl:variable name="tcnraw"><xsl:value-of select="substring-after(.,'TCN:')"/></xsl:variable>
+ <xsl:value-of select="concat('/opac/extras/ac/jacket/medium/r/',$tcnraw)"/>
+ </xsl:attribute>
+ </xsl:template>
+
<xsl:template match="atom:entry | item | //rss1:item | //rss9:item"> <!-- match="" must match the select="" earlier on -->
- <xsl:variable name="url"><xsl:call-template name="resolvelink"><xsl:with-param name="url" select="(atom:link[not(@rel) or @rel='alternate' or @rel='']/@href | link | guid[@isPermaLink='true'] | rss1:link | rss9:link)[1]" /></xsl:call-template></xsl:variable>
+ <!-- PINES - create url instead of using one brought in
+ <xsl:variable name="url"><xsl:call-template name="resolvelink"><xsl:with-param name="url" select="(atom:link[not(@rel) or @rel='alternate' or @rel='']/@href | link | guid[@isPermaLink='true'] | rss1:link | rss9:link)[1]" /></xsl:call-template></xsl:variable>
+ -->
+ <xsl:variable name="url">
+ <xsl:variable name="tcnraw"><xsl:value-of select="substring-after(.,'TCN:')"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="contains($tcnraw, ' ')">
+ <xsl:value-of select="concat('/eg/opac/record/', substring-before($tcnraw,' '))" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat('/eg/opac/record/', $tcnraw)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<!-- item title -->
<dt>
+ <span class="booktitle">
<xsl:choose>
<xsl:when test="string-length($url)>0">
<a href="{$url}">
</strong>
</xsl:otherwise>
</xsl:choose>
+ </span>
+ <br/>
<!-- item authors -->
<xsl:if test="$t-authors and (author | atom:author | atom:contributor | dc:creator | dc:publisher | dc:contributor)">
<xsl:value-of select="concat(' ', $t-authors, ' ')" />
<dd class="desc">
<xsl:if test="string-length($url)>0">
<a href="{$url}" style="text-decoration: none;">
- <img align="left" style="margin:5px; border: 0px;" height="50" width="40">
+ <img class="jacket" >
<xsl:apply-templates select="dc:identifier"/>
</img>
</a>
<xsl:if test="h:holdings/h:volumes">
<xsl:if test="h:holdings/h:volumes/h:volume/h:copies/h:copy">
<dd>
- <xsl:value-of select="$t-availcopies"/><xsl:value-of select="count(h:holdings/h:volumes/h:volume/h:copies/h:copy/h:status[@ident='0' or @ident='7' or @ident='12'])"/>
+ <xsl:value-of select="$t-availcopies"/>
+ <xsl:variable name="countcopies" select="count(h:holdings/h:volumes/h:volume/h:copies/h:copy/h:status[@ident='0' or @ident='7' or @ident='12'])"/>
+ <xsl:value-of select="$countcopies"/>
+ <xsl:if test="$countcopies = '0'">
+ <xsl:text> (ON ORDER) </xsl:text>
+ </xsl:if>
<span> / </span>
<xsl:value-of select="$t-totalcopies"/><xsl:value-of select="count(h:holdings/h:volumes/h:volume/h:copies/h:copy)"/>
</dd>
</xsl:if>
<!-- item url -->
+<!-- PINES DISABLE
<xsl:if test="string-length($url)>0">
<dd class="url">
<abbr class="unapi-id">
<xsl:value-of select="@href" />
</xsl:attribute>
</xsl:for-each>
+-->
<!--
<xsl:choose>
<xsl:when test="string-length(substring-after($url, 'http://'))>100">
</xsl:otherwise>
</xsl:choose>
-->
- <xsl:text>unAPI</xsl:text>
+<!-- PINES DISABLE
+ <xsl:text>unAPI</xsl:text>
</abbr>
</dd>
</xsl:if>
+-->
+
<br clear="all"/>
</xsl:template>
<xsl:choose>
<xsl:when test="starts-with($maybeurl, 'http')">
<xsl:value-of select="concat($maybeurl, '#', $category)" />
- </xsl:when>
+ </xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($base_dir, 'opensearch/1.1/', $lib, '/html-full/subject?searchTerms=', $name)" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="string-length($showname)>0">
+ <xsl:value-of select="$showname" />
+ <!-- PINES - don't link authors for now
<xsl:choose>
<xsl:when test="string-length($showlink)>0"><a href="{$showlink}"><xsl:value-of select="$showname" /></a></xsl:when>
<xsl:otherwise>
</a>
</xsl:otherwise>
</xsl:choose>
- <xsl:text>; </xsl:text>
+ -->
+ <xsl:text> </xsl:text>
</xsl:if>
</xsl:template>