Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implemented #16873: specify the name of offset to use in google.tpl, …

…in order to have more than one navigator one a page
  • Loading branch information...
commit d1c48e4260552070cfe50808efe54e848128527a 1 parent c8320ff
@jdespatis authored
View
9 design/admin/templates/navigator/google.tpl
@@ -1,7 +1,8 @@
{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{default page_uri_suffix=false()
left_max=7
- right_max=6}
+ right_max=6
+ offset_name=offset}
{default name=ViewParameter
page_uri_suffix=false()
left_max=$left_max
@@ -9,7 +10,7 @@
{let page_count=int( ceil( div( $item_count,$item_limit ) ) )
current_page=min($:page_count,
- int( ceil( div( first_set( $view_parameters.offset, 0),
+ int( ceil( div( first_set( $view_parameters[$offset_name], 0 ),
$item_limit ) ) ) )
item_previous=sub( mul( $:current_page, $item_limit ),
$item_limit )
@@ -19,10 +20,10 @@
left_length=min($ViewParameter:current_page,$:left_max)
right_length=max(min(sub($ViewParameter:page_count,$ViewParameter:current_page,1),$:right_max),0)
view_parameter_text=""
- offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( '/offset/', '/(offset)/' )}
+ offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( concat('/', $offset_name, '/'), concat('/(', $offset_name, ')/') )}
{* Create view parameter text with the exception of offset *}
{section loop=$view_parameters}
- {section-exclude match=$:key|eq('offset')}
+ {section-exclude match=$:key|eq($offset_name)}
{section-exclude match=$:item|eq('')}
{set view_parameter_text=concat($:view_parameter_text,'/(',$:key,')/',$:item)}
{/section}
View
9 design/admin2/templates/navigator/google.tpl
@@ -1,7 +1,8 @@
{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{default page_uri_suffix=false()
left_max=7
- right_max=6}
+ right_max=6
+ offset_name=offset}
{default name=ViewParameter
page_uri_suffix=false()
left_max=$left_max
@@ -9,7 +10,7 @@
{let page_count=int( ceil( div( $item_count,$item_limit ) ) )
current_page=min($:page_count,
- int( ceil( div( first_set( $view_parameters.offset, 0),
+ int( ceil( div( first_set( $view_parameters[$offset_name], 0 ),
$item_limit ) ) ) )
item_previous=sub( mul( $:current_page, $item_limit ),
$item_limit )
@@ -19,10 +20,10 @@
left_length=min($ViewParameter:current_page,$:left_max)
right_length=max(min(sub($ViewParameter:page_count,$ViewParameter:current_page,1),$:right_max),0)
view_parameter_text=""
- offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( '/offset/', '/(offset)/' )}
+ offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( concat('/', $offset_name, '/'), concat('/(', $offset_name, ')/') )}
{* Create view parameter text with the exception of offset *}
{section loop=$view_parameters}
- {section-exclude match=$:key|eq('offset')}
+ {section-exclude match=$:key|eq($offset_name)}
{section-exclude match=$:item|eq('')}
{set view_parameter_text=concat($:view_parameter_text,'/(',$:key,')/',$:item)}
{/section}
View
9 design/standard/templates/navigator/google.tpl
@@ -1,7 +1,8 @@
{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{default page_uri_suffix=false()
left_max=7
- right_max=6}
+ right_max=6
+ offset_name=offset}
{default name=ViewParameter
page_uri_suffix=false()
left_max=$left_max
@@ -9,7 +10,7 @@
{let page_count=int( ceil( div( $item_count,$item_limit ) ) )
current_page=min($:page_count,
- int( ceil( div( first_set( $view_parameters.offset, 0 ),
+ int( ceil( div( first_set( $view_parameters[$offset_name], 0 ),
$item_limit ) ) ) )
item_previous=sub( mul( $:current_page, $item_limit ),
$item_limit )
@@ -19,10 +20,10 @@
left_length=min($ViewParameter:current_page,$:left_max)
right_length=max(min(sub($ViewParameter:page_count,$ViewParameter:current_page,1),$:right_max),0)
view_parameter_text=""
- offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( '/offset/', '/(offset)/' )}
+ offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( concat('/', $offset_name, '/'), concat('/(', $offset_name, ')/') )}
{* Create view parameter text with the exception of offset *}
{section loop=$view_parameters}
- {section-exclude match=$:key|eq('offset')}
+ {section-exclude match=$:key|eq($offset_name)}
{section-exclude match=$:item|eq('')}
{set view_parameter_text=concat($:view_parameter_text,'/(',$:key,')/',$:item)}
{/section}
Please sign in to comment.
Something went wrong with that request. Please try again.