<cell name="Trumpet" img="category.png" type="search">su:trumpet</cell>
<cell name="Drums" img="category.png" type="search">su:drums</cell>
<cell name="Bass" img="category.png" type="search">su:bass</cell>
- <cell name="Clarinet" img="category.png" type="search">su:clarinet</cell>
+ <cell name="Clarinet" img="category.png" type="link">http://en.wikipedia.org/wiki/Clarinet</cell>
</page>
<page id="11" columns="3" name="Current Events" img="category.png">
<cell name="Entertainment" img="category.png" type="search">su:entertainment sort('pubdate')#descending</cell>
);
}
- # TODO: make generic "whoami" sub for EGCatLoader.
+ # TODO: make generic "whereami" sub for EGCatLoader.
my $ou = $self->ctx->{physical_loc} || $self->cgi->param('loc') || $self->ctx->{aou_tree}->()->id;
my $layout;
<div class="clear"> </div>
</div>
-<div class="sub_header">You can find this item at these locations:</div>
+<div class="sub_header">[% l('You can find this item at these locations:') %]</div>
<div class="item_detail_location_wrapper">
- <table cellpadding="0" cellspacing="0" border="0" class="item_location_table">
- <tbody>
- <tr class="header">
- <td class="location">Location</td>
- <td class="loc_info"> </td>
- <td class="status">Status</td>
- <td class="callnumber">Call Number</td>
- </tr>
- <tr>
- <td class="location">Bellevue Library</td>
- <td class="loc_info"><a href="javascript:;">View Library Info</a></td>
- <td class="status">Check Shelf</td>
- <td class="callnumber">J613.71 CRE</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="sub_header">About this item:</div>
- <div class="item_detail_desc">
- <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam <a href="javascript:;">nonummy</a> nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit</p>
+ [% INCLUDE 'kpac/parts/copy_table.tt2' %]
</div>
+ [% IF attrs.summary %]
+ <div class="sub_header">[% l('About this item:') %]</div>
+ <div class="item_detail_desc">
+ [% FOR sum IN attrs.summary %]
+ [% IF !loop.first; '<br/>'; END %]
+ <p>[% sum | html %] </p>
+ [% END %]
+ </div>
+ [% END %]
+
+ <!-- TODO -->
+
<div class="item_detail_extras_tabs">
<a href="javascript:;">Reviews</a>
<div class="selected">Rate this Item</div>
<div class="breadcrumb">
<!-- home page -->
- <a href="[% mkurl(ctx.kpac_root _ '/index', {}, ['trail']) %]"
+ <a href="[% mkurl(ctx.kpac_root _ '/index', {}, ['trail', 'page']) %]"
class="bread_home"><img alt="[% l('Home') %]"
src="[% ctx.media_prefix %]/images/kpac/home_icon.png" /></a>
<!-- record title -->
<div class="bread_green_mid"> </div>
- [% title = '';
- IF attrs AND attrs.title;
- title = attrs.title.substr(15, -1, '...');
- END
+ [% tlen = 18; # TODO config?
+ title = attrs.title || '';
+ IF title.length > tlen;
+ title = l('[_1]...', title.substr(0, tlen - 3));
+ END;
+ # I know there's a way to do this all w/ substr,
+ # but it's trying my patience. this works.
%]
<a href="javascript:;">[% title | html %]</a>
--- /dev/null
+[%-
+FOREACH copy_info IN ctx.copies;
+ IF copy_info.call_number_label != '##URI##';
+ has_copies = 'true';
+ END;
+ IF copy_info.part_label != '';
+ has_parts = 'true';
+ END;
+ IF has_parts && has_copies;
+ LAST;
+ END;
+END;
+%]
+[%- IF has_copies; %]
+<table cellpadding="0" cellspacing="0" border="0" width="100%" class="item_location_table">
+ <tbody>
+ <tr class="header">
+ <td class="location">[% l('Location') %]</td>
+ <td class="loc_info"> </td>
+ <td class="status">[% l('Status') %]</td>
+ <td class="callnumber">[% l('Call Number') %]</td>
+ </tr>
+ [%-
+ FOR copy_info IN ctx.copies;
+ callnum = copy_info.call_number_label;
+ NEXT IF callnum == '##URI##';
+
+ callnum_prefix = copy_info.call_number_prefix_label;
+ IF callnum_prefix != "";
+ callnum = callnum_prefix _ " " _ callnum;
+ END;
+
+ callnum_suffix = copy_info.call_number_suffix_label;
+ IF callnum_suffix != "";
+ callnum = callnum _ " " _ callnum_suffix;
+ END;
+ -%]
+ <tr>
+ <td class="location">[% ctx.get_aou(copy_info.circ_lib).name | html %]</td>
+ <td class="loc_info"><a href="javascript:;">View Library Info</a></td><!-- TODO -->
+ <td class="status">[% copy_info.copy_status | html %]</td>
+ [%- IF has_parts == 'true' %]
+ <td class="callnumber">[% l('[_1] ([_2])', callnum, copy_info.part_label) | html %]</td>
+ [% ELSE %]
+ <td class="callnumber">[% callnum | html %]</td>
+ [%- END %]
+ </tr>
+ [%- END %]
+
+ <!-- PAGING -->
+
+ <tr>
+
+ <td>
+ [%- IF ctx.copy_offset > 0;
+ new_offset = ctx.copy_offset - ctx.copy_limit;
+ IF new_offset < 0; new_offset = 0; END %]
+ <a href="[% mkurl('', {copy_offset => new_offset, copy_limit => ctx.copy_limit}) %]">« [%
+ l('Previous [_1]', ctx.copy_offset - new_offset) %]</a>
+ [%- END %]
+ </td>
+
+ <td>
+ [%- IF ctx.copies.size >= ctx.copy_limit %]
+ <a href="[% mkurl('', {copy_offset => ctx.copy_offset + ctx.copy_limit, copy_limit => ctx.copy_limit}) %]">[%
+ l('Next [_1]', ctx.copy_limit) %] »</a>
+ [%- END %]
+ </td>
+
+ [%- more_copies_limit = 50 %] [%# TODO: config %]
+ <td>
+ [%- IF ctx.copy_limit != more_copies_limit AND ctx.copies.size >= ctx.copy_limit %]
+ <a href="[% mkurl('', {copy_limit => more_copies_limit, copy_offset => 0}) %]">[% l('Show more copies') %]</a>
+ [%- ELSIF ctx.copy_limit == more_copies_limit %]
+ <a href="[% mkurl('', {copy_limit => 0, copy_offset => 0}) %]">[% l('Show fewer copies') %]</a>
+ [%- END %]
+ </td>
+ </tr>
+ </tbody>
+</table>
+[% END %]
+
[% ELSIF cell.type == 'search'; %]
- <td width="[% width %]%"><a href="[% mkurl(ctx.kpac_root _ '/search_results', {query => cell.content}) %]"><img
+ <td width="[% width %]%"><a href="[% mkurl(ctx.kpac_root _ '/search_results', {query => cell.content}, ['page']) %]"><img
src="[% kpac_img_path(cell.img) %]" alt="" /><span>[% cell.name %]</span></a></td>
[% ELSIF cell.type == 'link'; %]
<div class="sub_sidebar_header">[% l('New Search') %]</div>
<form action="[% ctx.kpac_root _ '/search_results' %]">
- <input type='hidden' name='trail' value="[% CGI.param('trail') | html %]"/>
<div class="sub_sidebar_search_wrapper">
<input type="text" name='query' value="[% CGI.param('query') | html %]"
[% seed = l(' Enter Text... ') | html %]