-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.create.content.tpl
66 lines (53 loc) · 2.29 KB
/
menu.create.content.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<script type="text/javascript">
jQuery(function($){
var trigger = $('#dropdown-create-trigger');
var menu = $('#dropdown-create-menu');
var pos = trigger.position();
// Dropdown
menu.css({ 'left': pos.left - 5 });
trigger.click(function(){
menu.slideToggle();
return false;
});
// Hide menu
$(document).click(function(){
menu.slideUp();
});
$('body').on("click", "#dropdown-create-trigger, #dropdown-create-menu", function(e) {
e.stopPropagation();
});
});
</script>
<div class="dropdown-create">
{strip}
<h2 class="page-header">{$aLang.block_create} <a href="#" class="dropdown-create-trigger link-dashed" id="dropdown-create-trigger">
{if $sMenuItemSelect=='topic'}
{$aLang.topic_menu_add}
{elseif $sMenuItemSelect=='blog'}
{$aLang.blog_menu_create}
{else}
{hook run='menu_create_item_select' sMenuItemSelect=$sMenuItemSelect}
{/if}
</a></h2>
{/strip}
<ul class="dropdown-menu" id="dropdown-create-menu" style="display: none">
<li {if $sMenuItemSelect=='topic'}class="active"{/if}><a href="{router page='topic'}add/">{$aLang.topic_menu_add}</a></li>
<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'}
<ul class="nav nav-pills">
<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>
{if $iUserCurrentCountTopicDraft}
<li class="pull-right{if $sMenuSubItemSelect=='saved'} active{/if}">
<a href="{router page='topic'}saved/">{$aLang.topic_menu_saved} ({$iUserCurrentCountTopicDraft})</a>
</li>
{/if}
{hook run='menu_create_topic_item'}
</ul>
{/if}
{hook run='menu_create' sMenuItemSelect=$sMenuItemSelect sMenuSubItemSelect=$sMenuSubItemSelect}