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

(-)a/C4/VirtualShelves.pm (-1 / +2 lines)
Lines 264-274 sub GetShelfContents { Link Here
264
        ($sortfield) = $sth2->fetchrow_array;
264
        ($sortfield) = $sth2->fetchrow_array;
265
    }
265
    }
266
    my $query =
266
    my $query =
267
       " SELECT vc.biblionumber, vc.shelfnumber, vc.dateadded, itemtypes.*,
267
       " SELECT DISTINCT vc.biblionumber, vc.shelfnumber, vc.dateadded, itemtypes.*,
268
            biblio.*, biblioitems.itemtype, biblioitems.publicationyear as year, biblioitems.publishercode, biblioitems.place, biblioitems.size, biblioitems.pages
268
            biblio.*, biblioitems.itemtype, biblioitems.publicationyear as year, biblioitems.publishercode, biblioitems.place, biblioitems.size, biblioitems.pages
269
         FROM   virtualshelfcontents vc
269
         FROM   virtualshelfcontents vc
270
         JOIN biblio      ON      vc.biblionumber =      biblio.biblionumber
270
         JOIN biblio      ON      vc.biblionumber =      biblio.biblionumber
271
         LEFT JOIN biblioitems ON  biblio.biblionumber = biblioitems.biblionumber
271
         LEFT JOIN biblioitems ON  biblio.biblionumber = biblioitems.biblionumber
272
         LEFT JOIN items ON items.biblionumber=vc.biblionumber
272
         LEFT JOIN itemtypes   ON biblioitems.itemtype = itemtypes.itemtype
273
         LEFT JOIN itemtypes   ON biblioitems.itemtype = itemtypes.itemtype
273
         WHERE  vc.shelfnumber=? ";
274
         WHERE  vc.shelfnumber=? ";
274
    my @params = ($shelfnumber);
275
    my @params = ($shelfnumber);
(-)a/C4/VirtualShelves/Page.pm (+3 lines)
Lines 304-309 sub shelfpage { Link Here
304
                    viewshelf           => $shelfnumber,
304
                    viewshelf           => $shelfnumber,
305
                    authorsort          => $authorsort,
305
                    authorsort          => $authorsort,
306
                    yearsort            => $yearsort,
306
                    yearsort            => $yearsort,
307
                    itemcallnumbersort  => $sortfield eq 'itemcallnumber',
307
                    manageshelf         => $manageshelf,
308
                    manageshelf         => $manageshelf,
308
                    allowremovingitems  => ShelfPossibleAction( $loggedinuser, $shelfnumber, 'delete'),
309
                    allowremovingitems  => ShelfPossibleAction( $loggedinuser, $shelfnumber, 'delete'),
309
                    allowaddingitem     => ShelfPossibleAction( $loggedinuser, $shelfnumber, 'add'),
310
                    allowaddingitem     => ShelfPossibleAction( $loggedinuser, $shelfnumber, 'add'),
Lines 418-423 sub shelfpage { Link Here
418
                $shelflist->{$element}->{"authorsort"} = 'author';
419
                $shelflist->{$element}->{"authorsort"} = 'author';
419
            } elsif ( $sortfield eq 'year' ) {
420
            } elsif ( $sortfield eq 'year' ) {
420
                $shelflist->{$element}->{"yearsort"} = 'year';
421
                $shelflist->{$element}->{"yearsort"} = 'year';
422
            } elsif ( $sortfield eq 'itemcallnumber' ) {
423
                $shelflist->{$element}->{"itemcallnumbersort"} = 'itemcallnumber';
421
            }
424
            }
422
        }
425
        }
423
        $shelflist->{$element}->{"viewcategory$category"} = 1;
426
        $shelflist->{$element}->{"viewcategory$category"} = 1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-2 / +8 lines)
Lines 210-215 function placeHold () { Link Here
210
                <th>Title</th>
210
                <th>Title</th>
211
                <th>Author</th>
211
                <th>Author</th>
212
                <th>Date added</th>
212
                <th>Date added</th>
213
                <th>Call number</th>
213
                <th>&nbsp;</th>
214
                <th>&nbsp;</th>
214
            </tr>
215
            </tr>
215
		[% FOREACH itemsloo IN itemsloop %]
216
		[% FOREACH itemsloo IN itemsloop %]
Lines 238-243 function placeHold () { Link Here
238
			<td>[% itemsloo.author %]</td>
239
			<td>[% itemsloo.author %]</td>
239
			<td>[% itemsloo.dateadded %]</td>
240
			<td>[% itemsloo.dateadded %]</td>
240
			<td>
241
			<td>
242
                [% FOREACH result IN itemsloo.ITEM_RESULTS %][% result.itemcallnumber %][% UNLESS loop.last %], [% END %][% END %]
243
            </td>
244
            <td>
241
			[% UNLESS ( itemsloo.notforloan ) %]
245
			[% UNLESS ( itemsloo.notforloan ) %]
242
			<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
246
			<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
243
			[% END %]
247
			[% END %]
Lines 299-304 function placeHold () { Link Here
299
		[% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
303
		[% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
300
		[% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
304
		[% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
301
		[% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
305
		[% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
306
        [% IF ( sort_itemcallnumber ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
302
		</select></li>
307
		</select></li>
303
        <li><label for="category">Category: </label>
308
        <li><label for="category">Category: </label>
304
			<select name="category" id="category">
309
			<select name="category" id="category">
Lines 322-327 function placeHold () { Link Here
322
		[% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
327
		[% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
323
		[% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
328
		[% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
324
		[% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
329
		[% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
330
        [% IF ( sort_itemcallnumber ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
325
		</select></li>
331
		</select></li>
326
		<li><label for="category">Category: </label>
332
		<li><label for="category">Category: </label>
327
			<select id="category" name="category">
333
			<select id="category" name="category">
Lines 386-392 function placeHold () { Link Here
386
                    [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
392
                    [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
387
        <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&amp;[% END %]viewshelf=[% shelveslooppri.shelf %]&amp;shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
393
        <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&amp;[% END %]viewshelf=[% shelveslooppri.shelf %]&amp;shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
388
        <td>[% shelveslooppri.count %] item(s)</td>
394
        <td>[% shelveslooppri.count %] item(s)</td>
389
        <td>[% IF ( shelveslooppri.authorsort ) %]Author[% ELSIF ( shelveslooppri.yearsort ) %]Year[% ELSE %]Title[% END %]</td>
395
        <td>[% IF ( shelveslooppri.authorsort ) %]Author[% ELSIF ( shelveslooppri.yearsort ) %]Year[% ELSIF (shelveslooppri.itemcallnumbersort) %]Call number[% ELSE %]Title[% END %]</td>
390
        <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
396
        <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
391
			[% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
397
			[% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
392
		</td>
398
		</td>
Lines 439-445 function placeHold () { Link Here
439
		<td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
445
		<td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
440
        <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
446
        <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
441
		<td>[% shelvesloo.count %] item(s)</td>
447
		<td>[% shelvesloo.count %] item(s)</td>
442
        <td>[% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSE %]Title[% END %]</td>
448
        <td>[% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSIF (shelvesloo.itemcallnumbersort) %]Call number[% ELSE %]Title[% END %]</td>
443
        <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
449
        <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
444
			[% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
450
			[% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
445
		</td>
451
		</td>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt (-1 / +2 lines)
Lines 466-471 $(function() { Link Here
466
                          [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
466
                          [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
467
                          [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
467
                          [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
468
                          [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %]
468
                          [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %]
469
                          [% IF ( sort_itemcallnumber ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
469
                        </select>
470
                        </select>
470
                      </li>
471
                      </li>
471
                      <li>
472
                      <li>
Lines 655-660 $(function() { Link Here
655
                          [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
656
                          [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
656
                          [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
657
                          [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
657
                          [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %]
658
                          [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %]
659
                          [% IF ( sort_itemcallnumber ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
658
                        </select>
660
                        </select>
659
                      </li>
661
                      </li>
660
                      <li>
662
                      <li>
661
- 

Return to bug 8032