Bugzilla – Attachment 54 Details for
Bug 1080
How about telling the template to make a noise on circulation errors?
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Git patch which contains swf files.
0007-Audio-feedback-for-member-status-issuing-and-retur.patch (text/plain), 18.45 KB, created by
Chris Cormack
on 2008-08-25 13:09:00 UTC
(
hide
)
Description:
Git patch which contains swf files.
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2008-08-25 13:09:00 UTC
Size:
18.45 KB
patch
obsolete
>From 4ce0589c1ccca9ff8e5c15ae54615f08fc04afed Mon Sep 17 00:00:00 2001 >From: Michael Hafen <mdhafen@washk12.org> >Date: Fri, 28 Mar 2008 11:27:40 -0600 >Subject: [PATCH] Audio feedback for member status, issuing, and returning. > >These two swf files are created by an open source tool from .wav files in the ubuntu-sounds package. >--- > circ/circulation.pl | 54 ++++++++++++++++++++ > circ/returns.pl | 12 ++++ > .../prog/en/modules/circ/circulation.tmpl | 3 + > .../prog/en/modules/circ/returns.tmpl | 2 + > .../prog/en/modules/members/moremember.tmpl | 1 + > koha-tmpl/intranet-tmpl/prog/img/error.swf | Bin 0 -> 3191 bytes > koha-tmpl/intranet-tmpl/prog/img/ok.swf | Bin 0 -> 1101 bytes > members/member.pl | 4 ++ > members/moremember.pl | 39 ++++++++++++++ > 9 files changed, 115 insertions(+), 0 deletions(-) > mode change 100644 => 100755 koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl > create mode 100644 koha-tmpl/intranet-tmpl/prog/img/error.swf > create mode 100644 koha-tmpl/intranet-tmpl/prog/img/ok.swf > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index f2af9be..5e3d997 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -101,6 +101,13 @@ my @failedrenews = $query->param('failedrenew'); > my @renew_failed; > for (@failedrenews) { $renew_failed[$_] = 1; } > >+my $sessionID = $query->cookie("CGISESSID") ; >+my $session = get_session($sessionID); >+my $sounderror; >+my @soundederrors = @{ $session->param( 'soundederrors' ) } if ( $session->param( 'soundederrors' ) ); >+my %soundederrors; >+for ( @soundederrors ) { $soundederrors{ $_ } = 1; } >+ > my $findborrower = $query->param('findborrower'); > $findborrower =~ s|,| |g; > #$findborrower =~ s|'| |g; >@@ -188,12 +195,16 @@ if ( $print eq 'yes' && $borrowernumber ne '' ) { > my $borrowerslist; > my $message; > if ($findborrower) { >+ $session->clear( 'soundederrors' ); >+ @soundederrors = (); >+ %soundederrors = (); > my ( $count, $borrowers ) = > SearchMember($findborrower, 'cardnumber', 'web' ); > my @borrowers = @$borrowers; > if ( $#borrowers == -1 ) { > $query->param( 'findborrower', '' ); > $message = "'$findborrower'"; >+ $sounderror = 1; > } > elsif ( $#borrowers == 0 ) { > $query->param( 'borrowernumber', $borrowers[0]->{'borrowernumber'} ); >@@ -212,6 +223,15 @@ if ($borrowernumber) { > $borrower = GetMemberDetails( $borrowernumber, 0 ); > my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); > >+ if ( $od && ! $soundederrors{ ODUES } ) { >+ $sounderror = 1; >+ $soundederrors{ ODUES } = 1; >+ } >+ if ( $fines > 0 && ! $soundederrors{ CHARGES } ) { >+ $sounderror = 1; >+ $soundederrors{ CHARGES } = 1; >+ } >+ > # Warningdate is the date that the warning starts appearing > my ( $today_year, $today_month, $today_day ) = Today(); > my ( $warning_year, $warning_month, $warning_day ) = split /-/, >@@ -234,6 +254,10 @@ if ($borrowernumber) { > expired => format_date($borrower->{dateexpiry}), > renewaldate => format_date("$renew_year-$renew_month-$renew_day") > ); >+ unless ( $soundederrors{ EXPIRED } ) { >+ $sounderror = 1; >+ $soundederrors{ EXPIRED } = 1; >+ } > } > # check for NotifyBorrowerDeparture > elsif ( C4::Context->preference('NotifyBorrowerDeparture') && >@@ -271,6 +295,7 @@ if ($barcode) { > IMPOSSIBLE => 1 > ); > $noerror = 0; >+ $sounderror = 1; > } > > if ($issueconfirmed && $noerror) { >@@ -293,6 +318,7 @@ if ($barcode) { > NEEDSCONFIRMATION => 1 > ); > $noquestion = 0; >+ $sounderror = 1; > } > # Because of the weird conditional structure (empty elsif block), > # if we reached here, $issueconfirmed must be false. >@@ -563,12 +589,24 @@ foreach $flag ( sort keys %$flags ) { > ); > if ( $flag eq 'GNA' ) { > $template->param( gna => 'true' ); >+ unless ( $soundederrors{ GNA } ) { >+ $sounderror = 1; >+ $soundederrors{ GNA } = 1; >+ } > } > if ( $flag eq 'LOST' ) { > $template->param( lost => 'true' ); >+ unless ( $soundederrors{ LOST } ) { >+ $sounderror = 1; >+ $soundederrors{ LOST } = 1; >+ } > } > if ( $flag eq 'DBARRED' ) { > $template->param( dbarred => 'true' ); >+ unless ( $soundederrors{ DBARRED } ) { >+ $sounderror = 1; >+ $soundederrors{ DBARRED } = 1; >+ } > } > if ( $flag eq 'CHARGES' ) { > $template->param( >@@ -576,6 +614,10 @@ foreach $flag ( sort keys %$flags ) { > chargesmsg => $flags->{'CHARGES'}->{'message'}, > charges_is_blocker => 1 > ); >+ unless ( $soundederrors{ CHARGES } ) { >+ $sounderror = 1; >+ $soundederrors{ CHARGES } = 1; >+ } > } > if ( $flag eq 'CREDITS' ) { > $template->param( >@@ -591,6 +633,10 @@ foreach $flag ( sort keys %$flags ) { > flagged => 1, > chargesmsg => $flags->{'CHARGES'}->{'message'} > ); >+ unless ( $soundederrors{ CHARGES } ) { >+ $sounderror = 1; >+ $soundederrors{ CHARGES } = 1; >+ } > } > if ( $flag eq 'CREDITS' ) { > $template->param( >@@ -604,6 +650,10 @@ foreach $flag ( sort keys %$flags ) { > flagged => 1, > oduesmsg => $flags->{'ODUES'}->{'message'} > ); >+ unless ( $soundederrors{ ODUES } ) { >+ $sounderror = 1; >+ $soundederrors{ ODUES } = 1; >+ } > > my $items = $flags->{$flag}->{'itemlist'}; > # useless ??? >@@ -714,6 +764,10 @@ if ($stickyduedate) { > my ($picture, $dberror) = GetPatronImage($borrower->{'cardnumber'}); > $template->param( picture => 1 ) if $picture; > >+$session->param('soundederrors', [ keys %soundederrors ] ); >+$template->param( >+ sounderror => $sounderror, >+ ); > > $template->param( > debt_confirmed => $debt_confirmed, >diff --git a/circ/returns.pl b/circ/returns.pl >index 9c08c31..0f76b70 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -73,6 +73,8 @@ my $printers = GetPrinters(); > #my $branch = C4::Context->userenv?C4::Context->userenv->{'branch'}:""; > my $printer = C4::Context->userenv?C4::Context->userenv->{'branchprinter'}:""; > my $overduecharges = (C4::Context->preference('finesMode') && C4::Context->preference('finesMode') ne 'off'); >+my $sounderror; >+my $soundok; > # > # Some code to handle the error if there is no branch or printer setting..... > # >@@ -148,6 +150,7 @@ if ( $query->param('resbarcode') ) { > > > if ( $messages->{'transfert'} ) { >+ $sounderror = 1; > $template->param( > itemtitle => $iteminfo->{'title'}, > itembiblionumber => $iteminfo->{'biblionumber'}, >@@ -206,6 +209,7 @@ if ($barcode) { > itembiblionumber => $biblio->{'biblionumber'}, > ); > if ($returned) { >+ $soundok = 1; > $returneditems{0} = $barcode; > $riborrowernumber{0} = $borrower->{'borrowernumber'}; > $riduedate{0} = $issueinformation->{'date_due'}; >@@ -243,6 +247,9 @@ if ($barcode) { > } > push( @inputloop, \%input ); > } >+ if ( ! $returned ) { >+ $sounderror = 1; >+ } > } > $template->param( inputloop => \@inputloop ); > >@@ -310,6 +317,7 @@ if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { > # reserve found and item arrived at the expected branch > # > if ( $messages->{'ResFound'}) { >+ $sounderror = 1; > my $reserve = $messages->{'ResFound'}; > my $branchname = $branches->{ $reserve->{'branchcode'} }->{'branchname'}; > my ($borr) = GetMemberDetails( $reserve->{'borrowernumber'}, 0 ); >@@ -454,6 +462,7 @@ if ($borrower) { > $flaginfo{redfont} = ( $flags->{$flag}->{'noissues'} ); > $flaginfo{flag} = $flag; > if ( $flag eq 'CHARGES' ) { >+ $sounderror = 1; > $flaginfo{msg} = $flag; > $flaginfo{charges} = 1; > $flaginfo{borrowernumber} = $borrower->{borrowernumber}; >@@ -478,6 +487,7 @@ if ($borrower) { > $flaginfo{itemloop} = \@waitingitemloop; > } > elsif ( $flag eq 'ODUES' ) { >+ $sounderror = 1; > my $items = $flags->{$flag}->{'itemlist'}; > my @itemloop; > foreach my $item ( sort { $a->{'date_due'} cmp $b->{'date_due'} } >@@ -581,6 +591,8 @@ $template->param( > dropboxmode => $dropboxmode, > dropboxdate => $dropboxdate->output(), > overduecharges => $overduecharges, >+ sounderror => $sounderror, >+ soundok => $soundok, > ); > > # actually print the page! >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl >old mode 100644 >new mode 100755 >index 1229390..bfb23fd >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl >@@ -60,6 +60,9 @@ $.tablesorter.addParser({ > <!-- /TMPL_IF --> > > <!-- INITIAL BLOC : PARAMETERS & BORROWER INFO --> >+<!-- TMPL_IF NAME="sounderror" --><EMBED src="/intranet-tmpl/prog/img/error.swf" quality="high" WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF --> >+<!-- TMPL_IF NAME="inprocess" --><!-- Sound on successful issueing --><EMBED src="/intranet-tmpl/prog/img/ok.swf" quality="high" WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF --> >+ > <!-- TMPL_IF NAME="dateexpiry" --><div class="dialog message">Patron's account has been renewed until <!-- TMPL_VAR NAME="dateexpiry" --></div><!-- /TMPL_IF --> > <!-- TMPL_IF NAME="NEEDSCONFIRMATION" --> > <div class="yui-g"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl >index d4d3095..acba3d0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl >@@ -317,6 +317,8 @@ function Dopop(link) { > </form> > </div> > >+<!-- TMPL_IF NAME="sounderror" --><EMBED src="/intranet-tmpl/prog/img/error.swf" quality="high" WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF --> >+<!-- TMPL_IF NAME="soundok" --><EMBED src="/intranet-tmpl/prog/img/ok.swf" quality="high" WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF --> > <!-- TMPL_IF Name="returned" --> > <div class="yui-g"> <table> > <tr><th>Item Information</th><th>Patron Information</th></tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl >index 9133705..39cb051 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl >@@ -81,6 +81,7 @@ if (nodename =="barcodes[]"){ > <div id="yui-main"> > <div class="yui-b"> > <!-- TMPL_INCLUDE NAME="members-toolbar.inc" --> >+<!-- TMPL_IF NAME="sounderror" --><EMBED src="/intranet-tmpl/prog/img/error.swf" quality="high" WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- <!-- TMPL_VAR NAME="sounderror" --> --><!-- /TMPL_IF --> > <!-- TMPL_IF NAME="error" --> > <div class="dialog alert"> > <!-- TMPL_IF NAME="AUTH_UPDATE_FAILED" --> >diff --git a/koha-tmpl/intranet-tmpl/prog/img/error.swf b/koha-tmpl/intranet-tmpl/prog/img/error.swf >new file mode 100644 >index 0000000000000000000000000000000000000000..2126177338fdf7d47cdf4c4478b41c159789df4c >GIT binary patch >literal 3191 >zcmdVddpOkD9|!R7%&<x>p%A7<m<lOlU1OLut=oihALTM;5JH9-)gp@IlDi$Z<kp7e >z7s(||VJPDgAsU<9SId^hrE&ZI?Ci78@5$4%zxMaEfBeor=lP!V&v|{`=bZ2Nd(!p{ >zFGT<V{D2)b0PrYGUJL>lHeDo94WS?i(qTrMbCLk^u`ICJ!13cPn;pyuVgLYU7#vnj >zMOzbb(3MDbIb{9+*tnp5_2T~Ya1SVec${m1*vZcegM^K&eV5BO7P6a69~{jKT~9U# >zXCJi59vlH_N%LXYrezSkZJ<3K8=MvowQ$)i)Kk*6+AG6mZM7=idV<@9H%Ho@*Cr8! >z&X^@Dw7XJ|!h{S}L^nr4Z~_x16nsB7hxbkHQMab6cOu{#GGQ!9|E?|dEdHMw7o@a? >zeh#B0K#W6s8Ix974T2>fn~I6bs63>zl4X@kA@Cp(76<V<fZ?aEilh7}kqNf`E1iiL >zro^_I_BT;6qv?^(`5c4+lenMke=F~xo@gtfnj>L099@*Cs}tQ^pp{Jyole0!#3iUm >zOPIsm)iF45HXkN7>3XNO`E+f|E4N=y2PlD{ZaxX;sa)qx?Hh`-ba;D4v7`7l2zHnD >zaq<rki!zF4XHeEkARZ5P-zT8mC%069yP>!s<sHoJlo&f`0)XJh&)&54s!UZKdHn+D >z<>3u?o43zjlz!hndo8Md<!4fP5rJ9MKeo;wlyNl27P8eJ)w??C>{8Nou}OJYzxYyy >zR4@-72zMUbe*N`aF`jaaXs-UjVcQsxU<Z5r-tJCsu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/prog/img/ok.swf b/koha-tmpl/intranet-tmpl/prog/img/ok.swf >new file mode 100644 >index 0000000000000000000000000000000000000000..68624749c0d38db905eb8d190b761fffb2583126 >GIT binary patch >literal 1101 >zcmZ<@4`%gcVPGg=;NHQ&u)9G;n32KxP*GZiGt>Y7|MxS?0p%nZ)Eu}OfZ+dQrz1d$ >z*@Mx6fx*Yo*VS0h(p*6!DYYa~Gju2du!nS5$|_i!Rxoe~*c^~MRKx#sqs9E6oiRHC >z{-0|3$**$q{C{Omrkc|J6yg6LPe`-K)b`9QNZtSc!&jaoi+CSvu&FUDaFk<ckpKVv >zADcCIV*>+2(&7!0oO<ls-i=o;E2Jtvuvo=#(!tPTikU)0Jup;%NJwy)I394wo$*CV >zB7t#%_y)rr^A8<AJVCf2`Z!Sj|BubbE9M+CDB$>ze$2=H@q#k0fPSUqo(+Bi&O$%~ >zl%5@VC}L`kEdn4Ol8)QJ-?)N-DNKTaNq)gk{!3BvGiFN8uAebOYNq7>r;mjmmMro8 >z|FdGI8t0^mb`Jah%O^KDE&Aa1u%r2(bOH;*tLrIK|1+^T7-_QbyjsPql<9Ei?Ewqx >z4j!pkW=$4`V=V?UN(_oWBtmTbxn9&A(6MH=lyDH>lMg(n)}3;)@5#xPlmF=7NNC7k >zWFWXB_2Fr0C8559g<Kw)-7QXG;Xn`0l9rU$n=xy8Pj8Qpzlu_Z_y7L~Tn>4m`Dhgo >zfIY;Y%(O?o!Gei_amRh2ZWy@#X14a8|Nqxd*SgT+s`EYU->>&x_4m{NJiGrtu1#d& >znm(0(@3u!|ZJlNFRQ0yVDlDdhY@jm$dq_NZ+Kl=G0?Z7#+ivG>f3c`h=*0H&D$UBZ >zGqbhhx;D-1Nq97CZEED^S8Eif+U}gt)i)*ft4s9n#l9x8lAE3-y!xaRc0bJS)asJG >wVb2%a#a=tI@{6a}ru|Bj*+0fPXFDz0TeIa>suq1be3V&&frXI)SRyb0054nnZU6uP > >literal 0 >HcmV?d00001 > >diff --git a/members/member.pl b/members/member.pl >index 6d42b45..5a71380 100755 >--- a/members/member.pl >+++ b/members/member.pl >@@ -78,6 +78,10 @@ $orderby = "surname,firstname" unless $orderby; > $member =~ s/,//g; #remove any commas from search string > $member =~ s/\*/%/g; > >+my $sessionID = $input->cookie("CGISESSID") ; >+my $session = C4::Auth::get_session($sessionID); >+$session->clear( 'soundederrors' ); >+ > my ($count,$results); > > if(length($member) == 1) >diff --git a/members/moremember.pl b/members/moremember.pl >index 87a5659..9bca25c 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -97,6 +97,30 @@ if ( not defined $data ) { > exit; > } > >+my $sessionID = $input->cookie("CGISESSID") ; >+my $session = C4::Auth::get_session($sessionID); >+my $sounderror; >+my @soundederrors = @{ $session->param( 'soundederrors' ) } if ( $session->param( 'soundederrors' ) ); >+my %soundederrors; >+for ( @soundederrors ) { $soundederrors{ $_ } = 1; } >+ >+if ( $$data{ debarred } && !$soundederrors{ DBARRED } ) { >+ $sounderror = 1; >+ $soundederrors{ DBARRED } = 1; >+} >+if ( $$data{ gonenoaddress } && !$soundederrors{ GNA } ) { >+ $sounderror = 1; >+ $soundederrors{ GNA } = 1; >+} >+if ( $$data{ lost } && !$soundederrors{ LOST } ) { >+ $sounderror = 1; >+ $soundederrors{ LOST } = 1; >+} >+if ( $$data{ dateexpiry } lt POSIX::strftime( "%Y-%m-%d", localtime ) && !$soundederrors{ EXPIRED } ) { >+ $sounderror = 1; >+ $soundederrors{ EXPIRED } = 1; >+} >+ > # re-reregistration function to automatic calcul of date expiry > if ( $reregistration eq 'y' ) { > $data->{'dateexpiry'} = ExtendMemberSubscriptionTo( $borrowernumber ); >@@ -212,6 +236,11 @@ my $lib2 = &GetSortDetails( "Bsort2", $data->{'sort2'} ); > ( $template->param( lib1 => $lib1 ) ) if ($lib1); > ( $template->param( lib2 => $lib2 ) ) if ($lib2); > >+if ( $total > 0 && ! $soundederrors{ CHARGES } ) { >+ $sounderror = 1; >+ $soundederrors{ CHARGES } = 1; >+} >+ > # current issues > # > my ( $count, $issue ) = GetPendingIssues($borrowernumber); >@@ -231,6 +260,11 @@ for ( my $i = 0 ; $i < $count ; $i++ ) { > if ( $datedue lt $today ) { > $overdues_exist = 1; > $row{'red'} = 1; #print "<font color=red>"; >+ >+ unless ( $soundederrors{ ODUES } ) { >+ $sounderror = 1; >+ $soundederrors{ ODUES } = 1; >+ } > } > $row{toggle} = $toggle++ % 2; > >@@ -363,4 +397,9 @@ $template->param( > dateformat => C4::Context->preference("dateformat"), > ); > >+$session->param('soundederrors', [ keys %soundederrors ] ); >+$template->param( >+ sounderror => $sounderror, >+ ); >+ > output_html_with_http_headers $input, $cookie, $template->output; >-- >1.5.4.3 >
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 1080
:
53
| 54 |
55
|
56