From: Ben Shum Date: Fri, 7 Dec 2012 21:47:59 +0000 (-0500) Subject: Tinypac - tweaks X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=34d4fdd15c52d9ed8744a812b31073f2447fb0db;p=working%2FEvergreen.git Tinypac - tweaks Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/templates/tinypac/base.tt2 b/Open-ILS/src/templates/tinypac/base.tt2 index 2107449ed4..846031e69a 100644 --- a/Open-ILS/src/templates/tinypac/base.tt2 +++ b/Open-ILS/src/templates/tinypac/base.tt2 @@ -1,21 +1,44 @@ - [% ctx.page_title %] - + [% IF ctx.refresh %] + + [% ELSIF ctx.authtime %] + + [% END %] + [% l('Catalog - [_1]', ctx.page_title) %] + + - -
-
-
-
-
-
-
- [% content %] -
-
-
- + [% content %] diff --git a/Open-ILS/src/templates/tinypac/home.tt2 b/Open-ILS/src/templates/tinypac/home.tt2 index 31604fe5ba..dc293e0586 100644 --- a/Open-ILS/src/templates/tinypac/home.tt2 +++ b/Open-ILS/src/templates/tinypac/home.tt2 @@ -1,18 +1,24 @@ -[% PROCESS "tinypac/parts/header.tt2"; - WRAPPER "tinypac/base.tt2"; - INCLUDE "tinypac/parts/misc_util.tt2"; - ctx.page_title = l("Home") %] -
- [% INCLUDE "tinypac/parts/searchbar.tt2" %] -
-
-
-
+[% + PROCESS 'opac/parts/header.tt2'; + WRAPPER 'tinypac/base.tt2'; + PROCESS 'opac/parts/org_selector.tt2' +%] + - +
[% INCLUDE "opac/parts/qtype_selector.tt2" id="qtype" %]
+
[% INCLUDE build_org_selector show_loc_groups=1 %]
+
+





Standard Catalog +
[% END %] diff --git a/Open-ILS/src/templates/tinypac/login.tt2 b/Open-ILS/src/templates/tinypac/login.tt2 index aa61bada3e..1f01c39c67 100644 --- a/Open-ILS/src/templates/tinypac/login.tt2 +++ b/Open-ILS/src/templates/tinypac/login.tt2 @@ -1,6 +1,6 @@ [% PROCESS "tinypac/parts/header.tt2"; WRAPPER "tinypac/base.tt2"; - INCLUDE "tinypac/parts/misc_util.tt2"; + INCLUDE "opac/parts/misc_util.tt2"; ctx.page_title = l("Account Login") %]
diff --git a/Open-ILS/src/templates/tinypac/myopac/circs.tt2 b/Open-ILS/src/templates/tinypac/myopac/circs.tt2 index ccecc05f7f..caa64b8b14 100644 --- a/Open-ILS/src/templates/tinypac/myopac/circs.tt2 +++ b/Open-ILS/src/templates/tinypac/myopac/circs.tt2 @@ -1,5 +1,5 @@ [% PROCESS "tinypac/parts/header.tt2"; - PROCESS "tinypac/parts/misc_util.tt2"; + PROCESS "opac/parts/misc_util.tt2"; WRAPPER "tinypac/parts/myopac/base.tt2"; myopac_page = "circs" %]
@@ -63,6 +63,10 @@ ) %]">[% attrs.author | html %] [% END %]
+ [% + due_date = ctx.parse_datetime(circ.circ.due_date); + due_class = (date.now > date.format(due_date, '%s')) ? 'error' : ''; + %] Renewals Remaining: [% circ.circ.renewal_remaining %]
Due Date: [% date.format(due_date, DATE_FORMAT) %] diff --git a/Open-ILS/src/templates/tinypac/myopac/holds.tt2 b/Open-ILS/src/templates/tinypac/myopac/holds.tt2 index 29404230a7..42119e9768 100644 --- a/Open-ILS/src/templates/tinypac/myopac/holds.tt2 +++ b/Open-ILS/src/templates/tinypac/myopac/holds.tt2 @@ -1,5 +1,5 @@ [% PROCESS "tinypac/parts/header.tt2"; - PROCESS "tinypac/parts/misc_util.tt2"; + PROCESS "opac/parts/misc_util.tt2"; PROCESS "tinypac/parts/hold_status.tt2"; WRAPPER "tinypac/parts/myopac/base.tt2"; myopac_page = "holds" %] diff --git a/Open-ILS/src/templates/tinypac/myopac/main.tt2 b/Open-ILS/src/templates/tinypac/myopac/main.tt2 index de7d13be50..22a7656bdf 100644 --- a/Open-ILS/src/templates/tinypac/myopac/main.tt2 +++ b/Open-ILS/src/templates/tinypac/myopac/main.tt2 @@ -1,5 +1,5 @@ [% PROCESS "tinypac/parts/header.tt2"; - PROCESS "tinypac/parts/misc_util.tt2"; + PROCESS "opac/parts/misc_util.tt2"; WRAPPER "tinypac/parts/myopac/main_base.tt2"; myopac_page = "main"; myopac_main_page = "main"; diff --git a/Open-ILS/src/templates/tinypac/parts/login/form.tt2 b/Open-ILS/src/templates/tinypac/parts/login/form.tt2 index c98235e458..769f905bf9 100644 --- a/Open-ILS/src/templates/tinypac/parts/login/form.tt2 +++ b/Open-ILS/src/templates/tinypac/parts/login/form.tt2 @@ -90,7 +90,7 @@
- +
diff --git a/Open-ILS/src/templates/tinypac/parts/myopac/main_base.tt2 b/Open-ILS/src/templates/tinypac/parts/myopac/main_base.tt2 index 4a5040aba4..8e4fd6e073 100644 --- a/Open-ILS/src/templates/tinypac/parts/myopac/main_base.tt2 +++ b/Open-ILS/src/templates/tinypac/parts/myopac/main_base.tt2 @@ -1,5 +1,5 @@ [% PROCESS "tinypac/parts/header.tt2"; - PROCESS "tinypac/parts/misc_util.tt2"; + PROCESS "opac/parts/misc_util.tt2"; WRAPPER "tinypac/parts/myopac/base.tt2"; %] diff --git a/Open-ILS/src/templates/tinypac/parts/record/body.tt2 b/Open-ILS/src/templates/tinypac/parts/record/body.tt2 index 77dad5e735..cf93dc962c 100644 --- a/Open-ILS/src/templates/tinypac/parts/record/body.tt2 +++ b/Open-ILS/src/templates/tinypac/parts/record/body.tt2 @@ -1,6 +1,6 @@ -[%- attrs = {marc_xml => ctx.marc_xml}; - PROCESS "tinypac/parts/misc_util.tt2"; - PROCESS get_marc_attrs args=attrs; +[%- attrs = {marc_xml => ctx.marc_xml}; + PROCESS "opac/parts/misc_util.tt2"; + INCLUDE get_marc_attrs args=attrs; stop_parms = ['expand','cnoffset']; ctx.record_attrs = attrs; # capture for JS %] @@ -13,5 +13,5 @@
[%- END %] [% INCLUDE "tinypac/parts/record/summary.tt2" %] - [%- INCLUDE "tinypac/parts/record/navigation.tt2" %] + [% INCLUDE "tinypac/parts/record/navigation.tt2" %]
diff --git a/Open-ILS/src/templates/tinypac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/tinypac/parts/record/copy_table.tt2 index 973292a5b2..9e20d9e974 100644 --- a/Open-ILS/src/templates/tinypac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/tinypac/parts/record/copy_table.tt2 @@ -25,6 +25,7 @@ FOREACH copy_info IN copies; END; END; -%] +

Holdings

[%- IF has_copies; %] [%- last_cn = 0; @@ -42,32 +43,47 @@ END; callnum = callnum _ " " _ callnum_suffix; END; -%] - + [%- IF serial_holdings %] + [%- copy_info.holding_label | html; -%] + + [% ELSE %] [%- org_name = ctx.get_aou(copy_info.circ_lib).name; org_name | html -%] - -
  • - [% callnum | html %] [% IF ctx.get_org_setting(CGI.param('loc') OR ctx.aou_tree.id, 'sms.enable') == 1 %](Text)[% END %] -
  • +
    [% END %]
  • [% copy_info.copy_location | html %]
  • + [% IF callnum; %] +
  • + Call #: [% callnum | html %] [% IF has_parts == 'true' %] [% copy_info.part_label | html %] [% END %] +
  • + [% END; %]
  • [% copy_info.copy_status | html %]
  • -
  • - [% - IF copy_info.due_date; - date.format( - ctx.parse_datetime(copy_info.due_date), - DATE_FORMAT - ); - ELSE; - '-'; - END %] -
  • - [%- END %] + [% IF copy_info.due_date AND copy_info.copy_status != 'Lost' %] + [% due_date = ctx.parse_datetime(copy_info.due_date); %] +
  • Due: [% date.format(due_date, DATE_FORMAT) %]
  • + [% END; %] +
    + [% END; %] [% END; %]
    +
    + [%- IF ctx.copy_offset > 0 AND NOT serial_holdings; + new_offset = ctx.copy_offset - ctx.copy_limit; + IF new_offset < 0; new_offset = 0; END %] + + « [% + l('Previous [_1]', ctx.copy_offset - new_offset) %] + + [%- END %] + [%- IF copies.size >= ctx.copy_limit AND NOT serial_holdings %] + + [% + l('Next [_1]', ctx.copy_limit) %] » + + [%- END %] +
    diff --git a/Open-ILS/src/templates/tinypac/parts/record/summary.tt2 b/Open-ILS/src/templates/tinypac/parts/record/summary.tt2 index 509401d71d..b166a465e2 100644 --- a/Open-ILS/src/templates/tinypac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/tinypac/parts/record/summary.tt2 @@ -1,4 +1,4 @@ -[% PROCESS "tinypac/parts/misc_util.tt2"; +[% PROCESS "opac/parts/misc_util.tt2"; USE ResolverResolver; ctx.page_title = attrs.title | html %] @@ -10,7 +10,7 @@ [%-# This holds the record summary information %]
    - +
    [% ident = attrs.isbn_clean || attrs.upc; IF ident; %] -

    [% attrs.title_extended | html %]

    + [%- IF attrs.format_icon %] + + [% attrs.format_label %] + + [%- END %] +

    [% attrs.title_extended | html %]

    - [%- INCLUDE "tinypac/parts/record/authors.tt2" %] + [%- search_ou = ctx.search_ou; + IF ctx.place_unfillable || + ( attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size > 0 + && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0) + ) + %]
    @@ -32,56 +42,18 @@ class="no-dec">[% l('place hold') %][% l('Place Hold') %]
    -
    -
    -
    - [%- IF attrs.format_icon %] -
    - [% attrs.format_label %] -
    - [%- END %]
    -
    + [% END %] -
    - [%- IF num_uris > 1 %]
      [% END %] - [%- FOR uri IN merged_uris %] - [%- IF num_uris == 1 %]

      [% ELSE %]

    • [% END %] - [% uri.link %][% ' - ' _ uri.note IF uri.note %] - [%- IF num_uris == 1 %]

      [% ELSE %]
    • [% END %] - [%- END %] - [%- IF num_uris > 1 %]
    [% END %] -
    -[%- # Hold/copy summary - IF ctx.copy_summary.0.count -%] -
    -[%- INCLUDE "tinypac/parts/record/copy_counts.tt2" %] - - [% l('Current holds') %] : - [%- l("[quant,_1,current hold,current holds] with [quant,_2,total copy,total copies].", - ctx.record_hold_count, ctx.copy_summary.0.count) %] -

    -
    -[%- INCLUDE "tinypac/parts/record/copy_table.tt2" copies=ctx.copies %] -
    -[%- 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 %] + [%- IF attrs.edition %] +
    • + [% l("Edition:") %] + [% attrs.edition | html %]
    • - [%- END %] [%- END %] [%- IF attrs.phys_desc %]
    • @@ -89,22 +61,32 @@ [% attrs.phys_desc | html %]
    • [%- END %] - [%- IF attrs.edition %] -
    • - [% l("Edition:") %] - [% attrs.edition | html %] -
    • - [%- END %] [%- IF attrs.publisher %]
    • [% l("Publisher:") %] [% - attrs.publisher | html; + attrs.pubinfo | html; %] - [% IF attrs.pubdate; %] - - [% END; %]
    • [%- END %]
    + [%- IF attrs.summary %] +
    +

    [% l('Summary') %]

    + +
    • [% attrs.summaries.0 | html %]
    +
    + [%- END %] +
    +[%- # Hold/copy summary + IF ctx.copy_summary.0.count +%] +
    +[%- INCLUDE "opac/parts/record/copy_counts.tt2" %] +[%- INCLUDE "tinypac/parts/record/copy_table.tt2" copies=ctx.copies %] +
    +[%- END %] diff --git a/Open-ILS/src/templates/tinypac/parts/result/table.tt2 b/Open-ILS/src/templates/tinypac/parts/result/table.tt2 index 95a5ac09be..482680c073 100644 --- a/Open-ILS/src/templates/tinypac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/tinypac/parts/result/table.tt2 @@ -1,4 +1,4 @@ -[% PROCESS "tinypac/parts/misc_util.tt2"; +[% PROCESS "opac/parts/misc_util.tt2"; USE ResolverResolver; @@ -39,14 +39,18 @@ [% END %] -
    +
    + [% IF attrs.format_icon %] + [% attrs.format_label | html %] + [% END %] l('Display record details for "[_1]"', attrs.title)) %] - class='search_link'>[% attrs.title | html %] + class='search_link'>[% attrs.title | html %]
    + [% IF attrs.author; %] [% attrs.author | html %]    + [% END %] [% attrs.pubdate | html %] +

    + [% IF attrs.holdings.0.label %] +
    +
    + Location: [% attrs.holdings.0.location | html %] +
    +
    + Call #: [% attrs.holdings.0.label | html %]
    +

    + [% END %] - - [% IF attrs.phys_desc %] - - - - - [% END %] [% FOR uri IN args.uris %] - - +
    + [% l('Electronic Resource') %] +
    +
    [% uri.link | html %][% ' - ' _ uri.note | html IF uri.note %]
    [% END %]
    - - [% args.phys_desc | html %] -
    - [% l('Electronic resource') %] - [% uri.link | html %][% ' - ' _ uri.note | html IF uri.note %]
    @@ -86,14 +91,15 @@ [% END %] [% END %]
    -
    - [% IF attrs.format_icon %] - [% attrs.format_label | html %] - [% END %] - -
    +[%- search_ou = ctx.search_ou; + num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0; + IF ctx.place_unfillable || + ( num_holdable_copies > 0 + && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0) + ) +%] -
    +

    [% ctx.results_count_header %]
    New Search

    -

    +
    Standard Catalog
    diff --git a/Open-ILS/src/templates/tinypac/parts/searchbar.tt2 b/Open-ILS/src/templates/tinypac/parts/searchbar.tt2 index 6aedaf16b1..88aa73a10c 100644 --- a/Open-ILS/src/templates/tinypac/parts/searchbar.tt2 +++ b/Open-ILS/src/templates/tinypac/parts/searchbar.tt2 @@ -1,6 +1,6 @@ [% PROCESS "tinypac/parts/org_selector.tt2" %]