[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. cd056eba75038c6a1fabd2a83ba97d81a444bc75

Evergreen Git git at git.evergreen-ils.org
Sat Jan 25 09:21:55 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  cd056eba75038c6a1fabd2a83ba97d81a444bc75 (commit)
       via  536e1cea766d9136e9d0f87fdf97fb6722926be1 (commit)
       via  7831ed7153eb21a565f1827ac3331434de2341b7 (commit)
       via  fd015294eca4169d373eee8ecda798245e5ea24e (commit)
       via  a49b91ff2afbffe4dc09dfd2df02893c4733d8ca (commit)
       via  c747313ae6b181b1a1eff01ca59b65380145b6a9 (commit)
       via  df5cc7561eacee316fda5756756f1e50260c13af (commit)
      from  6cebf87e12c29553b8c6d56d527dad415334a9a3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cd056eba75038c6a1fabd2a83ba97d81a444bc75
Author: Ben Shum <bshum at biblio.org>
Date:   Fri Jan 24 23:56:45 2014 -0500

    Fix copy_info variables for result and record view
    
    Because we yanked out the code that generates the link into a separate INCLUDE
    file, the function was looking for something for copy_info. The one for result
    was missing entirely and the one for record was backwards.
    
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
index b5fdd94..2681993 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
@@ -94,7 +94,7 @@ END; # FOREACH bib
                 [%- copy_info.holding_label | html; -%]
             </td>
             [%- ELSE %]<td headers='copy_header_library'>
-            [%- copy_info = copy;
+            [%- copy = copy_info;
                 INCLUDE "opac/parts/library_name_link.tt2";
             -%]
                 <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index 0122152..e960a63 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -247,7 +247,8 @@ END;
                                                                 [% FOR copy IN args.holdings %]
                                                                         <tr>
                                                                             <td>
-[%- INCLUDE "opac/parts/library_name_link.tt2" %]
+[%- copy = copy_info;
+    INCLUDE "opac/parts/library_name_link.tt2"; %]
                                                                             </td>
                                                                             <td>[% copy.location | html %]</td>
                                                                             <td>[% copy.label | html %]</td>

commit 536e1cea766d9136e9d0f87fdf97fb6722926be1
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Jan 23 13:51:30 2014 -0500

    KPAC library page: give the kids some style
    
    Just the bare minimum: some padding around the body, and a font colour and size
    that's reasonably consistent with the rest of the look of the KPAC for h2 and
    h3 elements.
    
    Yes, I know there is text-transform:uppercase and h2 is sized at 48px but that
    seems to be used for "You saved it!" and "Get it!" banner things. On the
    library info page, we're using headings for headings.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/web/css/skin/default/kpac/style.css b/Open-ILS/web/css/skin/default/kpac/style.css
index ed7e092..e42863f 100755
--- a/Open-ILS/web/css/skin/default/kpac/style.css
+++ b/Open-ILS/web/css/skin/default/kpac/style.css
@@ -1030,3 +1030,21 @@ div.hr {
     color: #fff;
     text-align: center;
 }
+
+.content-wrapper-library-page {
+    padding: 1.5em;
+}
+
+.content-wrapper-library-page h2 {
+    font-size: 18px;
+    color: #b53ea6;
+    padding-bottom: 0.5em;
+    padding-top: 0.5em;
+}
+
+.content-wrapper-library-page h3 {
+    font-size: 14px;
+    color: #b53ea6;
+    padding-bottom: 0.5em;
+    padding-top: 0.5em;
+}

commit 7831ed7153eb21a565f1827ac3331434de2341b7
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Jan 23 12:10:50 2014 -0500

    Clean up the breadcrumb trail in the KPAC
    
    Links to the library pages don't maintain GET context, so we can't feed search
    or "Get It" links in the breadcrumb trail, currently. We can revisit this,
    of course.
    
    Wasn't there some fairy tale about kids and a breadcrumb trail... once upon a
    time?
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/kpac/parts/breadcrumb.tt2 b/Open-ILS/src/templates/kpac/parts/breadcrumb.tt2
index f8699e3..4532070 100644
--- a/Open-ILS/src/templates/kpac/parts/breadcrumb.tt2
+++ b/Open-ILS/src/templates/kpac/parts/breadcrumb.tt2
@@ -16,7 +16,7 @@
                 {trail = trail_splice(page_id)}, clear_params) %]">[% page.name | html %]</a>
     [%  END %]
 
-    [% IF ctx.page != 'index' AND ctx.page != 'category' %]
+    [% IF ctx.page != 'index' AND ctx.page != 'category' AND ctx.page != 'library' %]
 
         <!-- search results -->
         <div class="bread_green_mid">&nbsp;</div>

commit fd015294eca4169d373eee8ecda798245e5ea24e
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Jan 23 12:05:20 2014 -0500

    KPAC root, OPAC root: we all live under one root
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/library/core_info.tt2 b/Open-ILS/src/templates/opac/parts/library/core_info.tt2
index b48c0d7..1398f70 100644
--- a/Open-ILS/src/templates/opac/parts/library/core_info.tt2
+++ b/Open-ILS/src/templates/opac/parts/library/core_info.tt2
@@ -1,3 +1,9 @@
+[%-
+    opac_root = ctx.opac_root;
+    IF ctx.kpac_root;
+        opac_root = ctx.kpac_root;
+    END;
+-%]
 <div id="content-wrapper">
     <div id="main-content" class="content-wrapper-library-page" vocab="http://schema.org/" typeof="Library">
     <h1 property="name">[% ctx.library.name | html %]</h1>
@@ -41,7 +47,7 @@
     [%- IF ctx.library.parent_ou; %]
     <h2>Branch relationship</h2>
     <div id="branch-info">[% l('Parent library: ') %]
-        <a property="branchOf" href="[% mkurl(ctx.opac_root _ '/library/' _ ctx.parent.shortname, {}, 1) %]">[% ctx.parent.name | html %]</a>
+        <a property="branchOf" href="[% mkurl(opac_root _ '/library/' _ ctx.parent.shortname, {}, 1) %]">[% ctx.parent.name | html %]</a>
     </div>
     [%  END; -%]
 
diff --git a/Open-ILS/src/templates/opac/parts/library_name_link.tt2 b/Open-ILS/src/templates/opac/parts/library_name_link.tt2
index c002ce2..3179e5f 100644
--- a/Open-ILS/src/templates/opac/parts/library_name_link.tt2
+++ b/Open-ILS/src/templates/opac/parts/library_name_link.tt2
@@ -1,10 +1,15 @@
 [%-
+    opac_root = ctx.opac_root;
+    IF ctx.kpac_root;
+        opac_root = ctx.kpac_root;
+    END;
+
     org_name = ctx.get_aou(copy_info.circ_lib).name;
     org_sname = ctx.get_aou(copy_info.circ_lib).shortname;
     lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url');
     prefer_external_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.prefer_external_url');
     UNLESS lib_url && prefer_external_url;
-        lib_url = mkurl(ctx.opac_root _ '/library/' _ ctx.get_aou(copy_info.circ_lib).shortname, {}, 1);
+        lib_url = mkurl(opac_root _ '/library/' _ ctx.get_aou(copy_info.circ_lib).shortname, {}, 1);
     END; 
     IF lib_url; '<a property="seller" typeof="Library" href="'; lib_url | url; '">'; END;
     '<span property="name">'; org_name | html; '</span>';

commit a49b91ff2afbffe4dc09dfd2df02893c4733d8ca
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Jan 23 11:41:52 2014 -0500

    Begin enabling KPAC-branded library info page
    
    This needs work and is going to get squashed like a bug when we're through.
    
    Yeesh.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm
index 77a7eae..30fbca2 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm
@@ -29,6 +29,7 @@ sub load {
     return $self->load_simple("category") if $path =~ m|kpac/category|;
     return $self->load_kpac_rresults if $path =~ m|kpac/results|;
     return $self->load_record(no_search => 1) if $path =~ m|kpac/record|; 
+    return $self->load_library if $path =~ m|kpac/library|;
 
     # ----------------------------------------------------------------
     #  Everything below here requires SSL
diff --git a/Open-ILS/src/templates/kpac/library.tt2 b/Open-ILS/src/templates/kpac/library.tt2
new file mode 100644
index 0000000..2c1dc65
--- /dev/null
+++ b/Open-ILS/src/templates/kpac/library.tt2
@@ -0,0 +1,6 @@
+[%- PROCESS "opac/parts/header.tt2";
+    WRAPPER "kpac/parts/subpage.tt2";
+    ctx.page_title = l("Library details: [_1]", ctx.library.name);
+-%]
+    [%- INCLUDE "opac/parts/library/core_info.tt2"; %]
+[%- END; %]
diff --git a/Open-ILS/src/templates/opac/library.tt2 b/Open-ILS/src/templates/opac/library.tt2
index 24a4f7a..f733ca0 100644
--- a/Open-ILS/src/templates/opac/library.tt2
+++ b/Open-ILS/src/templates/opac/library.tt2
@@ -4,54 +4,5 @@
     ctx.page_title = l("Library details: [_1]", ctx.library.name);
 -%]
     [%- INCLUDE "opac/parts/searchbar.tt2" %]
-<div id="content-wrapper">
-    <div id="main-content" class="content-wrapper-library-page" vocab="http://schema.org/" typeof="Library">
-    <h1 property="name">[% ctx.library.name | html %]</h1>
-
-    [%-
-        lib_url = ctx.get_org_setting(ctx.library.id, 'lib.info_url');
-        IF lib_url;
-            '<div id="library-url"><a href="'; lib_url | url; '" property="url">'; l('Library web site'); '</a></div>';
-        END;
-    -%]
-
-    [%- IF ctx.hours; %]
-        [%- INCLUDE "opac/parts/library/hours.tt2"; %]
-    [% END; -%]
-
-    [%- IF (ctx.library.email OR ctx.library.phone); %]
-    <h2 id="contact-info">[% l('Contact information') %]</h2>
-    [%- IF ctx.library.email; %]
-        <div>[% l('Email address: ') %]<a href="mailto:[% ctx.library.email | html %]" property="email">[% ctx.library.email | html %]</a></div>
-    [%- END; %]
-    [%- IF ctx.library.phone; %]
-        <div>[% l('Telephone: ') %]<a href="tel:[% ctx.library.phone | html %]" property="telephone">[% ctx.library.phone | html %]</a></div>
-    [% END; %]
-    [% END; %]
-
-    [%- IF ctx.library.mailing_address; %]
-    <div id="addresses">
-        <div id="mailing" property="location address" typeof="PostalAddress">
-            <h3 property="contactType">[% l('Mailing address') %]</h3>
-            <span property="streetAddress">[% ctx.mailing_address.street1 | html %]
-            [%- IF ctx.mailing_address.street2; "<br />"; ctx.mailing_address.street2 | html; END; %]
-            </span><br />
-            <span property="addressLocality">[% ctx.mailing_address.city | html %]</span><br />
-            <span property="addressRegion">[% ctx.mailing_address.state | html %]</span><br />
-            <span property="addressCountry">[% ctx.mailing_address.country | html %]</span><br />
-            <span property="postalCode">[% ctx.mailing_address.post_code | html %]</span><br />
-        </div>
-    </div>
-    [%- END; %]
-
-    [%- IF ctx.library.parent_ou; %]
-    <h2>Branch relationship</h2>
-    <div id="branch-info">[% l('Parent library: ') %]
-        <a property="branchOf" href="[% mkurl(ctx.opac_root _ '/library/' _ ctx.parent.shortname, {}, 1) %]">[% ctx.parent.name | html %]</a>
-    </div>
-    [%  END; -%]
-
-    <div class="common-full-pad"></div>
-    </div>
-[%- END %]
-</div>
+    [%- INCLUDE "opac/parts/library/core_info.tt2"; %]
+[%- END; %]
diff --git a/Open-ILS/src/templates/opac/library.tt2 b/Open-ILS/src/templates/opac/parts/library/core_info.tt2
similarity index 90%
copy from Open-ILS/src/templates/opac/library.tt2
copy to Open-ILS/src/templates/opac/parts/library/core_info.tt2
index 24a4f7a..b48c0d7 100644
--- a/Open-ILS/src/templates/opac/library.tt2
+++ b/Open-ILS/src/templates/opac/parts/library/core_info.tt2
@@ -1,9 +1,3 @@
-[%- PROCESS "opac/parts/header.tt2";
-    WRAPPER "opac/parts/base.tt2";
-    INCLUDE "opac/parts/topnav.tt2";
-    ctx.page_title = l("Library details: [_1]", ctx.library.name);
--%]
-    [%- INCLUDE "opac/parts/searchbar.tt2" %]
 <div id="content-wrapper">
     <div id="main-content" class="content-wrapper-library-page" vocab="http://schema.org/" typeof="Library">
     <h1 property="name">[% ctx.library.name | html %]</h1>
@@ -53,5 +47,4 @@
 
     <div class="common-full-pad"></div>
     </div>
-[%- END %]
 </div>

commit c747313ae6b181b1a1eff01ca59b65380145b6a9
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Jan 23 09:10:59 2014 -0500

    KPAC: Won't somebody think of the children's record details?
    
    Factor out the library name link logic into a separate template that can be
    included by TPAC search results, TPAC record details, and KPAC record details.
    
    Notice along the way that the KPAC is devoid of copy-level structured data,
    but save that for later.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/kpac/parts/copy_table.tt2 b/Open-ILS/src/templates/kpac/parts/copy_table.tt2
index 58fc329..7427220 100644
--- a/Open-ILS/src/templates/kpac/parts/copy_table.tt2
+++ b/Open-ILS/src/templates/kpac/parts/copy_table.tt2
@@ -37,13 +37,7 @@ END;
         -%]
         <tr>
             <td class="location">
-            [%-
-                org_name = ctx.get_aou(copy_info.circ_lib).name;
-                lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url');
-                IF lib_url; '<a href="'; lib_url | url; '">'; END;
-                org_name | html;
-                IF lib_url; '</a>'; END;
-            -%]
+            [%- INCLUDE "opac/parts/library_name_link.tt2"; -%]
             </td>
             [%- IF has_parts == 'true' %]
             <td class="callnumber">[% l('[_1] ([_2])', callnum, copy_info.part_label) | html %]</td>
diff --git a/Open-ILS/src/templates/opac/parts/library_name_link.tt2 b/Open-ILS/src/templates/opac/parts/library_name_link.tt2
new file mode 100644
index 0000000..c002ce2
--- /dev/null
+++ b/Open-ILS/src/templates/opac/parts/library_name_link.tt2
@@ -0,0 +1,13 @@
+[%-
+    org_name = ctx.get_aou(copy_info.circ_lib).name;
+    org_sname = ctx.get_aou(copy_info.circ_lib).shortname;
+    lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url');
+    prefer_external_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.prefer_external_url');
+    UNLESS lib_url && prefer_external_url;
+        lib_url = mkurl(ctx.opac_root _ '/library/' _ ctx.get_aou(copy_info.circ_lib).shortname, {}, 1);
+    END; 
+    IF lib_url; '<a property="seller" typeof="Library" href="'; lib_url | url; '">'; END;
+    '<span property="name">'; org_name | html; '</span>';
+    IF lib_url; '</a>'; END;
+-%]
+
diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
index be0d62c..b5fdd94 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
@@ -94,17 +94,8 @@ END; # FOREACH bib
                 [%- copy_info.holding_label | html; -%]
             </td>
             [%- ELSE %]<td headers='copy_header_library'>
-            [%-
-                org_name = ctx.get_aou(copy_info.circ_lib).name;
-                org_sname = ctx.get_aou(copy_info.circ_lib).shortname;
-                lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url');
-                prefer_external_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.prefer_external_url');
-                UNLESS lib_url && prefer_external_url;
-                    lib_url = mkurl(ctx.opac_root _ '/library/' _ ctx.get_aou(copy_info.circ_lib).shortname, {}, 1);
-                END; 
-                IF lib_url; '<a property="seller" typeof="Library" href="'; lib_url | url; '">'; END;
-                '<span property="name">'; org_name | html; '</span>';
-                IF lib_url; '</a>'; END;
+            [%- copy_info = copy;
+                INCLUDE "opac/parts/library_name_link.tt2";
             -%]
                 <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
                 <link property="itemOffered" href="#schemarecord">
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index ff2766b..0122152 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -247,18 +247,7 @@ END;
                                                                 [% FOR copy IN args.holdings %]
                                                                         <tr>
                                                                             <td>
-[%-
-    org_name = ctx.get_aou(copy.circ_lib).name;
-    org_sname = ctx.get_aou(copy.circ_lib).shortname;
-    lib_url = ctx.get_org_setting(copy.circ_lib, 'lib.info_url');
-    prefer_external_url = ctx.get_org_setting(copy.circ_lib, 'lib.prefer_external_url');
-    UNLESS lib_url && prefer_external_url;
-        lib_url = mkurl(ctx.opac_root _ '/library/' _ ctx.get_aou(copy.circ_lib).shortname, {}, 1);
-    END; 
-    IF lib_url; '<a property="seller" typeof="Library" href="'; lib_url | url; '">'; END;
-    '<span property="name">'; org_name | html; '</span>';
-    IF lib_url; '</a>'; END;
--%]
+[%- INCLUDE "opac/parts/library_name_link.tt2" %]
                                                                             </td>
                                                                             <td>[% copy.location | html %]</td>
                                                                             <td>[% copy.label | html %]</td>

commit df5cc7561eacee316fda5756756f1e50260c13af
Author: Dan Scott <dscott at laurentian.ca>
Date:   Wed Jan 22 10:12:37 2014 -0500

    TPAC: Link library in results page to library page
    
    Dan Wells noticed that the links on results pages went to a different location
    (potentially, depending on the "prefer external library uri" OUS) than the
    links on record pages. Make things consistent.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index b481b5f..ff2766b 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -248,9 +248,15 @@ END;
                                                                         <tr>
                                                                             <td>
 [%-
+    org_name = ctx.get_aou(copy.circ_lib).name;
+    org_sname = ctx.get_aou(copy.circ_lib).shortname;
     lib_url = ctx.get_org_setting(copy.circ_lib, 'lib.info_url');
-    IF lib_url; '<a href="'; lib_url | url; '">'; END;
-    copy.library | html;
+    prefer_external_url = ctx.get_org_setting(copy.circ_lib, 'lib.prefer_external_url');
+    UNLESS lib_url && prefer_external_url;
+        lib_url = mkurl(ctx.opac_root _ '/library/' _ ctx.get_aou(copy.circ_lib).shortname, {}, 1);
+    END; 
+    IF lib_url; '<a property="seller" typeof="Library" href="'; lib_url | url; '">'; END;
+    '<span property="name">'; org_name | html; '</span>';
     IF lib_url; '</a>'; END;
 -%]
                                                                             </td>

-----------------------------------------------------------------------

Summary of changes:
 .../src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm   |    1 +
 Open-ILS/src/templates/kpac/library.tt2            |    6 ++
 Open-ILS/src/templates/kpac/parts/breadcrumb.tt2   |    2 +-
 Open-ILS/src/templates/kpac/parts/copy_table.tt2   |    8 +---
 Open-ILS/src/templates/opac/library.tt2            |   53 +-------------------
 .../{library.tt2 => parts/library/core_info.tt2}   |   13 ++---
 .../src/templates/opac/parts/library_name_link.tt2 |   18 +++++++
 .../src/templates/opac/parts/record/copy_table.tt2 |   13 +----
 Open-ILS/src/templates/opac/parts/result/table.tt2 |    8 +--
 Open-ILS/web/css/skin/default/kpac/style.css       |   18 +++++++
 10 files changed, 57 insertions(+), 83 deletions(-)
 create mode 100644 Open-ILS/src/templates/kpac/library.tt2
 copy Open-ILS/src/templates/opac/{library.tt2 => parts/library/core_info.tt2} (84%)
 create mode 100644 Open-ILS/src/templates/opac/parts/library_name_link.tt2


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list