Hi Anna,
See the omero-gallery README:
omero.web.gallery.study_short_name: This specifies a short name for Screen or Project to show above the study Image in the categories or search page, instead of the default ‘Project: 123’. The list allows us to try multiple methods, using the first that works. Each object in the list has e.g. {‘key’: ‘Name’}. The ‘key’ can be Name, Description or the key for a Key:Value pair on the object. If a ‘regex’ and ‘template’ are specified, we try name.replace(regex, template). In this example, we check for a Key:Value named “Title”. If that is not found, then we use a regex based on the object’s Name. This example is from the IDR, where we want to create a short name like idr0001A
from a Name like: idr0001-graml-sysgro/screenA
:
$ omero config set omero.web.gallery.study_short_name '[ {"key":"Title"}, {"key":"Name", "regex": "^(.*?)-.*?(.)$", "template": "$1$2"}, ]'
You can test this in JavaScript like:
var re = new RegExp("^(.*?)-.*?(.)$"); var template = "$1$2"; var nameOrValue = "idr0001-graml-sysgro/screenA" var shortName = nameOrValue.replace(re, template);
For the front page, you could provide filtering by group in the Categories UI, by using a little script to add a Key-Value pair of Group: group-name
to each Project/Screen and add ‘Group’ to the omero.web.gallery.filter_keys. However, this would be a bit painful to keep up to date when new Projects/Screens are created.
However, if the Categories UI is otherwise suitable for you (you don’t mind the direct linking to webclient), adding the filtering of groups (similar to filtering by Name) wouldn’t be a big job.
It’s worth bearing in mind that the Categories UI loads all the Projects/Screens that the logged-in user has access to, along with all their key-value pairs. So if this gets large then it will get slower. Probably a thousand or more Projects/Screens would still be OK (not tested) but if an Admin were to log in on a large server where they could access ALL Projects/Screens then bigger numbers might be possible.
Regards,
Will.