
theory at bricolage
Mar 3, 2009, 10:57 PM
Post #1 of 1
(434 views)
Permalink
|
|
[8442] Restore the subelement hint, so that editors can get some idea
|
|
Revision: 8442 Author: theory Date: 2009-03-03 22:57:48 -0800 (Tue, 03 Mar 2009) ViewCVS: http://viewsvn.bricolage.cc/?rev=8442&view=rev Log Message: ----------- Restore the subelement hint, so that editors can get some idea WTF each subelement is when it is not currently revealed. Modified Paths: -------------- bricolage/trunk/comp/widgets/container_prof/container.mc bricolage/trunk/lib/Bric/Biz/Asset/Business/Media.pm bricolage/trunk/lib/Bric/Changes.pod Modified: bricolage/trunk/comp/widgets/container_prof/container.mc =================================================================== --- bricolage/trunk/comp/widgets/container_prof/container.mc 2009-03-04 04:09:35 UTC (rev 8441) +++ bricolage/trunk/comp/widgets/container_prof/container.mc 2009-03-04 06:57:48 UTC (rev 8442) @@ -6,6 +6,9 @@ <span title="<% $lang->maketext('Drag to reorder') %>"><% $element->get_name %></span> </legend> % } +% if ($hint_val) { +<p class="hint"><strong><% $hint_name %>:</strong> <% $hint_val %></p> +% } % if ($type->is_related_story) { <div id="element_<% $id %>_rel_story"> <& '_related.html', @@ -120,6 +123,15 @@ my $top_level = (get_state_data($widget, 'element') == $element); my $displayed = $element->get_displayed; +# Find something to indicate what the element contains. +my ($hint_name, $hint_val); +foreach my $field ($element->get_fields) { + $hint_val = $field->get_value or next; + $hint_name = $field->get_name; + $hint_val = substr($hint_val, 0, 64); + last; +} + # Get the list of fields and subelements that can be added. my $elem_opts = [ map { $_->[1] } Modified: bricolage/trunk/lib/Bric/Biz/Asset/Business/Media.pm =================================================================== --- bricolage/trunk/lib/Bric/Biz/Asset/Business/Media.pm 2009-03-04 04:09:35 UTC (rev 8441) +++ bricolage/trunk/lib/Bric/Biz/Asset/Business/Media.pm 2009-03-04 06:57:48 UTC (rev 8442) @@ -1412,9 +1412,10 @@ "associated with media '" . $self->get_name . "'") unless $self->get_output_channels($oc->get_id); - return Bric::Util::Trans::FS->cat_uri - ($self->_construct_uri($self->get_category_object, $oc), - $oc->get_filename($self)); + return Bric::Util::Trans::FS->cat_uri( + $self->_construct_uri($self->get_category_object, $oc), + escape_uri($oc->get_filename($self)) + ); } ############################################################################## Modified: bricolage/trunk/lib/Bric/Changes.pod =================================================================== --- bricolage/trunk/lib/Bric/Changes.pod 2009-03-04 04:09:35 UTC (rev 8441) +++ bricolage/trunk/lib/Bric/Changes.pod 2009-03-04 06:57:48 UTC (rev 8442) @@ -65,6 +65,12 @@ Upgraded Prototype and Scriptaculous libraries to versions 1.6.0.3 and 1.8.2 respectively. [Rolf, Mercier, Herring] +=item * + +Display a hint about subelements in the story view. This is especially +important when they have no related stories or media and are not revealed, so +that you can tell what each is! [David] + =back =head2 Bug Fixes
|