diff --git a/.gitignore b/.gitignore index c91b435..b8346ba 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,5 @@ .Spotlight-V100 .Trashes ehthumbs.db -Thumbs.db \ No newline at end of file +Thumbs.db +code/.DS_Store diff --git a/_config/config.yml b/_config/config.yml index 8617f11..f525f43 100644 --- a/_config/config.yml +++ b/_config/config.yml @@ -1,7 +1,4 @@ --- -ListingsPage: - extensions: - - ExcludeChildren SiteConfig: extensions: - RealEstateSiteConfig @@ -11,20 +8,41 @@ File: - RMSFileExtension Listing: extensions: - - 'Gallery_PageExtension' - - 'CatalogPageExtension' + - Gallery_PageExtension + - CatalogPageExtension parentClass: - - 'ListingsPage' + - ListingsPage + sort_column: false + default_sort: 'Created ASC' + +CommunitiesHolder: + extensions: + - Lumberjack + +MunicipalityPage: + extensions: + - 'Lumberjack' + show_in_sitetree: false + +NeighbourhoodPage: + show_in_sitetree: false ListingUtils: InlcudeMLS: 0 - LeftAndMain: menu_groups: + ListingAdmin: [] Content: - HomePageAdmin - - AboutUsAdmin - - ContactUsAdmin +# - AboutUsAdmin +# - ContactUsAdmin + - ListingsPageAdmin + - CommunitiesAdmin - CMSPagesController - - AssetAdmin \ No newline at end of file + BlogAdmin: [] + NeighbourhoodAdmin: [] + Other: + - ReportAdmin + - AssetAdmin + - TeamAdmin diff --git a/code/ModelAdmin/NeighbourhoodAdmin.php b/code/ModelAdmin/NeighbourhoodAdmin.php index 3af2f81..7b89615 100644 --- a/code/ModelAdmin/NeighbourhoodAdmin.php +++ b/code/ModelAdmin/NeighbourhoodAdmin.php @@ -2,10 +2,10 @@ /** * * @package Realestate Listing System - Neighbourhood Admin - * @requires DataObjectAsPage, Mappable + * @requires Mappable * @author Richard Rudy twitter:@thezenmonkey web: http://designplusawesome.com */ -class NeighbourhoodAdmin extends DataObjectAsPageAdmin { +class NeighbourhoodAdmin extends ModelAdmin { public static $managed_models = array( 'School' diff --git a/code/ModelAdmin/SinglePageAdmins.php b/code/ModelAdmin/SinglePageAdmins.php index 466c920..32ccdeb 100644 --- a/code/ModelAdmin/SinglePageAdmins.php +++ b/code/ModelAdmin/SinglePageAdmins.php @@ -7,6 +7,7 @@ class HomePageAdmin extends SinglePageAdmin { } +/* class ContactUsAdmin extends SinglePageAdmin { private static $menu_title = "Contact"; private static $tree_class = 'Page'; @@ -20,11 +21,25 @@ class AboutUsAdmin extends SinglePageAdmin { private static $url_segment = "about-us"; } +*/ -class ListingsAdmin extends SinglePageAdmin { - private static $menu_title = "Listings"; +class ListingsPageAdmin extends SinglePageAdmin { + private static $menu_title = "Listings Page"; private static $tree_class = 'ListingsPage'; private static $url_segment = "listings-page"; static $menu_icon = 'realestate/images/home.png'; +} + +class CommunitiesAdmin extends SinglePageAdmin { + private static $menu_title = "Communities"; + private static $tree_class = 'CommunitiesHolder'; + private static $url_segment = "communities-page"; + //static $menu_icon = 'realestate/images/home.png'; +} +class BlogAdmin extends SinglePageAdmin { + private static $menu_title = "Blog"; + private static $tree_class = 'Blog'; + private static $url_segment = "blog-admin"; + //static $menu_icon = 'realestate/images/home.png'; } \ No newline at end of file diff --git a/code/Pages/CommunitiesHolder.php b/code/Pages/CommunitiesHolder.php new file mode 100644 index 0000000..35e2d26 --- /dev/null +++ b/code/Pages/CommunitiesHolder.php @@ -0,0 +1,114 @@ +setFrom('Listing'); + $sqlQuery->setWhere('CityID = 0'); + $sqlQuery->selectField('Town'); + $sqlQuery->setDistinct(true); + $result = $sqlQuery->execute(); + + $townList = '