View | Details | Raw Unified | Return to bug 14890
Collapse All | Expand All

(-)a/circ/bookcount.pl (-15 / +1 lines)
Lines 71-81 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
71
71
72
my $branchloop = GetBranchesLoop(C4::Context->userenv->{branch});
72
my $branchloop = GetBranchesLoop(C4::Context->userenv->{branch});
73
foreach (@$branchloop) {
73
foreach (@$branchloop) {
74
    my $date = lastseenat( $itm, $_->{value} );
75
    my ($datechunk, $timechunk) =  slashdate($date);
76
    $_->{issues}     = issuesat($itm, $_->{value});
74
    $_->{issues}     = issuesat($itm, $_->{value});
77
    $_->{seen}       = $datechunk;
75
    $_->{seen}       = lastseenat( $itm, $_->{value} ) || undef;
78
    $_->{seentime}   = $timechunk;
79
}
76
}
80
77
81
$template->param(
78
$template->param(
Lines 170-183 sub lastseenat { Link Here
170
    my $date = ( $date1 lt $date2 ) ? $date2 : $date1 ;
167
    my $date = ( $date1 lt $date2 ) ? $date2 : $date1 ;
171
    return ($date);
168
    return ($date);
172
}
169
}
173
174
#####################################################
175
# return date and time from timestamp
176
sub slashdate {
177
    my ($date) = @_;
178
    $date or return;
179
    return (
180
        output_pref({ dt => dt_from_string( $date ), dateonly => 1 }),
181
        substr($date,11,5)
182
    );
183
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt (-2 / +1 lines)
Lines 48-54 $(document).ready(function(){ Link Here
48
            <td>[% branchloo.branchname %]</td>
48
            <td>[% branchloo.branchname %]</td>
49
            <td>[% branchloo.issues %]</td>
49
            <td>[% branchloo.issues %]</td>
50
            <td>[% IF ( branchloo.seen ) %]
50
            <td>[% IF ( branchloo.seen ) %]
51
                    [% branchloo.seen %] [% branchloo.seentime %]
51
                    [% branchloo.seen | $KohaDates with_hours => 1 %]
52
                [% ELSE %]
52
                [% ELSE %]
53
                    <span>Never</span>
53
                    <span>Never</span>
54
                [% END %]
54
                [% END %]
55
- 

Return to bug 14890