diff --git a/src/hci/templates/hci/base.html b/src/hci/templates/hci/base.html index 2699dc3..26809d6 100644 --- a/src/hci/templates/hci/base.html +++ b/src/hci/templates/hci/base.html @@ -15,18 +15,20 @@ -
-
- {% if user.is_authenticated %} -
-

{{ email }} | Log Out

-

{{ affiliation }} | Change Affiliation

-
- {% endif %} -

Clinical Genome HLA Curation

- {% block nav %}{% endblock %} - {% block content %}{% endblock %} -
-
+
+
+
+ {% if user.is_authenticated %} +
+

{{ email }} | Log Out

+

{{ affiliation }} | Change Affiliation

+
+ {% endif %} +

Clinical Genome HLA Curation

+ {% block nav %}{% endblock %} + {% block content %}{% endblock %} +
+
+
\ No newline at end of file diff --git a/src/hci/templates/hci/index.html b/src/hci/templates/hci/index.html index 809914b..cd3b278 100644 --- a/src/hci/templates/hci/index.html +++ b/src/hci/templates/hci/index.html @@ -12,10 +12,10 @@

Welcome, {{ username }}.

- - - - + Add Curation + Add Disease + Add Allele/Haplotype + Add Publication
diff --git a/src/hci/templates/hci/new_allele_haplotype.html b/src/hci/templates/hci/new_allele_haplotype.html new file mode 100644 index 0000000..8d72bd5 --- /dev/null +++ b/src/hci/templates/hci/new_allele_haplotype.html @@ -0,0 +1,6 @@ +{% extends "hci/nav.html" %} +{% block title %}New Allele/Haplotype{% endblock %} +{% block description %}Add a new allele or haplotype in the HLA curation interface.{% endblock %} +{% block content %} +

Coming soon...

+{% endblock %} diff --git a/src/hci/templates/hci/new_curation.html b/src/hci/templates/hci/new_curation.html new file mode 100644 index 0000000..c7586ba --- /dev/null +++ b/src/hci/templates/hci/new_curation.html @@ -0,0 +1,6 @@ +{% extends "hci/nav.html" %} +{% block title %}New Curation{% endblock %} +{% block description %}Start a new curation in the HLA curation interface.{% endblock %} +{% block content %} +

Coming soon...

+{% endblock %} diff --git a/src/hci/templates/hci/new_disease.html b/src/hci/templates/hci/new_disease.html new file mode 100644 index 0000000..8773847 --- /dev/null +++ b/src/hci/templates/hci/new_disease.html @@ -0,0 +1,6 @@ +{% extends "hci/nav.html" %} +{% block title %}New Disease{% endblock %} +{% block description %}Add a new disease in the HLA curation interface.{% endblock %} +{% block content %} +

Coming soon...

+{% endblock %} diff --git a/src/hci/templates/hci/new_publication.html b/src/hci/templates/hci/new_publication.html new file mode 100644 index 0000000..ae6591d --- /dev/null +++ b/src/hci/templates/hci/new_publication.html @@ -0,0 +1,6 @@ +{% extends "hci/nav.html" %} +{% block title %}New Publication{% endblock %} +{% block description %}Add a new publication in the HLA curation interface.{% endblock %} +{% block content %} +

Coming soon...

+{% endblock %} diff --git a/src/hci/urls.py b/src/hci/urls.py index 21e1f27..0910ed2 100644 --- a/src/hci/urls.py +++ b/src/hci/urls.py @@ -7,8 +7,19 @@ from . import views urlpatterns = [ + # One-off pages: path("", views.index_view, name="index"), - path("accounts/", include("django.contrib.auth.urls")), path("affiliation/", views.affiliation_view, name="affiliation"), + # Login/logout: + path("accounts/", include("django.contrib.auth.urls")), path("logout/", views.logout_view, name="custom_logout"), + # "New" pages: + path( + "allele_haplotype/new/", + views.new_allele_haplotype_view, + name="new_allele_haplotype", + ), + path("curation/new/", views.new_curation_view, name="new_curation"), + path("disease/new/", views.new_disease_view, name="new_disease"), + path("publication/new/", views.new_publication_view, name="new_publication"), ] diff --git a/src/hci/views.py b/src/hci/views.py index 8f3b36d..649f331 100644 --- a/src/hci/views.py +++ b/src/hci/views.py @@ -29,3 +29,31 @@ def affiliation_view(request): """Show the user the affiliation configuration page.""" context = {"email": request.user.email, "affiliation": "HLA Expert Panel"} return render(request, "hci/affiliation.html", context) + + +@login_required +def new_curation_view(request): + """Show the new curation page.""" + context = {"email": request.user.email, "affiliation": "HLA Expert Panel"} + return render(request, "hci/new_curation.html", context) + + +@login_required +def new_disease_view(request): + """Show the new curation page.""" + context = {"email": request.user.email, "affiliation": "HLA Expert Panel"} + return render(request, "hci/new_disease.html", context) + + +@login_required +def new_allele_haplotype_view(request): + """Show the new curation page.""" + context = {"email": request.user.email, "affiliation": "HLA Expert Panel"} + return render(request, "hci/new_allele_haplotype.html", context) + + +@login_required +def new_publication_view(request): + """Show the new curation page.""" + context = {"email": request.user.email, "affiliation": "HLA Expert Panel"} + return render(request, "hci/new_publication.html", context)