Changeset 2469 for trunk/include
- Timestamp:
- Aug 9, 2008, 11:27:58 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/calendar_base.class.php
r2299 r2469 138 138 $show_empty=false, $labels=null) 139 139 { 140 global $conf, $page ;141 142 $nav_bar = '';140 global $conf, $page, $template; 141 142 $nav_bar_datas=array(); 143 143 144 144 if ($conf['calendar_show_empty'] and $show_empty and !empty($labels) ) … … 163 163 if ($nb_images==-1) 164 164 { 165 $nav_bar .= '<span class="'.$class_prefix.'Empty">'; 166 $nav_bar .= $label; 165 $tmp_datas=array( 166 'classname' => $class_prefix."Empty", 167 'label'=> $label 168 ); 167 169 } 168 170 else 169 171 { 170 $nav_bar .= '<span class="'.$class_prefix.'">';171 172 $url = duplicate_index_url( 172 173 array('chronology_date'=>array_merge($date_components,array($item))), 173 174 array( 'start' ) 174 175 ); 175 $nav_bar .= '<a href="'.$url.'">'; 176 $nav_bar .= $label; 177 $nav_bar .= '</a>'; 176 $tmp_datas=array( 177 'classname' => $class_prefix, 178 'label'=> $label, 179 'url' => $url 180 ); 178 181 } 179 182 if ($nb_images > 0) 180 183 { 181 $nav_bar .= '('.$nb_images.')'; 182 } 183 $nav_bar.= '</span>'; 184 $tmp_datas['nb_images']=$nb_images; 185 } 186 $nav_bar_datas[]=$tmp_datas; 187 184 188 } 185 189 … … 187 191 count($date_components)<count($this->calendar_levels)-1 ) 188 192 { 189 $label = l10n('calendar_any');190 $nav_bar .= '<span class="'.$class_prefix.'">';191 193 $url = duplicate_index_url( 192 194 array('chronology_date'=>array_merge($date_components,array('any'))), 193 195 array( 'start' ) 194 196 ); 195 $nav_bar .= '<a href="'.$url.'">'; 196 $nav_bar .= $label; 197 $nav_bar .= '</a>'; 198 $nav_bar.= '</span>'; 199 } 200 return $nav_bar; 197 $nav_bar_datas[]=array( 198 'label' => l10n('calendar_any'), 199 'classname' => $class_prefix, 200 'url' => $url 201 ); 202 } 203 204 $template->set_filenames( array( 'nav_bar' => 'calendar_navbar.tpl',)); 205 $template->assign('datas', $nav_bar_datas); 206 return($template->parse('nav_bar', true)); 201 207 } 202 208
Note: See TracChangeset
for help on using the changeset viewer.