blob: 1525be505834428e0f533eb7b9ad46160c866ab2 [file] [log] [blame]
Jeff Arneson3a5cb1b2014-08-22 15:40:47 -07001<?cs # Create a comma separated list of annotations on obj that were in showAnnotations in Doclava ?>
2<?cs # pre is an HTML string to start the list, post is an HTML string to close the list ?>
3<?cs # for example call:show_annotations_list(cl, "<td>Annotations: ", "</td>") ?>
4<?cs # if obj has nothing on obj.showAnnotations, nothing will be output ?>
Jeff Arnesonad46e7e2014-09-15 09:53:15 -07005<?cs def:show_annotations_list(obj) ?>
Jeff Arneson3a5cb1b2014-08-22 15:40:47 -07006 <?cs each:anno = obj.showAnnotations ?>
7 <?cs if:first(anno) ?>
Jeff Arnesonad46e7e2014-09-15 09:53:15 -07008 <span class='annotation-message'>
9 Included in documention by the annotations:
Jeff Arneson3a5cb1b2014-08-22 15:40:47 -070010 <?cs /if ?>
11 @<?cs var:anno.type.label ?>
12 <?cs if:last(anno) == 0 ?>
13 , &nbsp;
14 <?cs /if ?>
15 <?cs if:last(anno)?>
Jeff Arnesonad46e7e2014-09-15 09:53:15 -070016 </span>
Jeff Arneson3a5cb1b2014-08-22 15:40:47 -070017 <?cs /if ?>
18 <?cs /each ?>
19<?cs /def ?>
20
21<?cs # Override default class_link_table to display annotations ?>
22<?cs def:class_link_table(classes) ?>
23 <?cs set:count = #1 ?>
24 <table class="jd-sumtable-expando">
25 <?cs each:cl=classes ?>
26 <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.type.since ?>" >
27 <td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
28 <td class="jd-descrcol" width="100%">
29 <?cs call:short_descr(cl) ?>&nbsp;
Jeff Arnesonad46e7e2014-09-15 09:53:15 -070030 <?cs call:show_annotations_list(cl) ?>
Jeff Arneson3a5cb1b2014-08-22 15:40:47 -070031 </td>
32 </tr>
33 <?cs set:count = count + #1 ?>
34 <?cs /each ?>
35 </table>
36<?cs /def ?>