]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/default/opac/parts/record/extras.tt2
Repaired merge conflicts resuling from ttopac-move-templates
[Evergreen.git] / Open-ILS / src / templates / default / opac / parts / record / extras.tt2
1 <div id="rdetail_main_div">
2     <div id='rdetail_extras_div' style='width: 100%;'> 
3
4         [%  # Hidden extras are not yet implemented.  Some may require JS
5
6         # Let's see if we should hide the content cafe / simple summary content
7         hide_summary = 1;
8         IF attrs.summary; 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;
14             END;
15         END;
16
17         extras = [
18             {name => 'summaryplus',  label => l('Summaries &amp; More'), hide => hide_summary}, 
19             {name => 'content',  label => l('Contents'), hide => 1}, # ToC
20             {name => 'authors',  label => l('Authors')}, 
21             {name => 'series',   label => l('Series'), hide => 1}, 
22             {name => 'subjects', label => l('Subject')}, 
23             {name => 'annotation', label => l('Annotation'), hide => 1}, 
24             {name => 'awards',  label => l('Awards, Reviews, & Suggested Reads')}, 
25             {name => 'excerpt',  label => l('Excerpt'), hide => 1},
26             {name => 'issues',   label => l('Issues Held'), hide => !ctx.have_holdings_to_show},
27             {name => 'preview',  label => l('Preview'), hide => 1}, 
28             {name => 'cnbrowse', label => l('Shelf Browser')},
29             {name => 'copyinfo', label => l('Copy Summary'), hide => 1}, 
30             {name => 'marchtml', label => l('MARC Record')}
31         ];
32
33         FOREACH extra IN extras;
34             IF extra.hide; NEXT; END; 
35             name = extra.name;
36         %]
37         <div class="rdetail_extras">
38             <div class="rdetail_extras_hr"></div>
39             <div class="rdetail_extras_link">
40                 [%  # extras_propagator should be used in place of propagator
41                     # in opac extras interfaces... it just avoids duplicating
42                     # the expands CGI param and parameters that are specific
43                     # to extras.
44                     # XXX move this off into a helper function
45
46                     extras_propagator = propagator.replace('(&amp;)?expand=.+($|&|;)', '$2');
47                     extras_propagator = extras_propagator.replace('(&amp;)?cnoffset=.+($|&|;)', '$2');
48
49
50                     href = ctx.full_path _ extras_propagator _ '&amp;expand=' _ name _ '#' _ name; %]
51                 <a name='[% name %]' href='[% href %]'><img
52                     alt='[% extra.label %]' src="[% ctx.media_prefix %]/images/rdetail_arrow.png" /></a>
53                 <a href='[% href %]' class="rdetail_extras_lbl">[% extra.label %]</a>
54             </div>
55         </div>
56         <div class='rdetail_extras_div'>
57             [%  exp_name = 'expand_' _ name;
58                 IF ctx.$exp_name;
59                     IF name == 'marchtml';
60                         ctx.marchtml;
61                     ELSE;
62                         # Load the template for the selected extra
63                         INCLUDE "default/opac/parts/record/${name}.tt2";
64                     END;
65                 END; 
66             %]
67         </div>
68         [% END %]
69     </div>
70     <!--
71     <div id='rdetail_preview_full_text' class='hide_me'>[% l("Full text") %]</div>
72     <div id='rdetail_preview_title' class='hide_me'>[% l("See the full text of this book.") %]</div>
73     <div id='rdetail_preview_badge' class='hide_me'>[% l("Show a preview of this book from Google Book Search") %]</div>
74     -->
75 </div>