Inspector display flags

From CollectiveAccess Documentation
Jump to: navigation, search

CollectiveAccess version 1.5 supports optional "flags" or alerts based on record metadata in the inspector window (the box in the record's upper left hand corner).

Let's say you have a yes/no checkbox field called "Is Confidential" and you want a visual indication to alert cataloguers when "yes" in checked. All you need to do is set a directive in /app/conf/app.conf.

The configuration follows the following syntax:

<table_name>_inspector_display_flags 

The directive should be set to an associative array were each key is an expression and each value is the content to print if the expression is true. For example:

"(^ca_objects.legalRestriction = \"yes\")" = <strong>Legal Restriction</strong><br/>

Note: the expression must be put in quotes. Any sort of expression will work including regular expressions. For example:

ca_objects_inspector_display_flags = {
 	"(^ca_objects.preferred_labels.name =~ /place/)" = <strong>Has the word place in the title!</strong>
}

The default delimiter between flags is set to a semi-colon ";". If you would like to configure how multiple flags appear in the inspector panel, use this setting in app.conf:

ca_objects_inspector_display_flags_delimiter = <br/>

In this case, the delimiter is set to a line break so that the flags appear stacked on top of each other. The "
" can be replaced with any arbitrary string.

sphinx

Namespaces

Variants
Actions
Navigation
Tools
User
Personal tools