Difference between revisions of "User:Sancho/DPL/continue"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (test changes)
m (test changes)
Line 1: Line 1:
<noinclude>Template to continue a query at a certain title; expects scroll direction and first / last page of previous query.<br>Note: MW 1.14+ uses <code><nowiki>{{urlencode:}}</nowiki></code> instead of <code><nowiki>{{#urlencode:}}</nowiki></code>.</noinclude><includeonly><!--
+
<noinclude>Template to scroll through DPL result pages</noinclude><includeonly><!--
 
--><table><tr><td style="background-color: #f9f9f9; padding: .1em .7em .2em .7em;"><!--
 
--><table><tr><td style="background-color: #f9f9f9; padding: .1em .7em .2em .7em;"><!--
  
-->{{#ifeq:dn{{{pages|0}}}|{{{dir|?}}}{{{total|0}}}||{{#if:{{{dir|}}}|
+
-->{{#ifexpr:{{{total|0}}} > {{{count|0}}}|{{#ifexpr:{{{offset|0}}} > 0|{{#vardefine:lwrbound|{{#ifexpr:{{#expr:{{{offset|0}}} - {{{count|100}}}}} < 0|0|{{#expr:{{{offset|0}}} - {{{count|100}}}}}}}}}<!--
<span class="plainlinks" style="padding-right: 24px;">[{{fullurl:{{{page}}}}} start]</span><span class="plainlinks" style="padding-right: 24px; font-weight: bold">[{{fullurl:{{{page}}}|DPL_scrollDir=dn&DPL_count={{{count|}}}&DPL_Offset={{#expr:{{{offset|0}}}-1}} пред]</span>|}}|<span style="padding-right: 24px;">начало</span><span style="padding-right: 24px;">пред</span>}}}}<!--
+
  
-->{{#ifeq:up{{{pages|0}}}|{{{dir|?}}}{{{total|0}}}|<span style="padding-right: 24px;">след</span>|
+
-->{{#ifexpr:{{{count|100}}} > {{{offset|0}}}|<span style="padding-right: 24px;">start</span>|<span class="plainlinks" style="padding-right: 24px;">[{{fullurl:{{{page}}}}} start]</span>}}<span class="plainlinks" style="padding-right: 24px; font-weight: bold">[{{fullurl:{{{page}}}|DPL_count={{{count|100}}}&DPL_offset={{#var:lwrbound}}}} {{#expr:{{#var:lwrbound}} + 1}}..{{{offset|0}}}]</span>}}<!--
<span class="plainlinks" style="padding-right: 24px; font-weight: bold">[{{fullurl:{{{page}}}|DPL_scrollDir=up&DPL_count={{{count|}}}&DPL_Offset={{#expr:{{{offset|0}}}+1}} след]</span>}}<!--
+
--><span style="padding-right: 24px; font-weight: bold">{{#expr:{{{offset|0}}} + 1}}..{{#expr:{{{offset|0}}} + {{{count|100}}}}}</span><!--
  
-->({{{pages|0}}} listed{{#ifexpr:{{{total|0}}} > {{{pages|0}}} |&nbsp;/ {{#expr:{{{total|0}}}-{{{pages|0}}}}} left}})
+
-->{{#ifexpr:{{{total|0}}} - {{{count|100}}} > {{{offset|0}}}|{{#ifexpr:{{{total|0}}} - 2 * {{{count|100}}} <= {{{offset|0}}}|
</td></tr></table></includeonly>
+
    <span class="plainlinks" style="padding-right: 24px; font-weight: bold">[{{fullurl:{{{page}}}|DPL_count={{{count|100}}}&DPL_offset={{#expr:{{{offset|0}}} + {{{count|100}}}}}}} {{#expr:{{{offset|0}}} + {{{count|100}}} + 1}}..{{{total|0}}}]</span>|
 +
    <span class="plainlinks" style="padding-right: 24px; font-weight: bold">[{{fullurl:{{{page}}}|DPL_count={{{count|100}}}&DPL_offset={{#expr:{{{offset|0}}} + {{{count|100}}}}}}} {{#expr:{{{offset|0}}} + {{{count|100}}} + 1}}..{{#expr:{{{offset|0}}} + 2 * {{{count|100}}}}}]</span>}}}}<!--
 +
 
 +
-->({{{total|0}}} total)}}<!--
 +
 
 +
--></td></tr></table></includeonly>

Revision as of 13:59, 15 November 2010

Template to scroll through DPL result pages

Personal tools