Permalink
Browse files

A few fixes for searching for related stories media, esp. stories.

  • Loading branch information...
1 parent 8f015fb commit ab2df74dc2e609178be0e25478b7aca8ca7f6cb2 @theory theory committed Jun 22, 2006
@@ -1,5 +1,6 @@
<& '/widgets/search/search.mc',
object => 'media',
+ state_key => 'rel_media',
type => 'media',
field => 'title',
use_form_tag => 0 &>
@@ -8,10 +9,11 @@
<& '/widgets/wrappers/sharky/table_top.mc', caption => 'Choose Related Media' &>
<& /widgets/listManager/listManager.mc,
object => 'media',
+ state_key => 'rel_media',
sortBy => 'name',
select => undef,
profile => $related_profile,
- constrain => { uri => '/%' }, # Must have a file associated.
+ constrain => ($args->{'search|uri'} ? {} : { uri => '/%' }), # Must have a file associated.
featured => $relate_id ? [$relate_id] : undef,
exclude => $excl_sub,
fields => [(USE_THUMBNAILS ? 'thumb' : ()), qw(id name uri cover_date)],
@@ -33,6 +35,7 @@
<%args>
$widget
+$args
</%args>
<%init>;
# The element object.
@@ -1,5 +1,6 @@
<& '/widgets/search/search.mc',
object => 'story',
+ state_key => 'rel_story',
type => 'story',
field => 'title',
use_form_tag => 0 &>
@@ -8,6 +9,7 @@
<& '/widgets/wrappers/sharky/table_top.mc', caption => 'Choose a Related Story' &>
<& /widgets/listManager/listManager.mc,
object => 'story',
+ state_key => 'rel_story',
sortBy => 'name',
select => undef,
profile => $related_profile,
@@ -19,43 +19,27 @@
=cut
</%doc>
-
-%#-- Once Section --#
<%once>;
my $type = 'element';
my $disp = get_disp_name($type);
my $sdisp = get_disp_name('story');
my $mdisp = get_disp_name('media');
my $context = "Workflow | Profile | $mdisp | $disp |";
</%once>
-
-%#-- Args Section --#
<%args>
</%args>
-
-%#-- Init Section --#
<%init>;
</%init>
-
-%#-- Begin HTML --#
-
-<& /widgets/wrappers/sharky/header.mc,
+<& /widgets/wrappers/sharky/header.mc,
title => "Select Related $mdisp",
context => $context . get_state_data('container_prof', 'crumb') .
" | Related $mdisp"
&>
-
<form action="<% $r->uri %>" method="post">
-
-<& /widgets/container_prof/container_prof.mc,
+<& /widgets/container_prof/container_prof.mc,
element_type => 'media"',
- action => 'edit_related_media'
+ action => 'edit_related_media',
+ args => \%ARGS,
&>
-
</form>
-
<& /widgets/wrappers/sharky/footer.mc &>
-
-%#-- End HTML --#
-
-
@@ -19,44 +19,29 @@
=cut
</%doc>
-
-%#-- Once Section --#
<%once>;
my $type = 'element';
my $disp = get_disp_name($type);
my $sdisp = get_disp_name('story');
my $mdisp = get_disp_name('media');
my $context = "Workflow | Profile | $sdisp | $disp |";
</%once>
-
-%#-- Args Section --#
<%args>
</%args>
-
-%#-- Init Section --#
<%init>;
my $crumb = get_state_data('container_prof', 'crumb') || '';
$crumb .= ' |' if $crumb;
</%init>
-
-%#-- Begin HTML --#
-
-<& /widgets/wrappers/sharky/header.mc,
+<& /widgets/wrappers/sharky/header.mc,
title => "Select Related $mdisp",
context => "$context $crumb Related $mdisp"
&>
-
<form action="<% $r->uri %>" method="post">
-
-<& /widgets/container_prof/container_prof.mc,
+<& /widgets/container_prof/container_prof.mc,
element_type => 'story',
- action => 'edit_related_media'
+ action => 'edit_related_media',
+ args => \%ARGS,
&>
</form>
-
<& /widgets/wrappers/sharky/footer.mc &>
-
-%#-- End HTML --#
-
-
View
@@ -335,6 +335,15 @@ type in IE 6. [David]
The list of templates deployed is now reported properly after a successful
deploy. [Paul Orrock]
+=item *
+
+Searching by URI for related media works again. [David]
+
+=item *
+
+The results when searching for media or stories to relate are no longer tied
+to the search for stories and media in general. [David]
+
=back
=head1 VERSION 1.10.1 (2006-03-20)

0 comments on commit ab2df74

Please sign in to comment.