& '/widgets/profile/hidden.mc',
name => "$widget|update_cb",
value => 1,
&>
<%perl>;
my $rightText = $m->scomp( '/widgets/profile/imageSubmit.mc',
formName => "theForm",
callback => $widget . "|trail_cb",
image => "view_trail_teal",
alt => 'Trail',
) . ' ';
$rightText .= $m->scomp( '/widgets/profile/imageSubmit.mc',
formName => "theForm",
callback => $widget . "|notes_cb",
image => $media->has_notes ? 'note_fill' : "note",
useGlobalImage => 1,
value => 'edit',
alt => 'Notes',
);
$m->comp("/widgets/wrappers/sharky/table_top.mc",
caption => "Information",
number => $num++,
id => 'mediainfo',
rightText => $rightText
);
%perl>
- <%$lang->maketext('UUID')%>:
- <% $media->get_uuid %>
- <%$lang->maketext('Media Type')%>:
- <% $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') %>:
% if (my $uri = $media->get_primary_uri) {
% if (@ocs == 1) {
- <% $m->comp('/widgets/profile/preview_link.mc',
type => 'media',
value => $media->get_primary_uri,
doc => $media,
style => 'blackUnderlinedLink') %>
% } else {
- <% $uri %>
- <% $lang->maketext('Preview in') %>:
- <% $oc_select %>

% }
% }
- <% $lang->maketext('Site') %>:
- <% Bric::Biz::Site->lookup({id => $media->get_site_id})->get_name() %>
<& '/widgets/profile/displayFormElement.mc',
objref => $media,
key => 'title',
&>
<& '/widgets/profile/displayFormElement.mc',
objref => $media,
key => 'description',
&>
<& '/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) {
<& '/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
<& '/widgets/profile/displayFormElement.mc',
objref => $media,
key => 'priority',
&>
<& '/widgets/profile/displayFormElement.mc',
objref => $media,
key => 'cover_date',
&>
<& '/widgets/profile/displayFormElement.mc',
objref => $media,
key => 'expire_date',
&>
<%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',
element => $element,
element_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->comp("/widgets/wrappers/sharky/table_top.mc",
caption => "Associations",
number => $num++);
%perl>
% my $rowColor = "even";
% if (ENABLE_CATEGORY_BROWSER) {
% $rowColor = $rowColor eq "odd" ? "even" : "odd";
<% $lang->maketext('Category') %>: |
<% $media->get_category->get_uri %> |
<& '/widgets/profile/button.mc',
disp => $lang->maketext("Edit"),
widget => $widget,
cb => 'category_cb',
button => 'pencil',
useTable => 0,
globalImage => 1 &> |
% } # if ENABLE_CATEGORY_BROWSER
% $rowColor = $rowColor eq "odd" ? "even" : "odd";
<% $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."));
%perl> |
<& '/widgets/profile/button.mc',
disp => $lang->maketext("Edit"),
widget => $widget,
cb => 'keywords_cb',
button => 'pencil',
useTable => 0,
globalImage => 1 &> |
% $rowColor = $rowColor eq "odd" ? "even" : "odd";
<% $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."));
%perl> |
% unless ($media->get_alias_id) {
<& '/widgets/profile/button.mc',
disp => $lang->maketext("Edit"),
widget => $widget,
cb => 'contributors_cb',
button => 'pencil',
useTable => 0,
globalImage => 1 &>
% }
|
<%perl>
$m->comp("/widgets/wrappers/sharky/table_bottom.mc");
$m->comp("/widgets/profile/buttonBar.mc",
widget => $widget,
desks => $desks,
cd => $cd,
obj => $media,
);
%perl>
%#-- Args Section --#
<%args>
$widget
%args>
%#-- Init Section --#
<%init>
my $media = get_state_data($widget, 'media');
my $element = $media->get_element();
set_state_data('container_prof', 'element', $element);
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 $infoIndent = FIELD_INDENT + 8;
my $num = 1;
# get output channel info
my $asset_type = $media->get_element_type;
my @aocs = $asset_type->get_output_channels;
my @ocs = $media->get_output_channels;
my $primocid = $media->get_primary_oc_id;
my $oc_select = '';
%init>