Skip to content

Commit

Permalink
Fix for displaying desk asset counts. (Bug #198)
Browse files Browse the repository at this point in the history
From commit e317d9b by Marshall Roch and Alex Howarth.

Conflicts:

	lib/Bric/Changes.pod
  • Loading branch information
theory committed Nov 5, 2010
1 parent e764714 commit 5865876
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion comp/widgets/wrappers/sideNav.mc
Expand Up @@ -70,6 +70,13 @@ my $get_cookie = sub {
my %cookies = map { split /:/ } split /[|]/, $cookie;
return exists($cookies{$name}) ? $cookies{$name} : '';
};

my $desk_caption = sub {
my ($desk_id, $desk_name) = @_;
return $desk_name unless get_pref('Show Desk Asset Counts');
my $desk = Bric::Biz::Workflow::Parts::Desk->lookup({ id => $desk_id });
return sprintf("$desk_name (%d)", scalar(@{$desk->assets}));
};
</%once>\
<%perl>;
my $site_id = $c->get_user_cx(get_user_id);
Expand Down Expand Up @@ -192,7 +199,7 @@ foreach my $wf (@$workflows) {
$printLink->(
"/workflow/profile/desk/$wfid/$d->[0]/",
$uri,
$d->[1],
$desk_caption->($d->[0], $d->[1]),
1
),
'</li>'
Expand Down
5 changes: 5 additions & 0 deletions lib/Bric/Changes.pod
Expand Up @@ -99,6 +99,11 @@ Fixed bug in bric_ftpd where the ftp PWD command returns an incorrect path
(missing the site name). Some ftp clients (eg. FileZilla) call PWD and use
this path after changing directories. [Adrian Yee]

=item *

Fixed a bug where desk asset counts would never be displayed regardless of the
preference setting (Bug #198). [Greg Heo]

=back

=head1 Version 2.0.0 (2010-04-12)
Expand Down

0 comments on commit 5865876

Please sign in to comment.