I have an #annots column 'Long text, like comments, not in tag browser' for annotations and I want - like above - an icon if there are annoations.
Code:
program:
def add_icon(icon, val):
if icon == '' then icon = val else icon = icon & ':' & val fi;
return icon
fed;
icon = '';
if $languages == 'eng' then icon = add_icon(icon, 'uk.png') fi;
icon = add_icon(
icon,
switch(
$$#toread,
'true', 'toread.png',
'false', 'false.png',
''));
if $$#formats == 'paper' then icon = add_icon(icon, 'paper.png') fi;
if $$#read == 'true' then icon = add_icon(icon, 'ok.png') fi;
if $$#readinglist != '' then icon = add_icon(icon, 'reading_list.png') fi;
if $$#annots != '' then icon = add_icon(icon, 'annotations.png') fi;
return icon
With this code I get the icon on every book.
I also tried
Code:
if $$#annots == 'true' then icon = add_icon(icon, 'annotations.png') fi;
I don't get any annot icon
Some help much appreciated