[xoops-cvslog 1745] CVS update: xoops2jp/html/modules/legacyRender/admin/actions

アーカイブの一覧に戻る

Minahito minah****@users*****
2006年 1月 14日 (土) 17:15:34 JST


Index: xoops2jp/html/modules/legacyRender/admin/actions/TplsetListAction.class.php
diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplsetListAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/actions/TplsetListAction.class.php:1.1.2.3
--- xoops2jp/html/modules/legacyRender/admin/actions/TplsetListAction.class.php:1.1.2.2	Sat Jan 14 15:53:14 2006
+++ xoops2jp/html/modules/legacyRender/admin/actions/TplsetListAction.class.php	Sat Jan 14 17:15:34 2006
@@ -1,38 +1,37 @@
 <?php
 
 require_once XOOPS_ROOT_PATH . "/class/XCube_PageNavigator.class.php";
+require_once XOOPS_MODULE_PATH . "/legacyRender/admin/class/AbstractListAction.class.php";
 require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplsetFilterForm.class.php";
 
-class LegacyRender_TplsetListAction extends LegacyRender_Action
+class LegacyRender_TplsetListAction extends LegacyRender_AbstractListAction
 {
-	var $mObjects = array();
-	var $mFilter = null;
-	var $mPageNavi = null;
-
-	function getDefaultView(&$controller, &$xoopsUser)
+	function &_getHandler()
 	{
-		$this->mFilter =& new LegacyRender_TplsetFilterForm();
-		$this->mFilter->fetch();
-	
 		$handler =& xoops_getmodulehandler('tplset');
+		return $handler;
+	}
+
+	function &_getFilterForm()
+	{
+		$filter =& new LegacyRender_TplsetFilterForm();
+		return $filter;
+	}
 	
-		$total = $handler->getCount($this->mFilter->getCriteria());
-	
-		$this->mPageNavi =& new XCube_PageNavigator("./index.php?action=TplsetList", $total, XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE);
-		$this->mPageNavi->fetch();
-	
-		$criteria = $this->mFilter->getCriteria($this->mPageNavi->getStart(), $this->mPageNavi->getPerpage());
-		$this->mObjects =& $handler->getObjects($criteria);
-		
-		foreach (array_keys($this->mObjects) as $key) {
-			$this->mObjects[$key]->loadModuletpl();
-		}
-	
-		return LEGACYRENDER_FRAME_VIEW_INDEX;
+	function _getBaseUrl()
+	{
+		return "./index.php?action=TplsetList";
 	}
 
 	function executeViewIndex(&$controller, &$xoopsUser, &$render)
 	{
+		//
+		// Load the list of module templates.
+		//
+		foreach (array_keys($this->mObjects) as $key) {
+			$this->mObjects[$key]->loadModuletpl();
+		}
+
 		$render->setTemplateName("tplset_list.html");
 		$render->setAttribute('objects', $this->mObjects);
 		$render->setAttribute('pageNavi', $this->mPageNavi);
Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php
diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.2
--- xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.1	Sat Jan 14 02:29:01 2006
+++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php	Sat Jan 14 17:15:34 2006
@@ -1,30 +1,26 @@
 <?php
 
 require_once XOOPS_ROOT_PATH . "/class/XCube_PageNavigator.class.php";
+require_once XOOPS_MODULE_PATH . "/legacyRender/admin/class/AbstractListAction.class.php";
 require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplfileFilterForm.class.php";
 
-class LegacyRender_TplfileListAction extends LegacyRender_Action
+class LegacyRender_TplfileListAction extends LegacyRender_AbstractListAction
 {
-	var $mObjects = array();
-	var $mFilter = null;
-	var $mPageNavi = null;
-
-	function getDefaultView(&$controller, &$xoopsUser)
+	function &_getHandler()
 	{
-		$this->mFilter =& new LegacyRender_TplfileFilterForm();
-		$this->mFilter->fetch();
-	
 		$handler =& xoops_getmodulehandler('tplfile');
+		return $handler;
+	}
+
+	function &_getFilterForm()
+	{
+		$filter =& new LegacyRender_TplfileFilterForm();
+		return $filter;
+	}
 	
-		$total = $handler->getCount($this->mFilter->getCriteria());
-	
-		$this->mPageNavi =& new XCube_PageNavigator("./index.php?action=TplfileList", $total, XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE);
-		$this->mPageNavi->fetch();
-	
-		$criteria = $this->mFilter->getCriteria($this->mPageNavi->getStart(), $this->mPageNavi->getPerpage());
-		$this->mObjects =& $handler->getObjects($criteria);
-	
-		return LEGACYRENDER_FRAME_VIEW_INDEX;
+	function _getBaseUrl()
+	{
+		return "./index.php?action=TplfileList";
 	}
 
 	function executeViewIndex(&$controller, &$xoopsUser, &$render)


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る