diff --git a/atlas/templates/atlas/collection_viva.html b/atlas/templates/atlas/collection_viva.html index d1c76a27..27ac6fe8 100644 --- a/atlas/templates/atlas/collection_viva.html +++ b/atlas/templates/atlas/collection_viva.html @@ -6,8 +6,10 @@ {% for case in cases %}
  • Case {{forloop.counter}}: {{case.title}}   - - + aoeu + +{% comment %} {% endcomment %} +
  • {% endfor %} @@ -20,34 +22,41 @@ {% block js %} - + -{{ form.media }} + {{ form.media }} {% endblock %} \ No newline at end of file diff --git a/atlas/templates/atlas/collection_viva_case.html b/atlas/templates/atlas/collection_viva_case.html new file mode 100644 index 00000000..2024e3a6 --- /dev/null +++ b/atlas/templates/atlas/collection_viva_case.html @@ -0,0 +1,27 @@ + + + + + Collection Viva Case + + + + +

    {{current_case.title}}

    + + + + + + diff --git a/atlas/urls.py b/atlas/urls.py index 3abe34e3..10c0cda7 100755 --- a/atlas/urls.py +++ b/atlas/urls.py @@ -57,6 +57,7 @@ urlpatterns = [ ), path("collection/", views.collection_detail, name="collection_detail"), path("collection//viva", views.collection_viva, name="collection_viva"), + path("collection//viva/", views.collection_viva_case, name="collection_viva_case"), path( "collection//take", views.collection_take_start, diff --git a/atlas/views.py b/atlas/views.py index b53f3e3e..54356f2a 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -1350,6 +1350,19 @@ def collection_viva(request, pk): {"collection": collection, "cases": cases, "can_edit": True}, ) +@user_is_collection_author_or_atlas_editor +def collection_viva_case(request, pk, case_number): + collection = get_object_or_404(CaseCollection, pk=pk) + + cases = collection.cases.all().order_by("casedetail__sort_order") + current_case = cases[case_number] + + return render( + request, + "atlas/collection_viva_case.html", + {"collection": collection, "cases": cases, "current_case": current_case}, + ) + @user_is_collection_author_or_atlas_editor def collection_detail(request, pk): collection = get_object_or_404(CaseCollection, pk=pk)