Bugzilla – Attachment 31838 Details for
Bug 12852
The "preview" param is never used in serials/claims.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12852: The "preview" param can be removed serials/claims.pl
0002-Bug-12852-The-preview-param-can-be-removed-serials-c.patch (text/plain), 6.87 KB, created by
Paola Rossi
on 2014-09-23 14:21:13 UTC
(
hide
)
Description:
Bug 12852: The "preview" param can be removed serials/claims.pl
Filename:
MIME Type:
Creator:
Paola Rossi
Created:
2014-09-23 14:21:13 UTC
Size:
6.87 KB
patch
obsolete
>From 86dc46061db73ff6d29de2769c6f03134516eaae Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 29 Aug 2014 15:16:19 +0200 >Subject: [PATCH 2/4] Bug 12852: The "preview" param can be removed > serials/claims.pl > >This case (preview=1) never appened. This patch remove all occurrences >in the pl and the tt files. > >Test plan: >Verify you don't manage to find a place where preview is set to 1 on the >claim serials page. > >Signed-off-by: Paola Rossi <paola.rossi@cineca.it> >--- > .../prog/en/modules/serials/claims.tt | 76 -------------------- > serials/claims.pl | 42 +++++------ > 2 files changed, 18 insertions(+), 100 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >index 49b8448..41099b2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >@@ -9,7 +9,6 @@ > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function() { >- [% UNLESS ( preview ) %] > var sTable = $("#claimst").dataTable($.extend(true, {}, dataTablesDefaults, { > "sDom": 't', > "aoColumnDefs": [ >@@ -19,7 +18,6 @@ > ], > "bPaginate": false > })); >- [% END %] > $('#supplierid').change(function() { > $('#claims').submit(); > }); >@@ -148,23 +146,15 @@ > $("table#claimst tbody tr").show(); > } > >- function popup(supplierid,serialid){ >- window.open('claims.pl?supplierid='+ supplierid +'&serialid='+ serialid +'&op=preview' ,'popup', 'width=600,height=400,toolbar=no,scrollbars=yes'); >- } >- > //]]> > </script> > </head> > <body id="ser_claims" class="ser"> > [% INCLUDE 'header.inc' %] >-[% UNLESS ( preview ) %] > [% INCLUDE 'serials-search.inc' %] >-[% END %] > > <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › Claims</div> > >-[% UNLESS ( preview ) %] >- > <div id="doc3" class="yui-t2"> > > <div id="bd"> >@@ -352,77 +342,11 @@ > </fieldset> > [% END %] > >-[% ELSE %] >- >-<div id="doc" class="yui-t7"> >- <div id="bd"> >- >-[% IF ( supplierloop ) %] >- [% FOREACH supplierloo IN supplierloop %] >- [% IF ( supplierloo.name ) %] >- <p><b>[% supplierloo.name %]</b><br /> >- [% END %] >- [% IF ( supplierloo.postal ) %] >- [% supplierloo.postal %]<br /> >- [% END %] >- [% IF ( supplierloo.contphone ) %] >- Ph: [% supplierloo.contphone %]<br /> >- [% END %] >- [% IF ( supplierloo.contfax ) %] >- Fax: [% supplierloo.contfax %]<br /> >- [% END %] >- [% IF ( supplierloo.contemail ) %] >- Email: [% supplierloo.contemail %]<br /> >- [% END %] >- [% IF ( supplierloo.accountnumber ) %] >- A/C: [% supplierloo.accountnumber %]</p> >- [% END %] >- [% IF ( supplierloo.contact ) %] >- <p>Dear [% supplierloo.contact %]</p> >- [% ELSE %] >- <p>To whom it may concern</p> >- [% END %] >- <p>The following items have not been received from you and are now considered missing:</p> >- [% END %] >-[% END %] >- [% IF ( missingissues ) %] >- <h3>Missing issues</h3> >- <table> >- <tr> >- <td><b>Vendor<b></td> >- <td><b>Title</b></td> >- <td><b>Issue number</b></td> >- <td><b>Missing since</b></td> >- </tr> >- [% FOREACH missingissue IN missingissues %] >- <tr> >- <td> >- [% missingissue.name %] >- </td> >- <td> >- [% missingissue.Title |html %] >- </td> >- <td> >- [% missingissue.serialseq %] >- </td> >- <td> >- [% missingissue.planneddate %] >- </td> >- </tr> >- [% END %] >- </table> >- [% END %] >- >-<p class="noprint"><a href="#" onclick="window.print(); return false;">Print</a> <a href="#" class="close">Close</a></p> >-[% END %] >- > </div> > </div> > >-[% UNLESS ( preview ) %] > <div class="yui-b"> > [% INCLUDE 'serials-menu.inc' %] > </div> >-[% END %] > </div> > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/serials/claims.pl b/serials/claims.pl >index 822a1ff..dc55fad 100755 >--- a/serials/claims.pl >+++ b/serials/claims.pl >@@ -59,30 +59,25 @@ for my $s (@{$supplierlist} ) { > > my $branchloop = GetBranchesLoop(); > >-my $preview=0; >-if($op && $op eq 'preview'){ >- $preview = 1; >-} else { >- my @serialnums=$input->param('serialid'); >- if (@serialnums) { # i.e. they have been flagged to generate claims >- my $err; >- eval { >- $err = SendAlerts('claimissues',\@serialnums,$input->param("letter_code")); >- if ( not ref $err or not exists $err->{error} ) { >- UpdateClaimdateIssues(\@serialnums); >- } >- }; >- if ( $@ ) { >- $template->param(error_claim => $@); >- } elsif ( ref $err and exists $err->{error} ) { >- if ( $err->{error} eq "no_email" ) { >- $template->param( error_claim => 'no_vendor_email' ); >- } elsif ( $err->{error} =~ m|Bad or missing From address| ) { >- $template->param( error_claim => 'no_loggedin_user_email' ); >- } >- } else { >- $template->param( info_claim => 1 ); >+my @serialnums=$input->param('serialid'); >+if (@serialnums) { # i.e. they have been flagged to generate claims >+ my $err; >+ eval { >+ $err = SendAlerts('claimissues',\@serialnums,$input->param("letter_code")); >+ if ( not ref $err or not exists $err->{error} ) { >+ UpdateClaimdateIssues(\@serialnums); > } >+ }; >+ if ( $@ ) { >+ $template->param(error_claim => $@); >+ } elsif ( ref $err and exists $err->{error} ) { >+ if ( $err->{error} eq "no_email" ) { >+ $template->param( error_claim => 'no_vendor_email' ); >+ } elsif ( $err->{error} =~ m|Bad or missing From address| ) { >+ $template->param( error_claim => 'no_loggedin_user_email' ); >+ } >+ } else { >+ $template->param( info_claim => 1 ); > } > } > >@@ -100,7 +95,6 @@ $template->param( > phone => $supplierinfo[0]->{phone}, > booksellerfax => $supplierinfo[0]->{booksellerfax}, > bookselleremail => $supplierinfo[0]->{bookselleremail}, >- preview => $preview, > missingissues => \@missingissues, > supplierid => $supplierid, > claimletter => $claimletter, >-- >1.7.10.4 >
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 12852
:
31278
|
31489
|
31831
|
31838
|
31839
|
31840
|
32275
|
32276
|
32277