Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit ab2df74dc2e609178be0e25478b7aca8ca7f6cb2 1 parent 8f015fb
David E. Wheeler theory authored
5 comp/widgets/container_prof/edit_related_media.html
View
@@ -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.
2  comp/widgets/container_prof/edit_related_story.html
View
@@ -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,
24 comp/workflow/profile/media/container/edit_related_media.html
View
@@ -19,8 +19,6 @@
=cut
</%doc>
-
-%#-- Once Section --#
<%once>;
my $type = 'element';
my $disp = get_disp_name($type);
@@ -28,34 +26,20 @@
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 --#
-
-
23 comp/workflow/profile/story/container/edit_related_media.html
View
@@ -19,8 +19,6 @@
=cut
</%doc>
-
-%#-- Once Section --#
<%once>;
my $type = 'element';
my $disp = get_disp_name($type);
@@ -28,35 +26,22 @@
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 --#
-
-
9 lib/Bric/Changes.pod
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)
Please sign in to comment.
Something went wrong with that request. Please try again.