& '/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 => $story->has_notes ? 'note_fill' : "note",
alt => 'Notes',
useGlobalImage => 1,
value => 'edit'
);
$m->comp("/widgets/wrappers/table_top.mc",
caption => "Information",
number => $num++,
id => 'storyinfo',
rightText => $rightText
);
# Used by Bric::App::Callback::ContainerProf->_drift_correction.
$m->comp(
'/widgets/profile/hidden.mc',
name => 'doc_uuid',
value => $story->get_uuid
);
%perl>
- <% $lang->maketext('UUID') %>:
- <% $story->get_uuid %>
- <% $lang->maketext('Story Type') %>:
- <% $story->get_element_name || ' ' %>
- <% $lang->maketext('Current Version') %>:
- <% $story->get_current_version %>
- <% $lang->maketext('Published Version') %>:
- <% $story->get_published_version || ' ' %>
- <% $lang->maketext('First Published') %>:
- <% $story->get_first_publish_date || ' ' %>
- <% $lang->maketext('Last Published') %>:
- <% $story->get_publish_date || ' ' %>
- <% $lang->maketext('URI') %>:
% if (@ocs == 1) {
- <% $m->comp(
'/widgets/profile/preview_link.mc',
doc => $story,
)%>
% } else {
% my $oc_opts = [
% map { [ $_->get_id => $_->get_name ] }
% $story->get_output_channels
% ];
- <% $story->get_primary_uri %>
- <% $lang->maketext('Preview in') %>:
- <&
'/widgets/profile/select.mc',
options => $oc_opts,
name => 'ocSelect',
useTable => 0,
value => $story->get_primary_oc_id,
&>
<% $m->comp('/widgets/profile/preview_link.mc',
type => 'story',
value => $story->get_primary_uri,
doc => $story,
oc_js => 'window.document.theForm.ocSelect.options[window.document.theForm.ocSelect.selectedIndex].value',
style => 'blackUnderlinedLink',
) %>
% }
% if (@$sites > 1) {
- <% $lang->maketext('Site') %>:
- <% Bric::Biz::Site->lookup({id => $story->get_site_id})->
get_name() %>
% }
<& '/widgets/select_object/select_object.mc',
object => 'source',
name => "$widget|source__id",
field => 'source_name',
selected => $story->get_source__id,
indent => 0,
useTable => 1,
disp => "Source",
exclude => sub { !chk_authz($_[0], READ, 1) },
&>
<& '/widgets/profile/displayFormElement.mc',
objref => $story,
key => 'priority',
&>
<& '/widgets/profile/displayFormElement.mc',
objref => $story,
key => 'title',
&>
<& '/widgets/profile/displayFormElement.mc',
objref => $story,
key => 'description',
&>
<& '/widgets/profile/displayFormElement.mc',
vals => $slug_vals,
id => 'slug',
key => 'slug',
&>
<%perl>;
TZ: {
# XXX Yes, ugly hack, but it's the best way to prevent the
# user's preferences from affecting the time zone.
local $HTML::Mason::Commands::session{_bric_user}->{object} = undef;
$m->comp(
'/widgets/profile/displayFormElement.mc',
objref => $story,
key => 'cover_date',
);
}
%perl>
<& '/widgets/profile/displayFormElement.mc',
objref => $story,
key => 'expire_date',
&>
<& '/widgets/wrappers/table_bottom.mc' &>
<%perl>;
$num = $m->comp('/widgets/container_prof/container_prof.mc',
element => $element,
element_type => 'story',
action => $story->get_alias_id ? 'view' : 'edit',
title => 'Content',
num => $num,
start_count => 4
);
%perl>
% unless (ENABLE_CATEGORY_BROWSER) {
% $m->comp("/widgets/wrappers/table_top.mc",
% caption => "Categories",
% number => $num++);
<& 'list_categories.html',
story => $story,
categories => [ $story->get_categories ],
primary_category_id => $story->get_primary_category->get_id
&>
<& "/widgets/wrappers/table_bottom.mc" &>
% } # unless ENABLE_CATEGORY_BROWSER
% if (ENABLE_OC_ASSET_ASSOCIATION) {
<& "/widgets/wrappers/table_top.mc",
caption => "Output Channels",
number => $num++
&>
<& 'list_output_channels.html',
story => $story,
output_channels => [ $story->get_output_channels ],
primary_oc_id => $story->get_primary_oc_id
&>
<& "/widgets/wrappers/table_bottom.mc" &>
% }
<& "/widgets/wrappers/table_top.mc",
caption => "Contributors",
number => $num++
&>
<& '/widgets/profile/contributors/_list.html',
asset => $story,
asset_type => 'story',
widget => $widget,
contribs => \@{ $story->get_contributors() }
&>
<& '/widgets/profile/button.mc',
disp => $lang->maketext("Add"),
name => "add_contributor",
button => "add_lgreen",
useTable => 0,
js => qq{onclick="openWindow('/workflow/profile/story/contributors.html', 'ContributorBricolagePopup', { closeOnUnload: true }); return false"}
&>
<& "/widgets/wrappers/table_bottom.mc" &>
<& "/widgets/wrappers/table_top.mc",
caption => "Keywords",
number => $num++
&>
% my $rowColor = 1;
% if (ENABLE_CATEGORY_BROWSER) {
">
<% $lang->maketext('Categories') %>: |
% my @cats = map { $_->get_uri } ( $story->get_primary_category, $story->get_secondary_categories );
% $m->out(scalar(@cats) ? join(' ', @cats) : $lang->maketext("No categories defined."));
|
<& '/widgets/profile/button.mc',
disp => $lang->maketext("Edit"),
widget => $widget,
cb => 'categories_cb',
button => 'pencil',
useTable => 0,
globalImage => 1 &> |
% }
">
<% $lang->maketext('Keywords') %>: |
<& '/widgets/profile/fast_add.mc',
type => "keyword",
objects => [ $story->get_keywords ]
&>
|
<%perl>
$m->comp("/widgets/wrappers/table_bottom.mc");
$m->comp("/widgets/profile/buttonBar.mc",
widget => $widget,
desks => $desks,
cd => $cd,
obj => $story,
);
%perl>
<%args>
$widget
%args>
<%init>
my $story = get_state_data($widget, 'story');
my $element = $story->get_element();
my $id = $story->get_id;
my $wf_id = get_state_data($widget, 'work_id');
$wf_id = $story->get_workflow_id() unless $wf_id;
my $wf = Bric::Biz::Workflow->lookup( { id => $wf_id });
my $desks = $wf->allowed_desks();
my $cd = $story->get_current_desk();
$cd = $wf->get_start_desk() unless $cd;
my $num = 1;
my $sites = $c->get('__SITES__') || Bric::Biz::Site->list({ active => 1 });
# get output channel info
my $asset_type = $story->get_element_type;
my @aocs = $asset_type->get_output_channels;
my @ocs = $story->get_output_channels;
# Set slug required if it is
my $slug_req = 0;
unless (ALLOW_SLUGLESS_NONFIXED || $story->is_fixed) {
# This isn't a Cover (it's non-fixed) and ALLOW_SLUGLESS_NONFIXED
# is false, so we make slug required
$slug_req = 1;
}
my $slug_vals = {
%{ Bric::Biz::Asset::Business::Story->my_meths->{slug} },
value => $story->get_slug,
req => $slug_req,
};
%init>