[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 {* DO NOT EDIT THIS FILE! Use an override template instead. *} 2 {default page_uri_suffix=false() 3 left_max=7 4 right_max=6} 5 {default name=ViewParameter 6 page_uri_suffix=false() 7 left_max=$left_max 8 right_max=$right_max} 9 10 {let page_count=int( ceil( div( $item_count,$item_limit ) ) ) 11 current_page=min($:page_count, 12 int( ceil( div( first_set( $view_parameters.offset, 0 ), 13 $item_limit ) ) ) ) 14 item_previous=sub( mul( $:current_page, $item_limit ), 15 $item_limit ) 16 item_next=sum( mul( $:current_page, $item_limit ), 17 $item_limit ) 18 19 left_length=min($ViewParameter:current_page,$:left_max) 20 right_length=max(min(sub($ViewParameter:page_count,$ViewParameter:current_page,1),$:right_max),0) 21 view_parameter_text="" 22 offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( '/offset/', '/(offset)/' )} 23 {* Create view parameter text with the exception of offset *} 24 {section loop=$view_parameters} 25 {section-exclude match=eq($:key,offset)} 26 {section-exclude match=$:item|not} 27 {set view_parameter_text=concat($:view_parameter_text,'/(',$:key,')/',$:item)} 28 {/section} 29 30 31 {section show=$:page_count|gt(1)} 32 33 <div class="pagenavigator"> 34 <p> 35 36 {switch match=$:item_previous|lt(0) } 37 {case match=0} 38 <span class="previous"><a href={concat($page_uri,$:item_previous|gt(0)|choose('',concat($:offset_text,$:item_previous)),$:view_parameter_text,$page_uri_suffix)|ezurl}><span class="text">« {"Previous"|i18n("design/standard/navigator")}</span></a></span> 39 {/case} 40 {case match=1} 41 {/case} 42 {/switch} 43 44 {switch match=$:item_next|lt($item_count)} 45 {case match=1} 46 <span class="next"><a href={concat($page_uri,$:offset_text,$:item_next,$:view_parameter_text,$page_uri_suffix)|ezurl}><span class="text">{"Next"|i18n("design/standard/navigator")} »</span></a></span> 47 {/case} 48 {case} 49 {/case} 50 {/switch} 51 52 <span class="pages"> 53 {section show=$:current_page|gt($:left_max)} 54 <a href={concat($page_uri,$:view_parameter_text,$page_uri_suffix)|ezurl}>1</a> 55 {section show=sub($:current_page,$:left_length)|gt(1)} 56 ... 57 {/section} 58 {/section} 59 60 {section loop=$:left_length} 61 {let page_offset=sum(sub($ViewParameter:current_page,$ViewParameter:left_length),$:index)} 62 <span class="other"><a href={concat($page_uri,$:page_offset|gt(0)|choose('',concat($:offset_text,mul($:page_offset,$item_limit))),$ViewParameter:view_parameter_text,$page_uri_suffix)|ezurl}>{$:page_offset|inc}</a></span> 63 {/let} 64 {/section} 65 66 <span class="current">{$:current_page|inc}</span> 67 68 {section loop=$:right_length} 69 {let page_offset=sum($ViewParameter:current_page,1,$:index)} 70 <span class="other"><a href={concat($page_uri,$:page_offset|gt(0)|choose('',concat($:offset_text,mul($:page_offset,$item_limit))),$ViewParameter:view_parameter_text,$page_uri_suffix)|ezurl}>{$:page_offset|inc}</a></span> 71 {/let} 72 {/section} 73 74 {section show=$:page_count|gt(sum($:current_page,$:right_max,1))} 75 {section show=sum($:current_page,$:right_max,2)|lt($:page_count)} 76 <span class="other">...</span> 77 {/section} 78 <span class="other"><a href={concat($page_uri,$:page_count|dec|gt(0)|choose('',concat($:offset_text,mul($:page_count|dec,$item_limit))),$:view_parameter_text,$page_uri_suffix)|ezurl}>{$:page_count}</a></span> 79 {/section} 80 81 </span> 82 83 </p> 84 <div class="break"></div> 85 </div> 86 87 {/section} 88 89 {/let} 90 {/default} 91 {/default} 92
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |