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

(-)a/C4/CourseReserves.pm (-2 / +6 lines)
Lines 21-27 use List::MoreUtils qw(any); Link Here
21
21
22
use C4::Context;
22
use C4::Context;
23
use C4::Items qw(GetItem ModItem);
23
use C4::Items qw(GetItem ModItem);
24
use C4::Biblio qw(GetBiblioFromItemNumber);
25
use C4::Circulation qw(GetOpenIssue);
24
use C4::Circulation qw(GetOpenIssue);
26
25
27
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG @FIELDS);
26
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG @FIELDS);
Lines 877-884 sub GetCourseReserves { Link Here
877
876
878
    if ($include_items) {
877
    if ($include_items) {
879
        foreach my $cr (@$course_reserves) {
878
        foreach my $cr (@$course_reserves) {
879
            my $item = Koha::Items->find( $cr->{itemnumber} );
880
            my $biblio = $item->biblio;
881
            my $biblioitem = $biblio->biblioitem;
880
            $cr->{'course_item'} = GetCourseItem( ci_id => $cr->{'ci_id'} );
882
            $cr->{'course_item'} = GetCourseItem( ci_id => $cr->{'ci_id'} );
881
            $cr->{'item'}        = GetBiblioFromItemNumber( $cr->{'itemnumber'} );
883
            $cr->{'item'}        = $item;
884
            $cr->{'biblio'}      = $biblio;
885
            $cr->{'biblioitem'}  = $biblioitem;
882
            $cr->{'issue'}       = GetOpenIssue( $cr->{'itemnumber'} );
886
            $cr->{'issue'}       = GetOpenIssue( $cr->{'itemnumber'} );
883
        }
887
        }
884
    }
888
    }
(-)a/course_reserves/add_items.pl (-3 / +4 lines)
Lines 30-35 use Koha::Items; Link Here
30
30
31
use C4::CourseReserves qw(GetCourse GetCourseItem GetCourseReserve ModCourseItem ModCourseReserve);
31
use C4::CourseReserves qw(GetCourse GetCourseItem GetCourseReserve ModCourseItem ModCourseReserve);
32
32
33
use Koha::Items;
33
use Koha::ItemTypes;
34
use Koha::ItemTypes;
34
35
35
my $cgi = new CGI;
36
my $cgi = new CGI;
Lines 60-67 $template->param( ERROR_BARCODE_NOT_FOUND => $barcode . $inumber ) Link Here
60
61
61
$template->param( course => GetCourse($course_id) );
62
$template->param( course => GetCourse($course_id) );
62
63
63
if ( $action eq 'lookup' ) {
64
if ( $action eq 'lookup' and $item ) {
64
    my $course_item = GetCourseItem( itemnumber => $item->{'itemnumber'} );
65
    my $course_item = GetCourseItem( itemnumber => $item->itemnumber );
65
    my $course_reserve =
66
    my $course_reserve =
66
      ($course_item)
67
      ($course_item)
67
      ? GetCourseReserve(
68
      ? GetCourseReserve(
Lines 73-79 if ( $action eq 'lookup' ) { Link Here
73
    my $itemtypes = Koha::ItemTypes->search;
74
    my $itemtypes = Koha::ItemTypes->search;
74
    $template->param(
75
    $template->param(
75
        item           => $item,
76
        item           => $item,
76
        title          => $title,
77
        biblio         => $item->biblio,
77
        course_item    => $course_item,
78
        course_item    => $course_item,
78
        course_reserve => $course_reserve,
79
        course_reserve => $course_reserve,
79
80
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt (-2 / +2 lines)
Lines 9-15 Link Here
9
[% INCLUDE 'header.inc' %]
9
[% INCLUDE 'header.inc' %]
10
[% INCLUDE 'cat-search.inc' %]
10
[% INCLUDE 'cat-search.inc' %]
11
11
12
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> &rsaquo; Reserve <i><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% title %]</a></i> for <i><a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id %]">[% course.course_name %]</a></i></div>
12
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> &rsaquo; Reserve <i><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]">[% biblio.title %]</a></i> for <i><a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id %]">[% course.course_name %]</a></i></div>
13
13
14
<div id="doc" class="yui-t7">
14
<div id="doc" class="yui-t7">
15
    <div id="bd">
15
    <div id="bd">
Lines 23-29 Link Here
23
            <input type="hidden" name="action" value="add" />
23
            <input type="hidden" name="action" value="add" />
24
24
25
            <fieldset class="rows">
25
            <fieldset class="rows">
26
                <legend>Add <i>[% title %]</i> to <i>[% course.course_name %]</i></legend>
26
                <legend>Add <i>[% biblio.title %]</i> to <i>[% course.course_name %]</i></legend>
27
                <ol>
27
                <ol>
28
                    <li>
28
                    <li>
29
                        <span class="label">Barcode:</span>
29
                        <span class="label">Barcode:</span>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt (-5 / +5 lines)
Lines 102-110 Link Here
102
                <tbody>
102
                <tbody>
103
                    [% FOREACH cr IN course_reserves %]
103
                    [% FOREACH cr IN course_reserves %]
104
                        <tr>
104
                        <tr>
105
                            <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></td>
105
                            <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cr.biblio.biblionumber %]">[% cr.biblio.title %]</a></td>
106
                            <td>[% cr.item.author %]</td>
106
                            <td>[% cr.biblio.author %]</td>
107
                            <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% cr.item.itemnumber %]&amp;biblionumber=[% cr.item.biblionumber %]&amp;bi=[% cr.item.biblioitemnumber %]">[% cr.item.barcode %]</a></td>
107
                            <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% cr.item.itemnumber %]&amp;biblionumber=[% cr.biblio.biblionumber %]&amp;bi=[% cr.biblioitem.biblioitemnumber %]">[% cr.item.barcode %]</a></td>
108
                            <td>[% cr.item.itemcallnumber %]</td>
108
                            <td>[% cr.item.itemcallnumber %]</td>
109
                            [% IF item_level_itypes %]
109
                            [% IF item_level_itypes %]
110
                            <td>
110
                            <td>
Lines 180-187 Link Here
180
                            <td>
180
                            <td>
181
                                [% IF (cr.item.uri) %]
181
                                [% IF (cr.item.uri) %]
182
                                    <a href="[% cr.item.uri %]">Item URI</a>
182
                                    <a href="[% cr.item.uri %]">Item URI</a>
183
                                [% ELSIF (cr.item.url) %]
183
                                [% ELSIF (cr.biblioitem.url) %]
184
                                    <a href="[% cr.item.url %]">Record URL</a>
184
                                    <a href="[% cr.biblioitem.url %]">Record URL</a>
185
                                [% END %]
185
                                [% END %]
186
                            </td>
186
                            </td>
187
187
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt (-5 / +4 lines)
Lines 66-73 Link Here
66
                        <tbody>
66
                        <tbody>
67
                            [% FOREACH cr IN course_reserves %]
67
                            [% FOREACH cr IN course_reserves %]
68
                                <tr>
68
                                <tr>
69
                                    <td><a href="opac-detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></td>
69
                                    <td><a href="opac-detail.pl?biblionumber=[% cr.biblio.biblionumber %]">[% cr.biblio.title %]</a></td>
70
                                    <td>[% cr.item.author %]</td>
70
                                    <td>[% cr.biblio.author %]</td>
71
                                    <td>[% ItemTypes.GetDescription( cr.item.itype ) %]</td>
71
                                    <td>[% ItemTypes.GetDescription( cr.item.itype ) %]</td>
72
                                    <td>[% Branches.GetName( cr.item.holdingbranch ) %] <br/> <i>[% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]</i></td>
72
                                    <td>[% Branches.GetName( cr.item.holdingbranch ) %] <br/> <i>[% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]</i></td>
73
                                    <td>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]</td>
73
                                    <td>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]</td>
Lines 83-90 Link Here
83
                                    </td>
83
                                    </td>
84
                                    <td>[% IF (cr.item.uri) %]
84
                                    <td>[% IF (cr.item.uri) %]
85
                                            <a href="[% cr.item.uri %]">Item URI</a>
85
                                            <a href="[% cr.item.uri %]">Item URI</a>
86
                                        [% ELSIF (cr.item.url) %]
86
                                        [% ELSIF (cr.biblioitem.url) %]
87
                                            <a href="[% cr.item.url %]">Record URL</a>
87
                                            <a href="[% cr.biblioitem.url %]">Record URL</a>
88
                                        [% END %]
88
                                        [% END %]
89
                                    </td>
89
                                    </td>
90
                                </tr>
90
                                </tr>
91
- 

Return to bug 18276