From 4bfb479dac07e004a11483332b1aaf19ac71cf4c Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Mon, 19 Sep 2011 18:59:25 -0400 Subject: [PATCH] Going for the Jungle skin feel (like Amazon) Signed-off-by: Dan Scott Signed-off-by: Thomas Berezansky --- .../src/templates/opac/parts/record/authors.tt2 | 25 +- Open-ILS/src/templates/opac/parts/record/body.tt2 | 2 - .../src/templates/opac/parts/record/extras.tt2 | 2 - .../src/templates/opac/parts/record/subjects.tt2 | 43 +-- .../src/templates/opac/parts/record/summary.tt2 | 298 ++++++++++----------- Open-ILS/web/css/skin/default/opac/style.css | 33 ++- 6 files changed, 210 insertions(+), 193 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/opac/parts/record/authors.tt2 index 0fabf46ec8..304e272df9 100644 --- a/Open-ILS/src/templates/opac/parts/record/authors.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/authors.tt2 @@ -3,19 +3,19 @@ authors = [ { type => 'author', - label => l('Authors: '), + label => l('Author'), xpath => '//*[@tag="100"]|//*[@tag="110"]|//*[@tag="111"]' }, { type => 'added', - label => l('Added Authors: '), + label => l('Added Author'), xpath => '//*[@tag="700"]|//*[@tag="710"]|//*[@tag="711"]' }, { type => 'credits', - label => l('Credits: '), + label => l('Credited'), xpath => '//*[@tag="100"]|//*[@tag="110"]|//*[@tag="111"]' }, { type => 'cast', - label => l('Cast: '), + label => l('Cast'), xpath => '//*[@tag="508"]' }, { type => 'notes', @@ -26,14 +26,20 @@ authors = [ BLOCK build_author_links; FOR node IN ctx.marc_xml.findnodes(xpath); + term = ''; + qterm = ''; FOR subfield IN node.childNodes; NEXT UNLESS subfield.nodeName == "subfield"; code = subfield.getAttribute('code'); NEXT UNLESS code.match('[a-z]'); - term = subfield.textContent | html; - url = mkurl(ctx.opac_root _ '/results', {query => subfield.textContent, qtype => 'author'}, ['page', 'expand']); - '
' _ term _ ''; + sf_raw = subfield.textContent; + sf = subfield.textContent | html; + term = term _ ' ' _ sf; + qterm = qterm _ ' ' _ sf_raw; END; + url = mkurl(ctx.opac_root _ '/results', {query => qterm, qtype => 'author'}, ['page', 'expand']); + author_type = label | html; + '' _ term _ ' (' _ author_type _ '). '; END; END; %] @@ -41,10 +47,9 @@ END;
[% FOREACH author IN authors; NEXT UNLESS author.xpath; - links = PROCESS build_author_links(xpath=author.xpath); + links = PROCESS build_author_links(xpath=author.xpath, label=author.label); IF links.match('\S') %] - [% author.label | html %] -
[% links %]
+ [% links %] [% END %] [% END %]
diff --git a/Open-ILS/src/templates/opac/parts/record/body.tt2 b/Open-ILS/src/templates/opac/parts/record/body.tt2 index bc42f5d56a..7010b46dcc 100644 --- a/Open-ILS/src/templates/opac/parts/record/body.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/body.tt2 @@ -50,7 +50,5 @@ [% l("This record has been deleted from the database. We recommend that you remove this title from any bookbags it may have been added to.") %] [% INCLUDE "opac/parts/record/summary.tt2" %] -
- [% INCLUDE "opac/parts/record/extras.tt2" %] diff --git a/Open-ILS/src/templates/opac/parts/record/extras.tt2 b/Open-ILS/src/templates/opac/parts/record/extras.tt2 index 5bf5716a4f..c6e403e2ec 100644 --- a/Open-ILS/src/templates/opac/parts/record/extras.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/extras.tt2 @@ -15,10 +15,8 @@ END; extras = [ - {name => 'subjects', label => l('Subject')}, {name => 'summaryplus', label => l('Summaries & More'), hide => hide_summary}, {name => 'contents', label => l('Contents'), hide => !attrs.contents}, - {name => 'authors', label => l('Authors')}, {name => 'series', label => l('Series')}, {name => 'annotation', label => l('Annotation'), hide => 1}, {name => 'awards', label => l('Awards, Reviews, & Suggested Reads')}, diff --git a/Open-ILS/src/templates/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates/opac/parts/record/subjects.tt2 index 25f6e2e129..34f80b11ba 100644 --- a/Open-ILS/src/templates/opac/parts/record/subjects.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/subjects.tt2 @@ -48,23 +48,26 @@ END %] -
- - [% any_subjects = 0; - FOREACH subj IN subjects; - content = PROCESS render_subject(xpath=subj.xpath); - IF content.match('\S'); - any_subjects = 1; %] - - - - - [% END; %] - [% END; %] - [% IF any_subjects == 0 %] - - [% END; %] -
- [% subj.label %] -
[% content %]
[% l('No Subjects') %]
-
+[% BLOCK render_all_subjects; + FOREACH subj IN subjects; + content = PROCESS render_subject(xpath=subj.xpath); + IF content.match('\S'); +%] + + + + + + + +
[% subj.label %][% content %]
+ [%- END; %] + [%- END; %] +[%- END %] + +[%- subject_html = PROCESS render_all_subjects; + IF subject_html.length > 0; +%] + +[%- subject_html %] +[%- END %] diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index a44e447a7e..a77e3e1281 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -9,151 +9,132 @@ [% INCLUDE 'opac/parts/record/refworks.tt2' %] [%- END %] - - - - - - - - - - -
- [% ident = attrs.isbn_clean || attrs.upc; IF ident; %] - [% l('Image of item') %] - [% END %] -
-
- - - - - -
- [% attrs.title_extended | html %]
- [% IF attrs.author %] - [% l("Author") %]: - [% attrs.author | html %] - [% END %] -
-
-
- -
- [% - operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add"; - label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); - %] - - - [% label %] - -
-
-
- [% IF attrs.format_icon %] - [% attrs.format_label %] - [% END %] -
-
-
-
- - - - - - - - [%- IF openurl.enabled == 'true'; - FOR issn IN args.issns; - sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl); - FOR res IN sfx; - %] - - - - - [% END %] - [% END %] - [% END %] - - - - - - - - - - - - -
- [% IF attrs.isbns.0 %][% l("ISBN") %][% END %] - - [% FOR isbn IN attrs.isbns %][% IF !loop.first; %]
[% END; isbn | html ; END %] -
- [% IF attrs.phys_desc %][% l("Physical Description") %][% END %] - [% attrs.phys_desc | html %]
- - [% res.public_name %] - [% res.target_coverage %]
- [% IF attrs.marc_cn; l("Call Number"); END %] - [% attrs.marc_cn | html %] - [% IF attrs.edition; l("Edition"); END %] - [% attrs.edition | html %]
- [% IF attrs.publisher; l("Publisher"); END %] - [% attrs.publisher | html %] - [% IF attrs.pubdate; l("Publication Date"); END %] - [% attrs.pubdate | html %]
- - -
-
- [% l("[quant,_1,Hold,Holds] with [quant,_2,total copy,total copies]", - ctx.record_hold_count, ctx.copy_summary.0.count) %] -
-
[% l('[quant,_1,Copy,Copies] available', ctx.copy_summary.0.available) %]
-
- -
-
-
+[%- # This holds the record summary information %] +
+ [% ident = attrs.isbn_clean || attrs.upc; IF ident; %] + [% l('Image of item') %] + [% END %] +
+
+ +
+ +
+ [%- + operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add"; + label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); + %] + + + [% label %] + +
+
-[% FOR uri IN args.uris %] -
- [% uri.link %][% ' - ' _ uri.note IF uri.note %] +
+

[% attrs.title_extended | html %]


+ [%- INCLUDE "opac/parts/record/authors.tt2" %] + [%- IF attrs.format_icon %] +
+ [% attrs.format_label %] +
+ [%- END %] + [%- IF openurl.enabled == 'true'; + sfx = [] + FOR issn IN args.issns; + sfx = sfx.import(ResolverResolver.resolve_issn(issn, openurl.baseurl)); + END; + IF sfx.size && sfx.0 != ''; + %] +
+ [% l("Electronic resources") %] + [%- + FOR res IN sfx; + %] +
+ + [% res.public_name %] + [% res.target_coverage %] +
+ [%- END %] + [%- END %] + [%- IF sfx.size && sfx.0 != '' %] +
+ [%- END %] + [%- FOR uri IN args.uris; %] +
+ [% uri.link %][% ' - ' _ uri.note IF uri.note %] +
+ [%- END %] + [%- # hold/copy summary %] + [%- IF ctx.copy_summary.0.count %] +
+ + [%- l("[quant,_1,current hold,current holds] with [quant,_2,total copy,total copies].", + ctx.record_hold_count, ctx.copy_summary.0.count) %] + + [% l('[quant,_1,copy,copies] currently available.', ctx.copy_summary.0.available) %] +
+ [% END %]
-[% END %] -
+

[% l("Record details") %]

+
    + [%- IF attrs.isbns.0; FOR isbn IN attrs.isbns %] +
  • + [% l('ISBN:'); %] + [% isbn | html %] +
  • + [%- END %] + [%- END %] + [%- IF attrs.issns.0; FOR issn IN attrs.issns %] +
  • + [% l('ISSN:'); %] + [% issn | html %] +
  • + [%- END %] + [%- END %] + + [%- IF attrs.phys_desc %] +
  • + [% l("Physical Description:") %] + [% attrs.phys_desc | html %] +
  • + [%- END %] + [%- IF attrs.edition %] +
  • + [% l("Edition:") %] + [% attrs.edition | html %] +
  • + [%- END %] + [%- IF attrs.publisher %] +
  • + [% l("Publisher:") %] + [% attrs.publisher | html %] [% IF attrs.pubdate; attrs.pubdate | html; END %] +
  • + [%- END %] +
- - - - + + + + [% IF ctx.is_staff %] - - - + + + [% END %] - - + + @@ -161,25 +142,25 @@ FOR copy_info IN ctx.copies; NEXT IF copy_info.call_number_label == '##URI##' %] - - - - + + + [% IF ctx.is_staff %] - - - [% END %] - - + - - - -
[% l("Location") %][% l("Call Number") %][% l("Barcode") %][% l("Shelving Location") %][% l("Location") %][% l("Call Number") %][% l("Barcode") %][% l("Shelving Location") %][% l("Age Hold Protection") %][% l("Create Date") %][% l("Holdable?") %][% l("Age Hold Protection") %][% l("Create Date") %][% l("Holdable?") %][% l("Status") %][% l("Due Date") %][% l("Status") %][% l("Due Date") %]
+ [%- org_name = ctx.get_aou(copy_info.circ_lib).name; org_name | html -%] [% copy_info.call_number_label | html %][% copy_info.barcode | html %][% copy_info.copy_location | html %][% copy_info.call_number_label | html %][% copy_info.barcode | html %][% copy_info.copy_location | html %] + [% copy_info.age_protect ? ctx.get_crahp(copy_info.age_protect).name : l('None') | html %] [% date.format( + [% date.format( ctx.parse_datetime(copy_info.create_date), DATE_FORMAT ) %][% # Show copy/volume hold links to staff (without + [% # Show copy/volume hold links to staff (without # checking whether they have permissions to do those). overall_holdable = (copy_info.holdable == 't' AND copy_info.location_holdable == 't' AND @@ -196,8 +177,8 @@ l("No"); END %][% copy_info.copy_status | html %][% + [% copy_info.copy_status | html %][% IF copy_info.due_date; date.format( ctx.parse_datetime(copy_info.due_date), @@ -240,21 +221,24 @@ [% END %]
- [% IF CGI.param('expand') == 'all' %] - - [% l('Collapse all tabs') %] - [% ELSE %] - - [% l('Expand all tabs') %] - [% END %] -
+[%- INCLUDE "opac/parts/record/subjects.tt2" %] + + +[%- INCLUDE "opac/parts/record/series.tt2" %] + +
+ [%- IF CGI.param('expand') == 'all' %] + + [% l('Collapse all tabs') %] + [%- ELSE %] + + [% l('Expand all tabs') %] + [%- END %] +
+
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index cc8dcf4e19..2b747ebff5 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -384,21 +384,27 @@ div.select-wrapper:hover { padding-right: 50px; } +#rdetails_status { + margin-top: 1.5em; +} + #rdetails_status td, #rdetails_status2 td { white-space:nowrap !important; padding: 7px 0px 3px 13px; } -#rdetails_status thead td { +#rdetails_status thead th { background-color: #d8d8d8; padding: 13px 0px 13px 13px; font-size: 10px; text-transform: uppercase; font-weight: bold; + text-align: left; } #rdetails_status tbody td { - padding-left: 13px;; + padding-left: 13px; + text-align: left; } .rdetail_extras { @@ -1044,7 +1050,30 @@ a.opac-button { width: 100%; } +.rdetail_copy_counts { + margin-top: 1em; +} + +#rdetail_record_details { + clear: both; + margin-top: 1.5em; + padding-top: 1.5em; +} + +.rdetail_subject_type { + vertical-align: top; + font-weight: bold; +} + .bookbag-item-row td { vertical-align: top; } .error { color: red; font-weight: bold; } .success { color: green; font-weight: bold; } + +.rdetail_related_subjects { + margin-top: 1.5em; +} + +.rdetail_related_series { + margin-top: 1.5em; +} -- 2.11.0