Browse Source

Bug 9140 - Untranslatable strings in item circulation history

This patch removes the text of a message from the script
to the template. The lastmove sub now returns either the date
or 0, and the template displays the "no transfers" message
if the date doesn't exist.

To test, view the circulation history for items which
do and do not have a transfer history. A date should be displayed
for items which have a transfer history. A messages should
be displayed for those which do not.

This patch also adds a <span> around the text "Never" which
was not getting picked up by the translation script. To test
this change, run "perl translate update <lang>" from misc/translator,
then check if the string shows up in the po file. (Thanks kf!)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
3.12.x
Owen Leonard 12 years ago
committed by Jared Camins-Esakov
parent
commit
533c9bc657
  1. 6
      circ/bookcount.pl
  2. 5
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt

6
circ/bookcount.pl

@ -89,7 +89,7 @@ $template->param(
biblioitemnumber => $bi,
homebranch => $homebranch,
holdingbranch => $holdingbranch,
lastdate => $lastdate ? format_date($lastdate) : $message,
lastdate => $lastdate ? format_date($lastdate) : 0,
count => $count,
branchloop => $branchloop,
);
@ -112,13 +112,13 @@ sub lastmove {
);
$sth->execute($itemnumber);
my ($date) = $sth->fetchrow_array;
return ( 0, "Item has no branch transfers record" ) if not $date;
return ( 0, 1 ) if not $date;
$sth = $dbh->prepare(
"SELECT * FROM branchtransfers WHERE branchtransfers.itemnumber=? and branchtransfers.datearrived=?"
);
$sth->execute( $itemnumber, $date );
my ($data) = $sth->fetchrow_hashref;
return ( 0, "Item has no branch transfers record" ) if not $data;
return ( 0, 1 ) if not $data;
return ( $data, "" );
}

5
koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt

@ -28,7 +28,7 @@ $(document).ready(function(){
<tr><td>[% homebranch %]</td>
<td>[% holdingbranch %]</td>
<td>[% lastdate %]</td>
<td>[% IF ( lastdate ) %][% lastdate %][% ELSE %]Item has no transfer record[% END %]</td>
<td>[% count %]</td>
</tr>
</table>
@ -50,7 +50,8 @@ $(document).ready(function(){
<span style="display:none;">[% branchloo.seen %][% branchloo.seentime %]</span>
<!-- invisible span for eventual use by tablesorter -->
[% branchloo.seen %] [% branchloo.seentime %]
[% ELSE %]Never
[% ELSE %]
<span>Never</span>
[% END %]
</td>
</tr>

Loading…
Cancel
Save