mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: only show register button when permission allowed (#679)
This commit is contained in:
1 parent
a48369ab7c
commit
80aea0b09c
2 files changed
+4
No files matched your search
@@ -4,7 +4,9 @@
|
|||||||
<div class="dialog--signin__side">
|
<div class="dialog--signin__side">
|
||||||
<h1>{{ _("Don't have an account?") }}</h1>
|
<h1>{{ _("Don't have an account?") }}</h1>
|
||||||
<p>{{ _('By signing up a {0} universal account, you can submit code and join discussions in all online judging services provided by us.').format((handler.domain|default({ui:[]})).ui.name|default(model.system.get('server.name'))) }}</p>
|
<p>{{ _('By signing up a {0} universal account, you can submit code and join discussions in all online judging services provided by us.').format((handler.domain|default({ui:[]})).ui.name|default(model.system.get('server.name'))) }}</p>
|
||||||
|
{% if handler.user.hasPriv(PRIV.PRIV_REGISTER_USER) %}
|
||||||
<div><a href="{{ url('user_register') }}" class="inverse rounded button">{{ _('Sign Up Now') }}</a></div>
|
<div><a href="{{ url('user_register') }}" class="inverse rounded button">{{ _('Sign Up Now') }}</a></div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dialog--signin__main">
|
<div class="dialog--signin__main">
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
<ol class="nav__list nav__list--secondary clearfix">
|
<ol class="nav__list nav__list--secondary clearfix">
|
||||||
{% if not handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
{% if not handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
||||||
<li class="nav__list-item"><a href="{{ url('user_login') }}" class="nav__item" name="nav_login">{{ _('Login') }}</a></li>
|
<li class="nav__list-item"><a href="{{ url('user_login') }}" class="nav__item" name="nav_login">{{ _('Login') }}</a></li>
|
||||||
|
{% if handler.user.hasPriv(PRIV.PRIV_REGISTER_USER) %}
|
||||||
<li class="nav__list-item"><a href="{{ url('user_register') }}" class="nav__item--round">{{ _('Sign Up') }}</a></li>
|
<li class="nav__list-item"><a href="{{ url('user_register') }}" class="nav__item--round">{{ _('Sign Up') }}</a></li>
|
||||||
|
{% endif %}
|
||||||
<li class="nav__list-item nojs--hide" data-dropdown-pos="bottom right" data-dropdown-custom-class="nav__dropdown" data-dropdown-target="#menu-nav-user" data-dropdown-disabledconstrainToWindow data-dropdown-trigger-desktop-only>
|
<li class="nav__list-item nojs--hide" data-dropdown-pos="bottom right" data-dropdown-custom-class="nav__dropdown" data-dropdown-target="#menu-nav-user" data-dropdown-disabledconstrainToWindow data-dropdown-trigger-desktop-only>
|
||||||
<a href="javascript:;" class="nav__item">
|
<a href="javascript:;" class="nav__item">
|
||||||
<span class="icon icon-global"></span>Language <span class="icon icon-expand_more"></span>
|
<span class="icon icon-global"></span>Language <span class="icon icon-expand_more"></span>
|
||||||
|
|||||||
Reference in new issue
Block a user