Refactor case detail references: standardize variable naming from case_detail to casedetail across templates for consistency
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<h2>Case: {{ case.title }}</h2>
|
<h2>Case: {{ case.title }}</h2>
|
||||||
{{ case_detail.question_schema }}
|
{{ casedetail.question_schema }}
|
||||||
|
|
||||||
|
|
||||||
{{ case.question_answers }}
|
{{ case.question_answers }}
|
||||||
|
|||||||
@@ -3,15 +3,15 @@
|
|||||||
{% comment %} <script src="{% static 'js/jquery-3.7.1.min.js' %}"></script>
|
{% comment %} <script src="{% static 'js/jquery-3.7.1.min.js' %}"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@json-editor/json-editor@latest/dist/jsoneditor.min.js"></script> {% endcomment %}
|
<script src="https://cdn.jsdelivr.net/npm/@json-editor/json-editor@latest/dist/jsoneditor.min.js"></script> {% endcomment %}
|
||||||
<ol>
|
<ol>
|
||||||
{% for case_detail in case_details %}
|
{% for casedetail in casedetails %}
|
||||||
|
|
||||||
<li id="case-detail-{{case_detail.pk}}"{% if case_detail.question_schema %} class="cases"{% endif %}>
|
<li id="case-detail-{{casedetail.pk}}"{% if casedetail.question_schema %} class="cases"{% endif %}>
|
||||||
<h2>Case: {{ case_detail.case.title }}</h2>
|
<h2>Case: {{ casedetail.case.title }}</h2>
|
||||||
|
|
||||||
{% if case_detail.question_schema %}
|
{% if casedetail.question_schema %}
|
||||||
<button class="btn btn-sm btn-secondary use-layout">Use schema</button>
|
<button class="btn btn-sm btn-secondary use-layout">Use schema</button>
|
||||||
<details><summary>Schema:</summary>
|
<details><summary>Schema:</summary>
|
||||||
<div class="schema" data-schema='{{ case_detail.get_question_schema }}'>{{ case_detail.question_schema }}</div>
|
<div class="schema" data-schema='{{ casedetail.get_question_schema }}'>{{ casedetail.question_schema }}</div>
|
||||||
</details>
|
</details>
|
||||||
<div class="form"></div>
|
<div class="form"></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
<div class="d-flex flex-wrap justify-content-between align-items-start mb-3">
|
<div class="d-flex flex-wrap justify-content-between align-items-start mb-3">
|
||||||
<div class="btn-toolbar" role="toolbar" aria-label="Case actions">
|
<div class="btn-toolbar" role="toolbar" aria-label="Case actions">
|
||||||
<div class="btn-group me-2 mb-2" role="group" aria-label="Primary actions">
|
<div class="btn-group me-2 mb-2" role="group" aria-label="Primary actions">
|
||||||
<a class="btn btn-sm btn-outline-primary" href="{% url 'atlas:case_detail' pk=case.pk %}" title="View the Case">View</a>
|
<a class="btn btn-sm btn-outline-primary" href="{% url 'atlas:casedetail' pk=case.pk %}" title="View the Case">View</a>
|
||||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_update' pk=case.pk %}" title="Edit the Case">Edit</a>
|
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_update' pk=case.pk %}" title="Edit the Case">Edit</a>
|
||||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_series_update' pk=case.pk %}" title="Edit the Cases Series">Series</a>
|
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_series_update' pk=case.pk %}" title="Edit the Cases Series">Series</a>
|
||||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_displaysets' pk=case.pk %}" title="View and edit case display sets">Display sets</a>
|
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_displaysets' pk=case.pk %}" title="View and edit case display sets">Display sets</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group me-2 mb-2" role="group" aria-label="Secondary actions">
|
||||||
|
<a class="btn btn-sm btn-outline-success" href="{% url 'atlas:case_clone' pk=case.pk %}" title="Clone the Case (duplicate everything but the images)">Clone</a>
|
||||||
|
<a class="btn btn-sm btn-outline-danger" href="{% url 'atlas:case_delete' pk=case.pk %}" title="Delete the Case">Delete</a>
|
||||||
|
<a class="btn btn-sm btn-outline-info" href="#" onclick="return window.create_popup_window('{% url 'feedback_create' question_type='atlas' pk=case.pk %}');">Add Note</a>
|
||||||
|
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_authors' case.pk %}" title="Edit Authors">Authors</a>
|
||||||
|
{% if request.user.is_superuser %}
|
||||||
|
<a class="btn btn-sm btn-outline-dark" href="{% url 'admin:atlas_case_change' case.id %}" title="Edit the Case using the admin interface">Admin</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-group me-2 mb-2" role="group" aria-label="Secondary actions">
|
|
||||||
<a class="btn btn-sm btn-outline-success" href="{% url 'atlas:case_clone' pk=case.pk %}" title="Clone the Case (duplicate everything but the images)">Clone</a>
|
|
||||||
<a class="btn btn-sm btn-outline-danger" href="{% url 'atlas:case_delete' pk=case.pk %}" title="Delete the Case">Delete</a>
|
|
||||||
<a class="btn btn-sm btn-outline-info" href="#" onclick="return window.create_popup_window('{% url 'feedback_create' question_type='atlas' pk=case.pk %}');">Add Note</a>
|
|
||||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_authors' case.pk %}" title="Edit Authors">Authors</a>
|
|
||||||
{% if request.user.is_superuser %}
|
|
||||||
<a class="btn btn-sm btn-outline-dark" href="{% url 'admin:atlas_case_change' case.id %}" title="Edit the Case using the admin interface">Admin</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
{% if collection %}
|
||||||
|
{% include 'atlas/partials/_viewing_case_as_part_of_collection.html' with nav_link_view="atlas:collection_case_view" %}
|
||||||
{% if collection %}
|
{% endif %}
|
||||||
{% include 'atlas/partials/_viewing_case_as_part_of_collection.html' with nav_link_view="atlas:collection_case_view" %}
|
|
||||||
{% endif %}
|
|
||||||
Reference in New Issue
Block a user