blob: 6ff8f58d541d731ca1f4aeccdaf69517b674946d [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 ?>
5<?cs def:show_annotations_list(obj, pre, post) ?>
6 <?cs each:anno = obj.showAnnotations ?>
7 <?cs if:first(anno) ?>
8 <?cs var:pre ?>
9 <?cs /if ?>
10 @<?cs var:anno.type.label ?>
11 <?cs if:last(anno) == 0 ?>
12 , &nbsp;
13 <?cs /if ?>
14 <?cs if:last(anno)?>
15 <?cs var:post ?>
16 <?cs /if ?>
17 <?cs /each ?>
18<?cs /def ?>
19
20<?cs # Override default class_link_table to display annotations ?>
21<?cs def:class_link_table(classes) ?>
22 <?cs set:count = #1 ?>
23 <table class="jd-sumtable-expando">
24 <?cs each:cl=classes ?>
25 <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.type.since ?>" >
26 <td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
27 <td class="jd-descrcol" width="100%">
28 <?cs call:short_descr(cl) ?>&nbsp;
29 <?cs call:show_annotations_list(cl, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
30 </td>
31 </tr>
32 <?cs set:count = count + #1 ?>
33 <?cs /each ?>
34 </table>
35<?cs /def ?>