test cimar iframe

This commit is contained in:
Ross
2024-12-23 12:36:41 +00:00
parent 178ec034a3
commit 22812c5ec1
5 changed files with 29 additions and 2 deletions
+1 -1
View File
@@ -11,5 +11,5 @@
<a href="{% url 'anatomy:exam_cids' exam_id=exam.pk %}">Candidates</a> /
<a href="{% url 'anatomy:exam_stats' exam_id=exam.pk %}">Stats</a> /
{% endif %}
<a href="{% url 'anatomy:anatomy_create_exam' pk=exam.pk %}" title="Add a new question directly into the exam.">Add New Question</a>
<a href="{% url 'anatomy:create_exam' pk=exam.pk %}" title="Add a new question directly into the exam.">Add New Question</a>
{% endblock %}
@@ -1,5 +1,5 @@
{% if request.user.is_authenticated %}
<br/>Collection: {{collection.name}}-> <a href="{% url 'atlas:collection_detail' pk=collection.pk %}">Overview</a> /
Collection: {{collection.name}}-> <a href="{% url 'atlas:collection_detail' pk=collection.pk %}">Overview</a> /
<a href="{% url 'atlas:collection_history' collection.pk %}">History</a> /
<a href="{% url 'atlas:collection_mark_overview' collection.pk %}">Mark</a> /
<a href="{% url 'atlas:collection_scores_cid' collection.pk %}">Scores</a> /
+1
View File
@@ -155,6 +155,7 @@ urlpatterns = [
# path('select2/', include('select2.urls')),
*HTMXAutoComplete.url_dispatcher('ac'),
path('psutil/', psutil_urlpatterns(), name='psutil'),
path("cimar/", views.cimar, name="cimar"),
]
+6
View File
@@ -511,6 +511,12 @@ def view_feedback(request):
def privacy_view(request):
return render(request, "privacy.html")
def cimar(request):
if "link_id" in request.GET:
link_id = request.GET["link_id"]
return render(request, "cimar.html", {"link_id": link_id})
return render(request, "cimar.html")
def about_view(request):
return render(request, "about.html")
+20
View File
@@ -0,0 +1,20 @@
{% extends 'base.html' %}
{% block content %}
<div class="anatomy">
{% if link_id %}
<iframe src="https://cloud.cimar.co.uk/link/{{link_id}}" width="100%" height="1000px" style="border:none;"></iframe>
<a href="https://cloud.cimar.co.uk/link/{{link_id}}">Click here to open the CIMAR viewer in a new tab</a>
{% else %}
No link id
{% endif %}
</div>
{% endblock %}