[Koha-patches] [PATCH] Add fine amount to display on circ pages.
Galen Charlton
galen.charlton at liblime.com
Thu Oct 23 23:43:06 CEST 2008
Patch pushed. Note that I could see a library wanting to make the
display of the fine amount be sensitive to the operator's privileges;
somebody may be allowed to check out materials for patrons but have no
right to see a patron's fine balance. --gmc
On Tue, Oct 14, 2008 at 4:36 PM, Michael Hafen <mdhafen at tech.washk12.org> wrote:
> ---
> circ/circulation.pl | 4 +++-
> circ/returns.pl | 1 +
> .../prog/en/modules/circ/circulation.tmpl | 2 +-
> .../prog/en/modules/circ/returns.tmpl | 4 +++-
> 4 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/circ/circulation.pl b/circ/circulation.pl
> index 70e7fd2..28d0685 100755
> --- a/circ/circulation.pl
> +++ b/circ/circulation.pl
> @@ -568,6 +568,7 @@ foreach $flag ( sort keys %$flags ) {
> $template->param(
> charges => 'true',
> chargesmsg => $flags->{'CHARGES'}->{'message'},
> + chargesamount => $flags->{'CHARGES'}->{'amount'},
> charges_is_blocker => 1
> );
> }
> @@ -583,7 +584,8 @@ foreach $flag ( sort keys %$flags ) {
> $template->param(
> charges => 'true',
> flagged => 1,
> - chargesmsg => $flags->{'CHARGES'}->{'message'}
> + chargesmsg => $flags->{'CHARGES'}->{'message'},
> + chargesamount => $flags->{'CHARGES'}->{'amount'},
> );
> }
> if ( $flag eq 'CREDITS' ) {
> diff --git a/circ/returns.pl b/circ/returns.pl
> index e897645..66cfd9d 100755
> --- a/circ/returns.pl
> +++ b/circ/returns.pl
> @@ -456,6 +456,7 @@ if ($borrower) {
> if ( $flag eq 'CHARGES' ) {
> $flaginfo{msg} = $flag;
> $flaginfo{charges} = 1;
> + $flaginfo{chargeamount} = $flags->{$flag}->{amount};
> $flaginfo{borrowernumber} = $borrower->{borrowernumber};
> }
> elsif ( $flag eq 'WAITING' ) {
> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
> index 17d579d..24f2dd7 100644
> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
> @@ -339,7 +339,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
> <!-- TMPL_ELSE -->
> <li>
> <!-- /TMPL_IF -->
> - <span class="circ-hlt">Fines:</span> Patron has <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->">Outstanding fines</a>.
> + <span class="circ-hlt">Fines:</span> Patron has <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->">Outstanding fines<!-- TMPL_IF NAME="chargesamount" --> of $<!-- TMPL_VAR NAME="chargesamount" --><!-- /TMPL_IF --></a>.
> <!-- TMPL_IF NAME="charges_is_blocker" -->
> Checkouts are blocked because fine balance is over the limit.
> <!-- /TMPL_IF -->
> 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 1c9d79a..b7a0001 100644
> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
> @@ -327,7 +327,9 @@ function Dopop(link) {
> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR Name="riborrowernumber" -->"><!-- TMPL_VAR Name="riborsurname" -->, <!-- TMPL_VAR Name="ribortitle" --> <!-- TMPL_VAR Name="riborfirstname" --></a> (<!-- TMPL_VAR Name="riborcnum" -->)
> <!-- TMPL_IF Name="flagset" -->
> (<!-- TMPL_LOOP Name="flagloop" -->
> - <!-- TMPL_VAR Name="flag" -->,
> + <!-- TMPL_VAR Name="flag" -->
> + <!-- TMPL_IF NAME="charges" --> of <!-- TMPL_VAR NAME="chargeamount" --> <!-- /TMPL_IF -->
> + ,
> <!-- /TMPL_LOOP -->)<!-- /TMPL_IF -->
> </td>
> </tr>
> --
> 1.5.4.3
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches
>
--
Galen Charlton
VP, Research & Development, LibLime
galen.charlton at liblime.com
p: 1-888-564-2457 x709
skype: gmcharlt
More information about the Koha-patches
mailing list