Revert "fix(templates): grey out filament write controls for read-only viewers"

This reverts commit 1bbeef7a47.
This commit is contained in:
RNL
2026-08-12 22:24:42 +10:00
parent b2a083fb94
commit 911905610f
4 changed files with 9 additions and 9 deletions

View File

@@ -10,7 +10,7 @@
</div> </div>
<div class="col-md-4 text-end"> <div class="col-md-4 text-end">
{% if not is_basic_user %} {% if not is_basic_user %}
<a href="{% url 'bambu_run:filament_color_create' %}" class="btn btn-primary{% if not can_write %} disabled" aria-disabled="true" tabindex="-1" title="Read-only access{% endif %}"> <a href="{% url 'bambu_run:filament_color_create' %}" class="btn btn-primary">
<i class="bi bi-plus-circle"></i> Add New Color <i class="bi bi-plus-circle"></i> Add New Color
</a> </a>
{% endif %} {% endif %}
@@ -81,8 +81,8 @@
<td class="align-middle">{{ color.brand }}</td> <td class="align-middle">{{ color.brand }}</td>
<td class="align-middle"> <td class="align-middle">
{% if not is_basic_user %} {% if not is_basic_user %}
<a href="{% url 'bambu_run:filament_color_update' color.pk %}" class="btn btn-sm btn-warning{% if not can_write %} disabled" aria-disabled="true" tabindex="-1" title="Read-only access{% endif %}">Edit</a> <a href="{% url 'bambu_run:filament_color_update' color.pk %}" class="btn btn-sm btn-warning">Edit</a>
<a href="{% url 'bambu_run:filament_color_delete' color.pk %}" class="btn btn-sm btn-danger{% if not can_write %} disabled" aria-disabled="true" tabindex="-1" title="Read-only access{% endif %}">Delete</a> <a href="{% url 'bambu_run:filament_color_delete' color.pk %}" class="btn btn-sm btn-danger">Delete</a>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>

View File

@@ -14,7 +14,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
{% if not is_basic_user %} {% if not is_basic_user %}
<a href="{% url 'bambu_run:filament_update' filament.pk %}" class="btn btn-warning{% if not can_write %} disabled" aria-disabled="true" tabindex="-1" title="Read-only access{% endif %}">Edit</a> <a href="{% url 'bambu_run:filament_update' filament.pk %}" class="btn btn-warning">Edit</a>
{% endif %} {% endif %}
<a href="{% url 'bambu_run:filament_list' %}" class="btn btn-secondary">Back to List</a> <a href="{% url 'bambu_run:filament_list' %}" class="btn btn-secondary">Back to List</a>
</div> </div>

View File

@@ -20,7 +20,7 @@
<a href="{% url 'bambu_run:filament_color_list' %}" class="btn btn-outline-info me-2"> <a href="{% url 'bambu_run:filament_color_list' %}" class="btn btn-outline-info me-2">
<i class="bi bi-palette"></i> Manage Colors <i class="bi bi-palette"></i> Manage Colors
</a> </a>
<a href="{% url 'bambu_run:filament_create' %}" class="btn btn-primary{% if not can_write %} disabled" aria-disabled="true" tabindex="-1" title="Read-only access{% endif %}"> <a href="{% url 'bambu_run:filament_create' %}" class="btn btn-primary">
<i class="bi bi-plus-circle"></i> Add Filament <i class="bi bi-plus-circle"></i> Add Filament
</a> </a>
</div> </div>
@@ -177,7 +177,7 @@
<td class="align-middle"> <td class="align-middle">
<a href="{% url 'bambu_run:filament_detail' filament.pk %}" class="btn btn-sm btn-info">View</a> <a href="{% url 'bambu_run:filament_detail' filament.pk %}" class="btn btn-sm btn-info">View</a>
{% if not is_basic_user %} {% if not is_basic_user %}
<a href="{% url 'bambu_run:filament_update' filament.pk %}" class="btn btn-sm btn-warning{% if not can_write %} disabled" aria-disabled="true" tabindex="-1" title="Read-only access{% endif %}">Edit</a> <a href="{% url 'bambu_run:filament_update' filament.pk %}" class="btn btn-sm btn-warning">Edit</a>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>

View File

@@ -10,7 +10,7 @@
</div> </div>
<div class="col-md-4 text-end"> <div class="col-md-4 text-end">
{% if not is_basic_user %} {% if not is_basic_user %}
<a href="{% url 'bambu_run:filament_type_create' %}" class="btn btn-primary{% if not can_write %} disabled" aria-disabled="true" tabindex="-1" title="Read-only access{% endif %}"> <a href="{% url 'bambu_run:filament_type_create' %}" class="btn btn-primary">
<i class="bi bi-plus-circle"></i> Add New Type <i class="bi bi-plus-circle"></i> Add New Type
</a> </a>
{% endif %} {% endif %}
@@ -63,8 +63,8 @@
<td class="align-middle">{{ ft.brand }}</td> <td class="align-middle">{{ ft.brand }}</td>
<td class="align-middle"> <td class="align-middle">
{% if not is_basic_user %} {% if not is_basic_user %}
<a href="{% url 'bambu_run:filament_type_update' ft.pk %}" class="btn btn-sm btn-warning{% if not can_write %} disabled" aria-disabled="true" tabindex="-1" title="Read-only access{% endif %}">Edit</a> <a href="{% url 'bambu_run:filament_type_update' ft.pk %}" class="btn btn-sm btn-warning">Edit</a>
<a href="{% url 'bambu_run:filament_type_delete' ft.pk %}" class="btn btn-sm btn-danger{% if not can_write %} disabled" aria-disabled="true" tabindex="-1" title="Read-only access{% endif %}">Delete</a> <a href="{% url 'bambu_run:filament_type_delete' ft.pk %}" class="btn btn-sm btn-danger">Delete</a>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>