@Joanna: do you have any programming knowledge? If so then the right way to do something this complicated is to use a custom template function or to use pre-calculated fields.
The first, custom template functions, are written in python and can in one pass (rule) determine which "flag" is to be displayed.
The seconds, a pre-calculated field, would be a text-based custom column containing the name of the icon file for the book. You would run a "calibre" python script from time to time to evaluate the books and enter the icon name for each book.
Several of us could supply you with such functions/scripts. The problem with these approaches is that if you don't understand what they are doing and how to maintain them then they are magic, and none of us wants to become your dedicated developer.
Personally, I would use a custom template function.
BTW: you might get significant performance improvements if you reorder your existing rules so that the most common/probable occur first. Rule evaluation is linear, evaluating one by one until one succeeds or there are no more rules.
|