mirror of https://github.com/kiwix/libkiwix.git
Merge pull request #765 from kiwix/unittests_for_search_results_page
This commit is contained in:
commit
ff2c7b1fb2
|
@ -150,7 +150,7 @@ std::string SearchRenderer::getHtml()
|
||||||
allData.set("results", results);
|
allData.set("results", results);
|
||||||
allData.set("pages", pages);
|
allData.set("pages", pages);
|
||||||
allData.set("hasResults", estimatedResultCount != 0);
|
allData.set("hasResults", estimatedResultCount != 0);
|
||||||
allData.set("hasPages", pageStart != pageEnd);
|
allData.set("hasPages", pageStart + 1 < pageEnd);
|
||||||
allData.set("count", kiwix::beautifyInteger(estimatedResultCount));
|
allData.set("count", kiwix::beautifyInteger(estimatedResultCount));
|
||||||
allData.set("searchPattern", kiwix::encodeDiples(this->searchPattern));
|
allData.set("searchPattern", kiwix::encodeDiples(this->searchPattern));
|
||||||
allData.set("searchPatternEncoded", urlEncode(this->searchPattern));
|
allData.set("searchPatternEncoded", urlEncode(this->searchPattern));
|
||||||
|
|
|
@ -2,6 +2,12 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||||
|
|
||||||
|
{{!
|
||||||
|
The inline CSS below can be extracted into a standalone CSS resource
|
||||||
|
ONLY IF all clients of kiwix::SearchRenderer are required to provide
|
||||||
|
access to resources compiled into libkiwix.
|
||||||
|
}}
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{
|
body{
|
||||||
color: #000000;
|
color: #000000;
|
||||||
|
@ -141,7 +147,8 @@
|
||||||
<ul>
|
<ul>
|
||||||
{{#resultLastPageStart}}
|
{{#resultLastPageStart}}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{searchProtocolPrefix}}pattern={{searchPatternEncoded}}{{#contentId}}&content={{.}}{{/contentId}}&start=0&pageLength={{pageLength}}">
|
<a {{! let the format of this tag be identical to the case below }}
|
||||||
|
href="{{searchProtocolPrefix}}pattern={{searchPatternEncoded}}{{#contentId}}&content={{.}}{{/contentId}}&start=0&pageLength={{pageLength}}">
|
||||||
◀
|
◀
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -156,7 +163,8 @@
|
||||||
{{/pages}}
|
{{/pages}}
|
||||||
{{#resultLastPageStart}}
|
{{#resultLastPageStart}}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{searchProtocolPrefix}}pattern={{searchPatternEncoded}}{{#contentId}}&content={{.}}{{/contentId}}&start={{resultLastPageStart}}&pageLength={{pageLength}}">
|
<a {{! let the format of this tag be identical to the case above }}
|
||||||
|
href="{{searchProtocolPrefix}}pattern={{searchPatternEncoded}}{{#contentId}}&content={{.}}{{/contentId}}&start={{resultLastPageStart}}&pageLength={{pageLength}}">
|
||||||
▶
|
▶
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
1183
test/server.cpp
1183
test/server.cpp
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue