diff --git a/application/classes/modules/topic/entity/TopicType.entity.class.php b/application/classes/modules/topic/entity/TopicType.entity.class.php index eb224f24..bb802dc7 100644 --- a/application/classes/modules/topic/entity/TopicType.entity.class.php +++ b/application/classes/modules/topic/entity/TopicType.entity.class.php @@ -47,6 +47,7 @@ class ModuleTopic_EntityTopicType extends Entity $aParamsResult['allow_preview'] = (isset($aParams['allow_preview']) and $aParams['allow_preview']) ? true : false; $aParamsResult['allow_text'] = (isset($aParams['allow_text']) and $aParams['allow_text']) ? true : false; $aParamsResult['allow_tags'] = (isset($aParams['allow_tags']) and $aParams['allow_tags']) ? true : false; + $aParamsResult['css_icon'] = (isset($aParams['css_icon']) and is_string($aParams['css_icon']) and $aParams['css_icon']) ? htmlspecialchars($aParams['css_icon']) : null; $this->setParams($aParamsResult); return true; @@ -102,13 +103,14 @@ class ModuleTopic_EntityTopicType extends Entity * Возвращает конкретный параметр типа * * @param string $sName + * @param mixed $mDefault * * @return null */ - public function getParam($sName) + public function getParam($sName, $mDefault = null) { $aParams = $this->getParamsArray(); - return isset($aParams[$sName]) ? $aParams[$sName] : null; + return isset($aParams[$sName]) ? $aParams[$sName] : $mDefault; } public function getStateText() diff --git a/application/frontend/skin/synio/components/syn-create/create.tpl b/application/frontend/skin/synio/components/syn-create/create.tpl index d828e52e..1dc8a24f 100644 --- a/application/frontend/skin/synio/components/syn-create/create.tpl +++ b/application/frontend/skin/synio/components/syn-create/create.tpl @@ -1,6 +1,6 @@ {function syn_create item=null} -
+
{$item.text}
{/function} @@ -17,7 +17,7 @@ {/if} {foreach $LS->Topic_GetTopicTypes() as $type} - {syn_create item=[ 'name' => $type->getCode(), 'text' => $type->getName(), 'url' => $type->getUrlForAdd() ]} + {syn_create item=[ 'name' => $type->getCode(), 'css_icon' => $type->getParam('css_icon', 'fa fa-file-text-o'), 'text' => $type->getName(), 'url' => $type->getUrlForAdd() ]} {/foreach} {foreach $_menu as $item}