exposed a form variable for Gallery Album Others Can Add asset property
checkin missing WebGUI::User method
This commit is contained in:
parent
26d353e7e6
commit
afea092a97
4 changed files with 44 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
- fixed: thingy's checkbox field
|
- fixed: thingy's checkbox field
|
||||||
- Inbox and ?op=viewInbox can now handle millions of rows without taking 10 minutes to return
|
- Inbox and ?op=viewInbox can now handle millions of rows without taking 10 minutes to return
|
||||||
some results
|
some results
|
||||||
|
- Exposed a form element for the GalleryAlbum Others Can Add property
|
||||||
|
|
||||||
7.5.18
|
7.5.18
|
||||||
- fixed: Collateral Image Manager broken in Firefox 3
|
- fixed: Collateral Image Manager broken in Firefox 3
|
||||||
|
|
|
||||||
|
|
@ -500,6 +500,11 @@ sub getTemplateVars {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Set a flag for pending files
|
||||||
|
if ( $self->get( "status" ) eq "pending" ) {
|
||||||
|
$var->{ 'isPending' } = 1;
|
||||||
|
}
|
||||||
|
|
||||||
# Permissions
|
# Permissions
|
||||||
$var->{ canAddFile } = $self->canAddFile;
|
$var->{ canAddFile } = $self->canAddFile;
|
||||||
$var->{ canEdit } = $self->canEdit;
|
$var->{ canEdit } = $self->canEdit;
|
||||||
|
|
@ -1065,6 +1070,12 @@ sub www_edit {
|
||||||
richEditId => $self->getParent->get("richEditIdAlbum"),
|
richEditId => $self->getParent->get("richEditIdAlbum"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$var->{ form_othersCanAdd }
|
||||||
|
= WebGUI::Form::yesNo( $session, {
|
||||||
|
name => "othersCanAdd",
|
||||||
|
value => $form->get( "othersCanAdd" ) || $self->get( "othersCanAdd" ),
|
||||||
|
} );
|
||||||
|
|
||||||
# Generate the file loop
|
# Generate the file loop
|
||||||
my $assetIdThumbnail = $form->get("assetIdThumbnail") || $self->get("assetIdThumbnail");
|
my $assetIdThumbnail = $form->get("assetIdThumbnail") || $self->get("assetIdThumbnail");
|
||||||
$self->appendTemplateVarsFileLoop( $var, $self->getFileIds );
|
$self->appendTemplateVarsFileLoop( $var, $self->getFileIds );
|
||||||
|
|
|
||||||
|
|
@ -332,6 +332,32 @@ sub getGroups {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 getGroupIdsRecursive ( )
|
||||||
|
|
||||||
|
Get the groups the user is in AND all the groups those groups are in, recursively.
|
||||||
|
Returns a flattened array reference of unique group IDs
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub getGroupIdsRecursive {
|
||||||
|
my $self = shift;
|
||||||
|
my $groupingIds = $self->getGroups( "withoutExpired" );
|
||||||
|
my %groupIds = map { $_ => 1 } @{ $groupingIds };
|
||||||
|
while ( my $groupingId = shift @{ $groupingIds } ) {
|
||||||
|
my $group = WebGUI::Group->new( $self->session, $groupingId );
|
||||||
|
for my $groupGroupingId ( @{ $group->getGroupsFor } ) {
|
||||||
|
if ( !$groupIds{ $groupGroupingId } ) {
|
||||||
|
push @{ $groupingIds }, $groupGroupingId;
|
||||||
|
}
|
||||||
|
$groupIds{ $groupGroupingId } = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return [ keys %groupIds ];
|
||||||
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 getWholeName ( )
|
=head2 getWholeName ( )
|
||||||
|
|
|
||||||
|
|
@ -550,6 +550,12 @@ our $I18N = {
|
||||||
context => q{Description of template variable},
|
context => q{Description of template variable},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'editForm othersCanAdd label' => {
|
||||||
|
message => q{Others Can Add},
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q{Description of asset property to allow people besides the owner to add files to the album},
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue