diff --git a/generic/templates/generic/trainees.html b/generic/templates/generic/trainees.html index 5b16de3d..1d1e5389 100644 --- a/generic/templates/generic/trainees.html +++ b/generic/templates/generic/trainees.html @@ -9,6 +9,7 @@ {% for i in "123456"|make_list %} ST{{i}}{% if not forloop.last %}, {% endif %} {% endfor %} + Add trainee

{% if grade %} @@ -38,7 +39,12 @@ add {% endif %} - User/Profile + User/Profile + + + {% endfor %} diff --git a/generic/urls.py b/generic/urls.py index 06b62aa0..f68b8397 100755 --- a/generic/urls.py +++ b/generic/urls.py @@ -113,6 +113,11 @@ urlpatterns = [ views.users_bulk_edit, name="users_bulk_edit", ), + path( + "user//not_trainee", + views.user_not_trainee, + name="user_not_trainee", + ), path("user/group/", views.user_group_view, name="user_group_view"), path("user/group/all", views.user_group_view_all, name="user_group_view_all"), path( diff --git a/generic/views.py b/generic/views.py index d94a37a2..f47e29e1 100644 --- a/generic/views.py +++ b/generic/views.py @@ -2791,6 +2791,14 @@ def get_user_selection_from_request(request): user_models = User.objects.filter(id__in=selected_users) return user_models +@user_is_cid_user_manager +def user_not_trainee(request, user_id): + user = get_object_or_404(User, pk=user_id) + + user.userprofile.peninsula_trainee = False + user.userprofile.save() + + return HttpResponse(f"{user.username} is no longer a trainee", content_type="text/plain") @user_is_cid_user_manager def users_bulk_edit(request): diff --git a/rad/static/css/anatomy.css b/rad/static/css/anatomy.css index ba942955..e3592340 100644 --- a/rad/static/css/anatomy.css +++ b/rad/static/css/anatomy.css @@ -1275,3 +1275,11 @@ tr:has(> td > a) { color: lightgray; overflow: auto; } + +.hover-highlight { + opacity: 50%; +} +.hover-highlight:hover { + opacity: 100%; + color:purple; +} \ No newline at end of file