-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom-question-button.ftl
27 lines (24 loc) · 1.01 KB
/
custom-question-button.ftl
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
<style>
div#ask-button-ak {
margin-top: -5.5px;
margin-right: 20px;
display: none;
}
@media screen and (min-width: 992px){
div#ask-button-ak {
display: inline-block;
}
}
</style>
<#if (coreNode.nodeType == "board") && (coreNode.discussionStyle == "forum") && (coreNode.permissions.hasPermission("create_thread"))>
<#assign sourceBoard = coreNode.id/>
<#assign postURL = "/t5/forums/postpage/choose-node/true/board-id/" + sourceBoard + "?source=header" />
<#elseif (coreNode.nodeType == "grouphub") && (coreNode.permissions.hasPermission("create_thread"))>
<#assign sourceBoard = coreNode.id/>
<#assign postURL = "/t5/forums/postpage/choose-node/true/board-id/" + sourceBoard + "forum-board?source=header" />
<#else>
<#assign postURL = "/t5/forums/postpage/choose-node/true?source=header" />
</#if>
<div class="ask-button-ak" id="ask-button-ak">
<a href="${postURL}" target="_blank" class="lia-button lia-button-primary">Start a topic</a>
</div>