major rcr update

This commit is contained in:
Ross
2024-01-22 20:57:26 +00:00
parent bfabde9ef6
commit 6cecb8514c
29 changed files with 784 additions and 77 deletions
@@ -1,10 +1,26 @@
{% extends 'rcr/base.html' %}
{% load auth_extras %}
{% block content %}
<h2>Assign items to {{user_to_assign}}</h2>
<details>
<summary>Filter</summary>
<form method="get">
{{ item_filter.form.as_p }}
<input type="submit" />
</form>
</details>
{% if request.user|has_group:"rcr_radiology_assessor" %}
Radiology
{% elif request.user|has_group:"rcr_oncology_assessor" %}
Oncology
{% endif %}
assessor.<br/>
<form action="" method="post" enctype="multipart/form-data" id="assessor-assignment-form">
{% csrf_token %}
{{assessor_assignment_form}}
+11 -2
View File
@@ -5,13 +5,22 @@
<h2>Assessors:</h2>
<h3>Radiology</h3>
<ul>
{% for assessor in assessors %}
{% for assessor in rad_assessors %}
<li>
{{assessor}} <a href='{% url "rcr:radiology_assigned_user_view" assessor.pk %}'>(items to assess)</a> <a href='{% url "rcr:radiology_index_completed_by_user_view" assessor.pk %}'>(items assessed)</a> <a href='{% url "rcr:radiology_assessor_assignment_view" assessor.pk %}'>(assign items)</a>
{{assessor}} <a href='{% url "rcr:radiology_assigned_user_view" assessor.pk %}'>(items to assess)</a> <a href='{% url "rcr:radiology_index_completed_by_user_view" assessor.pk %}'>(items assessed)</a> <a href='{% url "rcr:radiology_assessor_assignment_view" assessor.pk %}?assigned_to_radiology=null&specialty=Radiology&specialty=Cross-faculty'>(assign items)</a>
</li>
{% endfor %}
</ul>
<h3>Oncology</h3>
<ul>
{% for assessor in onc_assessors %}
<li>
{{assessor}} <a href='{% url "rcr:radiology_assigned_user_view" assessor.pk %}'>(items to assess)</a> <a href='{% url "rcr:radiology_index_completed_by_user_view" assessor.pk %}'>(items assessed)</a> <a href='{% url "rcr:radiology_assessor_assignment_view" assessor.pk %}?assigned_to_oncology=null&specialty=Oncology&specialty=Cross-faculty'>(assign items)</a>
</li>
{% endfor %}
</ul>
{% endblock %}
+3
View File
@@ -76,6 +76,9 @@
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
<div class="main-nav-header">
<span id="" class="top-bar-link">
<a href="{% url 'rcr:radiology_index_all_view' %}">All</a>
</span>
<span id="" class="top-bar-link">
<a href="{% url 'rcr:radiology_index_view' %}">Index</a>
</span>
+39 -13
View File
@@ -2,13 +2,14 @@
{% block content %}
{% if assessor %}
Assessor: {{assessor}}
{% endif %}
{% include 'rcr/item_filter.html' %}
{% if completed %}
<h2>Completed items:</h2>
@@ -24,25 +25,28 @@
{% endif %}
<ul>
<table>
{% for item in items %}
{% if item.completed %}
<li class="completed">
{% endif %}
{{forloop.counter}}:
{{item.name}} / {{item.rcr_platform_id}} <a href="{% url 'rcr:radiology_detail_view' item.pk %}">view</a> <a href="{% url 'rcr:radiology_update_view' item.pk %}">edit</a>
</li>
<tr class="{{item.content_type}} {% if item.completed_radiology %} completed-radiology{% endif %}{% if item.completed_radiology %} completed-oncology{% endif %}">
<td class="{{item.specialty}}">
{{forloop.counter}}:
</td>
<td> {{item.content_type}}</td>
<td>
{{item.name}}
</td>
<td><a href="{% url 'rcr:radiology_detail_view' item.pk %}">view</a> <a href="{% url 'rcr:radiology_update_view' item.pk %}">edit</a>
</td>
{% empty %}
No items found.
</tr>
{% endfor %}
</ul>
</table>
<a href="{% url 'rcr:radiology_index_view' %}">Todo</a>
<a href="{% url 'rcr:radiology_index_completed_view' %}">Done</a>
{% endblock %}
@@ -52,6 +56,28 @@
.completed::after {
content: '✓';
color: green;
};
}
.Radiology::before {
content: "R";
}
.Radiology {
color: green;
}
.Oncology::before {
content: "O";
}
.Oncology {
color: blue;
}
.Cross-faculty::before {
content: "C";
}
.Cross-faculty {
color: purple;
}
td {
padding-right: 10px;
}
</style>
{% endblock css %}
+21 -4
View File
@@ -1,8 +1,11 @@
{% extends 'rcr/base.html' %}
{% load markdownify %}
{% block content %}
<h2>Item: {{object.name}}</h2>
{% include "rcr/item_rcr_details.html" %}
<p>Category: {{object.category}}</p>
<p>Radiology Category: {{object.radiology_category}}</p>
<p>Oncology Category: {{object.oncology_category}}</p>
<p>
Level(s):
@@ -22,7 +25,10 @@
Date assessed: {{object.assessed_date}}
</p>
<p>
Assigned to: {{object.assigned_to}}
Assigned to (radiology): {{object.assigned_to_radiology}}
</p>
<p>
Assigned to (oncology): {{object.assigned_to_oncology}}
</p>
<p>
@@ -32,11 +38,22 @@
{% endfor %}
</p>
<p>
Completed: {{object.completed}}
Completed (radiology): {{object.completed_radiology}}
</p>
<p>
Completed (oncology): {{object.completed_oncology}}
</p>
<p><a href='{% url "rcr:radiology_update_view" object.pk %}'>Edit</a></p>
<details><summary> </summary>
</details>
{% endblock %}
{% endblock %}
{% block css %}
<style>
pre {
white-space: pre-wrap;
}
</style>
{% endblock css %}
+13
View File
@@ -0,0 +1,13 @@
{% if item_filter %}
<details>
<summary>
Filters
</summary>
<form method="get">
{{ item_filter.form.as_p }}
<input type="submit" />
</form>
</details>
{% endif %}
+67
View File
@@ -0,0 +1,67 @@
<div class="float-end opacity-25">{{object.rcr_platform_id}}</div>
{% load markdownify %}
{% if item.content_type == "Web link" or item.content_type == "Video" or item.content_type == "Audio" or item.content_type == "PowerPoint" or item.content_type == "Course" %}
<p>Link: <a href="https://cr.rcrlearning.org/#/catalogue/landingpage/item/{{object.rcr_platform_id}}/" title="Link to content on learning hub">click here</a></p>
{% elif item.content_type == "Curriculum" %}
<p>Link: <a href="https://cr.rcrlearning.org/#/catalogue/item/{{object.rcr_platform_id}}/" title="Link to content on learning hub">click here</a></p>
{% else %}
<p>Unknown content type!</p>
{% endif %}
{% if item.review_link %}
<p>Review link: {{item.review_link}}
{% if item.password %}
<br/>Password: {{item.password}}
{% endif %}
</p>
{% endif %}
<p>
<b>Description</b><br/>
<pre> {{object.description|markdownify}}</pre>
</p>
<p>
<details>
<summary>
<b>Description (raw)</b><br/>
</summary>
<pre> {{object.description}}</pre>
</details>
</p>
<div class="d-flex flex-row mb-3 flex-wrap">
<div class="p-2">
<b>Content type</b><br/>
{{object.content_type}}
</div>
<div class="p-2">
<b>Created on</b><br/>
{{object.created_on}}
</div>
<div class="p-2">
<b>Number of items</b><br/>
{{object.number_of_items}}
</div>
<div class="p-2">
<b>Speciality</b><br/>
{{object.specialty}}
</div>
<div class="p-2">
<b>Access count</b><br/>
{{object.access_count}}
</div>
<div class="p-2">
<b>Targeted to group</b><br/>
{{object.targeted_to_group}}
</div>
</div>
+15 -5
View File
@@ -5,18 +5,28 @@
{% comment %} {% if request.user.is_superuser %}
(<a href="{% url 'admin:auth_user_change' object.id %}" title="Edit the user using the admin interface">Admin Edit</a>)
{% endif %} {% endcomment %}
<p>Link: <a href="" title="Link to content on learning hub">click here</a></p>
{% include "rcr/item_rcr_details.html" %}
<form method="post">{% csrf_token %}
{{ form|crispy }}
<input type="submit" value="Update">
{% if skip == 0 or skip %}
<button> <a href="{% url 'rcr:radiology_update_next_skip_view' skip|add:1 %}">Skip</a> </button>
{% endif %}
</form>
{% if skip == 0 or skip %}
<a href="{% url 'rcr:radiology_update_next_skip_view' skip|add:1 %}"><button>Skip</button></a>
{% endif %}
<details><summary> </summary>
</details>
{% endblock %}
{% endblock %}
{% block css %}
<style>
pre {
white-space: pre-wrap;
}
</style>
{% endblock css %}