diff --git a/physionet-django/console/templates/console/application_display_table.html b/physionet-django/console/templates/console/application_display_table.html
index 6a86f08822..68fa202f69 100644
--- a/physionet-django/console/templates/console/application_display_table.html
+++ b/physionet-django/console/templates/console/application_display_table.html
@@ -3,7 +3,9 @@
{% load console_templatetags %}
Username: {{ application.user.username }}
-Applied: {{ application.application_datetime|date }}
+ Applied: {{ application.application_datetime|date }}
+[View previous applications.]
+[Search for name and affiliation.]
{% if application.reference_contact_datetime %}
Reference contact date: {{ application.reference_contact_datetime|date }}
diff --git a/physionet-django/console/views.py b/physionet-django/console/views.py
index 1c9d4fccb5..982ef7d6e6 100644
--- a/physionet-django/console/views.py
+++ b/physionet-django/console/views.py
@@ -927,7 +927,6 @@ def user_management(request, username):
projects['Archived'] = ArchivedProject.objects.filter(authors__user=user).order_by('-archive_datetime')
projects['Published'] = PublishedProject.objects.filter(authors__user=user).order_by('-publish_datetime')
-
return render(request, 'console/user_management.html', {'subject': user,
'profile': user.profile,
'emails': emails,
diff --git a/physionet-django/user/urls.py b/physionet-django/user/urls.py
index 4ed91fe989..83fa653bf1 100644
--- a/physionet-django/user/urls.py
+++ b/physionet-django/user/urls.py
@@ -38,6 +38,8 @@
path('settings/credentialing/', views.edit_credentialing, name='edit_credentialing'),
path('settings/credentialing/applications/',
views.user_credential_applications, name='user_credential_applications'),
+ path('settings/credentialing/applications//',
+ views.user_credential_applications, name='user_credential_applications'),
path('settings/agreements/', views.view_agreements, name='edit_agreements'),
path('settings/agreements//',
views.view_signed_agreement, name='view_signed_agreement'),
diff --git a/physionet-django/user/views.py b/physionet-django/user/views.py
index 6e365c0ee6..632a6021d5 100644
--- a/physionet-django/user/views.py
+++ b/physionet-django/user/views.py
@@ -16,7 +16,7 @@
from django.db import IntegrityError
from django.forms import inlineformset_factory, HiddenInput, CheckboxInput
from django.http import HttpResponse, Http404, HttpResponseRedirect
-from django.shortcuts import redirect, render
+from django.shortcuts import redirect, render, get_object_or_404
from django.template import loader
from django.urls import reverse, reverse_lazy
from django.utils import timezone
@@ -576,12 +576,19 @@ def edit_credentialing(request):
@login_required
-def user_credential_applications(request):
+def user_credential_applications(request, username=None):
"""
All the credential applications made by a user
"""
+ if username:
+ if request.user.is_admin or (request.user == username):
+ request_user = get_object_or_404(User, username__iexact=username)
+ else:
+ raise Http404()
+ else:
+ request_user = request.user
applications = CredentialApplication.objects.filter(
- user=request.user).order_by('-application_datetime')
+ user=request_user).order_by('-application_datetime')
return render(request, 'user/user_credential_applications.html',
{'applications':applications})