<?php 
/**
 * Netgo_News extension
 * 
 * NOTICE OF LICENSE
 * 
 * This source file is subject to the MIT License
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/mit-license.php
 * 
 * @category       Netgo
 * @package        Netgo_News
 * @copyright      Copyright (c) 2015
 * @license        http://opensource.org/licenses/mit-license.php MIT License
 */
/**
 * News list template
 *
 * @category    Netgo
 * @package     Netgo_News
 * @author      Ultimate Module Creator
 */
?>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" id="mybuysstyles"/>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<?php $_newss = $this->getNewss(); ?>
<!--<div class="page-title news-title">
    <h1><?php echo Mage::helper('netgo_news')->__('News') ?></h1>
</div>-->
<?php //echo $this->getLayout()->createBlock('cms/block')->setBlockId('news-banner')->toHtml(); ?>

<?php if ($_newss->getSize() > 0) :?>
    <?php //echo $this->getPagerHtml(); ?>
	
	<?php
 
         $model = Mage::getModel("netgo_news/news")->getCollection();	
    	$customtoolbar=new Netgo_News_Block_News_List();

           $models = Mage::getModel("netgo_news/news")->getCollection();	

          $newss=$customtoolbar->getCollectionc($model );
		  
		  
		  ?>
   
    <?php foreach ($newss as $_news) : ?>
	
	
	<div class="dj-news-b">

      <div class="row">
	  
      <div class="col-xs-12 col-sm-3 col-md-3">
        <div class="img-thumbnailholder"> 
		
		<?php if ($_news->getImage()) :?>
						<img class="img-responsive img-thumbnail" title="image" alt="image" src="<?php echo Mage::helper('netgo_news/news_image')->init($_news, 'image');?>" alt="<?php echo $this->htmlEscape($_news->getTitle());?>" />
					<?php endif;?>
		
		 </div>
      </div>
			 <div class="col-xs-12 col-sm-9 col-md-9">
				<section class="text-block">
				   <ul>
				    <li> <img class="img-responsive" title="image" alt="image" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);?>wysiwyg/calendar.jpg" /> </li>
				   <li class="date">
						<?php
						echo date('d/m/Y',strtotime($_news->getUpdatedAt()));
						
						?> 
	
	                </li>
				    <li class="datetitle"> -  <?php echo $_news->getTitle();?>
					</li>
					<div class="clearfix"> </div>
			  
				   </ul>
					<p>
					<?php echo Mage::helper('netgo_news')->__('Description');?>:<?php echo $_news->getDescription();?>
					</p>
				</section>
			 </div>
	    </div>

     </div>
    <?php endforeach;?>
	<div class="dj-news-pagination">

    <div class="row">

      <div class="col-xs-12 col-sm-12 col-md-12">

       
         <?php echo $this->getPagerHtml(); ?>
		 <?php //echo $customtoolbar->getPagersHtml($models ); ?>
	
	  </div>

    </div>  

</div>
<?php else : ?>
    <?php echo Mage::helper('netgo_news')->__('There are no news at this moment');?>
<?php endif;?>
