@@ -, +, @@
---
course_reserves/add_items.pl | 9 ++--
.../en/modules/course_reserves/course-reserves.tt | 19 +++++++-
.../prog/en/modules/course_reserves/course.tt | 48 ++++++++++++--------
3 files changed, 51 insertions(+), 25 deletions(-)
--- a/course_reserves/add_items.pl
+++ a/course_reserves/add_items.pl
@@ -51,16 +51,19 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
flagsrequired => { coursereserves => 'add_reserves' },
}
);
-$template->param( ERROR_BARCODE_NOT_FOUND => $barcode ) unless ( $barcode && $item && $action eq 'lookup' );
+$template->param( ERROR_BARCODE_NOT_FOUND => $barcode )
+ unless ( $barcode && $item && $action eq 'lookup' );
$template->param( course => GetCourse($course_id) );
if ( $action eq 'lookup' ) {
my $course_item = GetCourseItem( itemnumber => $item->{'itemnumber'} );
- my $course_reserve = GetCourseReserve(
+ my $course_reserve = ($course_item)
+ ? GetCourseReserve(
course_id => $course_id,
ci_id => $course_item->{'ci_id'}
- ) if ($course_item);
+ )
+ : undef;
$template->param(
item => $item,
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt
@@ -2,7 +2,20 @@
[% INCLUDE 'doc-head-open.inc' %]
Koha › Course reserves
[% INCLUDE 'doc-head-close.inc' %]
-
+
+
+
+[% INCLUDE 'datatables-strings.inc' %]
+
+
+
@@ -32,6 +45,7 @@
+
+
+ -->
Courses
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt
@@ -90,17 +90,21 @@ function RemoveInstructor( cardnumber ) {
Department:
-
- Select A Department
-
- [% FOREACH d IN departments %]
- [% IF d.authorised_value == department %]
- [% d.lib %]
- [% ELSE %]
- [% d.lib %]
+ [% IF departments %]
+
+ Select A Department
+
+ [% FOREACH d IN departments %]
+ [% IF d.authorised_value == department %]
+ [% d.lib %]
+ [% ELSE %]
+ [% d.lib %]
+ [% END %]
[% END %]
- [% END %]
-
+
+ [% ELSE %]
+ No DEPARTMENT authorised values found! Please create one or more authorised values with the category DEPARTMENT.
+ [% END %]
@@ -120,17 +124,21 @@ function RemoveInstructor( cardnumber ) {
Term:
-
-
-
- [% FOREACH t IN terms %]
- [% IF t.authorised_value == term %]
- [% t.lib %]
- [% ELSE %]
- [% t.lib %]
+ [% IF terms %]
+
+
+
+ [% FOREACH t IN terms %]
+ [% IF t.authorised_value == term %]
+ [% t.lib %]
+ [% ELSE %]
+ [% t.lib %]
+ [% END %]
[% END %]
- [% END %]
-
+
+ [% ELSE %]
+ No TERM authorised values found! Please create one or more authorised values with the category TERM.
+ [% END %]
--