~jfb-tempo-consulting/unifield-web/us-1673

« back to all changes in this revision

Viewing changes to addons/openerp/widgets/templates/pager.mako

  • Committer: jf
  • Date: 2016-05-26 12:01:41 UTC
  • mfrom: (4785.3.5 unifield-web)
  • Revision ID: jfb@tempo-consulting.fr-20160526120141-w1o885j1nqok4h74
US-1207 [IMP] Pager: try to approximate records count to reduce processing time on unifield-server

lp:~fabien-morin/unifield-server/fm-us-1207

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
        </a>
17
17
        % endif
18
18
        <span class="pager_info" onclick="jQuery('[id=_${name+str(pager_id)}_link_span]').hide(); jQuery('[id=_${name+str(pager_id)}_limit_span]').show();">
19
 
            ${page_info} ${_('of')} ${count}
 
19
            ${page_info} ${_('of')} ${approximation and '~' or ''}${count}
20
20
        </span>
21
21
        % if next:
22
22
        <a href="#next" action="next" relation="${name}" onclick="validate_action(this, pager_action); return false;">
24
24
        <span class="next nav${' ' if next else ' inactive'}">${_("Next >")}</span>
25
25
        % if next:
26
26
        </a>
 
27
        % endif
 
28
        % if not approximation:
27
29
        <a href="#last" action="last" relation="${name}" onclick="validate_action(this, pager_action); return false;">
28
 
        % endif
29
30
        <span class="last nav ${' ' if next else ' inactive'}">${_("Last >>")}</span>
30
 
        % if next:
31
31
        </a>
32
32
        % endif
33
33
    </p>
45
45
            % for k in pager_options:
46
46
                <option value="${k}" ${py.selector(limit=='${k]}')}>${k}</option>
47
47
            % endfor
48
 
            <option value="-1" ${py.selector(limit==-1)}>unlimited</option>
49
48
        </select>
50
49
    </div>
51
50
</div>