View | Details | Raw Unified | Return to bug 3355
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/result.tmpl (-9 / +9 lines)
Lines 21-27 function GetIt(bibno,title) Link Here
21
   <div id="bd">
21
   <div id="bd">
22
	
22
	
23
23
24
<h1>Search results</h1>
24
<h1>Search results from <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --></h1>
25
<!-- TMPL_IF NAME="total"-->
25
<!-- TMPL_IF NAME="total"-->
26
<table>
26
<table>
27
    <tr>
27
    <tr>
Lines 54-68 function GetIt(bibno,title) Link Here
54
<!-- TMPL_ELSE -->
54
<!-- TMPL_ELSE -->
55
<h2>No results found for <b><!-- TMPL_VAR NAME="query" --></b></h2>
55
<h2>No results found for <b><!-- TMPL_VAR NAME="query" --></b></h2>
56
<!-- /TMPL_IF-->
56
<!-- /TMPL_IF-->
57
<a onclick="Plugin(f)" href="">Search for another Biblio</a>
57
<!-- TMPL_IF NAME="displayprev" -->
58
<a href="/cgi-bin/koha/serials/subscription-bib-search.pl?op=do_search&type=intranet&startfrom=<!-- TMPL_VAR ESCAPE="URL" NAME="startfromprev" -->&q=<!-- TMPL_VAR ESCAPE="URL" NAME="query" -->">&lt;&lt;</a>
59
<!-- /TMPL_IF -->
60
<!-- TMPL_IF NAME="displaynext" -->
61
<a href="/cgi-bin/koha/serials/subscription-bib-search.pl?op=do_search&type=intranet&startfrom=<!-- TMPL_VAR ESCAPE="URL" NAME="startfromnext" -->&q=<!-- TMPL_VAR ESCAPE="URL" NAME="query" -->">&gt;&gt;</a>
62
<!-- /TMPL_IF -->
63
<br/>
64
<a href="subscription-bib-search.pl">Search for another Biblio</a>
58
<a class="button" href="#" onclick="window.close()">  Close</a></p>
65
<a class="button" href="#" onclick="window.close()">  Close</a></p>
59
</div>
66
</div>
60
67
61
<script type="text/javascript">
62
function Plugin(f)
63
{
64
    window.open('subscription-bib-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
65
}
66
</script>
67
68
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
68
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-bib-search.tmpl (-1 / +1 lines)
Lines 12-18 Link Here
12
<!-- TMPL_IF name="no_query" -->
12
<!-- TMPL_IF name="no_query" -->
13
    <div class="warning">You must enter a term to search on </div>
13
    <div class="warning">You must enter a term to search on </div>
14
<!-- /TMPL_IF -->
14
<!-- /TMPL_IF -->
15
<form name="f" action="/cgi-bin/koha/serials/subscription-bib-search.pl" method="post">
15
<form name="f" action="/cgi-bin/koha/serials/subscription-bib-search.pl" method="get">
16
    <input type="hidden" name="op" value="do_search" />
16
    <input type="hidden" name="op" value="do_search" />
17
    <input type="hidden" name="type" value="intranet" />
17
    <input type="hidden" name="type" value="intranet" />
18
    <label for="q">Keyword</label>
18
    <label for="q">Keyword</label>
(-)a/serials/subscription-bib-search.pl (-9 / +9 lines)
Lines 76-84 if ($op eq "do_search" && $query) { Link Here
76
    $query .= " AND itype=$itemtypelimit" if $itemtypelimit;
76
    $query .= " AND itype=$itemtypelimit" if $itemtypelimit;
77
    
77
    
78
    $resultsperpage= $input->param('resultsperpage');
78
    $resultsperpage= $input->param('resultsperpage');
79
    $resultsperpage = 19 if(!defined $resultsperpage);
79
    $resultsperpage = 20 if(!defined $resultsperpage);
80
80
81
    my ($error, $marcrecords, $total_hits) = SimpleSearch($query, $startfrom, $resultsperpage);
81
    my ($error, $marcrecords, $total_hits) = SimpleSearch($query, $startfrom*$resultsperpage, $resultsperpage);
82
    my $total = scalar @$marcrecords;
82
    my $total = scalar @$marcrecords;
83
83
84
    if (defined $error) {
84
    if (defined $error) {
Lines 119-132 if ($op eq "do_search" && $query) { Link Here
119
    # multi page display gestion
119
    # multi page display gestion
120
    my $displaynext=0;
120
    my $displaynext=0;
121
    my $displayprev=$startfrom;
121
    my $displayprev=$startfrom;
122
    if(($total - (($startfrom+1)*($resultsperpage))) > 0 ){
122
    if(($total_hits - (($startfrom+1)*($resultsperpage))) > 0 ){
123
        $displaynext = 1;
123
        $displaynext = 1;
124
    }
124
    }
125
125
126
126
127
    my @numbers = ();
127
    my @numbers = ();
128
128
129
    if ($total>$resultsperpage)
129
    if ($total_hits>$resultsperpage)
130
    {
130
    {
131
        for (my $i=1; $i<$total/$resultsperpage+1; $i++)
131
        for (my $i=1; $i<$total/$resultsperpage+1; $i++)
132
        {
132
        {
Lines 141-151 if ($op eq "do_search" && $query) { Link Here
141
            }
141
            }
142
        }
142
        }
143
    }
143
    }
144
144
    
145
    my $from = $startfrom*$resultsperpage+1;
145
    my $from = 0;
146
    $from = $startfrom*$resultsperpage+1 if($total_hits > 0);
146
    my $to;
147
    my $to;
147
148
148
    if($total < (($startfrom+1)*$resultsperpage))
149
    if($total_hits < (($startfrom+1)*$resultsperpage))
149
    {
150
    {
150
        $to = $total;
151
        $to = $total;
151
    } else {
152
    } else {
Lines 160-166 if ($op eq "do_search" && $query) { Link Here
160
                            resultsperpage => $resultsperpage,
161
                            resultsperpage => $resultsperpage,
161
                            startfromnext => $startfrom+1,
162
                            startfromnext => $startfrom+1,
162
                            startfromprev => $startfrom-1,
163
                            startfromprev => $startfrom-1,
163
                            total=>$total,
164
                            total=>$total_hits,
164
                            from=>$from,
165
                            from=>$from,
165
                            to=>$to,
166
                            to=>$to,
166
                            numbers=>\@numbers,
167
                            numbers=>\@numbers,
167
- 

Return to bug 3355