1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-26 03:30:48 +03:00

Мелкие исправления

This commit is contained in:
Denis Shakhov 2016-04-07 14:10:49 +07:00
parent 42c0af725d
commit 1eb8f4812d
4 changed files with 21 additions and 28 deletions

View file

@ -11,11 +11,11 @@
{* Получатели *}
{component 'user' template='choose'
items = ($recepient) ? [[ 'text' => $recepient->getLogin(), 'value' => $recepient->getId() ]] : null
selectedValue = ($recepient) ? $recepient->getId() : null
form = ($_aRequest['talk_recepient_id']) ? null : $_aRequest
items = ($recepient) ? [[ 'text' => $recepient->getLogin(), 'value' => $recepient->getId() ]] : false
selectedValue = ($recepient) ? $recepient->getId() : false
form = ($_aRequest['talk_recepient_id']) ? false : $_aRequest
name = 'talk_users[]'
rules = [ 'required' => true, 'rangetags' => '[1,99]' ]
rules = [ 'required' => true ]
classes = 'js-talk-add-user-choose'
label = {lang 'talk.add.fields.users.label'}
lang_choose = {lang 'talk.add.choose_friends'}}

View file

@ -5,22 +5,16 @@
* @param boolean $isPreview
*}
{$type = $smarty.local.type}
{component_define_params params=[ 'topic', 'type', 'blogs', 'blogId', 'skipBlogs', 'mods', 'classes', 'attributes' ]}
{$typeCode = $type->getCode()}
{if $LS->Topic_IsAllowTopicType( $typeCode )}
{$template = $LS->Component_GetTemplatePath('topic', "topic-add-type-{$typeCode}" )}
{if $LS->Topic_IsAllowTopicType($typeCode)}
{$template = $LS->Component_GetTemplatePath('topic', "topic-add-type-{$typeCode}")}
{* Если для указанного типа существует шаблон, то подключаем его *}
{* Иначе подключаем дефолтный шаблон топика *}
{if ! $template}
{$template = $LS->Component_GetTemplatePath('topic', 'add')}
{if $template}
{component "topic.topic-add-type-$typeCode" params=$params}
{else}
{component 'topic.add' params=$params}
{/if}
{include "$template"
topic=$smarty.local.topic
type=$smarty.local.type
blogs=$smarty.local.blogs
blogId=$smarty.local.blogId
skipBlogs=$smarty.local.skipBlogs }
{/if}

View file

@ -5,17 +5,16 @@
* @param boolean $isPreview
*}
{$topic = $smarty.local.topic}
{component_define_params params=[ 'topic', 'isPreview', 'isList', 'mods', 'classes', 'attributes' ]}
{$type = $topic->getType()}
{if $LS->Topic_IsAllowTopicType( $type )}
{$template = $LS->Component_GetTemplatePath('topic', "topic-type-{$type}" )}
{if $LS->Topic_IsAllowTopicType($type)}
{$template = $LS->Component_GetTemplatePath('topic', "topic-type-{$type}")}
{* Если для указанного типа существует шаблон, то подключаем его *}
{* Иначе подключаем дефолтный шаблон топика *}
{if ! $template}
{$template = $LS->Component_GetTemplatePath('topic', 'topic')}
{if $template}
{component "topic.topic-type-$type" params=$params}
{else}
{component 'topic' params=$params}
{/if}
{include "$template" topic=$topic isList=$smarty.local.isList isPreview=$smarty.local.isPreview}
{/if}

@ -1 +1 @@
Subproject commit 90265e4bcb27ef33eea7b2192cd978750f6fb00d
Subproject commit 8410a744b062f67347e67b1fff81e29b0a4bbff3