使用url()来构建url

This commit is contained in:
masnn committed 2020-06-12 13:37:19 +08:00
1 parent 0efac48bde
commit 86f67a0ec3
61 files changed
+262 -275

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@
<div class="section__body">
{% if vnode %}
{% if handler.hasPerm(perm.PERM_CREATE_DISCUSSION) %}
<p><a href="/discuss/{{ model.discussion.typeDisplay[vnode.parentType] }}/{{ vnode.parentId }}/create" class="expanded primary button">{{ _('Create a Discussion') }}</a></p>
<p><a href="{{ url('discussion_create', type=model.discussion.typeDisplay[vnode.parentType], name=vnode.parentId) }}" class="expanded primary button">{{ _('Create a Discussion') }}</a></p>
{% else %}
{% if not handler.hasPerm(perm.PERM_LOGGEDIN) %}
<p><a href="javascript:showSignInDialog();" class="expanded primary button">{{ _('Login to Create a Discussion') }}</a></p>