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

(-)a/C4/VirtualShelves.pm (+19 lines)
Lines 44-49 BEGIN { Link Here
44
            &ModShelf
44
            &ModShelf
45
            &ShelfPossibleAction
45
            &ShelfPossibleAction
46
            &DelFromShelf &DelShelf
46
            &DelFromShelf &DelShelf
47
            &GetBibliosShelves
47
	);
48
	);
48
        @EXPORT_OK = qw(
49
        @EXPORT_OK = qw(
49
            &GetShelvesSummary &GetRecentShelves
50
            &GetShelvesSummary &GetRecentShelves
Lines 532-537 sub DelShelf { Link Here
532
	return $sth->execute(shift);
533
	return $sth->execute(shift);
533
}
534
}
534
535
536
=item GetBibShelves
537
538
This finds all the lists that this bib record is in.
539
540
=cut
541
542
sub GetBibliosShelves {
543
  my ( $biblionumber )  = @_;
544
  my $dbh = C4::Context->dbh;
545
  my $sth = $dbh->prepare('SELECT vs.shelfname, vs.shelfnumber FROM virtualshelves vs LEFT JOIN virtualshelfcontents vc ON (vs.shelfnumber= vc.shelfnumber) WHERE vs.category != 1 AND vc.biblionumber= ?');
546
  $sth->execute( $biblionumber );
547
  my @lists;
548
  while (my $data = $sth->fetchrow_hashref){
549
    push @lists,$data;
550
  }
551
  return \@lists;
552
}
553
535
=item RefreshShelvesSummary
554
=item RefreshShelvesSummary
536
555
537
	($total, $pubshelves, $barshelves) = RefreshShelvesSummary($sessionID, $loggedinuser, $row_count);
556
	($total, $pubshelves, $barshelves) = RefreshShelvesSummary($sessionID, $loggedinuser, $row_count);
(-)a/catalogue/detail.pl (+7 lines)
Lines 35-40 use C4::Serials; Link Here
35
use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn);
35
use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn);
36
use C4::External::Amazon;
36
use C4::External::Amazon;
37
use C4::Search;		# enabled_staff_search_views
37
use C4::Search;		# enabled_staff_search_views
38
use C4::VirtualShelves;
38
39
39
# use Smart::Comments;
40
# use Smart::Comments;
40
41
Lines 225-230 $template->param( Link Here
225
226
226
# $debug and $template->param(debug_display => 1);
227
# $debug and $template->param(debug_display => 1);
227
228
229
# Lists
230
231
if (C4::Context->preference("virtualshelves") ) {
232
   $template->param( 'GetShelves' => GetBibliosShelves( $biblionumber ) );
233
}
234
228
# XISBN Stuff
235
# XISBN Stuff
229
if (C4::Context->preference("FRBRizeEditions")==1) {
236
if (C4::Context->preference("FRBRizeEditions")==1) {
230
    eval {
237
    eval {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl (+11 lines)
Lines 100-105 function verify_images() { Link Here
100
            <!-- /TMPL_LOOP --></ul>
100
            <!-- /TMPL_LOOP --></ul>
101
</li>
101
</li>
102
    <!-- /TMPL_IF -->
102
    <!-- /TMPL_IF -->
103
    
103
    <!-- TMPL_IF name="OpacUrl" -->
104
    <!-- TMPL_IF name="OpacUrl" -->
104
    	<li><strong>OPAC View:</strong>
105
    	<li><strong>OPAC View:</strong>
105
    	<a href="http://<!-- TMPL_VAR name="OpacUrl" -->/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" target="_blank">Open in new window</a>
106
    	<a href="http://<!-- TMPL_VAR name="OpacUrl" -->/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" target="_blank">Open in new window</a>
Lines 150-155 function verify_images() { Link Here
150
                <!-- /TMPL_LOOP -->
151
                <!-- /TMPL_LOOP -->
151
            </li>
152
            </li>
152
        <!-- /TMPL_IF -->
153
        <!-- /TMPL_IF -->
154
        <!--This grabs all of the lists a bib record appears in -->
155
        <!-- TMPL_IF NAME="GetShelves" -->
156
	        <li><strong>Lists that include this title: </strong>
157
	        <ul>
158
	        <!-- TMPL_LOOP NAME="GetShelves" -->
159
		        <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelfnumber" -->"><!-- TMPL_VAR NAME="shelfname" --></a></li>
160
	        <!-- /TMPL_LOOP -->
161
	        </ul>
162
	        </li>
163
        <!-- /TMPL_IF -->
153
        </ul>
164
        </ul>
154
</div>
165
</div>
155
</div>
166
</div>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl (+9 lines)
Lines 216-221 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
216
    </span>
216
    </span>
217
<!-- /TMPL_IF --> 
217
<!-- /TMPL_IF --> 
218
218
219
<!--This grabs all of the lists a bib record appears in -->
220
<!-- TMPL_IF NAME="GetShelves" -->
221
	<span class="results_summary"><span class="label">List(s) this item appears in: </span>
222
	<!-- TMPL_LOOP NAME="GetShelves" -->
223
		<a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelfnumber" -->&sortfield=title"><!-- TMPL_VAR NAME="shelfname" --></a> 
224
		<!-- TMPL_IF NAME="__LAST__" --><!-- TMPL_ELSE -->|<!-- /TMPL_IF -->
225
	<!-- /TMPL_LOOP -->
226
	</span>
227
<!-- /TMPL_IF -->
219
228
220
    <!-- TMPL_IF NAME="TagsShowOnDetail" -->
229
    <!-- TMPL_IF NAME="TagsShowOnDetail" -->
221
        <div class="results_summary">
230
        <div class="results_summary">
(-)a/opac/opac-detail.pl (-1 / +8 lines)
Lines 38-43 use C4::External::Syndetics qw(get_syndetics_index get_syndetics_summary get_syn Link Here
38
use C4::Review;
38
use C4::Review;
39
use C4::Serials;
39
use C4::Serials;
40
use C4::Members;
40
use C4::Members;
41
use C4::VirtualShelves;
41
use C4::XSLT;
42
use C4::XSLT;
42
43
43
BEGIN {
44
BEGIN {
Lines 266-271 $template->param( Link Here
266
    loggedincommenter   => $loggedincommenter
267
    loggedincommenter   => $loggedincommenter
267
);
268
);
268
269
270
# Lists
271
272
if (C4::Context->preference("virtualshelves") ) {
273
   $template->param( 'GetShelves' => GetBibliosShelves( $biblionumber ) );
274
}
275
276
269
# XISBN Stuff
277
# XISBN Stuff
270
if (C4::Context->preference("OPACFRBRizeEditions")==1) {
278
if (C4::Context->preference("OPACFRBRizeEditions")==1) {
271
    eval {
279
    eval {
272
- 

Return to bug 1003