fix: Enhances activity visibility control
Replaces conditional rendering with inline style for hidden activities. This simplifies the template logic and maintains consistent structure for all activities, enhancing UI flexibility.
This commit is contained in:
parent
d522f23b55
commit
3c3cfc38ba
1 changed files with 2 additions and 3 deletions
|
@ -79,14 +79,13 @@
|
||||||
<b>{{ activitycategory.name }}</b>
|
<b>{{ activitycategory.name }}</b>
|
||||||
</p>
|
</p>
|
||||||
{% for activity in activitycategory.activity_set.all|dictsort:"name" %}
|
{% for activity in activitycategory.activity_set.all|dictsort:"name" %}
|
||||||
{% if not activity.hidden %}
|
<p {% if activity.hidden %}style="display: none;"{% endif %}>
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
{% if activity in object.activity_set %}checked{% endif %}
|
{% if activity in object.activity_set %}checked{% endif %}
|
||||||
value="{{ activity.id }}"
|
value="{{ activity.id }}"
|
||||||
name="activities">
|
name="activities">
|
||||||
<i class="{{ activity.icon }}" style="color:{{ activity.color }};"></i> {{ activity }}
|
<i class="{{ activity.icon }}" style="color:{{ activity.color }};"></i> {{ activity }}
|
||||||
<br>
|
</p>
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% other_activities as activities %}
|
{% other_activities as activities %}
|
||||||
|
|
Loading…
Reference in a new issue