class="version<% ($highlight eq 'id' ? ' sorted' : '') %>"><% $id%> v.<% $obj->get_version %>
<% $uri || $name %>
<% $m->comp('publish_status_span.mc', sorted => $highlight eq 'name' ? ' sorted' : '', asset => $obj) %>
% if ($class ne 'template') {
<% $lang->maketext('Primary URI') %>:
<% $obj->get_primary_uri || ' ' %>
% }
<% $lang->maketext($date_label) %>:
<% $date || ' ' %>
% if ($class eq 'template') {
<% $lang->maketext('Output Channel') %>:
<% $oc || ' ' %>
% } else {
<% $lang->maketext($type_label) %>:
<% $type || ' ' %>
% } % if (@$sites > 1) {
<% $lang->maketext('Site') %>:
<% $site %>
% }
<% $lang->maketext('Priority') %>:
<% $lang->maketext($priors->{$obj->get_priority}) %>

<% $elink %>

% if ($can_edit && $desk_opts) { <& '/widgets/profile/select.mc', name => "$widget|next_desk", value => $desk_val, options => $desk_opts, useTable => 0, id => "move$id" &> % } else {   % }
<%once>; my $priors = Bric::Biz::Asset->list_priorities; <%args> $widget => 'desk_asset' $obj $highlight $can_edit $vlabel => 'View' $desk_val $desk_opts $ppage $disp $oc => '' $type => '' $pub => '' $aid $class => 'story' $did $desk_type $user => undef $label => undef $action => undef <%init>; # Get the ID. my $id = $obj->get_id; my $user_id = $obj->get_user__id; my ($name, $date, $date_label, $type_label, $uri, $uuid); my $header_class = 'lightHeader'; my $alias = ''; my $site = Bric::Biz::Site->lookup({id => $obj->get_site_id})->get_name; my $sites = $c->get('__SITES__') || Bric::Biz::Site->list({ active => 1 }); my $idv_class = 'idv'; if ($class eq 'template') { $date = $obj->get_deploy_date; $date_label = 'Deployed Date'; $name = $obj->get_uri; } else { $name = $obj->get_name; $date = $obj->get_cover_date; $date_label = 'Cover Date'; $type_label = "$disp Type"; my $co = $vlabel eq 'Edit'; $uuid = $obj->get_uuid; $alias = ' alias' if $obj->get_alias_id; if ($class eq 'media') { $uri = $m->comp( '/widgets/profile/preview_link.mc', type => $class, doc => $obj, value => $name, ) if $obj->get_file_name; } else { $uri = $m->comp( '/widgets/profile/preview_link.mc', type => $class, doc => $obj, value => $name, ); } } my $classes = { $highlight => ' class="sorted"' }; my $rowspan = 5; my $checked_out = defined $user_id && get_user_id() == $user_id; my $mover_label = $desk_type ne 'workflow' ? 'Check in' : 'Move'; my $callback_widget = ($class eq 'template' ? 'tmpl' : $class) . '_prof'; 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"; } } my $elink = $user ? $user : $label ? '$label} : ''; # Create alternating row colors my $count = 1; my $rowtype = sub { # Print "odd" for 1st and 2nd cell (odd rows), "even" for 3rd and 4th $m->out(($count++ <= 2) ? 'odd' : 'even'); $count = 1 if ($count > 4); return; }; <%doc> ############################################################################### =head1 NAME /widgets/desk/desk_item.html - Desk Item Presentation. =head1 VERSION $LastChangedRevision$ =head1 DATE $LastChangedDate: 2006-06-14 23:55:03 +0200 (Wed, 14 Jun 2006) $ =head1 DESCRIPTION This element handles the display of individual assets on a desk or workspace.