From: Bill Erickson Date: Tue, 16 Aug 2011 19:09:50 +0000 (-0400) Subject: TTPac: move some templates into the right place X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=110a7fb2222833875b50da601539bce210439191;p=contrib%2FConifer.git TTPac: move some templates into the right place Signed-off-by: Bill Erickson --- 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 index 0000000000..cdfe588f08 --- /dev/null +++ b/Open-ILS/src/templates/default/opac/parts/record/series.tt2 @@ -0,0 +1,16 @@ +[% + series_tags = ['440', '490', '800', '810', '811', '830', '694']; + loc = CGI.param('loc'); +%] + +
+ + [% FOR tag IN series_tags; %] +
+ [% FOR node IN ctx.marc_xml.findnodes('//*[@tag="' _ tag _ '"]/*') %] + [% IF !loop.first %] [% END %] + [% node.textContent | html %] + [% END %] + [% END; %] +
+
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 index 0000000000..6582c01bb8 --- /dev/null +++ b/Open-ILS/src/templates/default/opac/parts/result/paginate.tt2 @@ -0,0 +1,59 @@ +[% BLOCK results_count_header %] +
+ + + + + + +
[% l('Search Results') %] + [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %] + Results [_1] - [_2] of [_3] + [% END %] + + [% |l(page + 1, page_count) %](page [_1] of [_2])[% END %] + + + + + [% class = 'search_page_nav_link'; + href = '#'; + IF page > 0; + href = mkurl('', {page => page - 1}); + ELSE; class = class _ ' invisible'; END; + %] + [% l('Previous') %] + + + [% # 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; %] + [% pageitr + 1%] + [% ELSE %] + [% pageitr + 1%] + [% END; + added = added + 1; + IF added == 8; LAST; END; + END; + END; + %] + + + [% class = 'search_page_nav_link'; + href = '#'; + IF (page + 1) < page_count; + href = mkurl('', {page => page + 1}); + ELSE; class = class _ ' invisible'; END; + %] + [% l('Next') %] + +
+
+[% 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 index cdfe588f08..0000000000 --- a/Open-ILS/web/templates/default/opac/parts/record/series.tt2 +++ /dev/null @@ -1,16 +0,0 @@ -[% - series_tags = ['440', '490', '800', '810', '811', '830', '694']; - loc = CGI.param('loc'); -%] - -
- - [% FOR tag IN series_tags; %] -
- [% FOR node IN ctx.marc_xml.findnodes('//*[@tag="' _ tag _ '"]/*') %] - [% IF !loop.first %] [% END %] - [% node.textContent | html %] - [% END %] - [% END; %] -
-
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 index 6582c01bb8..0000000000 --- a/Open-ILS/web/templates/default/opac/parts/result/paginate.tt2 +++ /dev/null @@ -1,59 +0,0 @@ -[% BLOCK results_count_header %] -
- - - - - - -
[% l('Search Results') %] - [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %] - Results [_1] - [_2] of [_3] - [% END %] - - [% |l(page + 1, page_count) %](page [_1] of [_2])[% END %] - - - - - [% class = 'search_page_nav_link'; - href = '#'; - IF page > 0; - href = mkurl('', {page => page - 1}); - ELSE; class = class _ ' invisible'; END; - %] - [% l('Previous') %] - - - [% # 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; %] - [% pageitr + 1%] - [% ELSE %] - [% pageitr + 1%] - [% END; - added = added + 1; - IF added == 8; LAST; END; - END; - END; - %] - - - [% class = 'search_page_nav_link'; - href = '#'; - IF (page + 1) < page_count; - href = mkurl('', {page => page + 1}); - ELSE; class = class _ ' invisible'; END; - %] - [% l('Next') %] - -
-
-[% END %] -