Changeset 3173 for trunk/template/yoga


Ignore:
Timestamp:
Mar 6, 2009, 2:06:18 AM (16 years ago)
Author:
patdenice
Message:

Code simplification of commit 3172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/template/yoga/navigation_bar.tpl

    r3172 r3173  
    11{* $Id: navigation_bar.tpl 3145 2009-02-14 02:24:10Z patdenice $ *}
    22<div class="navigationBar">
     3  {if isset($navbar.URL_FIRST)}
     4  <a href="{$navbar.URL_FIRST}" rel="first">{'first_page'|@translate}</a> |
     5  <a href="{$navbar.URL_PREV}" rel="prev">{'previous_page'|@translate}</a> |
     6  {else}
     7  {'first_page'|@translate} |
     8  {'previous_page'|@translate} |
     9  {/if}
    310
    4 {if isset($navbar.URL_FIRST)}
    5 <a href="{$navbar.URL_FIRST}" rel="first">{'first_page'|@translate}</a>
    6 {else}
    7 {'first_page'|@translate}
    8 {/if}
    9 |
    10 {if isset($navbar.URL_PREV)}
    11 <a href="{$navbar.URL_PREV}" rel="prev">{'previous_page'|@translate}</a>
    12 {else}
    13 {'previous_page'|@translate}
    14 {/if}
    15 |
    16 {assign var='prev_page' value=0}
    17 {foreach from=$navbar.pages key=page item=url}
    18   {if $page > $prev_page+1} ... {/if}
    19   {if $page == $navbar.CURRENT_PAGE}
     11  {assign var='prev_page' value=0}
     12  {foreach from=$navbar.pages key=page item=url}
     13    {if $page > $prev_page+1}...{/if}
     14    {if $page == $navbar.CURRENT_PAGE}
    2015    <span class="pageNumberSelected">{$page}</span>
     16    {else}
     17    <a href="{$url}">{$page}</a>
     18    {/if}
     19    {assign var='prev_page' value=$page}
     20  {/foreach}
     21
     22  {if isset($navbar.URL_NEXT)}
     23  | <a href="{$navbar.URL_NEXT}" rel="next">{'next_page'|@translate}</a>
     24  | <a href="{$navbar.URL_LAST}" rel="last">{'last_page'|@translate}</a>
    2125  {else}
    22     <a href="{$url}">{$page}</a>
     26  | {'next_page'|@translate}
     27  | {'last_page'|@translate}
    2328  {/if}
    24 {assign var='prev_page' value=$page}
    25 {/foreach}
    26 |
    27 {if isset($navbar.URL_NEXT)}
    28 <a href="{$navbar.URL_NEXT}" rel="next">{'next_page'|@translate}</a>
    29 {else}
    30 {'next_page'|@translate}
    31 {/if}
    32 |
    33 {if isset($navbar.URL_LAST)}
    34 <a href="{$navbar.URL_LAST}" rel="last">{'last_page'|@translate}</a>
    35 {else}
    36 {'last_page'|@translate}
    37 {/if}
    38 
    3929</div>
Note: See TracChangeset for help on using the changeset viewer.