Bugzilla – Attachment 12188 Details for
Bug 8215
Add Course Reserves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8215 - Add Course Reserves - QA Followup
Bug-8215---Add-Course-Reserves---QA-Followup.patch (text/plain), 8.25 KB, created by
Kyle M Hall (khall)
on 2012-09-13 13:32:16 UTC
(
hide
)
Description:
Bug 8215 - Add Course Reserves - QA Followup
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2012-09-13 13:32:16 UTC
Size:
8.25 KB
patch
obsolete
>From 8ebfe541a94a27ea8b616ee246536561ed62a042 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 13 Sep 2012 09:25:16 -0400 >Subject: [PATCH] Bug 8215 - Add Course Reserves - QA Followup >Content-Type: text/plain; charset="utf-8" > >* Fix perlcritic error. >* Add warnings if DEPT and TERM authorised values are not defined. >* Enable datatables on courses table, hide old search. >--- > 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(-) > >diff --git a/course_reserves/add_items.pl b/course_reserves/add_items.pl >index e810837..5e8ad86 100755 >--- a/course_reserves/add_items.pl >+++ b/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, >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 8f6e58b..f3016bc 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 >@@ -2,7 +2,20 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Course reserves</title> > [% INCLUDE 'doc-head-close.inc' %] >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> >+ >+<link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" /> >+<script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+[% INCLUDE 'datatables-strings.inc' %] >+<script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script> >+<script type="text/javascript" id="js">$(document).ready(function() { >+ $(document).ready(function() { >+ $("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sPaginationType": "four_button", >+ })); >+ }); >+}); >+</script> >+ > </head> > <body id="lists_shelves" class="lists"> > >@@ -32,6 +45,7 @@ > </ul> > </div><!-- /toolbar --> > >+ <!-- > <div id="search-toolbar"> > <script type="text/javascript"> > //<![CDATA[ >@@ -49,7 +63,8 @@ > <li><form id="search_courses_form"><input type="text" name="search_on" id="search_on"></form></li> > <li><a id="search_courses">Search Courses</a></li> > </ul> >- </div><!-- /toolbar --> >+ </div> >+ --> > > <h1>Courses</h1> > <table id="course_reserves_table"> >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 bb3feae..407c1e1 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 >@@ -90,17 +90,21 @@ function RemoveInstructor( cardnumber ) { > <ol> > <li> > <label class="required" for="department">Department:</label> >- <select id="department" name="department"> >- <option value="">Select A Department</option> >- >- [% FOREACH d IN departments %] >- [% IF d.authorised_value == department %] >- <option value="[% d.authorised_value %]" selected="selected">[% d.lib %]</option> >- [% ELSE %] >- <option value="[% d.authorised_value %]">[% d.lib %]</option> >+ [% IF departments %] >+ <select id="department" name="department"> >+ <option value="">Select A Department</option> >+ >+ [% FOREACH d IN departments %] >+ [% IF d.authorised_value == department %] >+ <option value="[% d.authorised_value %]" selected="selected">[% d.lib %]</option> >+ [% ELSE %] >+ <option value="[% d.authorised_value %]">[% d.lib %]</option> >+ [% END %] > [% END %] >- [% END %] >- </select> >+ </select> >+ [% ELSE %] >+ <span id="department">No DEPT authorised values found! Please create one or more authorised values with the category DEPT.</span> >+ [% END %] > </li> > > <li> >@@ -120,17 +124,21 @@ function RemoveInstructor( cardnumber ) { > > <li> > <label for="term">Term:</label> >- <select id="term" name="term"> >- <option value=""></option> >- >- [% FOREACH t IN terms %] >- [% IF t.authorised_value == term %] >- <option value="[% t.authorised_value %]" selected="selected">[% t.lib %]</option> >- [% ELSE %] >- <option value="[% t.authorised_value %]">[% t.lib %]</option> >+ [% IF terms %] >+ <select id="term" name="term"> >+ <option value=""></option> >+ >+ [% FOREACH t IN terms %] >+ [% IF t.authorised_value == term %] >+ <option value="[% t.authorised_value %]" selected="selected">[% t.lib %]</option> >+ [% ELSE %] >+ <option value="[% t.authorised_value %]">[% t.lib %]</option> >+ [% END %] > [% END %] >- [% END %] >- </select> >+ </select> >+ [% ELSE %] >+ <span id="term">No TERM authorised values found! Please create one or more authorised values with the category TERM.</span> >+ [% END %] > </li> > > <!-- TODO: Add Instructors --> >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8215
:
9990
|
10181
|
10224
|
11131
|
11612
|
11657
|
11677
|
11678
|
11679
|
11680
|
11681
|
11682
|
11683
|
11860
|
11861
|
11862
|
11865
|
11875
|
11881
|
11882
|
11980
|
12039
|
12120
|
12128
|
12188
|
12189
|
12192
|
12246
|
12361
|
12400
|
12413
|
12414
|
12593
|
12627
|
13496
|
13497
|
13498
|
13499
|
15195
|
15196
|
15197
|
15198
|
15199
|
16228
|
16229
|
16251
|
16252
|
16532
|
16533
|
16534
|
16536
|
16537
|
16545
|
16567
|
16568
|
16587
|
16588
|
16599
|
16621
|
16623
|
16634
|
17333
|
17334
|
17335
|
17336
|
17337
|
17377
|
17378
|
17379
|
17894
|
17895
|
17896
|
17897
|
17898
|
17899
|
18274
|
18275
|
18276
|
18277
|
18278
|
18279
|
18282
|
18283
|
18284
|
18285
|
18286
|
18287
|
18288
|
18289
|
18290
|
18291
|
18292
|
18293
|
21885
|
23264