From: berick Date: Fri, 1 Apr 2011 15:47:09 +0000 (-0400) Subject: More work on record details 'extras' X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fa1eb32192823e4d548a0fb9e049f04b4e050305;p=evergreen%2Fequinox.git More work on record details 'extras' When an extra is chosen, anchor the page on the selected extra for focus Lots of cleanup to create a consistent system for selecting and displaying extras --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm index c2da1921d5..1400aef0a3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm @@ -34,11 +34,10 @@ sub load_record { $self->ctx->{copy_offset} = $copy_offset; for my $expand ($self->cgi->param('expand')) { + $self->ctx->{"expand_$expand"} = 1; if($expand eq 'marchtml') { $self->ctx->{marchtml} = $self->mk_marc_html($rec_id); - } elsif($expand eq 'subject') { - $self->ctx->{expand_subject} = 1; - } + } } return Apache2::Const::OK; diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index 32a3c8297b..27f36a7c52 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -977,3 +977,5 @@ a.dash-link:hover { text-decoration: underline !important; } .fmt-note { vertical-align: middle; padding-left: 1em !important; } .hold-editor-controls { text-align: center; padding-top: 1em !important; } .hold-editor-controls a { padding-left: 2em; } + +#rdetail_cn_browse_div { text-align: center; } diff --git a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 index 292ed79a74..f66b77b706 100644 --- a/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/record/extras.tt2 @@ -1,77 +1,20 @@ [% - # Augments/alters the current URL to set expand=$tab - # for displaying expanded detail content. + # Builds a link like so: $orig_link&expand=$tab#$tab + # use of 'SET foo =' prevents unintended inline rendering of values BLOCK rdetail_extras_tab_link; - SET foo = CGI.param('expand', tab); - ctx.unparsed_uri.replace('\?.*', '?' _ CGI.query_string); + cgi = CGI(); + SET foo = cgi.param('expand', tab); + url = ctx.unparsed_uri.replace('\?.*', '?' _ cgi.query_string); + SET foo = url.replace('#.*', ''); # clear any existing anchor + url _ '#' _ tab; # anchor on the tab name END; %]
- - - - - - -
- - -
- - - - - -
- Summary: - -
-
- -
- - [% INCLUDE "default/opac/parts/record/subjects.tt2" %] - - -
- Contents: -
- [% l("Table of Contents") %]: -
-
- - + - - -
- Series: -
-
- - - + + + [% + # Hidden extras are not yet implemented. Some may require JS + extras = [ + {name => 'summary', label => l('Summary & More'), hide => 1}, # Content Cafe + {name => 'content', label => l('Contents'), hide => 1}, # ToC + {name => 'authors', label => l('Authors'), hide => 1}, + {name => 'series', label => l('Series'), hide => 1}, + {name => 'awards', label => l('Series'), hide => 1}, + {name => 'subject', label => l('Subject')}, + {name => 'annotation', label => l('Annotation'), hide => 1}, + {name => 'reviews', label => l('Reviews'), hide => 1}, + {name => 'excerpt', label => l('Excerpt'), hide => 1}, + {name => 'preview', label => l('Preview'), hide => 1}, + {name => 'novelist', label => l('Suggestions by NoveList'), hide => 1}, + {name => 'cnbrowse', label => l('Shelf Browser'), hide => 1}, + {name => 'copyinfo', label => l('Copy Summary'), hide => 1}, + {name => 'marchtml', label => l('MARC Record')} + ]; + %] + [% FOREACH extra IN extras %] + [% IF extra.hide; NEXT; END; %] +
- -
- - - -
- - - -
- - - - - -
-
- [% l("There are no call numbers for this item at this location.") %] -
- -
- [% l("Local Call Numbers:") %] - -
- [% INCLUDE "default/opac/parts/cn_browse.tt2" %] -
- - [% INCLUDE "default/opac/parts/record/cn_details.tt2" %] - - - - [% INCLUDE "default/opac/parts/record/copyinfo.tt2" %] - - +
- diff --git a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2 b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2 index 50a83f6039..64cc3c474a 100644 --- a/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/record/subjects.tt2 @@ -1,16 +1,4 @@ - - -[% IF ctx.expand_subject %] - -
+
@@ -87,6 +75,3 @@ [% END; END; %]
- -[% END %] -