mirror of
https://github.com/chibicitiberiu/ytsm.git
synced 2024-02-24 05:43:31 +00:00
Added admin settings page. Improve dynamic_preferences integration.
This commit is contained in:
@ -46,6 +46,9 @@
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="userDropdown">
|
||||
<a class="dropdown-item" href="{% url 'settings' %}">Settings</a>
|
||||
{% if request.user.is_superuser %}
|
||||
<a class="dropdown-item" href="{% url 'admin_settings' %}">Admin settings</a>
|
||||
{% endif %}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="{% url 'logout' %}">Log out</a>
|
||||
</div>
|
||||
@ -54,9 +57,11 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'login' %}">Login</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'register' %}">Register</a>
|
||||
</li>
|
||||
{% if global_preferences.general__allow_registrations %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'register' %}">Register</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
11
app/YtManagerApp/templates/YtManagerApp/settings_admin.html
Normal file
11
app/YtManagerApp/templates/YtManagerApp/settings_admin.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "YtManagerApp/master_default.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div class="container">
|
||||
<h1>Admin settings</h1>
|
||||
{% crispy form %}
|
||||
</div>
|
||||
|
||||
{% endblock body %}
|
@ -24,9 +24,17 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<h5>Register</h5>
|
||||
{% if not global_preferences.general__allow_registrations %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
Registrations are disabled by the administrator!
|
||||
</div>
|
||||
|
||||
{% crispy form %}
|
||||
{% else %}
|
||||
|
||||
<h5>Register</h5>
|
||||
{% crispy form %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user