1 <a name='addedcontent'></a> <!-- for page focus -->
2 <div class='item_detail_extras_tabs'>
4 # NOTE: enabling all of these types may result in the tabs occupying
5 # too much horizontal space to fit within the fixed-width box.
8 reviews => l('Reviews'),
9 anotes => l('Author Notes'),
10 toc => l('Table of Contents'),
11 excerpt => l('Excerpt'),
12 summary => l('Smmary')
15 selected_type = CGI.param('ac');
17 # For each type of added content, render the link if it's known to have
18 # content, do not render the link if it's known to not have content. If
19 # the content status is unknown, render the link, but hide the link via CSS
20 # if dojo is enabled. If dojo is not enabled, render and display the link.
23 FOR type IN ac_types.keys;
25 SET tab_class = 'ac_tab_selected' IF type == selected_type;
26 '<!-- status = ' _ type _ ' : ' _ ctx.added_content.$type.status _ '-->';
27 IF ctx.added_content.$type.status != '2'; # no content
29 IF ctx.added_content.$type.status == '3' AND want_dojo; # status unknown
30 tab_class = tab_class _ ' hidden';
32 <a class="[% tab_class %]" id="ac:[% type %]" href="[% mkurl('', {ac => type}) _ '#addedcontent' %]">[% ac_types.$type %]</a>
36 <div class="clear"> </div>
39 <div style='width:98%; padding:5px;'>
43 content = ctx.added_content.$selected_type.content;
47 l('No Content Available');