Bugzilla – Attachment 16623 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), 9.75 KB, created by
Kyle M Hall (khall)
on 2013-03-21 13:27:13 UTC
(
hide
)
Description:
Bug 8215 - Add Course Reserves - QA Followup
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-03-21 13:27:13 UTC
Size:
9.75 KB
patch
obsolete
>From 8de8e789588824e920d8121e724664fbf850c5d7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 21 Mar 2013 06:15:28 -0700 >Subject: [PATCH] Bug 8215 - Add Course Reserves - QA Followup > >--- > course_reserves/add_items.pl | 5 +-- > course_reserves/course-details.pl | 5 +-- > course_reserves/course-reserves.pl | 2 +- > course_reserves/course.pl | 2 +- > koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 4 +++ > .../en/modules/course_reserves/course-details.tt | 10 ++----- > .../en/modules/course_reserves/course-reserves.tt | 9 +------ > .../prog/en/modules/course_reserves/course.tt | 1 - > .../en/modules/course_reserves/invalid-course.tt | 24 ++++++++++++++++++++ > 9 files changed, 38 insertions(+), 24 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt > >diff --git a/course_reserves/add_items.pl b/course_reserves/add_items.pl >index bbf67d5..bb770a3 100755 >--- a/course_reserves/add_items.pl >+++ b/course_reserves/add_items.pl >@@ -36,15 +36,14 @@ my $action = $cgi->param('action') || ''; > my $course_id = $cgi->param('course_id') || ''; > my $barcode = $cgi->param('barcode') || ''; > >-die('No course_id provided') unless ($course_id); >- > my $item = GetBiblioFromItemNumber( undef, $barcode ); > > my $step = ( $action eq 'lookup' && $item ) ? '2' : '1'; > >+my $tmpl = ( $course_id ) ? "add_items-step$step.tt" : "invalid-course.tt"; > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >- template_name => "course_reserves/add_items-step$step.tmpl", >+ template_name => "course_reserves/$tmpl", > query => $cgi, > type => "intranet", > authnotrequired => 0, >diff --git a/course_reserves/course-details.pl b/course_reserves/course-details.pl >index a0b03e9..e1440f1 100755 >--- a/course_reserves/course-details.pl >+++ b/course_reserves/course-details.pl >@@ -36,9 +36,10 @@ my $course_id = $cgi->param('course_id'); > my $flagsrequired; > $flagsrequired->{coursereserves} = 'delete_reserves' if ( $action eq 'del_reserve' ); > >+my $tmpl = ( $course_id ) ? "course-details.tt" : "invalid-course.tt"; > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >- template_name => "course_reserves/course-details.tmpl", >+ template_name => "course_reserves/$tmpl", > query => $cgi, > type => "intranet", > authnotrequired => 0, >@@ -46,8 +47,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > } > ); > >-die("No course_id given") unless ($course_id); >- > if ( $action eq 'del_reserve' ) { > DelCourseReserve( cr_id => $cgi->param('cr_id') ); > } >diff --git a/course_reserves/course-reserves.pl b/course_reserves/course-reserves.pl >index ebffed4..8b4e50e 100755 >--- a/course_reserves/course-reserves.pl >+++ b/course_reserves/course-reserves.pl >@@ -35,7 +35,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > query => $cgi, > type => "intranet", > authnotrequired => 0, >- flagsrequired => {}, >+ flagsrequired => { coursereserves => '*' }, > } > ); > >diff --git a/course_reserves/course.pl b/course_reserves/course.pl >index e2af77f..1a3d4a4 100755 >--- a/course_reserves/course.pl >+++ b/course_reserves/course.pl >@@ -32,7 +32,7 @@ my $cgi = new CGI; > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >- template_name => "course_reserves/course.tmpl", >+ template_name => "course_reserves/course.tt", > query => $cgi, > type => "intranet", > authnotrequired => 0, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >index 53fc249..2cb8b80 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >@@ -13,6 +13,10 @@ function _(s) { return s; } // dummy function for gettext > if($("#header_search #catalog_search").length > 0){ $(document).bind('keydown','Alt+q',function (){ $("#header_search").tabs("select","#catalog_search"); $("#search-form").focus(); }); } else { $(document).bind('keydown','Alt+q',function(){ location.href="/cgi-bin/koha/catalogue/search.pl"; }); } > > $(".focus").focus(); >+ >+ $('.noEnterSubmit').keypress(function(e){ >+ if ( e.which == 13 ) return false; >+ }); > }); > > // http://jennifermadden.com/javascript/stringEnterKeyDetector.html >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 72f41fe..6b2f787 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 >@@ -31,10 +31,6 @@ > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function(){ >- addItemsButton = new YAHOO.widget.Button("add_items"); >- editCourseButton = new YAHOO.widget.Button("edit_course"); >- deleteCourseButton = new YAHOO.widget.Button("delete_course"); >- > deleteCourseButton.on("click", confirmDelete ); > }); > >@@ -47,9 +43,9 @@ > //]]> > </script> > <ul class="toolbar"> >- [% IF CAN_user_coursereserves_add_reserves %]<li><a id="add_items" href="/cgi-bin/koha/course_reserves/add_items.pl?course_id=[% course.course_id %]">Add reserves</a></li>[% END %] >- [% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a id="edit_course" href="/cgi-bin/koha/course_reserves/course.pl?course_id=[% course.course_id %]">Edit course</a></li>[% END %] >- [% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a id="delete_course" href="/cgi-bin/koha/course_reserves/mod_course.pl?course_id=[% course.course_id %]&action=del">Delete course</a></li>[% END %] >+ [% IF CAN_user_coursereserves_add_reserves %]<li><a class="btn" id="add_items" href="/cgi-bin/koha/course_reserves/add_items.pl?course_id=[% course.course_id %]">Add reserves</a></li>[% END %] >+ [% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a class="btn" id="edit_course" href="/cgi-bin/koha/course_reserves/course.pl?course_id=[% course.course_id %]">Edit course</a></li>[% END %] >+ [% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a class="btn" id="delete_course" href="/cgi-bin/koha/course_reserves/mod_course.pl?course_id=[% course.course_id %]&action=del">Delete course</a></li>[% END %] > </ul> > </div><!-- /toolbar --> > >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 23d18ed..c757518 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 >@@ -33,16 +33,9 @@ > <div class="yui-g"> > > <div id="toolbar"> >- <script type="text/javascript"> >- //<![CDATA[ >- $(document).ready(function(){ >- newCourseButton = new YAHOO.widget.Button("new_course"); >- }); >- //]]> >- </script> > <ul class="toolbar"> > [% IF ( CAN_user_coursereserves_manage_courses ) %] >- <li><a id="new_course" href="/cgi-bin/koha/course_reserves/course.pl">New course</a></li> >+ <li><a class="btn" id="new_course" href="/cgi-bin/koha/course_reserves/course.pl">New course</a></li> > [% END %] > </ul> > </div><!-- /toolbar --> >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 8568afc..85817ed 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 >@@ -141,7 +141,6 @@ function RemoveInstructor( cardnumber ) { > [% END %] > </li> > >- <!-- TODO: Add Instructors --> > <li> > <label for="instructors">Instructors:</label> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt >new file mode 100644 >index 0000000..d1ae392 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt >@@ -0,0 +1,24 @@ >+[% INCLUDE 'doc-head-open.inc' %] >+<title>Koha › Course reserves</title> >+[% INCLUDE 'doc-head-close.inc' %] >+<body id="lists_shelves" class="lists"> >+ >+[% INCLUDE 'header.inc' %] >+[% INCLUDE 'cat-search.inc' %] >+ >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a></div> >+ >+<div id="doc2" class="yui-t7"> >+ <div id="bd"> >+ <div id="yui-main"> >+ <div class="yui-b"> >+ <div class="yui-g"> >+ <p>Invalid course!</p> >+ </div> >+ </div> >+ </div> >+ </div> >+</div> >+ >+ >+[% INCLUDE 'intranet-bottom.inc' %] >-- >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