$item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan};
# can place hold on item ?
- if ((!$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems'))
- && !$item->{itemlost}
- && !$item->{withdrawn}
- ) {
- $can_place_holds = 1;
+ if ( !$item->{itemlost} ) {
+ if ( !$item->{wthdrawn} ){
+ if ( $item->{damaged} ){
+ if ( C4::Context->preference('AllowHoldsOnDamagedItems') ){
+ # can place a hold on a damaged item if AllowHoldsOnDamagedItems is true
+ if ( ( !$item->{notforloan} || $item->{notforloan} < 0 ) ){
+ # item is either for loan or has notforloan < 0
+ $can_place_holds = 1;
+ }
+ }
+ } elsif ( $item->{notforloan} < 0 ) {
+ # item is not damaged and notforloan is < 0
+ $can_place_holds = 1;
+ }
+ }
}
-
+
$other_count++;
my $key = $prefix . $item->{status};
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
{lang: '[% lang %]'}
</script>
+ <script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
[% END %]
[% IF ( OpacStarRatings != 'disable' ) %]<script type="text/javascript" src="/opac-tmpl/prog/en/lib/jquery/plugins/jquery.rating.js"></script>
<link rel="stylesheet" type="text/css" href="/opac-tmpl/prog/en/css/jquery.rating.css" />[% END %]
<div id="social_networks">
<span>Share</span>
<div><a id="facebook" href="http://www.facebook.com/sharer.php?u=[% current_url |url %]&t=[% title |url %]" title="Share on Facebook">Facebook</a></div>
- <div><a id="twitter" href="http://twitter.com/share" title="Share on Twitter">Twitter</a></div>
<div><a id="linkedin" href="http://www.linkedin.com/shareArticle?mini=true&url=[% current_url |url %]&title=[% title |url %]" title="Share on LinkedIn">LinkedIn</a></div>
<div><a id="delicious" href="http://www.delicious.com/save?url=[% current_url |url %]&title=[% title |url %]" title="Share on Delicious">Delicious</a></div>
<div><a id="email" href="mailto:?subject=[% title |url %]&body=[% title |url %] ([% current_url |url %])" title="Share by email">Email</a></div>
- <div><g:plusone size="small"></g:plusone></div>
+ <div><g:plusone size="small" annotation="none"></g:plusone></div>
+ <div><a id="twitter" href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-text="[% title %]" data-lang="[% lang %]">Tweet</a></div>
</div>
[% END %]