From 227ef973f923ec201a1ece197f6242b3248c66ae Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 25 Nov 2013 12:49:07 -0500 Subject: WSAT beta release with doc. --- framework/Wsat/pages/TWsatGenerateAR.page | 47 +++++++++++++++++++++++-------- framework/Wsat/pages/TWsatGenerateAR.php | 22 +++++++++------ framework/Wsat/pages/TWsatHome.page | 16 +++++++++-- framework/Wsat/pages/TWsatHome.php | 33 +++++++++++++--------- framework/Wsat/pages/TWsatLogin.page | 8 +++--- framework/Wsat/pages/TWsatLogin.php | 11 ++++++-- framework/Wsat/pages/TWsatScaffolding.php | 33 +++++++++++++--------- 7 files changed, 113 insertions(+), 57 deletions(-) (limited to 'framework/Wsat/pages') diff --git a/framework/Wsat/pages/TWsatGenerateAR.page b/framework/Wsat/pages/TWsatGenerateAR.page index acd456fd..b1cd98aa 100644 --- a/framework/Wsat/pages/TWsatGenerateAR.page +++ b/framework/Wsat/pages/TWsatGenerateAR.page @@ -1,33 +1,56 @@ -
+
Active Record Classes Generator
+
+
+ +
+
+
    +
  • If you want to generate all AR Classes, keep the "Table Name" field as appears by default.
  • +
  • "Output Folder" field refers to the directory that the new AR class file should be generated under... where Application refers to the protected folder of your project. You can let this default field value and PRADO will create the proper folders for you.
  • +
+
+
+ +
- - - + + + +
+ +
+ + + + +
+
+
- - + +
- +
- - - + + +
-
+
- + diff --git a/framework/Wsat/pages/TWsatGenerateAR.php b/framework/Wsat/pages/TWsatGenerateAR.php index 3d4291e2..d5934686 100644 --- a/framework/Wsat/pages/TWsatGenerateAR.php +++ b/framework/Wsat/pages/TWsatGenerateAR.php @@ -1,9 +1,13 @@ + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2013 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + * @since 3.3 + * @package Wsat.pages */ Prado::using("System.Wsat.TWsatARGenerator"); @@ -12,13 +16,15 @@ class TWsatGenerateAR extends TPage { public function generate($sender) { if ($this->IsValid) { $table_name = $this->table_name->Text; - $class_prefix = $this->class_prefix->Text; $output_folder_ns = $this->output_folder->Text; + $class_prefix = $this->class_prefix->Text; + $class_sufix = $this->class_sufix->Text; try { $ar_generator = new TWsatARGenerator(); $ar_generator->setOpFile($output_folder_ns); $ar_generator->setClasPrefix($class_prefix); + $ar_generator->setClassSufix($class_sufix); if ($this->build_rel->Checked) { $ar_generator->buildRelations(); @@ -28,20 +34,20 @@ class TWsatGenerateAR extends TPage { } else { $ar_generator->generateAll(); } - $this->success_panel->CssClass = "success_panel"; + $this->feedback_panel->CssClass = "green_panel"; $this->generation_msg->Text = "The code has been generated successfully."; } catch (Exception $ex) { - $this->success_panel->CssClass = "exception_panel"; + $this->feedback_panel->CssClass = "red_panel"; $this->generation_msg->Text = $ex->getMessage(); } - $this->success_panel->Visible = true; + $this->feedback_panel->Visible = true; } } public function preview($sender) { // $ar_generator = new TWsatARGenerator(); // $ar_generator->renderAllTablesInformation(); - throw new THttpException(500, "Not implemented yet."); + throw new THttpException(500, "Not implemented yet."); } } diff --git a/framework/Wsat/pages/TWsatHome.page b/framework/Wsat/pages/TWsatHome.page index 16aa3669..e8796ccd 100644 --- a/framework/Wsat/pages/TWsatHome.page +++ b/framework/Wsat/pages/TWsatHome.page @@ -1,5 +1,17 @@ - - + +
Application Dir: <%= Prado::getPathOfNamespace('Application') %>
+ +
+ + + + + +
+ + + Enables you to generate all Active Record Classes with relations included. +
diff --git a/framework/Wsat/pages/TWsatHome.php b/framework/Wsat/pages/TWsatHome.php index 3c1358e1..035dd7c6 100644 --- a/framework/Wsat/pages/TWsatHome.php +++ b/framework/Wsat/pages/TWsatHome.php @@ -1,15 +1,20 @@ - + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2013 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + * @since 3.3 + * @package Wsat.pages + */ + +Prado::using("System.Wsat.TWsatARGenerator"); + +class TWsatHome extends TPage { + + +} + ?> \ No newline at end of file diff --git a/framework/Wsat/pages/TWsatLogin.page b/framework/Wsat/pages/TWsatLogin.page index d0a94f2a..79578f59 100644 --- a/framework/Wsat/pages/TWsatLogin.page +++ b/framework/Wsat/pages/TWsatLogin.page @@ -29,10 +29,10 @@