2 <div id='rdetail_extras_div' style='width: 100%;'>
4 [% # Hidden extras are not yet implemented. Some may require JS
6 # Let's see if we should hide the content cafe / simple summary content
8 IF attrs.summary.0; hide_summary = 0; ELSE;
9 # Expose content cafe if it's reasonable to do so.
10 # This approach only works when using embedded content cafe.
11 IF ENV.OILS_CONTENT_CAFE_USER;
12 ident = attrs.isbn_clean || attrs.upc;
13 IF ident; hide_summary = 0; END;
18 {name => 'summaryplus', label => l('Summaries & More'), hide => hide_summary},
19 {name => 'contents', label => l('Contents'), hide => !attrs.contents},
20 {name => 'series', label => l('Series')},
21 {name => 'annotation', label => l('Annotation'), hide => 1},
22 {name => 'awards', label => l('Awards, Reviews, & Suggested Reads')},
23 {name => 'excerpt', label => l('Excerpt'), hide => 1},
24 {name => 'issues', label => l('Issues Held'), hide => !(ctx.have_holdings_to_show || ctx.have_mfhd_to_show)},
25 {name => 'preview', label => l('Preview'), hide => 1},
26 {name => 'cnbrowse', label => l('Shelf Browser')},
27 {name => 'marchtml', label => l('MARC Record')}
30 MACRO tab_is_active(tab) BLOCK;
31 exp_name = 'expand_' _ tab;
32 IF ctx.$exp_name OR ctx.expand_all; 1; END;
35 FOREACH extra IN extras;
36 IF extra.hide; NEXT; END;
39 <div class="rdetail_extras">
40 <div class="rdetail_extras_hr"></div>
41 <div class="rdetail_extras_link">
43 IF tab_is_active(name);
44 href = mkurl('', {}, ['expand']);
45 img_url = ctx.media_prefix _ '/images/rdetail_arrow_down.png';
47 href = mkurl('', {expand => name}) _ '#' _ name;
48 img_url = ctx.media_prefix _ '/images/rdetail_arrow.png';
51 <a name='[% name %]' href='[% href %]'><img alt='[% extra.label %]' src='[% img_url %]'/></a>
52 <a href='[% href %]' class="rdetail_extras_lbl">[% extra.label %]</a>
55 <div class='rdetail_extras_div'>
56 [% IF tab_is_active(name);
57 IF name == 'marchtml';
59 ELSIF name == 'contents';
62 # Load the template for the selected extra
63 INCLUDE "opac/parts/record/${name}.tt2";