only show clipLayer clips in clips view

This commit is contained in:
j 2024-05-17 14:01:16 +02:00
commit cf0ad718f7
5 changed files with 41 additions and 9 deletions

View file

@ -17,6 +17,7 @@ keymap = {
'place': 'annotations__places__id',
'text': 'findvalue',
'annotations': 'findvalue',
'layer': 'annotations__layer',
'user': 'annotations__user__username',
}
case_insensitive_keys = ('annotations__user__username', )

View file

@ -115,8 +115,7 @@ class MetaClip(object):
del j[key]
#needed here to make item find with clips work
if 'annotations' in keys:
#annotations = self.annotations.filter(layer__in=settings.CONFIG['clipLayers'])
annotations = self.annotations.all()
annotations = self.annotations.all().exclude(value='')
if qs:
for q in qs:
annotations = annotations.filter(q)

View file

@ -102,8 +102,7 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
],
/*
"clipLayers" is the ordered list of public layers that will appear as the
text of clips (in grid view, below the icon). Excluding a layer from this
list means it will not be included in find annotations.
text of clips (in grid view, below the icon).
*/
"clipLayers": ["publicnotes", "keywords", "subtitles"],
/*