glm blocks admin side
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 13 Aug 2014 19:38:21 +0000 (15:38 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 13 Aug 2014 19:38:21 +0000 (15:38 -0400)
lock down the blocks

Toolkit/Blocks/Admin/EditPage.php
Toolkit/Blocks/Admin/ListPages.php
Toolkit/Blocks/css/style.css
Toolkit/Blocks/templates/editPage.html

index 1219bda..9b3e654 100644 (file)
@@ -258,7 +258,7 @@ class Toolkit_Blocks_Admin_EditPage
                 $page->pageName = $this->_getPageName();
             }
             $page->baseUrl = MEDIA_BASE_URL;
-            $page->pageOn = $this->_pageId;
+            $page->pageOn  = $this->_pageId;
             $page->blocks
                 = ($this->_pageId)
                 ? $this->_getBlocks()
index e6e9989..fa58a9b 100644 (file)
@@ -75,7 +75,8 @@ class Toolkit_Blocks_Admin_ListPages
             SELECT count(b.id) as count,b.page_on,p.navigation_name
               FROM blocks.blocks b
                    LEFT OUTER JOIN pages p ON (b.page_on = p.id)
-            GROUP BY navigation_name,page_on";
+            GROUP BY navigation_name,page_on
+            ORDER BY navigation_name";
             $stmt = $this->_dbh->query($sql);
             while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
                 $row['editUrl']
index c91bfd6..402c512 100644 (file)
@@ -73,6 +73,7 @@ h2 {
     margin-left: -25px;
 }
 #newBlockForm {
+    display: none;
     float: left;
     clear: both;
     list-style-type: none;
@@ -167,6 +168,7 @@ a#editBtn:hover {
     color: #09F;
     background-position: 0px -28px;
     }
+.deleteBlock {display:none;}
 a#deleteBtn {
     background: url(../assets/btn_delete.gif) no-repeat;
     }
@@ -225,7 +227,7 @@ a#deleteBtn:hover {
     margin: 0 -3px;
     }
 a#addPageUrl {
-    display: block;
+    display: none;
     width: 222px;
     height: 28px;
     line-height: 28px;
index 0c0e0e5..2cda95c 100644 (file)
@@ -2,7 +2,7 @@
 <a id="backBtn" href="../admin/blocks.php">Back to All Blocks</a>
 {end:}
 <div id="blocksEditWrapper">
-    <h2>Add New {pageName} Block</h2>
+    <h2 style="display: none;">Add New {pageName} Block</h2>
     <ul id="newBlockForm">
         <li class="ui-widget-content">
             <form