|
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 |
} |