Bugzilla – Attachment 87246 Details for
Bug 21003
Don't show warning when editing a reserve item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21003: Removed warning and changed wording on add_items-step2.tt
Bug-21003-Removed-warning-and-changed-wording-on-a.patch (text/plain), 7.26 KB, created by
Katrin Fischer
on 2019-03-31 20:18:37 UTC
(
hide
)
Description:
Bug 21003: Removed warning and changed wording on add_items-step2.tt
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-03-31 20:18:37 UTC
Size:
7.26 KB
patch
obsolete
>From d6748d87f833de82e18177e381a0a8cc0ec27576 Mon Sep 17 00:00:00 2001 >From: Hayley Mapley <hayleymapley@catalyst.net.nz> >Date: Thu, 7 Mar 2019 02:50:12 +0000 >Subject: [PATCH] Bug 21003: Removed warning and changed wording on > add_items-step2.tt > >When editing an item in a Course Reserve, the page displayed is the same >that is displayed when adding an item to a Course Reserve. This patch >removes the warning 'This course already has this item on reserve' when >the item is being edited, as well as changes the title, breadcrumbs, and >header of the div. This patch also Changes the header of the div to say >'Edit 'book_name' in 'course_name'' instead of 'Add 'book_name' to >'course_name'' when adding items to a course reserve if the item is >already present. > >To test: >1) Create a new course in Course Reserves (you will need Course > Reserves enabled in syspref) >2) Add an item by clicking the Add reserves button >3) Click the edit button on the right hand side of the item listing >under the Reserves heading >4) Observe that the warning 'The course already has this item on reserve' appears, and that the title, breadcrumbs and >header of the div all say Add/Reserve >5) Apply the patch >6) Repeat step 3 and observe that the title, breadcrumbs and header of >the div now say Edit >7) Also verify that when adding a reserve with a barcode that does not >yet exist in the course reserves that the warning 'The course already...' is not displayed and that the header of the div says Add >8) Finally verify that when adding a reserve with a barcode that DOES >exist in the course reserves that the warning 'The course already...' IS >displayed and the header of the div says Edit >9) Sign off! > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > course_reserves/add_items.pl | 2 ++ > .../prog/en/modules/course_reserves/add_items-step2.tt | 12 ++++++++---- > .../prog/en/modules/course_reserves/course-details.tt | 2 +- > 3 files changed, 11 insertions(+), 5 deletions(-) > >diff --git a/course_reserves/add_items.pl b/course_reserves/add_items.pl >index ff398b995a..42416b3a63 100755 >--- a/course_reserves/add_items.pl >+++ b/course_reserves/add_items.pl >@@ -40,6 +40,7 @@ my $course_id = $cgi->param('course_id') || ''; > my $barcode = $cgi->param('barcode') || ''; > my $return = $cgi->param('return') || ''; > my $itemnumber = ($cgi->param('itemnumber') && $action eq 'lookup') ? $cgi->param('itemnumber') : ''; >+my $is_edit = $cgi->param('is_edit') || ''; > > my $item = Koha::Items->find( { ( $itemnumber ? ( itemnumber => $itemnumber ) : ( barcode => $barcode ) ) } ); > my $title = ($item) ? $item->biblio->title : undef; >@@ -79,6 +80,7 @@ if ( $action eq 'lookup' and $item ) { > biblio => $item->biblio, > course_item => $course_item, > course_reserve => $course_reserve, >+ is_edit => $is_edit, > > ccodes => GetAuthorisedValues('CCODE'), > locations => GetAuthorisedValues('LOC'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt >index 669be49ced..4646c85123 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt >@@ -1,6 +1,6 @@ > [% USE Branches %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Course reserves › Add items</title> >+<title>Koha › Course reserves ›[% IF is_edit %] Edit item[% ELSE %]Add items[% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] > </head> > >@@ -9,13 +9,13 @@ > [% 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> › Reserve <i><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | html %]">[% biblio.title | html %]</a></i> for <i><a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | html %]">[% course.course_name | html %]</a></i></div> >+<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> ›[% IF is_edit %] Edit [% ELSE %] Reserve [% END %]<i><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | html %]">[% biblio.title | html %]</a></i> for <i><a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | html %]">[% course.course_name | html %]</a></i></div> > > <div class="main container-fluid"> > <div class="row"> > <div class="col-md-8 col-md-offset-2"> > >- [% IF course_reserve %]<div class="dialog message" id="already_on_reserve_this">This course already has this item on reserve.</div>[% END %] >+ [% IF course_reserve && !is_edit%]<div class="dialog message" id="already_on_reserve_this">This course already has this item on reserve.</div>[% END %] > [% IF course_item %]<div class="dialog message" id="already_on_reserve">Number of courses reserving this item: [% course_item.course_reserves.size | html %]</div>[% END %] > > <form method="post" action="/cgi-bin/koha/course_reserves/add_items.pl"> >@@ -24,7 +24,11 @@ > <input type="hidden" name="action" value="add" /> > > <fieldset class="rows"> >- <legend>Add <i>[% biblio.title | html %]</i> to <i>[% course.course_name | html %]</i></legend> >+ [% IF is_edit || course_reserve %] >+ <legend>Edit <i>[% biblio.title | html %]</i> in <i>[% course.course_name | html %]</i></legend> >+ [% ELSE %] >+ <legend>Add <i>[% biblio.title | html %]</i> to <i>[% course.course_name | html %]</i></legend> >+ [% END %] > <ol> > <li> > <span class="label">Barcode:</span> >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 ad1a8a9440..6313a2dfe0 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 >@@ -219,7 +219,7 @@ > [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %] > <td class="actions"> > [% IF CAN_user_coursereserves_add_reserves %] >- <a class="btn btn-default btn-xs" href="add_items.pl?course_id=[% course.course_id | html %]&itemnumber=[% cr.item.itemnumber | html %]&action=lookup&return=[% course.course_id | html %]"><i class="fa fa-pencil"></i> Edit</a> >+ <a class="btn btn-default btn-xs" href="add_items.pl?course_id=[% course.course_id | html %]&itemnumber=[% cr.item.itemnumber | html %]&action=lookup&return=[% course.course_id | html %]&is_edit=1"><i class="fa fa-pencil"></i> Edit</a> > [% END %] > > [% IF CAN_user_coursereserves_delete_reserves %] >-- >2.11.0
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 21003
:
86219
|
86330
|
86708
|
86930
| 87246 |
87247