<%perl> my $rightText = $m->scomp( '/widgets/profile/imageSubmit.mc', formName => "theForm", callback => $widget . "|trail_cb", image => "view_trail_teal" ) . ' '; $rightText .= $m->scomp( '/widgets/profile/imageSubmit.mc', formName => "theForm", callback => $widget . "|notes_cb", image => %{ $media->get_notes } ? 'note_fill' : "note", useGlobalImage => 1, value => 'edit' ); $m->comp("/widgets/wrappers/sharky/table_top.mc", caption => "Information", number => $num++, id => 'mediainfo', rightText => $rightText ); % if (my $uri = $media->get_primary_uri) { % if (@ocs == 1) { % } else { % } % }
<%$lang->maketext('ID')%>:   <% $id %>
<%$lang->maketext('Media Type Element')%>:   <% $media->get_element_name() %>
<% $lang->maketext('Current Version') %>:   <% $media->get_current_version() %>
<% $lang->maketext('Published Version') %>:   <% $media->get_published_version || '' %>
<% $lang->maketext('First Published') %>:   <% $media->get_first_publish_date || '' %>
<% $lang->maketext('Last Published') %>:   <% $media->get_publish_date || '' %>
<% $lang->maketext('URI') %>:  <% $m->comp('/widgets/profile/preview_link.mc', type => 'media', title => $media->get_primary_uri, doc => $media, style => 'blackUnderlinedLink') %>
 <% $uri %>
<% $lang->maketext('Preview in') %>:   <% $oc_select %> Preview
<% $lang->maketext('Site') %>:   <% Bric::Biz::Site->lookup({id => $media->get_site_id})-> get_name() %>
<% $ieSpacer %> <& '/widgets/profile/displayFormElement.mc', objref => $media, key => 'title', &> <% $ieSpacer %> <& '/widgets/profile/displayFormElement.mc', objref => $media, key => 'description', &> <% $ieSpacer %> <& '/widgets/select_object/select_object.mc', object => 'source', name => "$widget|source__id", field => 'source_name', selected => $media->get_source__id, indent => 0, useTable => 1, disp => "Source" &> % unless (ENABLE_CATEGORY_BROWSER) { <% $ieSpacer %> <& '/widgets/select_object/select_object.mc', object => 'category', constrain => { site_id => $media->get_site_id }, name => "$widget|category__id", field => "uri", sort_field => "uri", selected => $media->get_category__id, indent => 0, req => 1, useTable => 1, exclude => sub { ! chk_authz($_[0], READ, 1) }, disp => "Category" &> % } # unless ENABLE_CATEGORY_BROWSER <% $ieSpacer %> <& '/widgets/profile/displayFormElement.mc', objref => $media, key => 'priority', &> <% $ieSpacer %> <& '/widgets/profile/displayFormElement.mc', objref => $media, key => 'cover_date', &> <% $ieSpacer %> <& '/widgets/profile/displayFormElement.mc', objref => $media, key => 'expire_date', &> <% $ieSpacer %> <%perl>; $m->comp("/widgets/wrappers/sharky/table_bottom.mc"); $m->comp('file_section.mc', media => $media, widget => $widget, num => $num++, read_only => $media->get_alias_id, indent => $infoIndent ); $num = $m->comp( '/widgets/container_prof/container_prof.mc', tile => $tile, tile_type => 'media', action => $media->get_alias_id ? 'view' : 'edit', num => $num, title => 'Content', start_count => 6 ); if (ENABLE_OC_ASSET_ASSOCIATION) { $m->comp('/widgets/profile/asset_ocs.mc', asset => $media, widget => $widget, ocs => \@ocs, num => $num++, at_ocs => \@aocs ); } $m->out("$ieSpacer
\n"); $m->comp("/widgets/wrappers/sharky/table_top.mc", caption => "Associations", number => $num++);
<% $lang->maketext('Category') %>:  <%perl> my $cat = $media->get_category; $m->out($cat->get_name); <& '/widgets/profile/imageSubmit.mc', formName => "theForm", callback => "$widget|category_cb", image => "edit_lgreen", vspace => 4 &>
<% $lang->maketext('Keywords') %>:  <%perl> my @keywords; foreach my $kw ($media->get_keywords) { push @keywords, $kw->get_name; } $m->out(scalar(@keywords) ? join(", ", @keywords) : $lang->maketext("No keywords defined.")); <& '/widgets/profile/imageSubmit.mc', formName => "theForm", callback => "$widget|keywords_cb", image => "edit_lgreen", vspace => 4 &>
<% $lang->maketext('Contributors') %>:  <%perl> my @contribs; foreach my $cntr ($media->get_contributors) { push @contribs, $cntr->get_name; } $m->out(scalar(@contribs) ? join(", ", @contribs) : $lang->maketext("No contributors defined.")); % if ($media->get_alias_id) { % } else { <& /widgets/profile/imageSubmit.mc, formName => "theForm", callback => $widget . "|contributors_cb", image => "edit_lgreen", vspace => 3 &> % }
<%perl> $m->comp("/widgets/wrappers/sharky/table_bottom.mc"); $m->comp("/widgets/profile/buttonBar.mc", widget => $widget, desks => $desks, cd => $cd, obj => $media, ); %#-- Args Section --# <%args> $widget %#-- Init Section --# <%init> my $media = get_state_data($widget, 'media'); my $tile = $media->get_tile(); set_state_data('container_prof', 'tile', $tile); my $wf_id = get_state_data($widget, 'work_id'); $wf_id = $media->get_workflow_id() unless $wf_id; my $wf = Bric::Biz::Workflow->lookup( { id => $wf_id }); my $desks = $wf->allowed_desks(); my $cd = $media->get_current_desk(); $cd = $wf->get_start_desk() unless $cd; my $id = $media->get_id; # Set up a formatting variable my $agent = detect_agent(); my $infoIndent = $agent->nav4 ? FIELD_INDENT - 5 : FIELD_INDENT + 8; my $num = 1; my $ieSpacer = $agent->ie ? qq{
} : ''; # get output channel info my $at = $media->get_element__id; my $asset_type = Bric::Biz::AssetType->lookup({id => $at}); my @aocs = $asset_type->get_output_channels; my @ocs = $media->get_output_channels; my $primocid = $media->get_primary_oc_id; my $oc_select = '';