added: Two new approval activities, byLineage and byCommitterGroup
added: Show a message to users when they log in fixed: Gallery search form doesn't work right in IE6 fixed: Minor bug in new gallery approval handling
This commit is contained in:
parent
a0ec44567a
commit
614b37e31d
12 changed files with 515 additions and 32 deletions
|
|
@ -994,7 +994,15 @@ sub www_search {
|
|||
# NOTE: Search form is added as part of getTemplateVars()
|
||||
|
||||
# Get search results, if necessary.
|
||||
if ($form->get("submit")) {
|
||||
my $doSearch
|
||||
= (
|
||||
$form->get( 'basicSearch' ) || $form->get( 'keywords' )
|
||||
|| $form->get( 'title' ) || $form->get( 'description' )
|
||||
|| $form->get( 'userId' ) || $form->get( 'className' )
|
||||
|| $form->get( 'creationDate_after' ) || $form->get( 'creationDate_before' )
|
||||
);
|
||||
|
||||
if ( $doSearch ) {
|
||||
# Keywords to search on
|
||||
my $keywords = join " ", $form->get('basicSearch'),
|
||||
$form->get('keywords'),
|
||||
|
|
@ -1032,7 +1040,7 @@ sub www_search {
|
|||
# Build a URL for the pagination
|
||||
my $url
|
||||
= $self->getUrl(
|
||||
'func=search;submit=1;'
|
||||
'func=search;'
|
||||
. 'basicSearch=' . $form->get('basicSearch') . ';'
|
||||
. 'keywords=' . $form->get('keywords') . ';'
|
||||
. 'title=' . $form->get('title') . ';'
|
||||
|
|
|
|||
|
|
@ -411,7 +411,21 @@ sub getFileIds {
|
|||
my $self = shift;
|
||||
my $gallery = $self->getParent;
|
||||
|
||||
return $self->getLineage( ['descendants'], { } );
|
||||
# Deal with "pending" files.
|
||||
my %pendingRules;
|
||||
if ( $self->canEdit ) {
|
||||
$pendingRules{ statusToInclude } = [ 'pending', 'approved' ];
|
||||
}
|
||||
else {
|
||||
$pendingRules{ statusToInclude } = [ 'pending', 'approved' ];
|
||||
$pendingRules{ whereClause } = q{
|
||||
(
|
||||
status = "approved" || ownerUserId = "} . $self->session->user->userId . q{"
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
return $self->getLineage( ['descendants'], { (%pendingRules) } );
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue