blob: 0a945986e5e984fd946d631e8a49eaae37d94677 [file] [log] [blame]
Dirk Doughertyff233cc2015-05-04 14:37:05 -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) ?>
6 <?cs each:anno = obj.showAnnotations ?>
7 <?cs if:first(anno) ?>
8 <span class='annotation-message'>
9 Included in documentation by the annotations:
10 <?cs /if ?>
11 @<?cs var:anno.type.label ?>
12 <?cs if:last(anno) == 0 ?>
13 , &nbsp;
14 <?cs /if ?>
15 <?cs if:last(anno)?>
16 </span>
17 <?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;
30 <?cs call:show_annotations_list(cl) ?>
31 </td>
32 </tr>
33 <?cs set:count = count + #1 ?>
34 <?cs /each ?>
35 </table>
Trevor Johnsbf234fd2016-04-12 10:35:42 -070036<?cs /def ?>