Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desk pagination fixes #47

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion comp/widgets/desk/desk.mc
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ if ($class eq 'template') {
$obj_offset -= $num_media if $offset;
}

if (defined $objs && @$objs > $obj_offset) {
if (defined $objs && @$objs && @$objs > $obj_offset) {
$m->comp(
'/widgets/desk/desk_top.html',
class => $class,
Expand Down
2 changes: 1 addition & 1 deletion comp/widgets/desk/desk_bottom.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="pages">
<% $prev_link %>
% foreach my $page (0 .. $num_pages) {
% if ($page == $offset) {
% if ($page * $limit == $offset) {
<span class="current"><% $page + 1 %></span>&nbsp;
% } else {
% my $off = $page * $limit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@
</%once>

<%args>
$id
$id => undef
</%args>

<%init>;
my $crumb = get_state_data('container_prof', 'crumb') || '';
$crumb .= ' |' if $crumb;
if ($id) {
set_state_data('container_prof', relate_to_id => $id);
} else {
$id = get_state_data('container_prof', 'relate_to_id');
}
die "no value sent for required parameter 'id'" unless $id;
</%init>

<%doc>
Expand Down
5 changes: 5 additions & 0 deletions lib/Bric/Changes.pod
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ Fix for the possibility that a FTP server would return a list, not a text messag
reported in L<this thread|http://www.gossamer-threads.com/lists/bricolage/users/40893>.
[Phillip Smith]

=item *

Fix fatal error when using paging on desk/workspace and correctly highlight the
current page. [Adrian Yee]

=back

=head1 Version 2.0.1 ()
Expand Down