[Bps-public-commit] rt-extension-formtools branch, selfservice-header, created. 0.07_07-14-gb6d4ce7

Kevin Falcone falcone at bestpractical.com
Fri Jan 27 15:08:37 EST 2012


The branch, selfservice-header has been created
        at  b6d4ce7a8038970a658ecf0e0c59f3cded4ba4fd (commit)

- Log -----------------------------------------------------------------
commit 92fd50aae958c8d970e81edf41cd9b385eeb2a70
Author: Matt Zagrabelny <mzagrabe at d.umn.edu>
Date:   Thu Nov 10 11:39:27 2011 -0600

    add option for using SelfService header
    
    SelfService header includes some tabs and seems to circumvent the
    PageLayout, so don't display PageLayout if using SelfService.

diff --git a/html/FormTools/Form b/html/FormTools/Form
index 66ddeca..74fbea5 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -7,11 +7,15 @@ $ShowBar => 1
 $validation => 0
 $forbid_persisting => {}
 $form_id => undef
+$self_service => 0
 </%args>
 <%init>
 use RT::Extension::FormTools;
 my $content = $m->content;
 
+my $header_component = '/Elements/Header';
+$header_component = '/SelfService'.$header_component if ($self_service);
+
 my %cfs = map { $_ => 1} @{ $m->notes('cfs_on_page') || [] };
 my %core_fields = map { $_ => 1} @{ $m->notes('core_fields_on_page') || [] };
 
@@ -77,8 +81,8 @@ $next_for_validation ||= $m->caller(1)->path;
 
 </%init>
 % if ($include_header) {
-<& /Elements/Header, Title => $m->notes('page_title'), ShowBar => $ShowBar &>
-% if ($include_page_layout) {
+<& $header_component, Title => $m->notes('page_title'), ShowBar => $ShowBar &>
+% if (! $self_service && $include_page_layout) {
 <& /Elements/PageLayout, title => $m->notes('page_title') &>
 % }
 % }

commit b6d4ce7a8038970a658ecf0e0c59f3cded4ba4fd
Author: Kevin Falcone <kevin at jibsheet.com>
Date:   Fri Jan 27 15:05:02 2012 -0500

    Make the result of the option clearer

diff --git a/html/FormTools/Form b/html/FormTools/Form
index 74fbea5..6a761e7 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -13,8 +13,7 @@ $self_service => 0
 use RT::Extension::FormTools;
 my $content = $m->content;
 
-my $header_component = '/Elements/Header';
-$header_component = '/SelfService'.$header_component if ($self_service);
+my $header_component = $self_service ? '/SelfService/Elements/Header/' : '/Elements/Header';
 
 my %cfs = map { $_ => 1} @{ $m->notes('cfs_on_page') || [] };
 my %core_fields = map { $_ => 1} @{ $m->notes('core_fields_on_page') || [] };

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list