From c746c20b77d0be7406ed1cb7801d72d11268bbbf Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Mar 2013 10:08:41 +0100 Subject: [PATCH] Bug 8215: Followup FIX QA issues --- C4/CourseReserves.pm | 5 +++-- .../prog/en/modules/course_reserves/add_items-step1.tt | 4 +--- .../prog/en/modules/course_reserves/course-details.tt | 8 ++++++-- .../prog/en/modules/course_reserves/course-reserves.tt | 2 ++ .../prog/en/modules/course_reserves/course.tt | 2 +- t/db_dependent/CourseReserves.t | 14 +++++++------- 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/C4/CourseReserves.pm b/C4/CourseReserves.pm index f8ebb26..4737536 100644 --- a/C4/CourseReserves.pm +++ b/C4/CourseReserves.pm @@ -376,8 +376,9 @@ sub ModCourseInstructors { return unless ( $cardnumbers || $borrowernumbers ); return if ( $cardnumbers && $borrowernumbers ); - my @cardnumbers = @$cardnumbers if ( ref($cardnumbers) eq 'ARRAY' ); - my @borrowernumbers = @$borrowernumbers + my (@cardnumbers, @borrowernumbers); + @cardnumbers = @$cardnumbers if ( ref($cardnumbers) eq 'ARRAY' ); + @borrowernumbers = @$borrowernumbers if ( ref($borrowernumbers) eq 'ARRAY' ); my $field = (@cardnumbers) ? 'cardnumber' : 'borrowernumber'; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt index ab1b6ce..05bfe6d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt @@ -36,9 +36,7 @@ $(document).ready(function() {
Add items: scan barcode - -

- +

  1. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt index 3c91065..72f41fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt @@ -9,7 +9,7 @@ // @@ -39,7 +39,7 @@ }); function confirmDelete(p_oEvent){ - if ( ! confirm( _('Are you sure you want to delete this course?') ) ) { + if ( ! confirm( _("Are you sure you want to delete this course?") ) ) { YAHOO.util.Event.stopEvent( p_oEvent ); } } @@ -54,6 +54,7 @@ + @@ -64,8 +65,10 @@ +
    Course name[% course.course_name %]
    Term[% AuthorisedValues.GetByCode( 'TERM', course.term ) %]
    Department_[% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) %]
    Public note[% course.public_note %]
    Students count[% course.students_count %]
    Status[% IF course.enabled == 'yes' %]Active[% ELSE %]Inactive[% END %]
    + [% IF course_reserves %] @@ -177,6 +180,7 @@ [% END %]
    + [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt index dfae703..23d18ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt @@ -11,6 +11,8 @@ $(document).ready(function() { $("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, { "sPaginationType": "four_button", + "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], + "iDisplayLength": 20 })); }); }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt index 14498fa..8568afc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt @@ -55,7 +55,7 @@ $(document).ready(function(){ }); function AddInstructor( name, cardnumber ) { - div = "
    " + name + " ( Remove )
    "; + div = "
    " + name + " ( Remove )
    "; $('#instructors').append( div ); $('#find_instructor').val('').focus(); diff --git a/t/db_dependent/CourseReserves.t b/t/db_dependent/CourseReserves.t index 4b8fe41..bbaf8b0 100755 --- a/t/db_dependent/CourseReserves.t +++ b/t/db_dependent/CourseReserves.t @@ -10,7 +10,7 @@ use Test::More tests => 16; use Data::Dumper; BEGIN { - use_ok('C4::Context'); + use_ok('C4::Context'); use_ok('C4::CourseReserves'); } @@ -28,21 +28,21 @@ $sth->execute(); my @items = @{$sth->fetchall_arrayref({})}; my $course_id = ModCourse( - course_name => "Test Course", - staff_note => "Test staff note", - public_note => "Test public note", + course_name => "Test Course", + staff_note => "Test staff note", + public_note => "Test public note", ); ok( $course_id, "ModCourse created course successfully" ); $course_id = ModCourse( - course_id => $course_id, - staff_note => "Test staff note 2", + course_id => $course_id, + staff_note => "Test staff note 2", ); my $course = GetCourse( $course_id ); -ok( $course->{'course_name'} eq "Test Course", "GetCourse returned correct course" ); +ok( $course->{'course_name'} eq "Test Course", "GetCourse returned correct course" ); ok( $course->{'staff_note'} eq "Test staff note 2", "ModCourse updated course succesfully" ); my $courses = GetCourses(); -- 1.7.10.4