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): 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' 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): """ 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 ''