From 1f4e2d2f8a05252219a1330f616764fdaa9da53d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 31 Jul 2013 15:36:12 -0400 Subject: [PATCH] [PASSED QA] Bug 10668 - Improve suggestion detail page This patch makes several improvements to the suggestions template: - Improved breadcrumbs and page title. - Fixed a JavaScript error which appeared when viewing or editing a suggestion. - Added an 'Edit' and a 'Delete' button to the suggestion detail page. - Corrected capitalization. To test: - Perform various operations with suggestions management and confirm that page titles and breadcrumbs are correct. - View the detail page for an individual suggestion and confirm that the edit and delete buttons work correctly. - Confirm that there are no JavaScript errors when viewing or editing a suggestion, in particular when changing Acquisition information (quantity, currency, price). Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer Passes all tests, nice improvement. --- koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 11 ++-- .../prog/en/modules/suggestion/suggestion.tt | 64 ++++++++++++++------ 2 files changed, 49 insertions(+), 26 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js index 9997768..3fde6f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js @@ -660,13 +660,12 @@ function updateCosts(){ function calcNewsuggTotal(){ //collect values - var quantity = new Number(document.getElementById('quantity').value); -// var currency = f.currency.value; - var currcode = new String(document.getElementById('currency').value); - var price = new Number(document.getElementById('price').value); - var exchangerate = new Number(document.getElementById('currency_rate_'+currcode).value); + var quantity = Number(document.getElementById('quantity').value); + var currcode = String(document.getElementById('currency').value); + var price = Number(document.getElementById('price').value); + var exchangerate = Number(document.getElementById('currency_rate_'+currcode).value); - var total = new Number(quantity*price*exchangerate); + var total = Number(quantity*price*exchangerate); document.getElementById('total').value = total.toFixed(2); document.getElementById('price').value = price.toFixed(2); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 0b4a4ab..9fd2e67 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -3,21 +3,35 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › [% IF ( op_save ) %] - [% IF ( suggestionid) %] - [% IF ( op == 'show' ) %] - Show purchase suggestion #[% suggestionid %] - [% ELSE %] - Edit purchase suggestion #[% suggestionid %] - [% END %] + [% IF ( suggestionid ) %] + Suggestions › Edit suggestion #[% suggestionid %] [% ELSE %] - Enter a new purchase suggestion + Suggestions › Add suggestion [% END %] + [% ELSIF ( op == 'show' ) %] + Suggestions › Show suggestion #[% suggestionid %] [% ELSE %] Suggestions management [% END %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] +[% IF ( op == 'show' ) %] + +[% END %] [% IF ( op_else ) %] @@ -135,12 +149,13 @@ $(document).ready(function() { [% ELSE %] - +[% END %] +[% IF ( op_save ) %] + [% END %] @@ -150,12 +165,13 @@ $(document).ready(function() { calcNewsuggTotal(); });