From: <ki...@us...> - 2010-05-11 14:16:49
|
Revision: 515 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=515&view=rev Author: kilica Date: 2010-05-11 14:16:42 +0000 (Tue, 11 May 2010) Log Message: ----------- Modified Paths: -------------- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/preload/AssetPreload.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php 2010-05-11 14:16:42 UTC (rev 515) @@ -309,6 +309,7 @@ { //default Action $this->_addString('{{mainTable}}', ucfirst($this->mObject->mMainTableName), $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->get('title').'/class/Module.class.php'); + $this->_addString('{{mainTable}}', ucfirst($this->mObject->mMainTableName), $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->get('title').'/class/DelegateFunctions.class.php'); if($this->mObject->get('version')>1){ ///XCL2.2 @@ -540,7 +541,7 @@ //mTable for parent table:xcl2.2 only if($table->mParent){ - $mRelatedTable .= sprintf(' public $m%s = null;'."\n".' protected $_m%sLoadedFlag = false;'."\n", ucfirst($table->getShow('title')), ucfirst($table->getShow('title'))); + $mRelatedTable .= sprintf(' public $m%s = null;'."\n".' protected $_m%sLoadedFlag = false;'."\n", ucfirst($table->mParent->getShow('title')), ucfirst($table->mParent->getShow('title'))); $loadTable .= $table->mParent->getParentObjectString(); } @@ -612,7 +613,7 @@ $delete .= $field->getTemplateString('delete'); $edit .= $field->getTemplateString('edit'); $listTitle .= $field->getTemplateString('listTitle'); - $listValue .= $field->getTemplateString('listValue'); + $listValue .= $field->getTemplateString('list'); $view .= $field->getTemplateString('view'); } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php 2010-05-11 14:16:42 UTC (rev 515) @@ -61,11 +61,11 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; return sprintf(' - <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> + <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><{xoops_input type=text name=%s value=$actionForm->get(\'%s\') size=20 maxlength=%d%s}></dd>'."\n", - $NAME, $name, $name, $length, $class); + $class, $NAME, $name, $name, $length, $class); break; case 'view': case 'delete': @@ -77,7 +77,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } @@ -148,18 +148,17 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; if($this->mPrimary==true){ return sprintf(' - <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> - <dd><{xoops_input type=hidden name=%s value=$actionForm->get(\'%s\')}></dd>'."\n", + <{xoops_input type=hidden name=%s value=$actionForm->get(\'%s\')}>'."\n", $NAME, $name, $name, $class); } else{ return sprintf(' - <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> + <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><{xoops_input type=text name=%s value=$actionForm->get(\'%s\') size=10}></dd>'."\n", - $NAME, $name, $name, $class); + $class, $NAME, $name, $name, $class); } break; case 'view': @@ -174,7 +173,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } @@ -202,25 +201,25 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; return sprintf( -' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> +' <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><select name="%s"> <{legacy_category_select tree=$%sTree selectedValue=$actionForm->get(\'%s\')}> </select></dd>'."\n", - $NAME, $name, ucfirst($name), $name); + $class, $NAME, $name, ucfirst($name), $name); break; case 'view': case 'delete': return sprintf( ' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> - <dd><{$catTitle%s}></dd>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + <dd><{$%sTitle}></dd>'."\n", + strtoupper($name), ucfirst($name), $this->getShowModifier()); break; case 'list': return sprintf( -' <td><{assign var=catId value=$obj->getShow(\'%s\')}><{$catTitleList.$catId%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); +' <td><{assign var=catId value=$obj->getShow(\'%s\')}><{$%sTitleList.$catId}></td>'."\n", + $name, ucfirst($name)); break; } } @@ -285,7 +284,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } @@ -339,7 +338,7 @@ case 'list': return sprintf( ' <td><{$obj->getShowStatus()%s}></td>'."\n", - strtoupper($name), $this->getShowModifier()); + $this->getShowModifier()); break; } } @@ -393,7 +392,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } @@ -447,10 +446,15 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } + + public function getShowModifier() + { + return '|xoops_formattimestamp:s'; + } } /** @@ -500,11 +504,11 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; return sprintf( -' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> +' <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><{xoops_textarea type=text name=%s value=$actionForm->get(\'%s\')%s}></dd>'."\n", - $NAME, $name, $name, $class); + $class, $NAME, $name, $name, $class); break; case 'view': case 'delete': @@ -514,9 +518,10 @@ strtoupper($name), $name, $this->getShowModifier()); break; case 'list': - return sprintf( + return null; + /*sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + strtoupper($name), $name, $this->getShowModifier());*/ break; } } @@ -574,11 +579,11 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; return sprintf( -' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> +' <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><{xoops_input type=text name=%s value=$actionForm->get(\'%s\') size=10%s}></dd>'."\n", - $NAME, $name, $name, $class); + $class, $NAME, $name, $name, $class); break; case 'view': case 'delete': @@ -590,7 +595,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } @@ -628,7 +633,7 @@ public function getFormUpdateString() { return -' $obj->set(\'%s_lat\', $this->get(\'%s_lat\'));'."\n"; +' $obj->set(\'%s_lat\', $this->get(\'%s_lat\'));'."\n". ' $obj->set(\'%s_lng\', $this->get(\'%s_lng\'));'."\n"; } @@ -637,14 +642,14 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; return sprintf( -' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> +' <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.jp/maps?q=google+map&ll=<{$actionForm->get(\'%s_lat\')}>,<{$actionForm->get(\'%s_lng\')}>"></iframe> <{xoops_input type=text name=%s_lat value=$actionForm->get(\'%s_lat\') size=10%s}> <{xoops_input type=text name=%s_lng value=$actionForm->get(\'%s_lng\') size=10%s}> </dd>'."\n", - $NAME, $name, $name, $name, $name, $class, $name, $name, $class); + $class, $NAME, $name, $name, $name, $name, $class, $name, $name, $class); break; case 'view': case 'delete': @@ -722,7 +727,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php 2010-05-11 14:16:42 UTC (rev 515) @@ -144,7 +144,7 @@ { $this->mString['template'] = array( 'listTitle' => ' <th> - <{$smarty.const._MD_{MODULENAME}_LANG_%s}><br /> + <{$smarty.const._MD_{MODULENAME}_LANG_%s}> <a href="<{$pageNavi->renderUrlForSort()}>&<{$pageNavi->getPrefix()}>sort=<{$smarty.const.{MODULENAME}_%s_SORT_KEY_%s}>"><img src="images/up.gif" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a> <a href="<{$pageNavi->renderUrlForSort()}>&<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.{MODULENAME}_%s_SORT_KEY_%s}>"><img src="images/down.gif" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a> </th>'."\n" @@ -192,7 +192,13 @@ switch($type){ //prepare function case 'formProperties': - return sprintf($this->mType->getFormPropertyClass(), $this->getShow('name'), $this->getShow('name')); + if($this->get('field_type')==Tubsonp_FieldType::LATLNG){ + return sprintf($this->mType->getFormPropertyClass(), $this->getShow('name').'_lat', $this->getShow('name').'_lat')."\n" + .sprintf($this->mType->getFormPropertyClass(), $this->getShow('name').'_lng', $this->getShow('name').'_lng'); + } + else{ + return sprintf($this->mType->getFormPropertyClass(), $this->getShow('name'), $this->getShow('name')); + } break; case 'fieldProperties': @@ -253,7 +259,10 @@ { switch($type){ case 'listTitle': - return sprintf($this->mString['template']['listTitle'], strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name'))); + $ret = $this->mType->getTemplate('list', $this->getShow('name')); + if(isset($ret)){ + return sprintf($this->mString['template']['listTitle'], strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name'))); + } break; case 'delete': case 'view': Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php 2010-05-11 14:16:42 UTC (rev 515) @@ -8,7 +8,7 @@ class {Modulename}_CoolUriDelegate { /** - * getCoolUri + * getNormalUri * * @param string $uri * @param string $dirname @@ -19,28 +19,53 @@ * * @return void */ - public function getCoolUri(/*** string ***/ &$uri, /*** string ***/ $dirname, /*** string ***/ $dataname, /*** int ***/ $data_id, /*** string ***/ $action=null, /*** string ***/ $query=null) + public function getNormalUri(/*** string ***/ &$uri, /*** string ***/ $dirname, /*** string ***/ $dataname=null, /*** int ***/ $data_id=0, /*** string ***/ $action=null, /*** string ***/ $query=null) { - $keyName = Legacy_Utils::getModuleHandler($dataname, $dirname)->mPrimary; - $root = XCube_Root::getSingleton(); - if($root->mContext->getAttribute('useCoolUri')==true){ - $uriString = $root->mContext->getAttribute('coolUri'); - if(isset($query)){ - $uri = sprintf($uriString, $this->mDirname, $query); + $sUri = '/%s/index.php?action=%s%s'; + $lUri = '/%s/index.php?action=%s%s&%s=%d'; + $table = isset($dataname) ? $dataname : '{{mainTable}}'; + + $key = $table.'_id'; + + if(isset($dataname)){ + if($data_id>0){ + if(isset($action)){ + $uri = sprintf($lUri, $dirname, ucfirst($dataname), ucfirst($action), $key, $data_id); + } + else{ + $uri = sprintf($lUri, $dirname, ucfirst($dataname), 'View', $key, $data_id); + } } else{ - $uri = (isset($action)) ? - sprintf($uriString, $dirname, $data_id). '/'.$action : - sprintf($uriString, $dirname, $data_id); + if(isset($action)){ + $uri = sprintf($sUri, $dirname, ucfirst($dataname), ucfirst($action)); + } + else{ + $uri = sprintf($sUri, $dirname, ucfirst($dataname), 'List'); + } } + $uri = isset($query) ? $uri.'&'.$query : $uri; } else{ - $action = (isset($action)) ? $action : 'View'; - if(isset($query)){ - $uri = sprintf('%s/%s/%s', XOOPS_MODULE_URL, $dirname, $query); + if($data_id>0){ + if(isset($action)){ + die(); + } + else{ + $handler = Legacy_Utils::getModuleHandler($table, $dirname); + $key = $handler->mPrimary; + $uri = sprintf($lUri, $dirname, ucfirst($table).'View', ucfirst($action), $key, $data_id); + } + $uri = isset($query) ? $uri.'&'.$query : $uri; } else{ - $uri = sprintf('%s/%s/index.php?action=%s%s&%s=%d', XOOPS_MODULE_URL, $dirname, ucfirst($dataname), ucfirst($action), $keyName, $data_id); + if(isset($action)){ + die(); + } + else{ + $uri = sprintf('/%s/', $dirname); + $uri = isset($query) ? $uri.'index.php?'.$query : $uri; + } } } } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/preload/AssetPreload.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/preload/AssetPreload.class.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/preload/AssetPreload.class.php 2010-05-11 14:16:42 UTC (rev 515) @@ -7,12 +7,12 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } if(!defined('{MODULENAME}_TRUST_PATH')) { - define('{MODULENAME}_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/{modulename}'); + define('{MODULENAME}_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/{modulename}'); } require_once {MODULENAME}_TRUST_PATH . '/class/{Modulename}Utils.class.php'; @@ -22,101 +22,103 @@ **/ class {Modulename}_AssetPreloadBase extends XCube_ActionFilter { - /** - * prepare - * - * @param string $dirname - * - * @return void - **/ - public static function prepare(/*** string ***/ $dirname) - { - static $setupCompleted = false; - if(!$setupCompleted) - { - $setupCompleted = self::_setup(); - } - } + /** + * prepare + * + * @param string $dirname + * + * @return void + **/ + public static function prepare(/*** string ***/ $dirname) + { + static $setupCompleted = false; + if(!$setupCompleted) + { + $setupCompleted = self::_setup(); + } + } - /** - * _setup - * - * @param void - * - * @return bool - **/ - public static function _setup() - { - $root =& XCube_Root::getSingleton(); - $instance = new self($root->mController); - $root->mController->addActionFilter($instance); - return true; - } + /** + * _setup + * + * @param void + * + * @return bool + **/ + public static function _setup() + { + $root =& XCube_Root::getSingleton(); + $instance = new self($root->mController); + $root->mController->addActionFilter($instance); + return true; + } - /** - * preBlockFilter - * - * @param void - * - * @return void - **/ - public function preBlockFilter() - { - $this->mRoot->mDelegateManager->add('Module.{modulename}.Global.Event.GetAssetManager','{Modulename}_AssetPreloadBase::getManager'); - $this->mRoot->mDelegateManager->add('Legacy_Utils.CreateModule','{Modulename}_AssetPreloadBase::getModule'); - $this->mRoot->mDelegateManager->add('Legacy_Utils.CreateBlockProcedure','{Modulename}_AssetPreloadBase::getBlock'); - } + /** + * preBlockFilter + * + * @param void + * + * @return void + **/ + public function preBlockFilter() + { + $file = {MODULENAME}_TRUST_PATH . '/class/DelegateFunctions.class.php'; + $this->mRoot->mDelegateManager->add('Module.{modulename}.Global.Event.GetAssetManager','{Modulename}_AssetPreloadBase::getManager'); + $this->mRoot->mDelegateManager->add('Legacy_Utils.CreateModule','{Modulename}_AssetPreloadBase::getModule'); + $this->mRoot->mDelegateManager->add('Legacy_Utils.CreateBlockProcedure','{Modulename}_AssetPreloadBase::getBlock'); + $this->mRoot->mDelegateManager->add('Module.{modulename}.Global.Event.GetNormalUri','{Modulename}_CoolUriDelegate::getNormalUri', $file); + } - /** - * getManager - * - * @param {Modulename}_AssetManager &$obj - * @param string $dirname - * - * @return void - **/ - public static function getManager(/*** {Modulename}_AssetManager ***/ &$obj,/*** string ***/ $dirname) - { - require_once {MODULENAME}_TRUST_PATH . '/class/AssetManager.class.php'; - $obj = {Modulename}_AssetManager::getInstance($dirname); - } + /** + * getManager + * + * @param {Modulename}_AssetManager &$obj + * @param string $dirname + * + * @return void + **/ + public static function getManager(/*** {Modulename}_AssetManager ***/ &$obj,/*** string ***/ $dirname) + { + require_once {MODULENAME}_TRUST_PATH . '/class/AssetManager.class.php'; + $obj = {Modulename}_AssetManager::getInstance($dirname); + } - /** - * getModule - * - * @param Legacy_AbstractModule &$obj - * @param XoopsModule $module - * - * @return void - **/ - public static function getModule(/*** Legacy_AbstractModule ***/ &$obj,/*** XoopsModule ***/ $module) - { - if($module->getInfo('trust_dirname') == '{modulename}') - { - require_once {MODULENAME}_TRUST_PATH . '/class/Module.class.php'; - $obj = new {Modulename}_Module($module); - } - } + /** + * getModule + * + * @param Legacy_AbstractModule &$obj + * @param XoopsModule $module + * + * @return void + **/ + public static function getModule(/*** Legacy_AbstractModule ***/ &$obj,/*** XoopsModule ***/ $module) + { + if($module->getInfo('trust_dirname') == '{modulename}') + { + require_once {MODULENAME}_TRUST_PATH . '/class/Module.class.php'; + $obj = new {Modulename}_Module($module); + } + } - /** - * getBlock - * - * @param Legacy_AbstractBlockProcedure &$obj - * @param XoopsBlock $block - * - * @return void - **/ - public static function getBlock(/*** Legacy_AbstractBlockProcedure ***/ &$obj,/*** XoopsBlock ***/ $block) - { - $moduleHandler =& {Modulename}_Utils::getXoopsHandler('module'); - $module =& $moduleHandler->get($block->get('mid')); - if(is_object($module) && $module->getInfo('trust_dirname') == '{modulename}') - { - require_once {MODULENAME}_TRUST_PATH . '/blocks/' . $block->get('func_file'); - $className = '{Modulename}_' . substr($block->get('show_func'), 4); - $obj = new $className($block); - } - } + /** + * getBlock + * + * @param Legacy_AbstractBlockProcedure &$obj + * @param XoopsBlock $block + * + * @return void + **/ + public static function getBlock(/*** Legacy_AbstractBlockProcedure ***/ &$obj,/*** XoopsBlock ***/ $block) + { + $moduleHandler =& {Modulename}_Utils::getXoopsHandler('module'); + $module =& $moduleHandler->get($block->get('mid')); + if(is_object($module) && $module->getInfo('trust_dirname') == '{modulename}') + { + require_once {MODULENAME}_TRUST_PATH . '/blocks/' . $block->get('func_file'); + $className = '{Modulename}_' . substr($block->get('show_func'), 4); + $obj = new $className($block); + } + } } ?> Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php 2010-05-11 14:16:42 UTC (rev 515) @@ -82,7 +82,8 @@ $render->setTemplateName($this->mAsset->mDirname . '_{tablename}_list.html'); #cubson::lazy_load_array('{tablename}', $this->mObjects); $render->setAttribute('objects', $this->mObjects); - $render->setAttribute('dirname', $this->_getHandler()->getDirname()); + $render->setAttribute('dirname', $this->mAsset->mDirname); + $render->setAttribute('dataname', '{tablename}'); $render->setAttribute('pageNavi', $this->mFilter->mNavi); {{render}} } } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html 2010-05-11 14:16:42 UTC (rev 515) @@ -1,7 +1,7 @@ <div id="{modulename}"> <h1><{$smarty.const._LIST}></h1> <ul class="toptab"> - <li><a href="<{xoops_coolurl dirname=$dirname dataname=$dataname action=edit}>"><{$smarty.const._MD_{MODULENAME}_LANG_ADD_A_NEW_{TABLENAME}}></a></li> + <li><a href="<{xoops_cooluri dirname=$dirname dataname=$dataname action=edit}>"><{$smarty.const._MD_{MODULENAME}_LANG_ADD_A_NEW_{TABLENAME}}></a></li> </ul> <{if count($objects) > 0}> @@ -18,9 +18,9 @@ <tr class="<{cycle values='odd,even'}>"> {{list_value}} <td> - <a href="<{xoops_coolurl dirname=$dirname dataname=$dataname id=$obj->getShow('{primary_key_id}') action=view}>"><{$smarty.const._VIEW}></a> - <a href="<{xoops_coolurl dirname=$dirname dataname=$dataname id=$obj->getShow('{primary_key_id}') action=edit}>"><{$smarty.const._EDIT}></a> - <a href="<{xoops_coolurl dirname=$dirname dataname=$dataname id=$obj->getShow('{primary_key_id}') action=delete}>"><{$smarty.const._DELETE}></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=$dataname data_id=$obj->getShow('{primary_key_id}') action=view}>"><{$smarty.const._VIEW}></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=$dataname data_id=$obj->getShow('{primary_key_id}') action=edit}>"><{$smarty.const._EDIT}></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=$dataname data_id=$obj->getShow('{primary_key_id}') action=delete}>"><{$smarty.const._DELETE}></a> </td> </tr> <{/foreach}> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |