%#-- Begin HTML --# <%once> # outputs a 1x1 pixel table cell. The first argument determines value of the # colspan tag, while the second determines the height of the image. my $onePixCell = sub { my ($colspan, $h, $w) = @_; $h ||= 1; $w ||= 1; $colspan = $colspan ? qq{ colspan="$colspan"} : ''; return qq {} . qq{}; }; <% &$onePixCell(0, 22) %> <% &$onePixCell() %>
{id} || '' %> align="right"><% $id %> V.<% $obj->get_version %>{name} || $classes->{file_name} || '' %>> <% $name %> {name} || $classes->{file_name} || '' %>><% $status %>
<% &$onePixCell(undef, 1, 100) %> <% &$onePixCell(2, 1, 241) %> <% &$onePixCell(1) %> {category_name} || $classes->{location} || '' %> width="240"> <% $cat %> <% &$onePixCell(3) %> <% &$onePixCell(0, 20) %> {element} || '' %>> <% $type %> <% &$onePixCell(3) %> <% &$onePixCell(0, 20) %> {cover_date} || '' %>> <% $date || ' ' %> <% &$onePixCell(3) %> <% &$onePixCell(0, 18) %> {priority} || '' %>> <% $priors->{$obj->get_priority} || ' ' %>
Category: <% &$onePixCell(0, 20) %> <% &$onePixCell(0, 43) %> <% &$onePixCell(0, 18) %>
<% $elink %>
% if ($can_edit && $desk_opts) { <% $mlabel %>: <& '/widgets/profile/select.mc', name => $widget . '|next_desk', value => $desk_val, options => $desk_opts, useTable => 0 &> % } else {   % }
% my $link = $ppage . '/' . $aid; % if ($desk_type eq 'workflow') { % $link .= '?return=' . $did; % if ($vlabel eq 'Edit') { % $link .= '&checkout=1'; % } % } else { % if ($vlabel eq 'Edit') { % $link .= '?checkout=1'; % } % } Notes   Trail   <% $vlabel %>   Log   <% $pub %>
<% $class eq 'formatting' ? 'Asset' : $disp %> Type:
<% $date_label || ' ' %>:
Priority:
%#-- End HTML --# %#-- Once Section --# <%once>; my $priors = Bric::Biz::Asset->list_priorities; %#-- Args Section --# <%args> $mlabel => 'Move to Desk' $widget => 'desk' $obj $highlight $can_edit $elink $vlabel => 'View' $desk_val $desk_opts $ppage $disp $type $pub => '' $aid $class => 'story' $did $desk_type %#-- Init Section --# <%init>; # Get the ID. my $id = $obj->get_id; # Determine the status. my $status; if ($obj->get_publish_status) { my $letter = $obj->key_name eq 'formatting' ? 'D' : 'P'; $status = $obj->needs_publish ? qq{} : qq{}; } else { $status = ' '; } my $cats = $rc->get("desk.cats") || {}; my ($name, $date, $date_label, $cat); if ($class eq 'formatting') { $date = $obj->get_deploy_date || ' '; $date_label = 'Deployed Date'; $name = $obj->get_uri; my $cat_id = $obj->get_category_id; if (defined $cat_id) { unless ($cat = $cats->{$cat_id}) { $cat = Bric::Biz::Category->lookup({ id => $cat_id })->get_name; $cats->{$cat_id} = $cat; $rc->set("desk.cats", $cats); } } else { $cat = ' '; } } else { $name = $obj->get_name; $date = $obj->get_cover_date; $date_label = 'Cover Date'; my $co = $vlabel eq 'Edit'; my $c = $highlight eq 'name' ? 'whiteMedUnderlinedLink' : 'blackMedUnderlinedLink'; $name = qq{$name}; if ($class eq 'media') { $cat = $cats->{$obj->get_category__id} ||= $obj->get_category_object; $cat = $cat->get_name if $cat; } else { $cat = $obj->get_primary_category; $cat = $cat->get_name if $cat; $cat ||= ' '; } } $cat ||= ' '; my $classes = $highlight ? { $highlight => ' class="tealHighlight"' } : {}; my $rowspan = 4; <%doc> ############################################################################### =head1 NAME /widgets/desk/desk_item.html - Desk Item Presentation. =head1 VERSION $Revision: 1.13.2.1 $ =head1 DATE $Date: 2002/10/16 04:42:27 $ =head1 DESCRIPTION This element handles the display of individual assets on a desk or workspace.