[vhffs-dev] [1703] Make some constants available to templates

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1703
Author:   beuss
Date:     2011-05-12 22:10:22 +0200 (Thu, 12 May 2011)
Log Message:
-----------
Make some constants available to templates

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Main.pm

Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2011-05-12 20:10:14 UTC (rev 1702)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2011-05-12 20:10:22 UTC (rev 1703)
@@ -715,6 +715,22 @@
 	# TODO Should be in parent class when Template::Toolkit switch is over
 	my $create_vars = {
 		INCLUDE_PATH => $self->{templatedir}.'/panel/',
+        CONSTANTS => {
+            object_statuses => {
+                WAITING_FOR_VALIDATION      =>Vhffs::Constants::WAITING_FOR_VALIDATION,
+                VALIDATION_REFUSED          => Vhffs::Constants::VALIDATION_REFUSED,
+                WAITING_FOR_CREATION        => Vhffs::Constants::WAITING_FOR_CREATION,
+                CREATING_ERROR              => Vhffs::Constants::CREATING_ERROR,
+                ACTIVATED                   => Vhffs::Constants::ACTIVATED,
+                CREATED                     => Vhffs::Constants::CREATED,
+                SUSPEND_PENDING             => Vhffs::Constants::SUSPEND_PENDING,
+                SUSPENDED                   => Vhffs::Constants::SUSPENDED,
+                WAITING_FOR_MODIFICATION    => Vhffs::Constants::WAITING_FOR_MODIFICATION,
+                MODIFICATION_ERROR          => Vhffs::Constants::MODIFICATION_ERROR,
+                MODIFICATION_APPLIED        => Vhffs::Constants::MODIFICATION_APPLIED,
+                TO_DELETE                   => Vhffs::Constants::TO_DELETE
+            }
+        },
 		FILTERS => {
 			i18n => \&gettext,
 			mail => sub {


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/