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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasket.tt (-3 / +5 lines)
Lines 1-6 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE HtmlToText %]
2
[% USE HtmlToText %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE AuthorisedValues %]
5
[% USE Branches %]
4
6
5
<SUBJECT>
7
<SUBJECT>
6
Your cart
8
Your cart
Lines 143-154 Your cart Link Here
143
                In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber | html %]
145
                In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber | html %]
144
            </p>
146
            </p>
145
            [% END %]
147
            [% END %]
146
            [% IF ( BIBLIO_RESULT.ITEM_RESULTS.size ) %]
148
            [% IF ( BIBLIO_RESULT.ITEM_RESULTS.count ) %]
147
            <p>Items:
149
            <p>Items:
148
            <ul>
150
            <ul>
149
                [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]<li>
151
                [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]<li>
150
                    [% ITEM_RESULT.branchname | $raw %]
152
                    [% Branches.GetName(ITEM_RESULT.holdingbranch) | $raw %]
151
                    [% ITEM_RESULT.location | $raw %]
153
                    [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location ) | html %]%]
152
                    [% IF ITEM_RESULT.itemcallnumber %]([% ITEM_RESULT.itemcallnumber | $raw %])[% END %]
154
                    [% IF ITEM_RESULT.itemcallnumber %]([% ITEM_RESULT.itemcallnumber | $raw %])[% END %]
153
                    [% ITEM_RESULT.barcode | $raw %]
155
                    [% ITEM_RESULT.barcode | $raw %]
154
                </li>[% END %]
156
                </li>[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendshelf.tt (-3 / +5 lines)
Lines 1-4 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE AuthorisedValues %]
3
[% USE Branches %]
2
<SUBJECT>
4
<SUBJECT>
3
Your list : [% shelfname | $raw %]
5
Your list : [% shelfname | $raw %]
4
<END_SUBJECT>
6
<END_SUBJECT>
Lines 145-156 Your list : [% shelfname | $raw %] Link Here
145
                In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber | html %]
147
                In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber | html %]
146
            </p>
148
            </p>
147
            [% END %]
149
            [% END %]
148
            [% IF ( BIBLIO_RESULT.ITEM_RESULTS.size ) %]
150
            [% IF ( BIBLIO_RESULT.ITEM_RESULTS.count ) %]
149
            <p>Items:
151
            <p>Items:
150
            <ul>
152
            <ul>
151
                [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]<li>
153
                [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]<li>
152
                    [% ITEM_RESULT.branchname | $raw %]
154
                    [% Branches.GetName(ITEM_RESULT.holdingbranch) | $raw %]
153
                    [% ITEM_RESULT.location | $raw %]
155
                    [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location ) | html %]
154
                    [% IF ITEM_RESULT.itemcallnumber %]([% ITEM_RESULT.itemcallnumber | $raw %])[% END %]
156
                    [% IF ITEM_RESULT.itemcallnumber %]([% ITEM_RESULT.itemcallnumber | $raw %])[% END %]
155
                    [% ITEM_RESULT.barcode | $raw %]
157
                    [% ITEM_RESULT.barcode | $raw %]
156
                </li>[% END %]
158
                </li>[% END %]
(-)a/opac/opac-sendbasket.pl (-6 / +2 lines)
Lines 27-33 use Try::Tiny qw( catch try ); Link Here
27
use C4::Biblio qw(
27
use C4::Biblio qw(
28
    GetMarcSubjects
28
    GetMarcSubjects
29
);
29
);
30
use C4::Items qw( GetItemsInfo );
31
use C4::Auth qw( get_template_and_user );
30
use C4::Auth qw( get_template_and_user );
32
use C4::Output qw( output_html_with_http_headers );
31
use C4::Output qw( output_html_with_http_headers );
33
use C4::Templates;
32
use C4::Templates;
Lines 49-56 my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( Link Here
49
my $bib_list     = $query->param('bib_list') || '';
48
my $bib_list     = $query->param('bib_list') || '';
50
my $email_add    = $query->param('email_add');
49
my $email_add    = $query->param('email_add');
51
50
52
my $dbh          = C4::Context->dbh;
53
54
if ( $email_add ) {
51
if ( $email_add ) {
55
    die "Wrong CSRF token" unless Koha::Token->new->check_csrf({
52
    die "Wrong CSRF token" unless Koha::Token->new->check_csrf({
56
        session_id => scalar $query->cookie('CGISESSID'),
53
        session_id => scalar $query->cookie('CGISESSID'),
Lines 88-106 if ( $email_add ) { Link Here
88
        my $marcauthorsarray = $biblio->get_marc_authors;
85
        my $marcauthorsarray = $biblio->get_marc_authors;
89
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
86
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
90
87
91
        my @items = GetItemsInfo( $biblionumber );
88
        my $items = $biblio->items->search_ordered->filter_by_visible_in_opac({ patron => $patron });
92
89
93
        my $hasauthors = 0;
90
        my $hasauthors = 0;
94
        if($dat->{'author'} || @$marcauthorsarray) {
91
        if($dat->{'author'} || @$marcauthorsarray) {
95
          $hasauthors = 1;
92
          $hasauthors = 1;
96
        }
93
        }
97
	
98
94
99
        $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
95
        $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
100
        $dat->{MARCAUTHORS}    = $marcauthorsarray;
96
        $dat->{MARCAUTHORS}    = $marcauthorsarray;
101
        $dat->{HASAUTHORS}     = $hasauthors;
97
        $dat->{HASAUTHORS}     = $hasauthors;
102
        $dat->{'biblionumber'} = $biblionumber;
98
        $dat->{'biblionumber'} = $biblionumber;
103
        $dat->{ITEM_RESULTS}   = \@items;
99
        $dat->{ITEM_RESULTS}   = $items;
104
100
105
        $iso2709 .= $record->as_usmarc();
101
        $iso2709 .= $record->as_usmarc();
106
102
(-)a/opac/opac-sendshelf.pl (-6 / +2 lines)
Lines 30-36 use C4::Biblio qw( Link Here
30
    GetMarcISBN
30
    GetMarcISBN
31
    GetMarcSubjects
31
    GetMarcSubjects
32
);
32
);
33
use C4::Items qw( GetItemsInfo );
34
use C4::Output qw( output_html_with_http_headers );
33
use C4::Output qw( output_html_with_http_headers );
35
use Koha::Biblios;
34
use Koha::Biblios;
36
use Koha::Email;
35
use Koha::Email;
Lines 56-63 my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( Link Here
56
my $shelfid = $query->param('shelfid');
55
my $shelfid = $query->param('shelfid');
57
my $email   = $query->param('email');
56
my $email   = $query->param('email');
58
57
59
my $dbh          = C4::Context->dbh;
60
61
my $shelf = Koha::Virtualshelves->find( $shelfid );
58
my $shelf = Koha::Virtualshelves->find( $shelfid );
62
if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) {
59
if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) {
63
  if ( $email ) {
60
  if ( $email ) {
Lines 97-109 if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { Link Here
97
        my $marcauthorsarray = $biblio->get_marc_authors;
94
        my $marcauthorsarray = $biblio->get_marc_authors;
98
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
95
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
99
96
100
        my @items = GetItemsInfo( $biblionumber );
97
        my $items = $biblio->items->search_ordered->filter_by_visible_in_opac({ patron => $patron });
101
98
102
        $dat->{ISBN}           = GetMarcISBN($record, $marcflavour);
99
        $dat->{ISBN}           = GetMarcISBN($record, $marcflavour);
103
        $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
100
        $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
104
        $dat->{MARCAUTHORS}    = $marcauthorsarray;
101
        $dat->{MARCAUTHORS}    = $marcauthorsarray;
105
        $dat->{'biblionumber'} = $biblionumber;
102
        $dat->{'biblionumber'} = $biblionumber;
106
        $dat->{ITEM_RESULTS}   = \@items;
103
        $dat->{ITEM_RESULTS}   = $items;
107
        $dat->{HASAUTHORS}     = $dat->{'author'} || @$marcauthorsarray;
104
        $dat->{HASAUTHORS}     = $dat->{'author'} || @$marcauthorsarray;
108
105
109
        $iso2709 .= $record->as_usmarc();
106
        $iso2709 .= $record->as_usmarc();
110
- 

Return to bug 31316