TTPac: move some templates into the right place
authorBill Erickson <berick@esilibrary.com>
Tue, 16 Aug 2011 19:09:50 +0000 (15:09 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 16 Aug 2011 19:09:50 +0000 (15:09 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/default/opac/parts/record/series.tt2 [new file with mode: 0644]
Open-ILS/src/templates/default/opac/parts/result/paginate.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/opac/parts/record/series.tt2 [deleted file]
Open-ILS/web/templates/default/opac/parts/result/paginate.tt2 [deleted file]

diff --git a/Open-ILS/src/templates/default/opac/parts/record/series.tt2 b/Open-ILS/src/templates/default/opac/parts/record/series.tt2
new file mode 100644 (file)
index 0000000..cdfe588
--- /dev/null
@@ -0,0 +1,16 @@
+[% 
+    series_tags = ['440', '490', '800', '810', '811', '830', '694']; 
+    loc = CGI.param('loc');
+%]
+
+<div id='rdetail_series_div'>
+    <table cellpadding="0" cellspacing="0" border="0">
+    [%  FOR tag IN series_tags; %]
+        <tr><td style='padding-top:5px;'>
+        [%  FOR node IN ctx.marc_xml.findnodes('//*[@tag="' _ tag _ '"]/*') %]
+            [% IF !loop.first %]<span>&mdash;</span> [% END %]
+            <a href="[% ctx.opac_root %]/results?qtype=series&amp;query=[% node.textContent | uri %]&amp;loc=[% loc %]">[% node.textContent | html %]</a>
+        [% END %]
+    [% END; %]
+    </table>
+</div>
diff --git a/Open-ILS/src/templates/default/opac/parts/result/paginate.tt2 b/Open-ILS/src/templates/default/opac/parts/result/paginate.tt2
new file mode 100644 (file)
index 0000000..6582c01
--- /dev/null
@@ -0,0 +1,59 @@
+[% BLOCK results_count_header %]
+<div class="results_header_nav1">
+    <table cellpadding="0" cellspacing="0" border="0" width="100%">
+        <tr>
+            <td class="h1" width="116">[% l('Search Results') %]</td>
+            <td valign="bottom" nowrap="nowrap" class="result_number">
+                [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %]
+                Results <strong>[_1]</strong> - <strong>[_2]</strong> of <strong>[_3]</strong>
+                [% END %]
+                <span style='padding-left: 6px;'>
+                    [% |l(page + 1, page_count) %](page <strong>[_1]</strong> of <strong>[_2]</strong>)[% END %]
+                </span>
+            </td>
+            <td align="right" valign="bottom">
+                <span class='start_end_links_span'>
+
+                    [%  class = 'search_page_nav_link';
+                        href = '#';
+                        IF page > 0;
+                            href = mkurl('', {page => page - 1});
+                        ELSE; class = class _ ' invisible'; END;
+                    %]
+                    <a class='[% class %]' href='[% href %]' 
+                        title='[% l("Previous page") %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Previous') %] </a>
+
+                    <span style='padding-left: 11px; padding-right:11px;'>
+                        [%  # show links to 4 previous pages, the current page, and 3 more pages.
+                            added = 0;
+                            pageitr = page - 5; 
+                            IF page_count > 1; # no need to paginate 1 page
+                                WHILE (pageitr = pageitr + 1) < page_count;
+                                    IF pageitr < 0; NEXT; END;
+                                    IF pageitr == page; %]
+                                        <span class='results-paginator-selected'>[% pageitr + 1%]</span>
+                                    [% ELSE %]
+                                        <a href="[% mkurl('', {page => pageitr}) %]">[% pageitr + 1%]</a>
+                                [%  END;
+                                    added = added + 1;
+                                    IF added == 8; LAST; END;
+                                END;
+                            END;
+                        %]
+                    </span>
+
+                    [%  class = 'search_page_nav_link';
+                        href = '#';
+                        IF (page + 1) < page_count;
+                            href = mkurl('', {page => page + 1});
+                        ELSE; class = class _ ' invisible'; END;
+                    %]
+                    <a class='[% class %]' href='[% href %]' 
+                        title='[% l("Next page") %]'> [% l('Next') %] <span class="nav_arrow_fix">&#9658;</span></a>
+                </span>
+            </td>
+        </tr>
+    </table>
+</div>
+[% END %]
+
diff --git a/Open-ILS/web/templates/default/opac/parts/record/series.tt2 b/Open-ILS/web/templates/default/opac/parts/record/series.tt2
deleted file mode 100644 (file)
index cdfe588..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-[% 
-    series_tags = ['440', '490', '800', '810', '811', '830', '694']; 
-    loc = CGI.param('loc');
-%]
-
-<div id='rdetail_series_div'>
-    <table cellpadding="0" cellspacing="0" border="0">
-    [%  FOR tag IN series_tags; %]
-        <tr><td style='padding-top:5px;'>
-        [%  FOR node IN ctx.marc_xml.findnodes('//*[@tag="' _ tag _ '"]/*') %]
-            [% IF !loop.first %]<span>&mdash;</span> [% END %]
-            <a href="[% ctx.opac_root %]/results?qtype=series&amp;query=[% node.textContent | uri %]&amp;loc=[% loc %]">[% node.textContent | html %]</a>
-        [% END %]
-    [% END; %]
-    </table>
-</div>
diff --git a/Open-ILS/web/templates/default/opac/parts/result/paginate.tt2 b/Open-ILS/web/templates/default/opac/parts/result/paginate.tt2
deleted file mode 100644 (file)
index 6582c01..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-[% BLOCK results_count_header %]
-<div class="results_header_nav1">
-    <table cellpadding="0" cellspacing="0" border="0" width="100%">
-        <tr>
-            <td class="h1" width="116">[% l('Search Results') %]</td>
-            <td valign="bottom" nowrap="nowrap" class="result_number">
-                [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %]
-                Results <strong>[_1]</strong> - <strong>[_2]</strong> of <strong>[_3]</strong>
-                [% END %]
-                <span style='padding-left: 6px;'>
-                    [% |l(page + 1, page_count) %](page <strong>[_1]</strong> of <strong>[_2]</strong>)[% END %]
-                </span>
-            </td>
-            <td align="right" valign="bottom">
-                <span class='start_end_links_span'>
-
-                    [%  class = 'search_page_nav_link';
-                        href = '#';
-                        IF page > 0;
-                            href = mkurl('', {page => page - 1});
-                        ELSE; class = class _ ' invisible'; END;
-                    %]
-                    <a class='[% class %]' href='[% href %]' 
-                        title='[% l("Previous page") %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Previous') %] </a>
-
-                    <span style='padding-left: 11px; padding-right:11px;'>
-                        [%  # show links to 4 previous pages, the current page, and 3 more pages.
-                            added = 0;
-                            pageitr = page - 5; 
-                            IF page_count > 1; # no need to paginate 1 page
-                                WHILE (pageitr = pageitr + 1) < page_count;
-                                    IF pageitr < 0; NEXT; END;
-                                    IF pageitr == page; %]
-                                        <span class='results-paginator-selected'>[% pageitr + 1%]</span>
-                                    [% ELSE %]
-                                        <a href="[% mkurl('', {page => pageitr}) %]">[% pageitr + 1%]</a>
-                                [%  END;
-                                    added = added + 1;
-                                    IF added == 8; LAST; END;
-                                END;
-                            END;
-                        %]
-                    </span>
-
-                    [%  class = 'search_page_nav_link';
-                        href = '#';
-                        IF (page + 1) < page_count;
-                            href = mkurl('', {page => page + 1});
-                        ELSE; class = class _ ' invisible'; END;
-                    %]
-                    <a class='[% class %]' href='[% href %]' 
-                        title='[% l("Next page") %]'> [% l('Next') %] <span class="nav_arrow_fix">&#9658;</span></a>
-                </span>
-            </td>
-        </tr>
-    </table>
-</div>
-[% END %]
-