+ * Add "First" and "Last" arrows in the search result page (ID: 3442313)

This commit is contained in:
kelson42 committed 2011-12-04 13:40:22 +00:00
1 parent d851d065e8
commit aa9ebdb87e
3 files changed
+10

No files matched your search

+3
View File
@@ -43,6 +43,7 @@ namespace kiwix {
estimatedResultCount(0),
resultStart(0),
resultEnd(0),
resultRange(20),
protocolPrefix("zim://"),
searchProtocolPrefix("search://?") {
}
@@ -213,6 +214,8 @@ namespace kiwix {
oData["searchPattern"] = this->searchPattern;
oData["resultStart"] = this->resultStart + 1;
oData["resultEnd"] = (this->resultEnd > this->estimatedResultCount ? this->estimatedResultCount : this->resultEnd);
oData["resultRange"] = this->resultRange;
oData["resultLastPageStart"] = this->estimatedResultCount - this->resultRange;
oData["protocolPrefix"] = this->protocolPrefix;
oData["searchProtocolPrefix"] = this->searchProtocolPrefix;
+1
View File
@@ -91,6 +91,7 @@ namespace kiwix {
unsigned int resultEnd;
std::string protocolPrefix;
std::string searchProtocolPrefix;
unsigned int resultRange;
};
}
+6
View File
@@ -114,9 +114,15 @@
<div class="footer">
<ul>
<TMPL_if (count>resultRange)>
<li><a href="<TMPL_var searchProtocolPrefix>pattern=<TMPL_var searchPattern>&start=0&end=<TMPL_var resultRange>">◀</a></li>
</TMPL_if>
<TMPL_loop pages>
<li><a <TMPL_if selected>class="selected"</TMPL_if> href="<TMPL_var searchProtocolPrefix>pattern=<TMPL_var searchPattern>&start=<TMPL_var start>&end=<TMPL_var end>"><TMPL_var label></a></li>
</TMPL_LOOP>
<TMPL_if (count>resultRange)>
<li><a href="<TMPL_var searchProtocolPrefix>pattern=<TMPL_var searchPattern>&start=<TMPL_var resultLastPageStart>&end=<TMPL_var (resultLastPageStart+resultRange)>">▶</a></li>
</TMPL_if>
</ul>
</div>
</body>