[pLog-svn] r2127 - in plugins/trunk/templateeditor: class/action class/view templates

mark at devel.plogworld.net mark at devel.plogworld.net
Tue May 31 10:21:09 GMT 2005


Author: mark
Date: 2005-05-31 10:21:08 +0000 (Tue, 31 May 2005)
New Revision: 2127

Modified:
   plugins/trunk/templateeditor/class/action/pluginsitecopytemplatesetaction.class.php
   plugins/trunk/templateeditor/class/view/pluginblogtemplatesetslistview.class.php
   plugins/trunk/templateeditor/class/view/pluginsitetemplatesetslistview.class.php
   plugins/trunk/templateeditor/class/view/pluginsitetemplateslistview.class.php
   plugins/trunk/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php
   plugins/trunk/templateeditor/templates/sitetemplatesetslist.template
Log:


Modified: plugins/trunk/templateeditor/class/action/pluginsitecopytemplatesetaction.class.php
===================================================================
--- plugins/trunk/templateeditor/class/action/pluginsitecopytemplatesetaction.class.php	2005-05-31 07:42:16 UTC (rev 2126)
+++ plugins/trunk/templateeditor/class/action/pluginsitecopytemplatesetaction.class.php	2005-05-31 10:21:08 UTC (rev 2127)
@@ -81,9 +81,13 @@
         {
 		    $pattern = '/^[a-zA-Z0-9_-]*$/';
             if (preg_match($pattern, $name) ) {
-               return true;
+            	if ( $name != "admin" && $name != "rss" && $name != "summary" && $name != "wizard" ) {
+            		return true;
+            	} else {
+                	return false;
+                }
             } else {
-               return false;
+                return false;
             }
         }
     }

Modified: plugins/trunk/templateeditor/class/view/pluginblogtemplatesetslistview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginblogtemplatesetslistview.class.php	2005-05-31 07:42:16 UTC (rev 2126)
+++ plugins/trunk/templateeditor/class/view/pluginblogtemplatesetslistview.class.php	2005-05-31 10:21:08 UTC (rev 2127)
@@ -19,6 +19,7 @@
         	$ts = new TemplateSets();
             // get a list with all the site template sets
             $globalTemplateSets = $ts->getGlobalTemplateSets();
+
 			// get a list with all the blog template sets
             $blogTemplateSets = $ts->getBlogTemplateSets( $this->_blogInfo->getId(), false );
             

Modified: plugins/trunk/templateeditor/class/view/pluginsitetemplatesetslistview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginsitetemplatesetslistview.class.php	2005-05-31 07:42:16 UTC (rev 2126)
+++ plugins/trunk/templateeditor/class/view/pluginsitetemplatesetslistview.class.php	2005-05-31 10:21:08 UTC (rev 2127)
@@ -20,6 +20,12 @@
         	$ts = new TemplateSets();
             $globalTemplates = $ts->getGlobalTemplateSets();
             
+            // Add admin/rss/summary templateset to beginning of templatesets
+            $adminTemplate =& new TemplateSet( "admin", TEMPLATE_SET_GLOBAL, 0);
+            $rssTemplate =& new TemplateSet( "rss", TEMPLATE_SET_GLOBAL, 0);
+            $summaryTemplate =& new TemplateSet( "summary", TEMPLATE_SET_GLOBAL, 0);
+            array_unshift( $globalTemplates, $adminTemplate, $rssTemplate, $summaryTemplate );
+            
             $this->setValue( "templates", $globalTemplates );
 		
 			parent::render();

Modified: plugins/trunk/templateeditor/class/view/pluginsitetemplateslistview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginsitetemplateslistview.class.php	2005-05-31 07:42:16 UTC (rev 2126)
+++ plugins/trunk/templateeditor/class/view/pluginsitetemplateslistview.class.php	2005-05-31 10:21:08 UTC (rev 2127)
@@ -22,6 +22,12 @@
 			// get a list with all the global template sets
         	$ts = new TemplateSets();
             $globalTemplates = $ts->getGlobalTemplateSets();
+            
+            // Add admin/rss/summary templateset to beginning of templatesets
+            $adminTemplate =& new TemplateSet( "admin", TEMPLATE_SET_GLOBAL, 0);
+            $rssTemplate =& new TemplateSet( "rss", TEMPLATE_SET_GLOBAL, 0);
+            $summaryTemplate =& new TemplateSet( "summary", TEMPLATE_SET_GLOBAL, 0);
+            array_unshift( $globalTemplates, $adminTemplate, $rssTemplate, $summaryTemplate );          
 
 			// get a list with all the specific template files 
         	$ts = new TemplateSetStorage();

Modified: plugins/trunk/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php	2005-05-31 07:42:16 UTC (rev 2126)
+++ plugins/trunk/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php	2005-05-31 10:21:08 UTC (rev 2127)
@@ -25,6 +25,12 @@
         	$ts = new TemplateSets();
             $globalTemplates = $ts->getGlobalTemplateSets();
 
+            // Add admin/rss/summary templateset to beginning of templatesets
+            $adminTemplate =& new TemplateSet( "admin", TEMPLATE_SET_GLOBAL, 0);
+            $rssTemplate =& new TemplateSet( "rss", TEMPLATE_SET_GLOBAL, 0);
+            $summaryTemplate =& new TemplateSet( "summary", TEMPLATE_SET_GLOBAL, 0);
+            array_unshift( $globalTemplates, $adminTemplate, $rssTemplate, $summaryTemplate );             
+
 			// get a list with all the specific template files 
         	$ts = new TemplateSetStorage();
             

Modified: plugins/trunk/templateeditor/templates/sitetemplatesetslist.template
===================================================================
--- plugins/trunk/templateeditor/templates/sitetemplatesetslist.template	2005-05-31 07:42:16 UTC (rev 2126)
+++ plugins/trunk/templateeditor/templates/sitetemplatesetslist.template	2005-05-31 10:21:08 UTC (rev 2127)
@@ -45,12 +45,17 @@
       <a href="?op=siteTemplatesList&amp;templateId={$sitetemplate->getName()}">
         <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
       </a>
-      <a href="?op=siteDeleteTemplateSet&amp;templateId={$sitetemplate->getName()}">
-        <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
-      </a>
-      <a href="?op=siteCopyTemplateSet&amp;templateId={$sitetemplate->getName()}" id="{$sitetemplate->getName()}" onClick="copyTemplateSetTo(this.id)" >
-        <img src="imgs/admin/icon_copy-16.png" alt="{$locale->tr("copy")}" />
-      </a>
+      {if $sitetemplate->getName() != "admin" && $sitetemplate->getName() != "rss" && $sitetemplate->getName() != "summary"}
+       <a href="?op=siteDeleteTemplateSet&amp;templateId={$sitetemplate->getName()}">
+         <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
+       </a>
+       <a href="?op=siteCopyTemplateSet&amp;templateId={$sitetemplate->getName()}" id="{$sitetemplate->getName()}" onClick="copyTemplateSetTo(this.id)" >
+         <img src="imgs/admin/icon_copy-16.png" alt="{$locale->tr("copy")}" />
+       </a>
+      {else}
+       <img src="imgs/admin/icon_empty-16.png" />
+       <img src="imgs/admin/icon_empty-16.png" />
+      {/if}
       <a href="?op=siteArchiveTemplateSet&amp;templateId={$sitetemplate->getName()}">
         <img src="imgs/admin/icon_archive-16.png" alt="{$locale->tr("download")}" />
       </a>




More information about the pLog-svn mailing list