aboutsummaryrefslogtreecommitdiffstats
path: root/include/calendar_base.class.php
diff options
context:
space:
mode:
authorgrum <grum@piwigo.org>2008-08-09 21:27:58 +0000
committergrum <grum@piwigo.org>2008-08-09 21:27:58 +0000
commitd4a7be644b24729dd76067bef3f059d55fd5239a (patch)
tree8cd2c03cb047f8b27b787e49f54d5729de805684 /include/calendar_base.class.php
parent526d8006a16bd8b666d94aaf152346537045a0a5 (diff)
updating files for the Menu class (test_menu)
+ fixes "Links" translation bug updating files for the AMenuManager plugin + enhance links template updating common classes grum_plugins_classes-2 (needed for the AMenuManager plugin) + clearing the code updating the calendar_base.class.php the 'get_nav_bar_from_items' method was returning a hard coded html string now replaced by a template file (calendar_nav.tpl) git-svn-id: http://piwigo.org/svn/trunk@2469 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/calendar_base.class.php')
-rw-r--r--include/calendar_base.class.php40
1 files changed, 23 insertions, 17 deletions
diff --git a/include/calendar_base.class.php b/include/calendar_base.class.php
index bd3d2b180..96eeb19b1 100644
--- a/include/calendar_base.class.php
+++ b/include/calendar_base.class.php
@@ -137,9 +137,9 @@ class CalendarBase
$class_prefix, $show_any,
$show_empty=false, $labels=null)
{
- global $conf, $page;
+ global $conf, $page, $template;
- $nav_bar = '';
+ $nav_bar_datas=array();
if ($conf['calendar_show_empty'] and $show_empty and !empty($labels) )
{
@@ -162,42 +162,48 @@ class CalendarBase
}
if ($nb_images==-1)
{
- $nav_bar .= '<span class="'.$class_prefix.'Empty">';
- $nav_bar .= $label;
+ $tmp_datas=array(
+ 'classname' => $class_prefix."Empty",
+ 'label'=> $label
+ );
}
else
{
- $nav_bar .= '<span class="'.$class_prefix.'">';
$url = duplicate_index_url(
array('chronology_date'=>array_merge($date_components,array($item))),
array( 'start' )
);
- $nav_bar .= '<a href="'.$url.'">';
- $nav_bar .= $label;
- $nav_bar .= '</a>';
+ $tmp_datas=array(
+ 'classname' => $class_prefix,
+ 'label'=> $label,
+ 'url' => $url
+ );
}
if ($nb_images > 0)
{
- $nav_bar .= '('.$nb_images.')';
+ $tmp_datas['nb_images']=$nb_images;
}
- $nav_bar.= '</span>';
+ $nav_bar_datas[]=$tmp_datas;
+
}
if ($conf['calendar_show_any'] and $show_any and count($items)>1 and
count($date_components)<count($this->calendar_levels)-1 )
{
- $label = l10n('calendar_any');
- $nav_bar .= '<span class="'.$class_prefix.'">';
$url = duplicate_index_url(
array('chronology_date'=>array_merge($date_components,array('any'))),
array( 'start' )
);
- $nav_bar .= '<a href="'.$url.'">';
- $nav_bar .= $label;
- $nav_bar .= '</a>';
- $nav_bar.= '</span>';
+ $nav_bar_datas[]=array(
+ 'label' => l10n('calendar_any'),
+ 'classname' => $class_prefix,
+ 'url' => $url
+ );
}
- return $nav_bar;
+
+ $template->set_filenames( array( 'nav_bar' => 'calendar_navbar.tpl',));
+ $template->assign('datas', $nav_bar_datas);
+ return($template->parse('nav_bar', true));
}
/**