%#-- 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, 18) %> {priority} || '' %>> <% $site || ' ' %> <% &$onePixCell(3) %> <% &$onePixCell(0, 20) %> {element} || '' %>> <% $type %> <% &$onePixCell(3) %> <% &$onePixCell(0, 20) %> {cover_date} || '' %>> <% $date || ' ' %> <% &$onePixCell(3) %> <% &$onePixCell(0, 18) %> {priority} || '' %>> <% $lang->maketext($priors->{$obj->get_priority}) || ' ' %>
<%$lang->maketext('Category')%>: <% &$onePixCell(0, 20) %> <% &$onePixCell(0, 43) %> <% &$onePixCell(0, 18) %>
<% $lang->maketext($elink) %>
% if ($can_edit && $desk_opts) { <% $mlabel %>: <& '/widgets/profile/select.mc', name => $widget . '|next_desk', value => $desk_val, options => $desk_opts, useTable => 0 &> % } else {   % }
<%perl>; my $link = $ppage . '/' . $aid; my $item_label = 'Trail'; my $item_url = "/workflow/trail/$class/$aid"; if ($desk_type eq 'workflow') { $link .= '?return=' . $did; if ($vlabel eq 'Edit') { $link .= '&checkout=1'; } } else { if ($vlabel eq 'Edit') { $link .= '?checkout=1'; } if ($class eq 'story') { $item_label = 'Clone'; # $item_url = $r->uri . "?$widget|clone_cb=$aid"; $item_url = "/workflow/profile/workspace/clone/$aid"; } } <%$lang->maketext('Notes')%>   <% $lang->maketext($item_label) %>   <% $lang->maketext($vlabel) %>   <%$lang->maketext('Log')%>   <% $pub %>
<%$lang->maketext('Site')%>:
<% $lang->maketext($class eq 'formatting' ? 'Output Channel' : "$disp Type") %>:
<% $lang->maketext($date_label) || ' ' %>:
<%$lang->maketext('Priority')%>:
%#-- End HTML --# %#-- Once Section --# <%once>; my $priors = Bric::Biz::Asset->list_priorities; %#-- Args Section --# <%args> $mlabel => 'Move to Desk' $widget => 'desk_asset' $obj $highlight $can_edit $vlabel => 'View' $desk_val $desk_opts $ppage $disp $type $pub => '' $aid $class => 'story' $did $desk_type $user => undef $label => undef $action => undef %#-- Init Section --# <%init>; # Get the ID. my $id = $obj->get_id; # Determine the status. my $status = $m->comp('publish_status.mc', asset => $obj) || ' '; my $cats = $r->pnotes("desk.cats") || {}; my ($name, $date, $date_label, $cat); my $header_class = 'lightHeader'; my $site_id = $obj->get_site_id; my $site = Bric::Biz::Site->lookup({id => $site_id})->get_name || ' '; 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_uri; $cats->{$cat_id} = $cat; $r->pnotes("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'; if ($class eq 'media') { $cat = $cats->{$obj->get_category__id} ||= $obj->get_category_object; $cat = $cat->get_uri if $cat; $name = $m->comp('/widgets/profile/preview_link.mc', type => $class, style => $c, doc => $obj, title => $name ) if $obj->get_file_name; } else { $cat = $obj->get_primary_category; $cat = $cat->get_uri if $cat; $cat ||= ' '; $name = $m->comp('/widgets/profile/preview_link.mc', type => $class, style => $c, doc => $obj, title => $name ); } $header_class = 'aliasHeader' if $obj->get_alias_id; } $cat ||= ' '; my $classes = $highlight ? { $highlight => ' class="tealHighlight"' } : {}; my $rowspan = 5; my $elink = $user ? $user : $label ? qq{$label} : ''; <%doc> ############################################################################### =head1 NAME /widgets/desk/desk_item.html - Desk Item Presentation. =head1 VERSION $LastChangedRevision$ =head1 DATE $LastChangedDate: 2004-05-24 18:17:44 -0700 (Mon, 24 May 2004) $ =head1 DESCRIPTION This element handles the display of individual assets on a desk or workspace.