small ifx

This commit is contained in:
Faheed 2025-12-07 17:20:08 +03:00
parent 3f6bbd1cd5
commit c83b878be6
2 changed files with 15 additions and 14 deletions

View File

@ -163,6 +163,7 @@ logger = logging.getLogger(__name__)
User = get_user_model()
@login_required
@superuser_required
def settings(request):
return render(request,'user/settings.html')

View File

@ -93,9 +93,9 @@
}
/* ---------------------------------------------------- */
/* 5. BADGE VISIBILITY FIXES (Guaranteed Colors) */
/* 5. badges VISIBILITY FIXES (Guaranteed Colors) */
/* ---------------------------------------------------- */
.badge {
.badges {
font-weight: 600;
line-height: 1.4;
padding: 0.4em 0.6em;
@ -106,26 +106,26 @@
position: relative;
}
/* Dark Badges (CRUD Create/Delete & Login/Logout Type) - Use light text */
.badge-crud-create {
/* Dark badgess (CRUD Create/Delete & Login/Logout Type) - Use light text */
.badges-crud-create {
background-color: var(--color-success) !important;
color: var(--color-text-on-dark) !important;
}
.badge-crud-delete {
.badges-crud-delete {
background-color: var(--color-danger) !important;
color: var(--color-text-on-dark) !important;
}
.badge-login-status {
.badges-login-status {
background-color: var(--color-primary-dark) !important;
color: var(--color-text-on-dark) !important;
}
/* Light Badges (CRUD Update & Request Method) - Use dark text */
.badge-crud-update {
/* Light badgess (CRUD Update & Request Method) - Use dark text */
.badges-crud-update {
background-color: var(--color-warning) !important;
color: var(--color-text-dark) !important;
}
.badge-request-method {
.badges-request-method {
background-color: var(--color-info) !important;
color: var(--color-text-dark) !important;
}
@ -228,9 +228,9 @@
<td>{{ log.user.email|default:"N/A" }}</td>
<td>
<span class="badge rounded-pill
{% if log.event_type == 1 %}badge-crud-create
{% elif log.event_type == 2 %}badge-crud-update
{% else %}badge-crud-delete{% endif %}">
{% if log.event_type == 1 %}badges-crud-create
{% elif log.event_type == 2 %}badges-crud-update
{% else %}badges-crud-delete{% endif %}">
{% if log.event_type == 1 %}<i class="fas fa-plus-circle me-1"></i>{% trans "CREATE" %}
{% elif log.event_type == 2 %}<i class="fas fa-edit me-1"></i>{% trans "UPDATE" %}
{% else %}<i class="fas fa-trash-alt me-1"></i>{% trans "DELETE" %}{% endif %}
@ -256,7 +256,7 @@
{% endwith %}
</td>
<td>
<span class="badge rounded-pill badge-login-status">
<span class="badge rounded-pill badges-login-status">
{% if log.login_type == 0 %}{% trans "Login" %}
{% elif log.login_type == 1 %}{% trans "Logout" %}
{% else %}{% trans "Failed Login" %}{% endif %}
@ -277,7 +277,7 @@
<td>{{ log.datetime|date:"Y-m-d H:i:s" }}</td>
<td>{{ log.user.get_full_name|default:log.user.email|default:"Anonymous" }}</td>
<td>
<span class="badge rounded-pill badge-request-method">{{ log.method }}</span>
<span class="badge rounded-pill badges-request-method">{{ log.method }}</span>
</td>
<td><code class="text-break small" style="color: var(--color-text-dark) !important;">{{ log.url}}</code></td>