+ selected only the current page in the page list at the bottom of each result page

This commit is contained in:
kelson42 2011-04-03 11:08:35 +00:00
parent a52d290739
commit 91dfb75b47
2 changed files with 5 additions and 1 deletions

View File

@ -185,6 +185,10 @@ namespace kiwix {
CDT page;
page["start"] = i * this->resultCountPerPage;
page["end"] = (i+1) * this->resultCountPerPage;
if (i * this->resultCountPerPage == this->resultStart)
page["selected"] = true;
pagesCDT.PushBack(page);
}
oData["pages"] = pagesCDT;

View File

@ -114,7 +114,7 @@
<div class="footer">
<ul>
<TMPL_loop pages>
<li><a class="selected" href="search://?pattern=<TMPL_var searchPattern>&start=<TMPL_var start>&end=<TMPL_var end>"><TMPL_var __COUNTER__></a></li>
<li><a <TMPL_if selected>class="selected"</TMPL_if> href="search://?pattern=<TMPL_var searchPattern>&start=<TMPL_var start>&end=<TMPL_var end>"><TMPL_var __COUNTER__></a></li>
</TMPL_LOOP>
</ul>
</div>