add review link to rcr
This commit is contained in:
+2
-1
@@ -102,7 +102,8 @@ urlpatterns = [
|
||||
path("accounts/", include("django.contrib.auth.urls")),
|
||||
path("accounts/profile", views.profile, name="profile"),
|
||||
path("accounts/profile/<str:slug>/", views.account_profile, name="account_profile"),
|
||||
path("", TemplateView.as_view(template_name="index.html"), name="home"),
|
||||
#path("", TemplateView.as_view(template_name="index.html"), name="home"),
|
||||
path("", views.index, name="home"),
|
||||
path("cid/results/<int:cid>/", views.cid_results, name="cid_results"),
|
||||
path("cid/<int:cid>/<str:passcode>", views.cid_scores, name="cid_scores"),
|
||||
path("cid/<int:cid>/", views.cid_scores_admin, name="cid_scores_admin"),
|
||||
|
||||
@@ -75,6 +75,7 @@ import json
|
||||
|
||||
from django.template import RequestContext
|
||||
|
||||
from django.db.models import Q
|
||||
|
||||
def feedback_checker(user):
|
||||
return user.groups.filter(name="feedback_checker").exists()
|
||||
@@ -88,6 +89,10 @@ def profile(request):
|
||||
user = request.user
|
||||
return render(request, "profile.html", {"user": user})
|
||||
|
||||
def index(request):
|
||||
|
||||
rcr_assessor = request.user.groups.filter(Q(name="rcr_radiology_assessor") | Q(name="rcr_oncology_assessor")| Q(name="rcr_assessor")).exists()
|
||||
return render(request, "index.html", {"rcr_assessor": rcr_assessor})
|
||||
|
||||
@user_is_cid_user_manager
|
||||
def account_profile(request, slug):
|
||||
|
||||
@@ -85,6 +85,9 @@
|
||||
<span id="" class="top-bar-link">
|
||||
<a href="{% url 'rcr:radiology_assessors_view' %}">Assessors</a>
|
||||
</span>
|
||||
<span id="" class="top-bar-link">
|
||||
<a href="{% url 'rcr:radiology_review_view' %}">Review</a>
|
||||
</span>
|
||||
{% if request.user.is_staff %}
|
||||
<span id="admin-link" class="top-bar-link">
|
||||
<a href="{% url 'admin:index' %}">Admin</a>
|
||||
|
||||
@@ -11,6 +11,7 @@ app_name = "rcr"
|
||||
urlpatterns = [
|
||||
path("radiology/", views.radiology_index, name="radiology_index_view"),
|
||||
path("radiology/all", views.radiology_index_all, name="radiology_index_all_view"),
|
||||
path("radiology/review", views.radiology_review, name="radiology_review_view"),
|
||||
path(
|
||||
"radiology/completed",
|
||||
views.radiology_index_completed,
|
||||
|
||||
@@ -68,6 +68,10 @@ def radiology_index_all(request):
|
||||
},
|
||||
)
|
||||
|
||||
@user_is_rcr
|
||||
def radiology_review(request):
|
||||
return redirect(f"{reverse('rcr:radiology_index_all_view')}?needs_review=true")
|
||||
|
||||
@user_is_rcr
|
||||
def radiology_index(request, assigned=True, user_pk: int | None = None):
|
||||
|
||||
|
||||
@@ -42,6 +42,11 @@
|
||||
|
||||
<p><a href="http://www.penracourses.org.uk/rts">RTS is available here</a></p>
|
||||
|
||||
{% if rcr_assessor %}
|
||||
<div>
|
||||
<h3><a href="{% url 'rcr:radiology_index_view'%}">RCR platform migration</a></h3>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not request.user.is_authenticated %}
|
||||
<p><a href="{% url 'cid_selector' %}">CID users can log in here</a></p>
|
||||
|
||||
Reference in New Issue
Block a user