Skip to content

Commit

Permalink
fix: Добавлены недостающие шаблоны
Browse files Browse the repository at this point in the history
  • Loading branch information
aVadim483 committed May 14, 2016
1 parent d37837e commit ae259b1
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$config['multicategory'] = false; // один блог может быть включен в несколько категорий

$config['select_category'] = true; // возможность выбирать категорию при создании блога; действует, только если параметр multicategory = false
$config['change_category'] = 0; // возможность изменить категорию при редактировании блога; действует, только если параметр multicategory = false
$config['change_category'] = true; // возможность изменить категорию при редактировании блога; действует, только если параметр multicategory = false

/*
* Параметры для формирования главной плагина Категории
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<lang name="default">Alto CMS Team</lang>
</author>
<homepage>http://altocms.com</homepage>
<version>1.1.10</version>
<version>1.1.12</version>
<dirname>categories</dirname>
<requires>
<alto>
Expand Down
36 changes: 36 additions & 0 deletions templates/skin/default/tpls/hook.form_add_blog_begin.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{if $aCategories}
<div class="form-group">
{if $sEvent=='add'}
{* create blog *}
<label for="">{$aLang.plugin.categories.new_blog_category}</label>
<select name="category_id" id="category_id" class="form-control">
{foreach $aCategories as $oCategory}
<option value="{$oCategory->getId()}">
{$oCategory->getTitle()|escape:'html'}
</option>
{/foreach}
</select>
<p class="help-block">
<small>{$aLang.plugin.categories.new_blog_category_notice}</small>
</p>
{else}
{if $_aRequest.category_id}
{$iBlogCategoryId = $_aRequest.category_id}
{/if}
{* edit blog *}
<label for="">{$aLang.plugin.categories.edit_blog_category}</label>
<select name="category_id" id="category_id" class="form-control">
{foreach $aCategories as $oCategory}
<option value="{$oCategory->getId()}" {if $iBlogCategoryId==$oCategory->getId()}selected{/if}>
{$oCategory->getTitle()|escape:'html'}
</option>
{/foreach}
</select>
<p class="help-block">
<small>{$aLang.plugin.categories.edit_blog_category_notice}</small>
</p>
{/if}
</div>
{else}

{/if}
36 changes: 36 additions & 0 deletions templates/skin/experience/tpls/hook.form_add_blog_begin.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{if $aCategories}
<div class="form-group">
{if $sEvent=='add'}
{* create blog *}
<label for="">{$aLang.plugin.categories.new_blog_category}</label>
<select name="category_id" id="category_id" class="form-control">
{foreach $aCategories as $oCategory}
<option value="{$oCategory->getId()}">
{$oCategory->getTitle()|escape:'html'}
</option>
{/foreach}
</select>
<p class="help-block">
<small>{$aLang.plugin.categories.new_blog_category_notice}</small>
</p>
{else}
{if $_aRequest.category_id}
{$iBlogCategoryId = $_aRequest.category_id}
{/if}
{* edit blog *}
<label for="">{$aLang.plugin.categories.edit_blog_category}</label>
<select name="category_id" id="category_id" class="form-control">
{foreach $aCategories as $oCategory}
<option value="{$oCategory->getId()}" {if $iBlogCategoryId==$oCategory->getId()}selected{/if}>
{$oCategory->getTitle()|escape:'html'}
</option>
{/foreach}
</select>
<p class="help-block">
<small>{$aLang.plugin.categories.edit_blog_category_notice}</small>
</p>
{/if}
</div>
{else}

{/if}

0 comments on commit ae259b1

Please sign in to comment.