Add toolbox content
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 10 Jun 2014 15:33:32 +0000 (11:33 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 10 Jun 2014 15:33:32 +0000 (11:33 -0400)
Add toolbox content to template

Toolkit/Photos/templates/photoGalleryWrapper.html
Toolkit/Template/Page/BodyFactory.php
templates/template.html

index e48bb57..540556f 100644 (file)
@@ -1,198 +1,3 @@
-<style>
-#media-photo-gallery {
-    font-size:12px;
-}
-#gallery {
-    clear:both;
-}
-.gallery {
-    text-align: center;
-    list-style: none outside none;
-    padding: 10px 0 0 0;
-}
-.gallery:after {
-    clear: both;
-    content: ".";
-    display: block;
-    height: 0;
-    visibility: hidden;
-}
-.gallery li {
-    background: none repeat scroll 0 0 #F5F3E5;
-    float: left;
-    margin: 0 2% 26px 0;
-    overflow: hidden;
-    position: relative;
-    width: 23%
-}
-/*.gallery li:nth-child(4n+1) {
-    clear: both;
-    margin: 0 16px 26px 0;
-}
-.gallery li:nth-child(4n+2) {
-    margin: 0 16px 26px 0;
-}
-.gallery li:nth-child(4n+3) {
-    margin: 0 16px 26px 0;
-}
-.gallery li:nth-child(4n+4) {
-    margin: 0 0 26px 0;
-}*/
-.gallery li img {
-    width: 100%;
-    border: 1px solid #2797AB;
-    display: block;
-    height: auto;/*width: 143px;*/
-    -webkit-box-sizing: border-box;
-    -moz-box-sizing: border-box;
-    box-sizing: border-box;
-}
-.gallery li:hover img {
-    border: 1px solid #B8C728;
-}
-.gallery .ui-content {
-    overflow: hidden;
-}
-/*#inside #main {
-    width: 720px;
-}*/
-#staticBanners {
-    /*display:none;*/
-}
-.media-gallery-download {
-    font-size: 10px;
-    min-height: 22px;
-}
-#media-photo-gallery div {
-    clear:none;
-    font-size: 1em;
-    height: auto;
-    margin: 0;
-    padding: 0;
-}
-#media-photo-gallery div p {
-    display: block;
-    color: black;
-    padding: 5px;
-    text-shadow: none;
-    font-weight: normal;
-}
-#media-photo-gallery div a {
-}
-#filter_wrapper {
-    overflow: hidden;
-}
-#cat_filter_wrapper {
-    float: left;
-    height: 56px;
-}
-#photoCategoryLabel {
-    float: left;
-}
-#photoCategoryId {
-    float: left;
-    clear: left;
-    width: 180px;
-    height: 24px;
-    border: 1px solid #ABADB3;
-    box-sizing: border-box;
-    padding:.2em;/.3em;
-}
-#photoCategoryId option {
-    padding: 3px;
-}
-#media-login #username {
-    float: left;
-    width: 100px;
-    height: 10px;
-    padding: 5px;
-    margin: 0 5px 0 0;
-    border: 1px solid #ABADB3;
-}
-#media-login #password {
-    float: left;
-    width: 100px;
-    height: 10px;
-    padding: 5px;
-    margin: 0 5px 0 0;
-    border: 1px solid #ABADB3;
-}
-#media-login #submit {
-    display: block;
-    float: left;
-    width: 24px;
-    height: 22px;
-    cursor: pointer;
-    background: url(<?php echo $t->base_url;?>assets/play.gif) 50% 50% no-repeat;
-    border: 1px solid #ABADB3;
-    -bracket-:hack(;
-        height: 22px;
-    );
-}
-.photoHead {
-    display: block;
-    text-align: center;
-    min-height: 38px;
-    margin: 0 !important;
-    padding: 5px;
-    background: none;
-}
-.captionWrapper {
-    display: block;
-    width: 100%;
-    overflow: hidden;
-}
-.captionTitleWrapper {
-    display: block;
-    width: 50%;
-    float: left;
-    font-size: 18px;
-    font-size: 1.8rem;
-    font-weight: bold;
-    color: #FFF;
-    text-align: left;
-    padding: 10px 20px;
-    margin: 0;
-}
-.captionDescWrapper {
-    display: block;
-    width: 50%;
-    float: left;
-    clear: left;
-    font-size: 14px;
-    font-size: 1.4rem;
-    color: #FFF;
-    text-align: left;
-    padding: 0 20px 10px 20px;
-    margin: 0;
-}
-.download_wrapper {
-    display: block;
-    position: absolute;
-    z-index: 99;
-    top: 10px;
-    right: 20px;
-    width: 30%;
-    font-size: 14px;
-    font-size: 1.4rem;
-    color: #FFF;
-    text-align: left;
-    padding: 6px 0 10px 20px;
-    margin: 0;
-    text-align: right;
-}
-.download_wrapper a {
-    color: #CCC;
-}
-.download_wrapper a:hover {
-    color: #FFF;
-}
-.ps-caption-content {
-    width: 100%;
-    overflow: hidden;
-    position: relative;
-}
-</style>
 <flexy:toJavascript flexy:prefix="" base_url="base_url" ></flexy:toJavascript>
 <flexy:toJavascript flexy:prefix="" pageId="pageId" ></flexy:toJavascript>
 <div id="media-photo-gallery">
             <p>The Traverse City Tourism Marketing Team</p>
         </div>
         <h2 flexy:if="photoCategoryName">{photoCategoryName}</h2>
-        <ul id="Gallery" class="gallery">
+        <ul id="Gallery" class="small-block-grid-1 medium-block-grid-3">
             {if:photos}
             <flexy:include src="photos.html">
             {end:}
         });
     });
 </script>
-{end:}
\ No newline at end of file
+{end:}
index d5f7000..cf01ecf 100644 (file)
@@ -28,7 +28,7 @@
  */
 class Toolkit_Template_Page_BodyFactory
 {
-       //      {{{     properties
+    //  {{{ properties
 
     /**
      * description of $_breadCrumbsFactory
@@ -36,7 +36,7 @@ class Toolkit_Template_Page_BodyFactory
      * @var string
      * @access private
      */
-       private $_breadCrumbsFactory;
+    private $_breadCrumbsFactory;
 
     /**
      * description of $_pageGateway
@@ -44,7 +44,7 @@ class Toolkit_Template_Page_BodyFactory
      * @var string
      * @access private
      */
-       private $_pageGateway;
+    private $_pageGateway;
 
     /**
      * description of $_paragraphGateway
@@ -52,7 +52,7 @@ class Toolkit_Template_Page_BodyFactory
      * @var string
      * @access private
      */
-       private $_paragraphGateway;
+    private $_paragraphGateway;
 
     /**
      * description of $_cache
@@ -60,7 +60,7 @@ class Toolkit_Template_Page_BodyFactory
      * @var string
      * @access private
      */
-       private $_cache;
+    private $_cache;
 
     /**
      * description of $_keywordReplacement
@@ -68,10 +68,10 @@ class Toolkit_Template_Page_BodyFactory
      * @var string
      * @access private
      */
-       private $_keywordReplacement;
+    private $_keywordReplacement;
 
-       //      }}}
-       //      {{{     __construct()
+    //  }}}
+    //  {{{ __construct()
 
     /**
      * Class constructor
@@ -84,23 +84,23 @@ class Toolkit_Template_Page_BodyFactory
      *
      * @access public
      */
-       public function __construct(
-               Toolkit_BreadCrumbsFactory $breadCrumbsFactory,
-               Toolkit_Toolbox_PageGatewayAbstract $pageGateway,
-               Toolkit_Toolbox_ParagraphGatewayAbstract $paragraphGateway,
-               Toolkit_Template_KeywordReplacement $keywordReplacement,
+    public function __construct(
+        Toolkit_BreadCrumbsFactory $breadCrumbsFactory,
+        Toolkit_Toolbox_PageGatewayAbstract $pageGateway,
+        Toolkit_Toolbox_ParagraphGatewayAbstract $paragraphGateway,
+        Toolkit_Template_KeywordReplacement $keywordReplacement,
         Cache_Lite $cache
-       ) {
-               $this->_breadCrumbsFactory = $breadCrumbsFactory;
-               $this->_pageGateway        = $pageGateway;
-               $this->_paragraphGateway   = $paragraphGateway;
-               $this->_keywordReplacement = $keywordReplacement;
-               $this->_cache              = $cache;
+    ) {
+        $this->_breadCrumbsFactory = $breadCrumbsFactory;
+        $this->_pageGateway        = $pageGateway;
+        $this->_paragraphGateway   = $paragraphGateway;
+        $this->_keywordReplacement = $keywordReplacement;
+        $this->_cache              = $cache;
 
-       }
+    }
 
-       //      }}}
-       //      {{{     getPageBodyBuilder()
+    //  }}}
+    //  {{{ getPageBodyBuilder()
 
     /**
      * description of getPageBodyBuilder
@@ -112,107 +112,107 @@ class Toolkit_Template_Page_BodyFactory
      * |\Toolkit_Template_Page_Member|\Toolkit_Template_Page_Toolbox
      * @access public
      */
-       public function getPageBodyBuilder($id)
-       {
+    public function getPageBodyBuilder($id)
+    {
         $memberId = filter_var($_REQUEST['member_id'], FILTER_VALIDATE_INT);
-               $page     = $this->_pageGateway->find($id);
+        $page     = $this->_pageGateway->find($id);
 
-               $forgotPassword   = (isset($_GET['forgot']) && $_GET['forgot'] == 1);
-               $siteMap              = (isset($_GET['sitemap']) && $_GET['sitemap'] == 1);
-               $memberDbSiteMap  = (   isset($_GET['memberDbSiteMap'])
-                                                        && $_GET['memberDbSiteMap'] == 1);
-               $pageDoesNotExist = ($page === false);
+        $forgotPassword   = (isset($_GET['forgot']) && $_GET['forgot'] == 1);
+        $siteMap          = (isset($_GET['sitemap']) && $_GET['sitemap'] == 1);
+        $memberDbSiteMap  = (   isset($_GET['memberDbSiteMap'])
+                             && $_GET['memberDbSiteMap'] == 1);
+        $pageDoesNotExist = ($page === false);
         if ($pageDoesNotExist && $memberId) {
             $pageDoesNotExist = false;
         }
-               $pageIsTurnedOff  = (   is_array($page)
-                                                        && !$page['active']
-                                                        && !strstr($_SERVER['HTTP_REFERER'], 'admin/')
+        $pageIsTurnedOff  = (   is_array($page)
+                             && !$page['active']
+                             && !strstr($_SERVER['HTTP_REFERER'], 'admin/')
                              && !$_REQUEST['preview']);
-               $googleSearch     = (   defined('GOOGLE_SEARCH')
-                                                    && GOOGLE_SEARCH
-                                                    && isset($_GET['query'])
-                                                    && !empty($_GET['query']));
-               $glmSearch        = (   defined('GLM_SEARCH')
-                                                    && GLM_SEARCH
-                                                    && isset($_REQUEST['GLMSearch'])
-                                                    && $_REQUEST['GLMSearch'] == 'true');
-               $memberPage       = (   defined('MEMBERS_DB')
-                                                && MEMBERS_DB
+        $googleSearch     = (   defined('GOOGLE_SEARCH')
+                             && GOOGLE_SEARCH
+                             && isset($_GET['query'])
+                             && !empty($_GET['query']));
+        $glmSearch    = (   defined('GLM_SEARCH')
+                             && GLM_SEARCH
+                             && isset($_REQUEST['GLMSearch'])
+                             && $_REQUEST['GLMSearch'] == 'true');
+        $memberPage       = (   defined('MEMBERS_DB')
+                             && MEMBERS_DB
                              && $page['include_members']
                              || $memberId
                          );
 
-               if ($forgotPassword) {
-                       die('Toolkit_Template_Page_BodyFactory::getPageBodyBuilder');
-               } elseif ($memberDbSiteMap) {
-                       return new Toolkit_Members_SiteMapPage(
-                               Toolkit_Database::getInstance(),
+        if ($forgotPassword) {
+            die('Toolkit_Template_Page_BodyFactory::getPageBodyBuilder');
+        } elseif ($memberDbSiteMap) {
+            return new Toolkit_Members_SiteMapPage(
+                Toolkit_Database::getInstance(),
                 $this->_pageGateway
-                       );
-               } elseif ($siteMap) {
-                       return new Toolkit_Template_Page_SiteMap(
-                               Toolkit_Database::getInstance(),
+            );
+        } elseif ($siteMap) {
+            return new Toolkit_Template_Page_SiteMap(
+                Toolkit_Database::getInstance(),
                 $this->_pageGateway
-                       );
-               } elseif ($pageDoesNotExist) {
-                       //      page does not exist
-                       //      give 301 redirect and go back to index page
-                       header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently');
-                       header('Location: ' . BASE_URL . 'index.php');
-                       exit();
-               } elseif ($pageIsTurnedOff) {
-                       //      page exists, but is turned off
-                       //      give 404 redirect and go back to index page
-                       header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
-                       return new Toolkit_Template_Page_Bad();
-               } elseif ($googleSearch) {
-                       return new Toolkit_Template_Page_GoogleSearch();
-               } elseif ($glmSearch) {
-                       return new Toolkit_Template_Page_GLMSearch();
-               } elseif ($memberPage) {
-                       $conf = new Config;
-                       $root =& $conf->parseConfig(
-                               BASE . 'Toolkit/Members/config.ini',
-                               'IniFile'
-                       );
-
-                       $imageAdapter  = new Toolkit_FileServer_ImageAdapter();
-
-                       return new Toolkit_Template_Page_Member(
-                               $id,
-                               new Toolkit_Template_Image_Factory($imageAdapter),
-                               $this->_breadCrumbsFactory,
-                               $this->_pageGateway,
-                               $this->_paragraphGateway,
-                               $this->_keywordReplacement,
-                               $this->_cache,
-                               $root
-                       );
-               } else { // regular toolbox page
-                       $imageAdapter = new Toolkit_FileServer_ImageAdapter();
-
-                       $photoGallery = null;
-                       if (defined('PHOTO_GALLERY') && PHOTO_GALLERY) {
-                               $dbh = Toolkit_Database::getInstance();
-                               $photoGallery = new Toolkit_Photos_Gallery(
-                                       $dbh,
-                                       new Toolkit_Photos_Display($dbh)
-                               );
-                       }
-
-                       return new Toolkit_Template_Page_Toolbox(
-                               $id,
-                               new Toolkit_Template_Image_Factory($imageAdapter),
-                               $this->_breadCrumbsFactory,
-                               $this->_pageGateway,
-                               $this->_paragraphGateway,
-                               $this->_keywordReplacement,
-                               $this->_cache,
-                               $photoGallery
-                       );
-               }
-       }
-
-       //      }}}
+            );
+        } elseif ($pageDoesNotExist) {
+            //  page does not exist
+            //  give 301 redirect and go back to index page
+            header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently');
+            header('Location: ' . BASE_URL . 'index.php');
+            exit();
+        } elseif ($pageIsTurnedOff) {
+            //  page exists, but is turned off
+            //  give 404 redirect and go back to index page
+            header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
+            return new Toolkit_Template_Page_Bad();
+        } elseif ($googleSearch) {
+            return new Toolkit_Template_Page_GoogleSearch();
+        } elseif ($glmSearch) {
+            return new Toolkit_Template_Page_GLMSearch();
+        } elseif ($memberPage) {
+            $conf = new Config;
+            $root =& $conf->parseConfig(
+                BASE . 'Toolkit/Members/config.ini',
+                'IniFile'
+            );
+
+            $imageAdapter  = new Toolkit_FileServer_ImageAdapter();
+
+            return new Toolkit_Template_Page_Member(
+                $id,
+                new Toolkit_Template_Image_Factory($imageAdapter),
+                $this->_breadCrumbsFactory,
+                $this->_pageGateway,
+                $this->_paragraphGateway,
+                $this->_keywordReplacement,
+                $this->_cache,
+                $root
+            );
+        } else { // regular toolbox page
+            $imageAdapter = new Toolkit_FileServer_ImageAdapter();
+
+            $photoGallery = null;
+            if (defined('PHOTO_GALLERY') && PHOTO_GALLERY) {
+                $dbh = Toolkit_Database::getInstance();
+                $photoGallery = new Toolkit_Photos_Gallery(
+                    $dbh,
+                    new Toolkit_Photos_Display($dbh)
+                );
+            }
+
+            return new Toolkit_Template_Page_Toolbox(
+                $id,
+                new Toolkit_Template_Image_Factory($imageAdapter),
+                $this->_breadCrumbsFactory,
+                $this->_pageGateway,
+                $this->_paragraphGateway,
+                $this->_keywordReplacement,
+                $this->_cache,
+                $photoGallery
+            );
+        }
+    }
+
+    //  }}}
 }
index 1e0444b..dd77289 100644 (file)
                 <div class="medium-9 columns medium-push-3">      
                     <section id="main" data-equalizer-watch>
                         <div id="toolbox">
-                            <h1>Welcome to the Soo Locks Bout Tours</h1>
-                            <p>We are a top 5 Michigan Attraction that has been offering exciting tours through the famous Soo Locks since 1934. Over the years we have grown to a fleet of five tour vessels and two dock facilities in historic Sault Ste. Marie, Michigan.</p>
-                            <p>We offer a wide variety of maritime sightseeing adventures including our popular Soo Locks 
-        sightseeing tours, enjoyable Luncheon and Dinner Cruises, and adventurous Lighthouse Cruises.</p>
-
-                            <p>We operate Fireworks Cruises and Fireworks Dinner Cruises for Canada Day on July 1 and 
-        Independence Day on July 4. Be sure to check out our Special Cruises, Events, and Music Cruises in 2014.</p>
-
-                            <p>Located only 50 miles north of the Mackinac Bridge, we are a must see destination in Michigan’s beautiful Upper Peninsula. Our Links page offers you an array of hyper-links to other exciting 
-        attractions, overnight accommodations, and travel information.</p>
+                            {toolboxContent:h}
                         </div><!-- /#toolbox -->
                         <section id="hHlines" class="opensearchserver.ignore">
                             <ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-3">