From ad6da097139ee2d1352f8f32d8d82fd0736c926b Mon Sep 17 00:00:00 2001 From: mayofaulkner Date: Mon, 16 Oct 2023 12:11:42 +0100 Subject: [PATCH 1/4] sort session task inline by status --- alyx/actions/admin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/alyx/actions/admin.py b/alyx/actions/admin.py index 3e79a9b1..73b1c959 100644 --- a/alyx/actions/admin.py +++ b/alyx/actions/admin.py @@ -478,6 +478,7 @@ class TasksAdminInline(BaseInlineAdmin): extra = 0 fields = ('status', 'name', 'version', 'parents', 'datetime', 'arguments') readonly_fields = ('name', 'version', 'parents', 'datetime', 'arguments') + ordering = ('status',) def _pass_narrative_templates(context): From a1b0bc20a2c5b6a0ed0343df5af921c4c7899421 Mon Sep 17 00:00:00 2001 From: mayofaulkner Date: Mon, 16 Oct 2023 16:16:18 +0100 Subject: [PATCH 2/4] add ask parent filter --- alyx/jobs/templatetags/jobs_template_tags.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/alyx/jobs/templatetags/jobs_template_tags.py b/alyx/jobs/templatetags/jobs_template_tags.py index a9ac209e..2c6bc713 100644 --- a/alyx/jobs/templatetags/jobs_template_tags.py +++ b/alyx/jobs/templatetags/jobs_template_tags.py @@ -93,6 +93,13 @@ def get_task_colour(status): return "color:MediumSeaGreen" +@register.filter +def get_parents(obj): + parents = obj.parents.all() + + return parents + + @register.simple_tag(takes_context=True) def param_replace(context, **kwargs): """ From eaf0945549326ca77f92aabde26783e52c464e02 Mon Sep 17 00:00:00 2001 From: mayofaulkner Date: Wed, 25 Oct 2023 11:06:37 +0100 Subject: [PATCH 3/4] cortexlab cull subjects admin modifications --- alyx/subjects/admin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/alyx/subjects/admin.py b/alyx/subjects/admin.py index 7c94fc30..6febd819 100755 --- a/alyx/subjects/admin.py +++ b/alyx/subjects/admin.py @@ -1419,16 +1419,17 @@ def queryset(self, request, queryset): class CullMiceAdmin(SubjectAdmin): - list_display = ['nickname', 'birth_date', 'death_date', 'sex_f', 'ear_mark', - 'line', 'cage', 'responsible_user', 'to_be_culled', 'reduced', 'cull_l'] + list_display = ['nickname', 'to_be_culled', 'birth_date', 'death_date', 'sex_f', 'ear_mark', + 'line', 'zygosities', 'cage', 'responsible_user', 'reduced', 'cull_l'] ordering = ['-birth_date', '-nickname'] list_filter = [ResponsibleUserListFilter, CullSubjectAliveListFilter, + ZygosityFilter, ('line', LineDropdownFilter), ] list_editable = ['death_date', 'to_be_culled', 'reduced'] - ordering = ('-birth_date',) + ordering = ['-birth_date', '-nickname'] def sex_f(self, obj): return obj.sex[0] if obj.sex else '' From 08f0fe7ebe1c5b0ad6ea2ff23ad229845aad4666 Mon Sep 17 00:00:00 2001 From: Mayo Faulkner Date: Thu, 26 Oct 2023 09:17:05 +0100 Subject: [PATCH 4/4] bump version --- alyx/alyx/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alyx/alyx/__init__.py b/alyx/alyx/__init__.py index c31cd96f..d08f5d9b 100644 --- a/alyx/alyx/__init__.py +++ b/alyx/alyx/__init__.py @@ -1 +1 @@ -VERSION = __version__ = '1.16.1' +VERSION = __version__ = '1.16.2'