diff --git a/.dockerignore b/.dockerignore index 2a87a513f9..9c80bf416e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,6 +2,12 @@ .git .gitignore +.venv +__pycache__/ +*.pyc +node_modules + + # everything in gitignore *.py[cod] *.swp diff --git a/Containerfile.debugpy b/Containerfile.debugpy index 250f90d963..e4cb4cb946 100644 --- a/Containerfile.debugpy +++ b/Containerfile.debugpy @@ -29,9 +29,8 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* WORKDIR /app +COPY uv.lock pyproject.toml ./ RUN --mount=type=cache,target=/root/.cache/uv \ - --mount=type=bind,source=uv.lock,target=uv.lock \ - --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ uv sync --locked --no-install-project COPY . /app RUN --mount=type=cache,target=/root/.cache/uv \ diff --git a/coldfront/config/base.py b/coldfront/config/base.py index b1b2559051..2732de94ac 100644 --- a/coldfront/config/base.py +++ b/coldfront/config/base.py @@ -60,7 +60,7 @@ INSTALLED_APPS += [ "crispy_forms", - "crispy_bootstrap4", + "crispy_bootstrap5", "django_q", "simple_history", "django_vite", @@ -151,7 +151,9 @@ else: raise ImproperlyConfigured("SITE_TEMPLATES should be a path to a directory") -CRISPY_TEMPLATE_PACK = "bootstrap4" +CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5" +CRISPY_TEMPLATE_PACK = "bootstrap5" + SETTINGS_EXPORT = [] STATIC_URL = "/static/" diff --git a/coldfront/core/allocation/templates/allocation/allocation_account_list.html b/coldfront/core/allocation/templates/allocation/allocation_account_list.html index 0a9373d260..c24c1db737 100644 --- a/coldfront/core/allocation/templates/allocation/allocation_account_list.html +++ b/coldfront/core/allocation/templates/allocation/allocation_account_list.html @@ -11,7 +11,7 @@ {% block content %}
- Request changes to an existing allocation using the form below. For each change - you must provide a justification. -
- - - -{% endblock %} +{% extends "common/base.html" %} +{% load crispy_forms_tags %} +{% load static %} + + +{% block title %} +Request Allocation Change +{% endblock %} + + +{% block content %} + ++ Request changes to an existing allocation using the form below. For each change + you must provide a justification. +
+ + + +{% endblock %} diff --git a/coldfront/core/allocation/templates/allocation/allocation_change_detail.html b/coldfront/core/allocation/templates/allocation/allocation_change_detail.html index df6dd86d5f..12a0de7bb1 100644 --- a/coldfront/core/allocation/templates/allocation/allocation_change_detail.html +++ b/coldfront/core/allocation/templates/allocation/allocation_change_detail.html @@ -1,225 +1,225 @@ -{% extends "common/base.html" %} -{% load crispy_forms_tags %} -{% load static %} - - -{% block title %} -Allocation Change Detail -{% endblock %} - - -{% block content %} - -{{ allocation_change.notes }}
- {% endif %} -{{ allocation_change.notes }}
- {% endif %} -{{ allocation_change.notes }}
- {% endif %} -{{ allocation_change.notes }}
+ {% endif %} +{{ allocation_change.notes }}
+ {% endif %} +{{ allocation_change.notes }}
+ {% endif %} +- For each allocation change request below, there is the option to activate the allocation request and to view the allocation change's detail page. - If a change request is only for an extension to the allocation, they can be approved on this page. However if the change request includes changes to - the allocation's attributes, the request must be reviewed and acted upon in its detail page. -
- -{% if allocation_change_list %} -| # | -Requested | -Project Title | -PI | -Resource | -Extension | -Actions | -
|---|---|---|---|---|---|---|
| {{change.pk}} | -{{ change.created|date:"M. d, Y" }} | -{{change.allocation.project.title|truncatechars:50}} | -{{change.allocation.project.pi.first_name}} {{change.allocation.project.pi.last_name}} - ({{change.allocation.project.pi.username}}) | -{{change.allocation.get_parent_resource}} | -- {% if change.end_date_extension == 0 %} - {% else %} {{change.end_date_extension}} days - {% endif %} - | -- - | -
+ For each allocation change request below, there is the option to activate the allocation request and to view the allocation change's detail page. + If a change request is only for an extension to the allocation, they can be approved on this page. However if the change request includes changes to + the allocation's attributes, the request must be reviewed and acted upon in its detail page. +
+ +{% if allocation_change_list %} +| # | +Requested | +Project Title | +Allocation ID | +PI | +Resource | +Extension | +Actions | +
|---|---|---|---|---|---|---|---|
| {{change.pk}} | +{{ change.created|date:"M. d, Y" }} | +{{change.allocation.project.title|truncatechars:50}} | +{{change.allocation.project.pi.first_name}} {{change.allocation.project.pi.last_name}} + ({{change.allocation.project.pi.username}}) | +{{change.allocation.get_parent_resource}} | ++ {% if change.end_date_extension == 0 %} + {% else %} {{change.end_date_extension}} days + {% endif %} + | ++ + | +
The following {% settings_value 'CENTER_NAME' %} +
The following {% settings_value 'CENTER_NAME' %} resources are available to request for this project. If you need access to more than one of these, please submit a separate allocation request for each resource. For each request you must provide the justification for how you @@ -32,7 +32,7 @@
By clicking submit you agree to the Terms and Conditions.
+By clicking submit you agree to the Terms and Conditions.
+
For each allocation request below, there is the option to activate the allocation request and to view the allocation's detail page.
-+
By default, activating an allocation will make it active for {{ settings.ALLOCATION_DEFAULT_ALLOCATION_LENGTH }} days.
@@ -56,8 +56,8 @@
diff --git a/coldfront/core/project/templates/project/add_user_search_results.html b/coldfront/core/project/templates/project/add_user_search_results.html
index 075dde373e..1fbef3ee84 100644
--- a/coldfront/core/project/templates/project/add_user_search_results.html
+++ b/coldfront/core/project/templates/project/add_user_search_results.html
@@ -7,7 +7,7 @@
Found {{number_of_usernames_found}} of
{{number_of_usernames_searched}} usernames searched.
{% elif matches %}
- Found {{matches|length}} match{{matches|length|pluralize}}.
+ Found {{matches|length}} match{{matches|length|pluralize:"es"}}.
{% endif %}
Description: {{ project.description }} School: {{ project.school }} Status: {{ project.status}} Description: {{ project.description }} School: {{ project.school }} Status: {{ project.status}} Description: {{ project.description }} School: {{ project.school }} Project Status: {{ project.status }}
+ Description: {{ project.description }} School: {{ project.school }} Project Status: {{ project.status }}
{% if project.last_project_review and project.last_project_review.status.name == 'Pending'%}
- project review pending
+ project review pending
{% endif %}
Created: {{ project.created|date:"M. d, Y" }} Created: {{ project.created|date:"M. d, Y" }}
{% if usernames_not_found %}
@@ -26,15 +26,45 @@
+
+
+
+
+
+
+ {% for form in allocation_formset %}
+
+ #
+ Resource
+ Details
+ Resource Type
+ Status
+
+
+ {% endfor %}
+
+ {{ form.selected }}
+ {{ form.pk.value }}
+ {{ form.resource.value }}
+ {{ form.details.value }}
+ {{ form.resource_type.value }}
+ {{ form.status.value }}
+
{% if is_paginated %} Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}
-
-
@@ -78,7 +78,7 @@
+
#
Username
First Name
@@ -87,14 +117,16 @@
}
});
- $("#id_allocationform-allocation_0").click(function () {
+ $("#selectAllAllocations").click(function () {
$("input[name^='allocationform-']").prop('checked', $(this).prop('checked'));
});
$("input[name^='allocationform-']").click(function (ele) {
var id = $(this).attr('id');
- if ( id != "id_allocationform-allocation_0") {
- $("#id_allocationform-allocation_0").prop('checked', false);
+ if ( id != "selectAllAllocations") {
+ $("#selectAllAllocations").prop('checked', false);
}
});
+
+{% comment %} if eula box is in focus, then required {% endcomment %}
diff --git a/coldfront/core/project/templates/project/project_add_users.html b/coldfront/core/project/templates/project/project_add_users.html
index c9b8201db8..cfae4212e7 100644
--- a/coldfront/core/project/templates/project/project_add_users.html
+++ b/coldfront/core/project/templates/project/project_add_users.html
@@ -17,7 +17,9 @@ Add users to project: {{project.title}}
@@ -84,10 +86,10 @@ Add users to project: {{project.title}}
// handle a non-successful response
error : function(xhr,errmsg,err) {
if(xhr.status == 403 || xhr.status == 401) {
- $('#search_results_inner').html("Add users to project: {{project.title}}
$('#search_results').hide();
$('#selected_users').hide();
- $('[data-toggle="popover"]').popover();
});
{% endblock %}
diff --git a/coldfront/core/project/templates/project/project_archive.html b/coldfront/core/project/templates/project/project_archive.html
index d6ee42d2ae..712352b30e 100644
--- a/coldfront/core/project/templates/project/project_archive.html
+++ b/coldfront/core/project/templates/project/project_archive.html
@@ -19,11 +19,11 @@
{{ project.pi.first_name }}
{{ project.pi.last_name }}
({{ project.pi.username }})
- Email
+ Email
- Archived Projects
{{ project.id }}
{{ project.pi.username }}
- Title: {{ project.title }}
+ Title: {{ project.title }}
Description: {{ project.description }}{{ project.school.description }}
{{ project.status.name }}
@@ -87,7 +87,7 @@ Archived Projects
+
+{% extends "common/base.html" %}
+{% load crispy_forms_tags %}
+{% load common_tags %}
+{% load static %}
+
+
+{% block title %}
+Add Project Attribute
+{% endblock %}
+
+
+{% block content %}
+
{% if page_obj.has_previous %}
Adding project attribute to {{ project }}
-
-Adding project attribute to {{ project }}
+
+
{% endblock %}
\ No newline at end of file
diff --git a/coldfront/core/project/templates/project/project_attribute_delete.html b/coldfront/core/project/templates/project/project_attribute_delete.html
index e21a415b9c..c996f8b1f8 100644
--- a/coldfront/core/project/templates/project/project_attribute_delete.html
+++ b/coldfront/core/project/templates/project/project_attribute_delete.html
@@ -1,61 +1,61 @@
-{% extends "common/base.html" %}
-{% load crispy_forms_tags %}
-{% load common_tags %}
-{% load static %}
-
-
-{% block title %}
-Remove Project Attribute
-{% endblock %}
-
-
-{% block content %}
-Removing project attribute from {{ project }}
-
-{% if formset %}
- Removing project attribute from {{ project }}
+
+{% if formset %}
+ Project Attribute Update Form
-
-
-
-
-{% endblock%}
\ No newline at end of file
+{% extends "common/base.html" %}
+{% load crispy_forms_tags %}
+{% load static %}
+
+
+{% block title %}
+Project Attribute Details
+{% endblock %}
+
+
+{% block content %}
+Project Attribute Update Form
+
+
+
+
+{% endblock%}
diff --git a/coldfront/core/project/templates/project/project_detail.html b/coldfront/core/project/templates/project/project_detail.html
index c809e31898..d726b14fcf 100644
--- a/coldfront/core/project/templates/project/project_detail.html
+++ b/coldfront/core/project/templates/project/project_detail.html
@@ -26,15 +26,15 @@
{% endif %}
{{ project.title }}
+ {{ project.title }}
Manage Project
-
{{ project.pi.first_name }}
{{ project.pi.last_name }}
({{ project.pi.username }})
- Email PI
+ Email PI
-
Users
{{project_users.count}}
- Users
{{project_users.count}}
+
First Name
Last Name
Email
- Role Manager role grants user access to add/remove users, allocations, grants, and publications to the project.
+ Role Manager role grants user access to add/remove users, allocations, grants, and publications to the project.
Status
- Enable Notifications When disabled, user will not receive notifications for allocation requests and expirations or cloud usage (if applicable).
+ Enable Notifications When disabled, user will not receive notifications for allocation requests and expirations or cloud usage (if applicable).
Actions
For everyone
- + Log in with NYU NetID diff --git a/coldfront/core/user/templates/user/login_form.html b/coldfront/core/user/templates/user/login_form.html index 1d25a5aeed..21612a8510 100644 --- a/coldfront/core/user/templates/user/login_form.html +++ b/coldfront/core/user/templates/user/login_form.html @@ -5,7 +5,7 @@ diff --git a/coldfront/core/user/templates/user/user_profile.html b/coldfront/core/user/templates/user/user_profile.html index c36b580e6f..1484354f0c 100644 --- a/coldfront/core/user/templates/user/user_profile.html +++ b/coldfront/core/user/templates/user/user_profile.html @@ -8,54 +8,60 @@ {% block content %}| University Role(s): | -{{group_list}} | -
|---|---|
| Email: | -{{viewed_user.email}} | -
| PI Status: | -
- {% if viewed_user.userprofile.is_pi %}
- Yes
- {% elif not user == viewed_user %}
- No
- {% else %}
-
- No
-
- {% endif %}
- |
-
| Last Login: | -{{viewed_user.last_login}} | -
| University Role(s): | +{{group_list}} | +
|---|---|
| Email: | +{{viewed_user.email}} | +
| PI Status: | ++ {% if viewed_user.userprofile.is_pi %} + Yes + {% elif not user == viewed_user %} + No + {% else %} + + {% endif %} + | +
| Last Login: | +{{viewed_user.last_login}} | +
User role in project: {{ association.role }}
+User role in project: {{ association.role }}
{% endif %} {# a few Pending statuses may be displayed here #} -User status in project: +
User status in project: {% if association.status.name == 'Active' %} {{ association.status.name }} {% else %} {{ association.status.name }} {% endif %}
-Description: {{ project.description }}
-School: {{ project.school }}
-Project Status: {{ project.status }}
+Description: {{ project.description }}
+School: {{ project.school }}
+Project Status: {{ project.status }}
Principal Investigator: {{ project.pi.first_name }} {{ project.pi.last_name }} ({{ project.pi.username }}) - Email + Email {% if association.is_project_pi %} ({{ user_pronounish | lower }} {{user_verbform_be}} the project PI) {% endif %} @@ -51,9 +51,9 @@
{{ user_pronounish }} {{user_verbform_be}} a manager of this project.