Fix rendering of the carousel inside of a Story. Fixes bug #12386

This commit is contained in:
Colin Kuskie 2012-09-20 14:00:57 -07:00
parent 50c7634800
commit e046e5a8ce
8 changed files with 55 additions and 4 deletions

View file

@ -966,10 +966,11 @@ sub viewTemplateVariables {
};
++$photoCounter;
}
$var->{hasPhotos} = $photoCounter;
$var->{singlePhoto} = $photoCounter == 1;
$var->{canEdit} = $self->canEdit;
$var->{photoWidth} = $archive->get('photoWidth');
$var->{hasPhotos} = $photoCounter;
$var->{singlePhoto} = $photoCounter == 1;
$var->{canEdit} = $self->canEdit;
$var->{photoWidth} = $archive->get('photoWidth');
$var->{photoHeight} = $archive->get('photoHeight');
return $var;
}

View file

@ -126,6 +126,13 @@ sub definition {
hoverHelp => $i18n->get('photo width help'),
defaultValue => '300',
},
photoHeight => {
tab => 'display',
fieldType => 'integer',
label => $i18n->get('photo height'),
hoverHelp => $i18n->get('photo height help'),
defaultValue => '300',
},
editStoryTemplateId => {
tab => 'display',
fieldType => 'template',

View file

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

View file

@ -437,6 +437,12 @@ our $I18N = {
lastUpdated => 0,
},
'photoWidth' => {
message => q|The height of slides, 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|,

View file

@ -321,6 +321,12 @@ our $I18N = {
lastUpdated => 0,
},
'photoHeight' => {
message => q|The height used to display photos.|,
context => q|Template variable.|,
lastUpdated => 0,
},
'photo width' => {
message => q|Photo width|,
context => q|Label in the edit screen|,
@ -333,6 +339,18 @@ our $I18N = {
lastUpdated => 0,
},
'photo height' => {
message => q|Photo Height|,
context => q|Label in the edit screen|,
lastUpdated => 0,
},
'photo height help' => {
message => q|Slides in the photo carousel have to have a fixed height to render in some browsers. To disable this feature, set it to 0.|,
context => q|hoverhelp for photoHeight in the edit screen|,
lastUpdated => 0,
},
'sortAlphabeticallyChronologically' => {
message => q|Sort Order|,
context => q|Label in the edit screen|,