added ability to configure number of files per page in the galleryalbum
This commit is contained in:
parent
e7260285be
commit
b137688f65
5 changed files with 37 additions and 1 deletions
|
|
@ -307,6 +307,13 @@ sub definition {
|
|||
label => $i18n->get("workflowIdCommit label"),
|
||||
hoverHelp => $i18n->get("workflowIdCommit description"),
|
||||
},
|
||||
defaultFilesPerPage => {
|
||||
tab => 'display',
|
||||
fieldType => 'integer',
|
||||
defaultValue => 24,
|
||||
label => $i18n->get( 'defaultFilesPerPage label' ),
|
||||
hoverHelp => $i18n->get( 'defaultFilesPerPage description' ),
|
||||
},
|
||||
);
|
||||
|
||||
push @{$definition}, {
|
||||
|
|
|
|||
|
|
@ -440,8 +440,9 @@ url to the current page that will be given to the paginator.
|
|||
sub getFilePaginator {
|
||||
my $self = shift;
|
||||
my $url = shift || $self->getUrl;
|
||||
my $perPage = $self->getParent->get( 'defaultFilesPerPage' );
|
||||
|
||||
my $p = WebGUI::Paginator->new( $self->session, $url );
|
||||
my $p = WebGUI::Paginator->new( $self->session, $url, $perPage );
|
||||
$p->setDataByArrayRef( $self->getFileIds );
|
||||
|
||||
return $p;
|
||||
|
|
|
|||
|
|
@ -699,6 +699,18 @@ our $I18N = {
|
|||
lastUpdated => 0,
|
||||
context => q{Description of template variable},
|
||||
},
|
||||
|
||||
'defaultFilesPerPage label' => {
|
||||
message => q{Default Files Per Page},
|
||||
lastUpdated => 0,
|
||||
context => q{Asset property label},
|
||||
},
|
||||
|
||||
'defaultFilesPerPage description' => {
|
||||
message => q{The number of files to show per page of the album view.},
|
||||
lastUpdated => 0,
|
||||
context => q{Description of asset property},
|
||||
},
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue