Bugzilla – Attachment 34290 Details for
Bug 12404
CSV profiles improvements (concatenations, substrings, conditions...)
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
Bug-12852-The-preview-param-can-be-removed-serials.patch (text/plain), 6.86 KB, created by
Biblibre Sandboxes
on 2014-12-11 09:03:43 UTC
(
hide
)
Description:
Bug 12852: The "preview" param can be removed serials/claims.pl
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2014-12-11 09:03:43 UTC
Size:
6.86 KB
patch
obsolete
>From 137e25e7eb747dc0434add39c1d96673b2ae80d6 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] 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> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> > >Signed-off-by: scourret@gmail.com <2> > >http://bugs.koha-community.org/show_bug.cgi?id=12404 >--- > .../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 4eb131a..4cd666e 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"> >@@ -354,77 +344,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.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 12404
:
28767
|
28768
|
28769
|
28770
|
28771
|
33170
|
33171
|
33172
|
33173
|
33174
|
33263
|
33477
|
34288
|
34289
|
34290
|
34291
|
34292
|
34293
|
34294
|
34300
|
34301
|
34302
|
34303
|
34405
|
34406
|
34407
|
34408
|
34409
|
34410
|
34411
|
35048
|
35049
|
35050
|
35051
|
35052
|
35053
|
35054