Index: trunk/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r2810 -r2893 --- trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 2810) +++ trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 2893) @@ -1341,6 +1341,19 @@ } return $error_msg; } + + /** + * Returns templates path for module, which is gathered from prefix module + * + * @param Array $params + * @return string + * @author Alex + */ + function ModulePath($params) + { + $module_folder = $this->Application->getUnitOption($this->Prefix, 'ModuleFolder'); + return '../../'.$module_folder.'/admin_templates/'; + } } ?> \ No newline at end of file Index: trunk/core/units/general/my_application.php =================================================================== diff -u -r2707 -r2893 --- trunk/core/units/general/my_application.php (.../my_application.php) (revision 2707) +++ trunk/core/units/general/my_application.php (.../my_application.php) (revision 2893) @@ -14,6 +14,8 @@ $this->registerClass('kCatDBItem',MODULES_PATH.'/kernel/units/general/cat_dbitem.php'); $this->registerClass('kCatDBList',MODULES_PATH.'/kernel/units/general/cat_dblist.php'); $this->registerClass('kCatDBEventHandler',MODULES_PATH.'/kernel/units/general/cat_event_handler.php'); + $this->registerClass('kCatDBTagProcessor',MODULES_PATH.'/kernel/units/general/cat_tag_processor.php'); + $this->registerClass('InpDBEventHandler', MODULES_PATH.'/kernel/units/general/inp_db_event_handler.php', 'kDBEventHandler'); $this->registerClass('InpTempTablesHandler',MODULES_PATH.'/kernel/units/general/inp_temp_handler.php','kTempTablesHandler'); Index: trunk/core/kernel/utility/unit_config_reader.php =================================================================== diff -u -r2792 -r2893 --- trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 2792) +++ trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 2893) @@ -194,6 +194,9 @@ if($config_found) { $prefix = $config['Prefix']; + + preg_match('/\/(.*)\//U', $filename, $rets); + $config['ModuleFolder'] = $rets[1]; $config['BasePath'] = dirname(FULL_PATH.$filename); $this->configData[$prefix] = $config; $this->ParseConfigClones($prefix); Index: trunk/kernel/units/general/cat_tag_processor.php =================================================================== diff -u --- trunk/kernel/units/general/cat_tag_processor.php (revision 0) +++ trunk/kernel/units/general/cat_tag_processor.php (revision 2893) @@ -0,0 +1,28 @@ +Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params); + + $grids = $this->Application->getUnitOption($this->Prefix,'Grids'); + $icons =& $grids[ $params['grid'] ]['Icons']; + + $status_fields = $this->Application->getUnitOption($this->Prefix,'StatusField'); + if(!$status_fields) return $icons['default']; + + $value = $object->GetDBField($status_fields[0]); // sets base status icon + if($value == STATUS_ACTIVE) + { + if( $object->GetDBField('IsPop') ) $value = 'POP'; + if( $object->GetDBField('IsHot') ) $value = 'HOT'; + if( $object->GetDBField('IsNew') ) $value = 'NEW'; + if( $object->GetDBField('EditorsPick') ) $value = 'PICK'; + } + + return isset($icons[$value]) ? $icons[$value] : $icons['default']; + } + } + +?> \ No newline at end of file Index: trunk/kernel/units/general/my_application.php =================================================================== diff -u -r2707 -r2893 --- trunk/kernel/units/general/my_application.php (.../my_application.php) (revision 2707) +++ trunk/kernel/units/general/my_application.php (.../my_application.php) (revision 2893) @@ -14,6 +14,8 @@ $this->registerClass('kCatDBItem',MODULES_PATH.'/kernel/units/general/cat_dbitem.php'); $this->registerClass('kCatDBList',MODULES_PATH.'/kernel/units/general/cat_dblist.php'); $this->registerClass('kCatDBEventHandler',MODULES_PATH.'/kernel/units/general/cat_event_handler.php'); + $this->registerClass('kCatDBTagProcessor',MODULES_PATH.'/kernel/units/general/cat_tag_processor.php'); + $this->registerClass('InpDBEventHandler', MODULES_PATH.'/kernel/units/general/inp_db_event_handler.php', 'kDBEventHandler'); $this->registerClass('InpTempTablesHandler',MODULES_PATH.'/kernel/units/general/inp_temp_handler.php','kTempTablesHandler'); Index: trunk/core/units/general/cat_tag_processor.php =================================================================== diff -u --- trunk/core/units/general/cat_tag_processor.php (revision 0) +++ trunk/core/units/general/cat_tag_processor.php (revision 2893) @@ -0,0 +1,28 @@ +Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params); + + $grids = $this->Application->getUnitOption($this->Prefix,'Grids'); + $icons =& $grids[ $params['grid'] ]['Icons']; + + $status_fields = $this->Application->getUnitOption($this->Prefix,'StatusField'); + if(!$status_fields) return $icons['default']; + + $value = $object->GetDBField($status_fields[0]); // sets base status icon + if($value == STATUS_ACTIVE) + { + if( $object->GetDBField('IsPop') ) $value = 'POP'; + if( $object->GetDBField('IsHot') ) $value = 'HOT'; + if( $object->GetDBField('IsNew') ) $value = 'NEW'; + if( $object->GetDBField('EditorsPick') ) $value = 'PICK'; + } + + return isset($icons[$value]) ? $icons[$value] : $icons['default']; + } + } + +?> \ No newline at end of file