diff options
author | patdenice <patdenice@piwigo.org> | 2009-03-05 21:08:04 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2009-03-05 21:08:04 +0000 |
commit | 254aee26953b4e862b73467968f92138a6283da1 (patch) | |
tree | f2a78dbce4e54be16dd1698b67bb4a5df2d9c0d1 /template | |
parent | d3e6eabb053f311d5d8fd4ec80cfb0c1b32cf141 (diff) |
Create navigation_bar.tpl file.
Move create_navigation_bar function from functions_html.inc.php to functions.inc.php.
git-svn-id: http://piwigo.org/svn/trunk@3172 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | template/yoga/comments.tpl | 2 | ||||
-rw-r--r-- | template/yoga/index.tpl | 7 | ||||
-rw-r--r-- | template/yoga/navigation_bar.tpl | 39 | ||||
-rw-r--r-- | template/yoga/picture.tpl | 4 |
4 files changed, 42 insertions, 10 deletions
diff --git a/template/yoga/comments.tpl b/template/yoga/comments.tpl index da3c2a165..1475b1810 100644 --- a/template/yoga/comments.tpl +++ b/template/yoga/comments.tpl @@ -65,7 +65,7 @@ </form> -<div class="navigationBar">{$NAVBAR}</div> +{if !empty($navbar) }{include file='navigation_bar.tpl'}{/if} {if isset($comments)} <div id="comments"> diff --git a/template/yoga/index.tpl b/template/yoga/index.tpl index 4a87fc9c1..cc882d9d1 100644 --- a/template/yoga/index.tpl +++ b/template/yoga/index.tpl @@ -103,12 +103,7 @@ {if !empty($CATEGORIES) }{$CATEGORIES}{/if} {if !empty($THUMBNAILS) }{$THUMBNAILS}{/if} - -{if !empty($NAV_BAR) } -<div class="navigationBar"> - {$NAV_BAR} -</div> -{/if} +{if !empty($navbar) }{include file='navigation_bar.tpl'}{/if} {if !empty($CONTENT_DESCRIPTION) } <div class="additional_info"> diff --git a/template/yoga/navigation_bar.tpl b/template/yoga/navigation_bar.tpl new file mode 100644 index 000000000..94c8ad05f --- /dev/null +++ b/template/yoga/navigation_bar.tpl @@ -0,0 +1,39 @@ +{* $Id: navigation_bar.tpl 3145 2009-02-14 02:24:10Z patdenice $ *} +<div class="navigationBar"> + +{if isset($navbar.URL_FIRST)} +<a href="{$navbar.URL_FIRST}" rel="first">{'first_page'|@translate}</a> +{else} +{'first_page'|@translate} +{/if} +| +{if isset($navbar.URL_PREV)} +<a href="{$navbar.URL_PREV}" rel="prev">{'previous_page'|@translate}</a> +{else} +{'previous_page'|@translate} +{/if} +| +{assign var='prev_page' value=0} +{foreach from=$navbar.pages key=page item=url} + {if $page > $prev_page+1} ... {/if} + {if $page == $navbar.CURRENT_PAGE} + <span class="pageNumberSelected">{$page}</span> + {else} + <a href="{$url}">{$page}</a> + {/if} +{assign var='prev_page' value=$page} +{/foreach} +| +{if isset($navbar.URL_NEXT)} +<a href="{$navbar.URL_NEXT}" rel="next">{'next_page'|@translate}</a> +{else} +{'next_page'|@translate} +{/if} +| +{if isset($navbar.URL_LAST)} +<a href="{$navbar.URL_LAST}" rel="last">{'last_page'|@translate}</a> +{else} +{'last_page'|@translate} +{/if} + +</div>
\ No newline at end of file diff --git a/template/yoga/picture.tpl b/template/yoga/picture.tpl index 26450a21c..a6c9eda06 100644 --- a/template/yoga/picture.tpl +++ b/template/yoga/picture.tpl @@ -255,9 +255,7 @@ y.callService( {if $COMMENT_COUNT > 0} <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3> {/if} - {if !empty($COMMENT_NAV_BAR)} - <div class="navigationBar">{$COMMENT_NAV_BAR}</div> - {/if} + {if !empty($navbar) }{include file='navigation_bar.tpl'}{/if} {if isset($comments)} {include file='comment_list.tpl' comment_separator=true} |