From ebca093fd7acb9b84d4b8ac22fd40e510607bc91 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 2 Oct 2008 22:48:55 +0000 Subject: [PATCH] Aded initial test modeladmin --- _config.php | 7 +++++++ code/control/TestModelAdmin.php | 16 ++++++++++++++++ code/model/Client.php | 15 +++++++++++++++ code/model/Contact.php | 14 ++++++++++++++ code/model/Developer.php | 15 +++++++++++++++ code/model/Project.php | 13 +++++++++++++ 6 files changed, 80 insertions(+) create mode 100644 code/control/TestModelAdmin.php create mode 100644 code/model/Client.php create mode 100644 code/model/Contact.php create mode 100644 code/model/Developer.php create mode 100644 code/model/Project.php diff --git a/_config.php b/_config.php index e69de29..cdd601c 100644 --- a/_config.php +++ b/_config.php @@ -0,0 +1,7 @@ + 'TestModelAdmin', +)); +LeftAndMain::add_menu_item('test', 'Test ModelAdmin', 'admin/test', 'TestModelAdmin'); diff --git a/code/control/TestModelAdmin.php b/code/control/TestModelAdmin.php new file mode 100644 index 0000000..1e4b067 --- /dev/null +++ b/code/control/TestModelAdmin.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/code/model/Client.php b/code/model/Client.php new file mode 100644 index 0000000..5088558 --- /dev/null +++ b/code/model/Client.php @@ -0,0 +1,15 @@ + "Varchar", + ); + static $many_many = array( + "Contacts" => "Contact", + ); + static $belongs_many_many = array( + "Projects" => "Project", + ); +} + +?> \ No newline at end of file diff --git a/code/model/Contact.php b/code/model/Contact.php new file mode 100644 index 0000000..a9a01d5 --- /dev/null +++ b/code/model/Contact.php @@ -0,0 +1,14 @@ + "Varchar", + "Surname" => "Varchar", + "Email" => "Varchar", + ); + static $belongs_many_many = array( + "Clients" => "Client", + ); +} + +?> \ No newline at end of file diff --git a/code/model/Developer.php b/code/model/Developer.php new file mode 100644 index 0000000..905242e --- /dev/null +++ b/code/model/Developer.php @@ -0,0 +1,15 @@ + "Varchar", + "Surname" => "Varchar", + "Email" => "Varchar", + "Username" => "Varchar", + ); + static $belongs_many_many = array( + "Projects" => "Project", + ); +} + +?> \ No newline at end of file diff --git a/code/model/Project.php b/code/model/Project.php new file mode 100644 index 0000000..f8a36fe --- /dev/null +++ b/code/model/Project.php @@ -0,0 +1,13 @@ + "Varchar", + ); + static $many_many = array( + "Clients" => "Client", + "Developers" => "Developer", + ); +} + +?> \ No newline at end of file