<?php
				
	$theme_sliders = cloudfw_sliders();
				
	echo '
	<div id="slider_items">';	
	
	if ($data):
				
	ksort($data);

	echo '
	<ul class="slider_items slider_ajax">';
				
				foreach($data as $slider_id => $slider_item):
				
				$type = $slider_item["type"];
				
				$type_ = __('Type','cloudfw').': '.$theme_sliders[$type]['name'];
				
				$slider_source = cloudfw_get_slider($slider_id);
				$count = is_array($slider_source) ? count($slider_source ): 0;
				
				if (strlen($slider_item["title"])>50) mb_substr($slider_item["title"],0,50).'..';
				
				${'echo_'.$type} .= '
				<li class="sortable_item">
					
					<input type="hidden" name="d_'.$slider_id.'" id="d_'.$slider_id.'" class="delete_input" value="" autocomplete="off" />
					
					<a href="'.$this_page.'&amp;id='.$slider_id.'" class="cont">
					
						<div class="title">'.$slider_item["title"].'</div>
						<div class="text">'.$type_.', <em>'.$slider_id.'</em></div>
						<div class="text"><strong>Edit Slider Items | '.sprintf(__('%s Item(s)','cloudfw'),$count).'</strong></div>
						
					</a>
					
				   <div class="layout"></div>
					
					<div class="edit-remove">
					<a href="#" class="edit" rel="'.$slider_id.'"></a>
					<a href="#" class="remove" rel="'.$slider_id.'"></a>
					</div>
						
					<div class="handler">
						<span></span>
					</div>
					
					<div class="clear"></div>
				
				</li>
				
				';
				
				endforeach;
				
					
				$theme_sliders = cloudfw_sliders();
				
				foreach ($theme_sliders as $slider_id => $slider_item) {
						
					if (${'echo_'.$slider_id})
					echo '
					<div class="slider_group_title"><div class="section-title">'.__('Type','cloudfw').': '.$slider_item["name"].'</div></div>
						'.${'echo_'.$slider_id}.'
					';
									
				}
				
						
	echo '</ul><div class="clear"></div>';
			else:
			
			
			echo '
				<div class="module">
					<div style="padding:0" class="thereisno">'.__('There is no any slider','cloudfw').' <a class="small-button small-grey help" rel="mb_create_slider" width="m" title="'.__('Create New Slider','cloudfw').'" href="#" style="margin-left:20px !important;"><span>'.__('Create New One','cloudfw').'</span></a></div>			
				</div>

			';
			
			
	endif;
	echo '</div>';	

?>