[interchange-cvs] interchange - heins modified 2 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Sun May 8 13:39:00 EDT 2005
User: heins
Date: 2005-05-08 17:39:00 GMT
Modified: dist/lib/UI ContentEditor.pm
Modified: dist/lib/UI/pages/include page_editor_standard
Log:
* Add metadata links to page_editor_standard so that the "sets" can be
easily added/manipulated.
Revision Changes Path
2.16 +18 -7 interchange/dist/lib/UI/ContentEditor.pm
rev 2.16, prev_rev 2.15
Index: ContentEditor.pm
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/ContentEditor.pm,v
retrieving revision 2.15
retrieving revision 2.16
diff -u -r2.15 -r2.16
--- ContentEditor.pm 8 May 2005 03:50:05 -0000 2.15
+++ ContentEditor.pm 8 May 2005 17:38:59 -0000 2.16
@@ -2,7 +2,7 @@
#
# UI::ContentEditor - Interchange page/component edit
#
-# $Id: ContentEditor.pm,v 2.15 2005/05/08 03:50:05 mheins Exp $
+# $Id: ContentEditor.pm,v 2.16 2005/05/08 17:38:59 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -24,7 +24,7 @@
package UI::ContentEditor;
-$VERSION = substr(q$Revision: 2.15 $, 10);
+$VERSION = substr(q$Revision: 2.16 $, 10);
$DEBUG = 0;
use POSIX qw/strftime/;
@@ -1484,8 +1484,12 @@
if( my $extra_opt = $Extra_options{$opt->{editor_style}} ) {
my $name = $extra_opt->{name} || 'page_editor';
- my $ef = $Tag->meta_record('ui_component', $name);
- $ef ||= $extra_opt->{component_fields};
+ my $dbopt = $Tag->meta_record('ui_component', $name);
+ my $ef = $dbopt->{component_fields} || $extra_opt->{component_fields};
+ unless (ref $ef eq 'ARRAY') {
+ my @f = grep /\w/, split /[\s,\0]+/, $ef;
+ $ef = \@f;
+ }
if($ef) {
my $eo = $extra_opt->{component_fields_meta} || {};
my %seen;
@@ -1505,6 +1509,8 @@
href => 'admin/meta_editor',
form => qq{
item_id=${name}::ui_component::$_
+ ui_return_to=$Global::Variable->{MV_PAGE}
+ ui_return_to=ui_name=$cref->{ui_name}
},
});
my $anchor = errmsg('meta');
@@ -1594,8 +1600,12 @@
if( my $extra_opt = $Extra_options{$opt->{editor_style}} ) {
my $name = $extra_opt->{name} || 'page_editor';
- my $ef = $Tag->meta_record('ui_control', $name);
- $ef ||= $extra_opt->{control_fields};
+ my $dbopt = $Tag->meta_record('ui_control', $name);
+ my $ef = $dbopt->{control_fields} || $extra_opt->{control_fields};
+ unless (ref $ef eq 'ARRAY') {
+ my @f = grep /\w/, split /[\s,\0]+/, $ef;
+ $ef = \@f;
+ }
if($ef) {
my $eo = $extra_opt->{control_fields_meta} || {};
my %seen;
@@ -1615,7 +1625,8 @@
href => 'admin/meta_editor',
form => qq{
item_id=${name}::ui_control::$_
-
+ ui_return_to=$Global::Variable->{MV_PAGE}
+ ui_return_to=ui_name=$pref->{ui_name}
},
});
my $anchor = errmsg('meta');
1.2 +11 -0 interchange/dist/lib/UI/pages/include/page_editor_standard
rev 1.2, prev_rev 1.1
Index: page_editor_standard
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/include/page_editor_standard,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- page_editor_standard 8 May 2005 03:50:06 -0000 1.1
+++ page_editor_standard 8 May 2005 17:39:00 -0000 1.2
@@ -283,6 +283,17 @@
[/tabbed-panel]
[tabbed-panel [L]Page Controls[/L]]
+ <a href="[area
+ href="admin/flex_editor"
+ form="
+ mv_data_table=mv_metadata
+ item_id=standard_page_editor::ui_control
+ ui_data_fields=code extended.control_fields
+ ui_te_widget:extended.control_fields=textarea_10_40
+ ui_te_label:extended.control_fields=Constant fields for inclusion
+ ui_return_to=@@MV_PAGE@@
+ ui_return_to=ui_name=[cgi ui_name]
+ "]">Add fields</a>
[page-param _editor_table]
[/tabbed-panel]
More information about the interchange-cvs
mailing list