From: Salvador Zaragoza Rubio Date: Fri, 27 May 2011 09:12:52 +0000 (+0200) Subject: Bug 6483 - Paging in opac-detail when coming from a search X-Git-Tag: v3.06.00~10 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=4a2a95cc254f0ed1d5fcd6ea7084a5b08ef04952;hp=906ef4b28c376254743f948808e8ae47bb6f0a01;p=koha_fer Bug 6483 - Paging in opac-detail when coming from a search Add paging in opac-detail when coming from a search to be able to continue viewing the previous and next register from the detail without returning to the results. The partial list pagination can be showed to increase forwarding or rewinding in the pagination. It's implemented for Zebra search and not build_grouped_results. The param busc with all the information from the search is stored on the session when running opac-search and opac-detail, outside these pages the busc param is removed from the session. A list of the biblionumbers inside the OPACnumSearchResults range is passed to avoid repeating the searching everytime we see the previous or next biblio. The searching will be run again when we are going to exceed the list and a new one will be calculated from the new search. Signed-off-by: Magnus Enger Signed-off-by: Frédéric Demians Signed-off-by: Ian Walls Signed-off-by: Chris Cormack --- diff --git a/C4/Auth.pm b/C4/Auth.pm old mode 100644 new mode 100755 index 2aac67858c..e360e1085b --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -398,6 +398,11 @@ sub get_template_and_user { my $LibraryNameTitle = C4::Context->preference("LibraryName"); $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi; $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg; + # clean up the busc param in the session if the page is not opac-detail + if ($in->{'template_name'} =~ /opac-(.+)\.(?:tt|tmpl)$/ && $1 !~ /^(?:MARC|ISBD)?detail$/) { + my $sessionSearch = get_session($sessionID || $in->{'query'}->cookie("CGISESSID")); + $sessionSearch->clear(["busc"]) if ($sessionSearch->param("busc")); + } # variables passed from CGI: opac_css_override and opac_search_limits. my $opac_search_limit = $ENV{'OPAC_SEARCH_LIMIT'}; my $opac_limit_override = $ENV{'OPAC_LIMIT_OVERRIDE'}; diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css old mode 100644 new mode 100755 index 14236c82bb..11c434fc66 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -1902,7 +1902,7 @@ table#items th { padding : 2px; } #action { - margin-top: 0; + /*margin-top: 0;*/ } #similars h4 { text-align : left; @@ -2065,3 +2065,163 @@ a.koha_url { text-decoration:none; color: #666666; } +/* pagination */ +.pagination { + position: absolute; + top:32px; + left: -1px; + width: 100%; + height:auto; + border: 1px solid #D0D0D0; + display: none; + background-color:#F3F3F3; + padding-bottom:10px; +} + + +/* nav */ +.nav .close_pagination { + padding-right: 10px; + position: absolute; + right: 3px; + top: -25px; +} +.nav .close_pagination a { + text-decoration:none!important; +} + +.nav ul { + padding-top: 10px; +} + +.nav li { + list-style:none; + float:left; + padding:4px; + color:#999; +} + +.nav li a { + text-decoration:none!important; +} + +.nav li a:hover { + text-decoration:underline; +} + +.nav li ul { + float:left; +} + +.back { + float:right; +} + +.back input{ + background:none!important; + color:#999!important; +} + +.pagination_list { + float:bottom; +} +.pagination_list ul { + padding-top: 40px; + padding-left:0px; +} +.pagination_list li { + list-style:none; + float:bottom; + padding:4px; + color:#999; + /* border-bottom : 1px solid #DDDDDD;*/ +} +.pagination_list li.highlight { + background-color : #F3F3F3; + border-top : 1px solid #DDDDDD; + border-bottom : 1px solid #DDDDDD; +} +.pagination_list span.li_pag_index { + color: #999999; + float: left; + font-size: 15px; + font-weight: bold; + padding-right: 10px; + text-align: right; + width: 13px; + +} + +.pagination_list li a {padding-left:0px;} + + +.nav_results { + background-color: #F3F3F3; + border: 1px solid #D0D0D0; + margin-top: 0.5em; + position:relative; +} + +.nav_results .l_Results a { + background:#E1E1E1 url("../../images/ico_b_results.gif") 14px 13px no-repeat; + color:#006699; + display:block; + padding:8px 28px; + text-decoration:none; +} +.nav_results .l_Results a:hover { + background-color:#D9D9D9; +} +.nav_results ul.pg_menu { + height:25px; + border-top: 1px solid #D0D0D0; +} +.nav_results ul.pg_menu li { + color:#B2B2B2; + display:block; + float:left; + padding:5px 0; + list-style:none; + text-align:center; +} +.nav_results ul.pg_menu li.back_results { + padding:5px 0px; + width:45%; + border-left: 1px solid #D0D0D0; + border-right: 1px solid #D0D0D0; +} +.nav_results ul.pg_menu li a { + text-decoration:none; + font-weight:normal; + color:#4D4D4D; +} +.nav_results ul.pg_menu li a:hover { + color:#006699; +} +.nav_results ul.pg_menu li.left_results { + margin-right:10px; +} +.nav_results ul.pg_menu li.right_results { + margin-left:10px; +} + +.nav_results #listResults{ + line-height: 0.7em; +} + +.nav_results #listResults li { + background-color:#999999; + color:#C5C5C5; + font-weight:normal; + display:block; + margin-right:1px; + font-size:0.9em; + padding:5px 0px; + text-align:center; + min-width:20px; +} + +.nav_results #listResults li:hover {background-color:#006699;} + +.nav_results #listResults li a { color:#FFFFFF; font-weight:normal;} + diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc old mode 100644 new mode 100755 diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt old mode 100644 new mode 100755 index a42ceead1a..8cba98b2c8 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -3,6 +3,17 @@