[IMP]IMproved code for pager.

bzr revid: bth@tinyerp.com-20130826060057-0r61yfh36319y45a
This commit is contained in:
bth-openerp 2013-08-26 11:30:57 +05:30
parent 32b1bb5c1a
commit 5352e96a4d
1 changed files with 9 additions and 11 deletions

View File

@ -335,17 +335,15 @@
</template>
<template id="pager">
<div t-if="pager['page_count'] > 1" t-attf-class="#{ classname or '' } pagination">
<ul>
<li t-att-class=" 'disabled' if pager['page']['num'] == 1 else '' "> <a t-att-href=" pager['page_start']['url'] if pager['page']['num'] != 1 else '' ">Prev</a></li>
<t t-foreach="pager['pages']" t-as="page">
<li t-att-class=" 'active' if page['num'] == pager['page']['num'] else '' "> <a t-att-href="page['url']" t-raw="page['num']"></a></li>
</t>
<li t-att-class=" 'disabled' if pager['page']['num'] == pager['page_count'] else '' ">
<a t-att-href=" pager['page_end']['url'] if pager['page']['num'] != pager['page_count'] else '' ">Next</a>
</li>
</ul>
</div>
<ul t-if="pager['page_count'] > 1" t-attf-class="#{ classname or '' } pagination">
<li t-att-class=" 'disabled' if pager['page']['num'] == 1 else '' "> <a t-att-href=" pager['page_start']['url'] if pager['page']['num'] != 1 else '' ">Prev</a></li>
<t t-foreach="pager['pages']" t-as="page">
<li t-att-class=" 'active' if page['num'] == pager['page']['num'] else '' "> <a t-att-href="page['url']" t-raw="page['num']"></a></li>
</t>
<li t-att-class=" 'disabled' if pager['page']['num'] == pager['page_count'] else '' ">
<a t-att-href=" pager['page_end']['url'] if pager['page']['num'] != pager['page_count'] else '' ">Next</a>
</li>
</ul>
</template>
<template id="publish">