[Jifty-commit] r7142 - in jifty/trunk/lib/Jifty/Plugin: .

Jifty commits jifty-commit at lists.jifty.org
Mon Jun 1 18:21:59 EDT 2009


Author: sartak
Date: Mon Jun  1 18:21:59 2009
New Revision: 7142

Modified:
   jifty/trunk/lib/Jifty/Plugin/SetupWizard.pm
   jifty/trunk/lib/Jifty/Plugin/SetupWizard/View.pm

Log:
Add finalize template which always comes at the end

Modified: jifty/trunk/lib/Jifty/Plugin/SetupWizard.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/SetupWizard.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/SetupWizard.pm	Mon Jun  1 18:21:59 2009
@@ -30,6 +30,10 @@
                 template => 'web',
                 header   => 'Web',
             },
+            {
+                template => 'finalize',
+                header   => 'Finalize',
+            },
         ]);
     }
 }
@@ -38,7 +42,13 @@
     my $self = shift;
     my %step = @_;
 
-    push @{ $self->steps }, \%step;
+    # Keep finalize at the end
+    if ($self->steps->[-1]->{template} eq 'finalize') {
+        splice @{ $self->steps }, -1, 0, \%step;
+    }
+    else {
+        push @{ $self->steps }, \%step;
+    }
 }
 
 1;

Modified: jifty/trunk/lib/Jifty/Plugin/SetupWizard/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/SetupWizard/View.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/SetupWizard/View.pm	Mon Jun  1 18:21:59 2009
@@ -81,5 +81,9 @@
     p { _("You may change web server settings.") };
 };
 
+template '/__jifty/admin/setupwizard/finalize' => sub {
+    p { _("You may finalize your configuration.") };
+};
+
 1;
 


More information about the Jifty-commit mailing list