Added i18n for Gallery (Search) template
Fix: Album description showing up in Photos when photo has no synopsis fix: Photo now shows correct confirmation screen fix: Photo now gets auto-committed according to Gallery approval workflow fix: Formatting problems in Album view fix: Photo and Album assets now retain their Owner after other users edit them. fix: Gallery::Utility migration now retains createdBy, creationDate, and ownerUserId. Testing Gallery::Utility a bit more thoroughly. fix: Photo EXIF data now gets cached correctly and sanitized for references (since JSON won't store them and they're of no use to us anyway).
This commit is contained in:
parent
2a388db1a6
commit
ec3bc19d77
10 changed files with 207 additions and 51 deletions
|
|
@ -364,7 +364,7 @@ sub appendTemplateVarsSearchForm {
|
|||
$var->{ searchForm_className }
|
||||
= WebGUI::Form::radioList( $session, {
|
||||
name => "className",
|
||||
value => $form->get("className"),
|
||||
value => ( $form->get("className") || '' ),
|
||||
options => \%searchClassOptions,
|
||||
});
|
||||
|
||||
|
|
@ -513,7 +513,6 @@ sub getAlbumIds {
|
|||
my $options = shift;
|
||||
|
||||
my $orderBy = $options->{ orderBy } || "lineage ASC";
|
||||
$self->session->errorHandler->warn("ORDER BY: $orderBy");
|
||||
|
||||
my $assets
|
||||
= $self->getLineage(['descendants'], {
|
||||
|
|
@ -914,11 +913,13 @@ sub www_search {
|
|||
. $db->quote( '%' . $form->get("description") . '%' )
|
||||
;
|
||||
}
|
||||
|
||||
my $joinClass = [
|
||||
'WebGUI::Asset::Wobject::GalleryAlbum',
|
||||
'WebGUI::Asset::File::Image::Photo',
|
||||
];
|
||||
if ( $form->get("className") ) {
|
||||
$where .= q{ AND asset.className IN ('}
|
||||
. $db->quoteAndJoin( [$form->get('className','checkList')] )
|
||||
. q{)}
|
||||
;
|
||||
$joinClass = [ $form->get('className') ];
|
||||
}
|
||||
|
||||
# Build a URL for the pagination
|
||||
|
|
@ -939,7 +940,7 @@ sub www_search {
|
|||
url => $url,
|
||||
keywords => $keywords,
|
||||
where => $where,
|
||||
joinClass => ['WebGUI::Asset::Wobject::GalleryAlbum', 'WebGUI::Asset::File::Image::Photo'],
|
||||
joinClass => $joinClass,
|
||||
} );
|
||||
|
||||
$var->{ keywords } = $keywords;
|
||||
|
|
|
|||
|
|
@ -157,6 +157,8 @@ sub addAlbumFromThread {
|
|||
className => 'WebGUI::Asset::Wobject::GalleryAlbum',
|
||||
description => $thread->get('content'),
|
||||
menuTitle => $thread->get('menuTitle'),
|
||||
createdBy => $thread->get('createdBy'),
|
||||
creationDate => $thread->get('creationDate'),
|
||||
ownerUserId => $thread->get('ownerUserId'),
|
||||
synopsis => $thread->get('synopsis'),
|
||||
title => $thread->get('title'),
|
||||
|
|
@ -180,12 +182,18 @@ sub addAlbumFromThread {
|
|||
next;
|
||||
}
|
||||
|
||||
# Get rid of that file extention
|
||||
my ($title) = $filename =~ m{(.*)\.[^.]*$};
|
||||
|
||||
my $file = $album->addChild({
|
||||
className => $className,
|
||||
menuTitle => $filename,
|
||||
createdBy => $post->get('createdBy'),
|
||||
creationDate => $post->get('creationDate'),
|
||||
menuTitle => $title,
|
||||
ownerUserId => $post->get('ownerUserId'),
|
||||
title => $filename,
|
||||
url => $session->url->urlize( $album->get('url') . "/" . $filename ),
|
||||
synopsis => $post->get('content'),
|
||||
title => $title,
|
||||
url => $session->url->urlize( $album->get('url') . "/" . $title ),
|
||||
userDefined1 => $post->get('userDefined1'),
|
||||
userDefined2 => $post->get('userDefined2'),
|
||||
userDefined3 => $post->get('userDefined3'),
|
||||
|
|
|
|||
|
|
@ -494,12 +494,6 @@ sub processPropertiesFromFormPost {
|
|||
return $errors if @$errors;
|
||||
|
||||
### Passes all checks
|
||||
# Fix if adding a new GalleryAlbum
|
||||
if ( $form->get('assetId') eq "new" ) {
|
||||
$self->update({
|
||||
ownerUserId => $self->session->user->userId,
|
||||
});
|
||||
}
|
||||
|
||||
$self->requestAutoCommit;
|
||||
}
|
||||
|
|
@ -753,12 +747,20 @@ sub www_edit {
|
|||
$var->{ form_start }
|
||||
= WebGUI::Form::formHeader( $session, {
|
||||
action => $self->getParent->getUrl('func=editSave;assetId=new;class='.__PACKAGE__),
|
||||
})
|
||||
. WebGUI::Form::hidden( $session, {
|
||||
name => "ownerUserId",
|
||||
value => $session->user->userId,
|
||||
});
|
||||
}
|
||||
else {
|
||||
$var->{ form_start }
|
||||
= WebGUI::Form::formHeader( $session, {
|
||||
action => $self->getUrl('func=editSave'),
|
||||
})
|
||||
. WebGUI::Form::hidden( $session, {
|
||||
name => "ownerUserId",
|
||||
value => $self->get("ownerUserId"),
|
||||
});
|
||||
}
|
||||
$var->{ form_start }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue