2012-04-19 21:04:25 +03:00
|
|
|
<script type="text/javascript">
|
2012-04-16 19:37:23 +03:00
|
|
|
jQuery(function($){
|
|
|
|
var menu = $('#create-dropdown-menu');
|
|
|
|
|
|
|
|
var pos = $('#create-dropdown-link').position();
|
|
|
|
menu.css({ 'left': pos.left - 5 });
|
|
|
|
|
|
|
|
$('.create-dropdown-link').click(function(){
|
|
|
|
menu.slideToggle();
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).click(function(){
|
|
|
|
menu.slideUp();
|
|
|
|
});
|
|
|
|
|
|
|
|
$('body').on("click", "#create-dropdown, #create-dropdown-link", function(e) {
|
|
|
|
e.stopPropagation();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="create-dropdown" id="create-dropdown">
|
|
|
|
{strip}
|
|
|
|
<h2 class="page-header">Создать <a href="#" class="create-dropdown-link link-dashed" id="create-dropdown-link">
|
|
|
|
{if $sMenuItemSelect=='topic'}
|
2012-04-19 09:46:18 +03:00
|
|
|
{$aLang.topic_menu_add}
|
2012-04-16 19:37:23 +03:00
|
|
|
{elseif $sMenuItemSelect=='blog'}
|
|
|
|
{$aLang.blog_menu_create}
|
|
|
|
{else}
|
|
|
|
{hook run='menu_create_item_select' sMenuItemSelect=$sMenuItemSelect}
|
|
|
|
{/if}
|
|
|
|
</a></h2>
|
|
|
|
{/strip}
|
|
|
|
<ul class="create-dropdown-menu" id="create-dropdown-menu" style="display: none">
|
2012-04-19 09:46:18 +03:00
|
|
|
<li {if $sMenuItemSelect=='topic'}class="active"{/if}><a href="{router page='topic'}add/">{$aLang.topic_menu_add}</a></li>
|
2012-04-16 19:37:23 +03:00
|
|
|
<li {if $sMenuItemSelect=='blog'}class="active"{/if}><a href="{router page='blog'}add/">{$aLang.blog_menu_create}</a></li>
|
|
|
|
{hook run='menu_create_item' sMenuItemSelect=$sMenuItemSelect}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{if $sMenuItemSelect=='topic'}
|
|
|
|
{if $iUserCurrentCountTopicDraft}
|
|
|
|
<a href="{router page='topic'}saved/" class="drafts">{$aLang.topic_menu_saved} ({$iUserCurrentCountTopicDraft})</a>
|
|
|
|
{/if}
|
|
|
|
<ul class="nav nav-pills mb-30">
|
|
|
|
<li {if $sMenuSubItemSelect=='topic'}class="active"{/if}><a href="{router page='topic'}add/">{$aLang.topic_menu_add_topic}</a></li>
|
|
|
|
<li {if $sMenuSubItemSelect=='question'}class="active"{/if}><a href="{router page='question'}add/">{$aLang.topic_menu_add_question}</a></li>
|
|
|
|
<li {if $sMenuSubItemSelect=='link'}class="active"{/if}><a href="{router page='link'}add/">{$aLang.topic_menu_add_link}</a></li>
|
|
|
|
<li {if $sMenuSubItemSelect=='photoset'}class="active"{/if}><a href="{router page='photoset'}add/">{$aLang.topic_menu_add_photoset}</a></li>
|
|
|
|
{hook run='menu_create_topic_item'}
|
|
|
|
</ul>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
{hook run='menu_create' sMenuItemSelect=$sMenuItemSelect sMenuSubItemSelect=$sMenuSubItemSelect}
|