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

アーカイブの一覧に戻る

Minahito minah****@users*****
2006年 5月 17日 (水) 18:37:02 JST


Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php
diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.8 xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.9
--- xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.8	Wed May 17 16:21:43 2006
+++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php	Wed May 17 18:37:02 2006
@@ -4,6 +4,7 @@
 
 require_once XOOPS_MODULE_PATH . "/legacyRender/admin/class/AbstractListAction.class.php";
 require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplfileFilterForm.class.php";
+require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplfileSetFilterForm.class.php";
 
 class LegacyRender_TplfileListAction extends LegacyRender_AbstractListAction
 {
@@ -15,7 +16,7 @@
 
 	function &_getFilterForm()
 	{
-		$filter =& new LegacyRender_TplfileFilterForm($this->mPageNavi);
+		$filter = isset($_REQUEST['tpl_tplset']) ? new LegacyRender_TplfileSetFilterForm($this->mPageNavi) : new LegacyRender_TplfileFilterForm($this->mPageNavi);
 		return $filter;
 	}
 	
@@ -24,6 +25,32 @@
 		return "./index.php?action=TplfileList";
 	}
 
+	function getDefaultView(&$controller, &$xoopsUser)
+	{
+		$this->mPageNavi =& new LegacyRender_PageNavigator($this->_getBaseUrl(), 0, XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE);
+
+		$this->mFilter =& $this->_getFilterForm();
+		$this->mFilter->fetch();
+	
+		$handler =& $this->_getHandler();
+	
+		$total = $handler->getCount($this->mFilter->getCriteria());
+		
+		$this->mPageNavi->setTotal($total);
+		$this->mPageNavi->fetch();
+		
+		$criteria = $this->mFilter->getCriteria($this->mPageNavi->getStart(), $this->mPageNavi->getPerpage());
+		
+		if (isset($_REQUEST['tpl_tplset'])) {
+			$this->mObjects =& $handler->getObjectsWithOverride($criteria, xoops_getrequest('tpl_tplset'));
+		}
+		else {
+			$this->mObjects =& $handler->getObjects($criteria);
+		}
+	
+		return LEGACYRENDER_FRAME_VIEW_INDEX;
+	}
+
 	function executeViewIndex(&$controller, &$xoopsUser, &$render)
 	{
 		$render->setTemplateName("tplfile_list.html");


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