diff --git a/application/classes/actions/ActionSettings.class.php b/application/classes/actions/ActionSettings.class.php
index d6f9df4e..664258a3 100644
--- a/application/classes/actions/ActionSettings.class.php
+++ b/application/classes/actions/ActionSettings.class.php
@@ -237,6 +237,7 @@ class ActionSettings extends Action
$oViewer->Assign('originalHeight', (int) getRequest('original_height'), true);
$oViewer->Assign('width', (int) getRequest('width'), true);
$oViewer->Assign('height', (int) getRequest('height'), true);
+ $oViewer->Assign('usePreview', true, true);
$this->Viewer_AssignAjax('sText', $oViewer->Fetch("component@user.modal.crop-avatar"));
}
diff --git a/application/frontend/components/auth/modal.auth.tpl b/application/frontend/components/auth/modal.auth.tpl
index 925f2864..2c2e7e40 100644
--- a/application/frontend/components/auth/modal.auth.tpl
+++ b/application/frontend/components/auth/modal.auth.tpl
@@ -2,31 +2,25 @@
* Модальное окно с формами входа, регистрации и напоминанием пароля
*}
-{extends 'Component@modal.modal'}
-
-{block 'modal_options' append}
- {$id = 'modal-login'}
- {$mods = "$mods auth"}
- {$classes = "$classes js-modal-default"}
- {$title = $aLang.auth.authorization}
- {$options = array_merge( $options|default:[], [ 'center' => 'false' ] )}
-{/block}
-
-{block 'modal_content'}
+{capture 'modal_content'}
{if ! Config::Get('general.reg.invite')}
{component 'auth' template='registration' assign=auth_tab_reg}
{else}
{component 'auth' template='invite' assign=auth_tab_reg}
{/if}
- {component 'auth' template='login' assign=auth_tab_login}
- {component 'auth' template='reset' assign=auth_tab_reset}
-
{component 'tabs' classes='js-tabs-auth' tabs=[
- [ 'text' => {lang 'auth.login.title'}, 'content' => $auth_tab_login, 'classes' => 'js-auth-tab-login' ],
+ [ 'text' => {lang 'auth.login.title'}, 'content' => {component 'auth' template='login'}, 'classes' => 'js-auth-tab-login' ],
[ 'text' => {lang 'auth.registration.title'}, 'content' => $auth_tab_reg, 'classes' => 'js-auth-tab-reg' ],
- [ 'text' => {lang 'auth.reset.title'}, 'content' => $auth_tab_reset ]
+ [ 'text' => {lang 'auth.reset.title'}, 'content' => {component 'auth' template='reset'} ]
]}
-{/block}
+{/capture}
-{block 'modal_footer'}{/block}
\ No newline at end of file
+{component 'modal'
+ title = {lang 'auth.authorization'}
+ tabs = $smarty.capture.modal_content
+ options = [ 'center' => 'false' ]
+ showFooter = false
+ classes = 'js-modal-default'
+ mods = 'auth'
+ id = 'modal-login'}
\ No newline at end of file
diff --git a/application/frontend/components/blog/modals/modal.blog-delete.tpl b/application/frontend/components/blog/modals/modal.blog-delete.tpl
index de378736..cb9e1bdb 100644
--- a/application/frontend/components/blog/modals/modal.blog-delete.tpl
+++ b/application/frontend/components/blog/modals/modal.blog-delete.tpl
@@ -5,19 +5,13 @@
* @param array $blogs
*}
-{extends 'Component@modal.modal'}
-
-{block 'modal_options' append}
- {$id = "modal-blog-delete"}
- {$mods = "$mods blog-delete"}
- {$classes = "$classes js-modal-default"}
- {$title = $aLang.blog.remove.title}
-{/block}
-
-{block 'modal_content'}
+{capture 'modal_content'}
{$blog = $smarty.local.blog}
-{/block}
+{/capture}
-{block 'modal_footer_begin'}
- {component 'button' form='js-blog-remove-form' text=$aLang.common.remove mods='primary'}
-{/block}
\ No newline at end of file
+{component 'modal'
+ title = {lang 'blog.remove.title'}
+ content = $smarty.capture.modal_content
+ classes = 'js-modal-default'
+ mods = 'blog-delete'
+ id = 'modal-blog-delete'
+ primaryButton = [
+ 'text' => {lang 'common.remove'},
+ 'form' => 'js-blog-remove-form'
+ ]}
\ No newline at end of file
diff --git a/application/frontend/components/modal-create/modal-create.tpl b/application/frontend/components/modal-create/modal-create.tpl
index fb6f121d..30810607 100644
--- a/application/frontend/components/modal-create/modal-create.tpl
+++ b/application/frontend/components/modal-create/modal-create.tpl
@@ -2,16 +2,7 @@
* Модальное с меню "Создать"
*}
-{extends 'Component@modal.modal'}
-
-{block 'modal_options' append}
- {$id = 'modal-write'}
- {$mods = "$mods create"}
- {$classes = "$classes js-modal-default"}
- {$title = {lang name='modal_create.title'}}
-{/block}
-
-{block 'modal_content'}
+{capture 'modal_content'}
{function modal_create_item}
{$url = "{if ! $url}{router page=$item}add{else}{$url}{/if}"}
@@ -32,6 +23,11 @@
{hook run='write_item' isPopup=true}
-{/block}
+{/capture}
-{block 'modal_footer'}{/block}
\ No newline at end of file
+{component 'modal'
+ title = {lang 'modal_create.title'}
+ content = $smarty.capture.modal_content
+ classes = 'js-modal-default'
+ mods = 'create'
+ id = 'modal-write'}
\ No newline at end of file
diff --git a/application/frontend/components/poll/modal.poll-create.tpl b/application/frontend/components/poll/modal.poll-create.tpl
index 13067218..632a8872 100644
--- a/application/frontend/components/poll/modal.poll-create.tpl
+++ b/application/frontend/components/poll/modal.poll-create.tpl
@@ -2,23 +2,14 @@
* Создание опроса
*}
-{extends 'Component@modal.modal'}
-
-{block 'modal_options' append}
- {$id = "modal-poll-create"}
- {$mods = "$mods poll-create"}
- {$classes = "$classes js-modal-media"}
- {$title = ( $oPoll ) ? {lang 'poll.form.title.edit'} : {lang 'poll.form.title.add'}}
-{/block}
-
-{block 'modal_content'}
- {component 'poll' template='form'}
-{/block}
-
-{block 'modal_footer_begin'}
- {component 'button'
- form = 'js-poll-form'
- text = ($oPoll) ? $aLang.common.save : $aLang.common.add
- classes = 'js-poll-form-submit'
- mods = 'primary'}
-{/block}
\ No newline at end of file
+{component 'modal'
+ title = ( $oPoll ) ? {lang 'poll.form.title.edit'} : {lang 'poll.form.title.add'}
+ content = {component 'poll' template='form'}
+ classes = 'js-modal-default'
+ mods = 'poll-create'
+ id = 'modal-poll-create'
+ primaryButton = [
+ 'text' => ($oPoll) ? $aLang.common.save : $aLang.common.add,
+ 'form' => 'js-poll-form',
+ 'classes' => 'js-poll-form-submit'
+ ]}
\ No newline at end of file
diff --git a/application/frontend/components/property/input/modal.property-input-video.tpl b/application/frontend/components/property/input/modal.property-input-video.tpl
index 55a7d750..cbc95b42 100644
--- a/application/frontend/components/property/input/modal.property-input-video.tpl
+++ b/application/frontend/components/property/input/modal.property-input-video.tpl
@@ -2,15 +2,9 @@
* Модальное окно с предпросмотром видео для свойства с типом video
*}
-{extends 'Component@modal.modal'}
-
-{block 'modal_options' append}
- {$id = "modal-property-type-video-{$value->getId()}"}
- {$mods = "$mods property property-video"}
- {$classes = "$classes js-modal-media"}
- {$title = 'Предпросмотр видео'}
-{/block}
-
-{block 'modal_content'}
- {$value->getValueTypeObject()->getVideoCodeFrame()}
-{/block}
\ No newline at end of file
+{component 'modal'
+ title = {lang 'property.video.preview'}
+ content = $value->getValueTypeObject()->getVideoCodeFrame()
+ classes = 'js-modal-default'
+ mods = 'property property-video'
+ id = "modal-property-type-video-{$value->getId()}"}
\ No newline at end of file
diff --git a/application/frontend/components/report/modal.report.tpl b/application/frontend/components/report/modal.report.tpl
index bfa89e57..200e2332 100644
--- a/application/frontend/components/report/modal.report.tpl
+++ b/application/frontend/components/report/modal.report.tpl
@@ -4,40 +4,36 @@
* @param array $types
*}
-{extends 'Component@modal.modal'}
+{capture 'modal_content'}
+
+{/capture}
- {* Каптча *}
- {if Config::Get('module.user.complaint_captcha')}
- {component 'field' template='captcha'
- captchaName = 'complaint_user'
- name = 'captcha'}
- {/if}
-
- {component 'field' template='hidden' name='target_id' value=$_aRequest.target_id}
-
-{/block}
-
-{block 'modal_footer_begin'}
- {component 'button' text={lang 'report.form.submit'} mods='primary' form='form-complaint-user'}
-{/block}
\ No newline at end of file
+{component 'modal'
+ title = {lang 'report.form.title'}
+ content = $smarty.capture.modal_content
+ classes = 'js-modal-default'
+ mods = 'report'
+ id = 'modal-complaint-user'
+ primaryButton = [
+ 'text' => {lang 'report.form.submit'},
+ 'form' => 'form-complaint-user'
+ ]}
\ No newline at end of file
diff --git a/application/frontend/components/search-form/search-form.tpl b/application/frontend/components/search-form/search-form.tpl
index 506f8897..7f1a00e1 100644
--- a/application/frontend/components/search-form/search-form.tpl
+++ b/application/frontend/components/search-form/search-form.tpl
@@ -20,7 +20,7 @@
name = $smarty.local.inputName|default:'q'}
{if ! $smarty.local.noSubmitButton}
- {component 'button' mods='icon' classes="{$component}-submit" icon='icon-search'}
+ {component 'button' mods='icon' classes="{$component}-submit" icon='search'}
{/if}
{/block}
\ No newline at end of file
diff --git a/application/frontend/components/tags-favourite/modal.favourite_tags.tpl b/application/frontend/components/tags-favourite/modal.favourite_tags.tpl
index ac2ceebc..ae3f7635 100644
--- a/application/frontend/components/tags-favourite/modal.favourite_tags.tpl
+++ b/application/frontend/components/tags-favourite/modal.favourite_tags.tpl
@@ -2,16 +2,7 @@
* Добавление пользовательских тегов к топику
*}
-{extends 'Component@modal.modal'}
-
-{block 'modal_options' append}
- {$id = "favourite-form-tags"}
- {$mods = "$mods favourite-tags"}
- {$classes = "$classes js-modal-default"}
- {$title = {lang 'favourite_tags.title'}}
-{/block}
-
-{block 'modal_content'}
+{capture 'modal_content'}
-{/block}
+{/capture}
-{block 'modal_footer_begin'}
- {component 'button'
- form = 'js-favourite-form'
- text = $aLang.common.save
- classes = 'js-tags-form-submit'
- mods = 'primary'}
-{/block}
\ No newline at end of file
+{component 'modal'
+ title = {lang 'favourite_tags.title'}
+ content = $smarty.capture.modal_content
+ classes = 'js-modal-default'
+ mods = 'favourite-tags'
+ id = 'favourite-form-tags'
+ primaryButton = [
+ 'text' => {lang 'common.save'},
+ 'classes' => 'js-tags-form-submit',
+ 'form' => 'js-favourite-form'
+ ]}
\ No newline at end of file
diff --git a/application/frontend/components/topic/blocks/block.topics-tags.tpl b/application/frontend/components/topic/blocks/block.topics-tags.tpl
index 07e9ec61..b5ee0846 100644
--- a/application/frontend/components/topic/blocks/block.topics-tags.tpl
+++ b/application/frontend/components/topic/blocks/block.topics-tags.tpl
@@ -1,30 +1,21 @@
{**
* Теги
- *
- * @styles css/blocks.css
*}
-{extends 'component@tags.block.tags'}
-
-{block 'block_title'}
- {lang 'tags.block_tags.title'}
-{/block}
-
-{block 'block_options' append}
- {$classes = "{$classes} js-block-default"}
-{/block}
-
-{block 'block_content'}
- {component 'tags' template='cloud' tags=$smarty.local.tags url='{router page=\'tag\'}{$tag->getText()|escape:\'url\'}/' assign=tags_block_all}
- {component 'tags' template='cloud' tags=$smarty.local.tagsUser url='{router page=\'tag\'}{$tag->getText()|escape:\'url\'}/' assign=tags_block_favourite}
-
- {component 'tabs' classes='js-tabs-block' tabs=[
- [ 'text' => {lang 'tags.block_tags.nav.all'}, 'content' => $tags_block_all ],
- [ 'text' => {lang 'tags.block_tags.nav.favourite'}, 'content' => $tags_block_favourite, 'is_enabled' => !! $oUserCurrent ]
- ]}
-{/block}
-
-{* Подвал *}
-{block 'block_footer'}
- {component 'tags' template='search-form' mods='light'}
-{/block}
\ No newline at end of file
+{component 'block'
+ title = {lang 'tags.block_tags.title'}
+ classes = 'js-block-default'
+ footer = {component 'tags' template='search-form' mods='light'}
+ tabs = [
+ 'tabs' => [
+ [
+ 'text' => {lang 'tags.block_tags.nav.all'},
+ 'content' => {component 'tags' template='cloud' tags=$smarty.local.tags url='{router page=\'tag\'}{$tag->getText()|escape:\'url\'}/'}
+ ],
+ [
+ 'text' => {lang 'tags.block_tags.nav.favourite'},
+ 'content' => {component 'tags' template='cloud' tags=$smarty.local.tagsUser url='{router page=\'tag\'}{$tag->getText()|escape:\'url\'}/'},
+ 'is_enabled' => !! $oUserCurrent
+ ]
+ ]
+ ]}
\ No newline at end of file
diff --git a/application/frontend/components/user/modals/modal.add-friend.tpl b/application/frontend/components/user/modals/modal.add-friend.tpl
index 9daa00dc..d6c94872 100644
--- a/application/frontend/components/user/modals/modal.add-friend.tpl
+++ b/application/frontend/components/user/modals/modal.add-friend.tpl
@@ -2,26 +2,25 @@
* Добавление в друзья
*}
-{extends 'Component@modal.modal'}
+{capture 'modal_content'}
+ {* TODO: Form validation (front-end / back-end) *}
+
+{/capture}
-{block 'modal_options' append}
- {$id = "modal-add-friend"}
- {$classes = "$classes js-modal-default"}
- {$title = {lang 'user.friends.form.title'}}
-{/block}
-
-{block 'modal_content'}
- {* TODO: Form validation (front-end / back-end) *}
-
-{/block}
-
-{block 'modal_footer_begin'}
- {component 'button' mods='primary' form='add_friend_form' text={lang name='user.friends.form.fields.submit.text'}}
-{/block}
\ No newline at end of file
+{component 'modal'
+ title = {lang 'user.friends.form.title'}
+ content = $smarty.capture.modal_content
+ classes = 'js-modal-default'
+ mods = 'user-add-friend'
+ id = 'modal-add-friend'
+ primaryButton = [
+ 'text' => {lang 'user.friends.form.fields.submit.text'},
+ 'form' => 'add_friend_form'
+ ]}
\ No newline at end of file
diff --git a/application/frontend/components/user/modals/modal.user-list.tpl b/application/frontend/components/user/modals/modal.user-list.tpl
index 21adce59..421a50e3 100644
--- a/application/frontend/components/user/modals/modal.user-list.tpl
+++ b/application/frontend/components/user/modals/modal.user-list.tpl
@@ -6,16 +6,7 @@
* @param string $target
*}
-{extends 'Component@modal.modal'}
-
-{block 'modal_options' append}
- {$id = "modal-users-select"}
- {$mods = "$mods users-select"}
- {$classes = "$classes js-modal-default"}
- {$title = $title|default:$aLang.user.users|escape}
-{/block}
-
-{block 'modal_content'}
+{capture 'modal_content'}
{* Экшнбар *}
{if $smarty.local.users && $smarty.local.selectable}
{component 'actionbar' template='item.select'
@@ -32,14 +23,17 @@
selectable = $smarty.local.selectable
showEmpty = true
classes = 'js-user-list-select'}
-{/block}
+{/capture}
-{block 'modal_footer_begin'}
- {if $smarty.local.users && $smarty.local.selectable}
- {component 'button'
- text = $aLang.common.add
- mods = 'primary'
- classes = 'js-user-list-select-add'
- attributes = [ 'data-target' => $smarty.local.target ]}
- {/if}
-{/block}
\ No newline at end of file
+{component 'modal'
+ title = $title|default:$aLang.user.users|escape
+ content = $smarty.capture.modal_content
+ classes = 'js-modal-default'
+ mods = 'users-select'
+ id = 'modal-users-select'
+ primaryButton = ( $smarty.local.users && $smarty.local.selectable ) ? [
+ 'text' => {lang 'common.add'},
+ 'classes' => 'js-user-list-select-add',
+ 'attributes' => [ 'data-target' => $smarty.local.target ],
+ 'form' => 'form-complaint-user'
+ ] : false}
\ No newline at end of file
diff --git a/application/frontend/i18n/ru.php b/application/frontend/i18n/ru.php
index 9a2121d8..2380292c 100644
--- a/application/frontend/i18n/ru.php
+++ b/application/frontend/i18n/ru.php
@@ -1470,6 +1470,14 @@ return array(
'label' => 'Перетащите сюда файлы или кликните по этому тексту',
),
),
+ /**
+ * Кастомные поля
+ */
+ 'property' => array(
+ 'video' => array(
+ 'preview' => 'Предпросмотр видео'
+ )
+ ),
/**
* Редактор
*/
diff --git a/framework b/framework
index bfabe502..74599fce 160000
--- a/framework
+++ b/framework
@@ -1 +1 @@
-Subproject commit bfabe502d7f1789ea3e9e66e86e8e070d2173c67
+Subproject commit 74599fce218e2142ba68eb861ad80d244b62508d