Fix the carousel in the Story. Bug #10915

Add a template variables for the photoWidth from the Story's Archive.
Document the new template variable, with i18n.
Modify both Archive and Topic templates.
This commit is contained in:
Colin Kuskie 2009-09-05 14:56:16 -07:00
parent f484a344b3
commit 494d97c53f
6 changed files with 9 additions and 0 deletions

View file

@ -914,6 +914,7 @@ sub viewTemplateVariables {
$var->{hasPhotos} = $photoCounter;
$var->{singlePhoto} = $photoCounter == 1;
$var->{canEdit} = $self->canEdit;
$var->{photoWidth} = $archive->get('photoWidth');
return $var;
}

View file

@ -85,6 +85,7 @@ our $HELP = {
},
],
},
{ name => 'photoWidth', },
{ name => 'hasPhotos', },
{ name => 'singlePhoto', },
{ name => 'photo_loop',

View file

@ -418,6 +418,12 @@ our $I18N = {
lastUpdated => 0,
},
'photoWidth' => {
message => q|The width of photos, set in the Story Archive for this Story.|,
context => q|Template variable|,
lastUpdated => 0,
},
'hasPhoto' => {
message => q|This template variable will be true if the a photo in the photo_loop has an image in it.|,
context => q|Template variable|,