Skip to content

Commit

Permalink
Merge pull request #815 from cortex-lab/improve_reports
Browse files Browse the repository at this point in the history
Improve reports
  • Loading branch information
mayofaulkner authored Oct 26, 2023
2 parents 731fc04 + 08f0fe7 commit 138e8e7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions alyx/actions/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion alyx/alyx/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = __version__ = '1.16.1'
VERSION = __version__ = '1.16.2'
7 changes: 7 additions & 0 deletions alyx/jobs/templatetags/jobs_template_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
7 changes: 4 additions & 3 deletions alyx/subjects/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
Expand Down

0 comments on commit 138e8e7

Please sign in to comment.