my $owner = $shelflist->{$element}->{'owner'};
my $canmanage = ShelfPossibleAction( $loggedinuser, $element, 'manage' );
my $sortfield = $shelflist->{$element}->{'sortfield'};
- if ( $sortfield eq 'author' ) {
- $shelflist->{$element}->{"authorsort"} = 'author';
- }
- if ( $sortfield eq 'year' ) {
- $shelflist->{$element}->{"yearsort"} = 'year';
+ if ( $sortfield ){
+ if ( $sortfield eq 'author' ) {
+ $shelflist->{$element}->{"authorsort"} = 'author';
+ } elsif ( $sortfield eq 'year' ) {
+ $shelflist->{$element}->{"yearsort"} = 'year';
+ }
}
$shelflist->{$element}->{"viewcategory$category"} = 1;
$shelflist->{$element}->{manageshelf} = $canmanage;
$qhash{$_} = $query->param($_) if $query->param($_);
}
( scalar keys %qhash ) and $url .= '?' . join '&', map { "$_=$qhash{$_}" } keys %qhash;
- if ( $shelfnumber ) {
+ if ( $shelfnumber && $totitems ) {
$template->param( pagination_bar => pagination_bar( $url, ( int( $totitems / $shelflimit ) ) + ( ( $totitems % $shelflimit ) > 0 ? 1 : 0 ), $itemoff, "itemoff" ) );
- } else {
+ } elsif ( $totshelves ) {
$template->param(
pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" ) );
}
var _alertString="";
var alertString2;
- if(f.addshelf.value.length ==0){
+ if($("#shelfname").val() == ""){
_alertString += _("- You must enter a List Name") + "\n";
}
</td>
[% END %]
[% UNLESS ( item_level_itypes ) %]<td>
- [% UNLESS ( noItemTypeImages ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
+ [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
</td>[% END %]
<td>
[% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
[% IF ( shelvesloop ) %]
<div class="pages">[% pagination_bar %]</div>
<table>
- <tr><th>List Name</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
+ <tr><th>List Name</th><th>Created by</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
[% FOREACH shelvesloo IN shelvesloop %]
[% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
<td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
+ <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
<td>[% shelvesloo.count %] item(s)</td>
<td>[% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSE %]Title[% END %]</td>
<td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]