fixed photo/view test
This commit is contained in:
parent
d41fe1e4ab
commit
0e299cc18b
1 changed files with 14 additions and 2 deletions
|
|
@ -86,8 +86,8 @@ my $testTemplateVars = {
|
||||||
fileUrl => $photo->getFileUrl,
|
fileUrl => $photo->getFileUrl,
|
||||||
thumbnailUrl => $photo->getThumbnailUrl,
|
thumbnailUrl => $photo->getThumbnailUrl,
|
||||||
numberOfComments => scalar @{ $photo->getCommentIds },
|
numberOfComments => scalar @{ $photo->getCommentIds },
|
||||||
resolutions_loop => ignore(), # Tested elsewhere
|
|
||||||
exifLoop => ignore(), # Tested elsewhere
|
exifLoop => ignore(), # Tested elsewhere
|
||||||
|
isPending => ( $photo->get("status") eq "pending" ),
|
||||||
|
|
||||||
# Gallery stuff
|
# Gallery stuff
|
||||||
url_search => $gallery->getUrl('func=search'),
|
url_search => $gallery->getUrl('func=search'),
|
||||||
|
|
@ -110,6 +110,18 @@ for my $tag ( keys %{ $photo->getExifData } ) {
|
||||||
# Add search vars
|
# Add search vars
|
||||||
$gallery->appendTemplateVarsSearchForm( $testTemplateVars );
|
$gallery->appendTemplateVarsSearchForm( $testTemplateVars );
|
||||||
|
|
||||||
|
# Add resolution vars
|
||||||
|
for my $resolution ( @{ $photo->getResolutions } ) {
|
||||||
|
my $label = $resolution;
|
||||||
|
$label =~ s/\.[^.]+$//;
|
||||||
|
my $downloadUrl = $photo->getStorageLocation->getUrl( $resolution );
|
||||||
|
push @{ $testTemplateVars->{ resolutions_loop } }, {
|
||||||
|
resolution => $label,
|
||||||
|
url_download => $downloadUrl,
|
||||||
|
};
|
||||||
|
$testTemplateVars->{ "resolution_" . $resolution } = $downloadUrl;
|
||||||
|
}
|
||||||
|
|
||||||
# Fix vars that are time-sensitive
|
# Fix vars that are time-sensitive
|
||||||
$testTemplateVars->{ searchForm_creationDate_before }
|
$testTemplateVars->{ searchForm_creationDate_before }
|
||||||
= all(
|
= all(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue