<div class="main_content">
<div class="innercontent_outerbox">
  <h1>Case Studies</h1>
  <table width="885" border="0" align="center" cellpadding="5" cellspacing="5">
    <tr>
      <td><h3>Search by Product Category</h3></td>
    </tr>
    <tr>
      <td><?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'paper-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array(
        'enctype' => 'multipart/form-data',
    ),
)); ?>
        <table width="885" border="0" cellspacing="5" cellpadding="5">
      <tr>
        <td width="292">
          <?php echo $form->dropDownList($model,'user_group_id',UserGroup::userGroupFrontEnd(),
											 array(
												'class'=>'selectyze2',
												'prompt'=>'Select product category',
												/*'ajax' => array(
												'type'=>'POST',
												'url'=>CController::createUrl('site/updateProductGroup'), 
												//'update'=>'#Product_product_group_id',
												'data'=>array('user_group_id'=>'js:this.value'), 
												'success'=>'js:function(data){
													$("#Paper_product_group_id").html(data)
													$("#Paper_product_category_id").html("<option value=\"\">Select category</option>")
													$("#Paper_product_id").html("<option value=\"\">Select product</option>")
													$("#Paper_product_group_id").next(".DivSelectyze").remove();
													$("#Paper_product_group_id").Selectyze({theme : "mac"});
													}'
            )*/)); ?></td>
            
        <td width="271"><?php  echo $form->dropDownList($model,'region_id',Country::getCountry(),array('class'=>'selectyze2','prompt'=>'Selecet country',
				  'style'=>'width:150px',
				  )); ?></td>
            
        <td width="272">&nbsp;</td>
      
      </tr>
      <tr>
        <td><?php for($i=date('Y');$i>=1990;$i--) $years[$i]=$i; ?>
        <?php echo $form->dropDownList($model,'year',$years,array(
		'class'=>'selectyze2',
		'prompt'=>'Select year',)); ?></td>
            
        <td><?php echo $form->dropDownList($model,'industry_id',Industry::getIndustry(),array('class'=>'selectyze2',
				  'prompt'=>'Select industry',)); ?></td>
            
        <td><input type="submit" value="Send" name="btValide" class="submit_button" /></td>
       
      </tr>
    </table>
        <?php $this->endWidget(); ?></td>
    </tr>
  </table>
  <br />
  <br />
  <ul class="menu">
  <?php echo ($caseStudies==null)?'No Results found':''; ?>
   <?php foreach($caseStudies as $eachModel): ?>
    <li class="item1"><a href="#">
      <table width="885" border="1" align="center" cellpadding="5" cellspacing="5" bordercolor="#999999">
        <tr>
          <td width="300" align="left" valign="middle"><?php echo $eachModel->title_of_the_paper; ?></td>
          <td width="200"  align="left" valign="middle"><?php echo $eachModel->year; ?></td>
          <td width="300" align="left" valign="middle"><a href="<?php echo Yii::app()->request->getBaseUrl(true).'/media/paper/'.$eachModel->filename; ?>"><img src="<?php echo Yii::app()->baseUrl;?>/images/download.png" width="25" height="25" alt="download" style="float:left; margin-right:5px" /></a> <?php echo round(@filesize(Yii::app()->basePath."/../media/paper/".$eachModel->filename)/1000,2);?> KB </td>
          <td width="200" align="left" valign="middle"><?php echo $eachModel->date_added; ?></td>
        </tr>
      </table>
      </a>
      <ul>
        <li class="subitem1 casesudy_content">
          <h3><?php echo $eachModel->title_of_the_paper; ?></h3>
         <?php echo $eachModel->content; ?>
          <a target="_blank" href="<?php echo Yii::app()->request->getBaseUrl(true).'/media/paper/'.$eachModel->filename; ?>"><img src="<?php echo Yii::app()->baseUrl;?>/images/download-now.png" width="150" height="39" alt="download" style="margin-left:30px;" /></a> </li>
      </ul>
    </li>
    <?php endforeach; ?> 
    
   
    
  </ul>
   <div class="pagination">
                         <?php
                        $this->widget('CLinkPager', array(
                            'pages' => $pages,
                            'header' =>"",
                        ))
                        ?>
                    </div>
  
  <!--initiate accordion--> 
  <script type="text/javascript">
	$(function() {
	
	    var menu_ul = $('.menu > li > ul'),
	           menu_a  = $('.menu > li > a');
	    
	    menu_ul.hide();
	
	    menu_a.click(function(e) {
	        e.preventDefault();
	        if(!$(this).hasClass('active')) {
	            menu_a.removeClass('active');
	            menu_ul.filter(':visible').slideUp('normal');
	            $(this).addClass('active').next().stop(true,true).slideDown('normal');
	        } else {
	            $(this).removeClass('active');
	            $(this).next().stop(true,true).slideUp('normal');
	        }
	    });
	
	});
</script> 
</div>
<?php echo $this->renderPartial('_bottom_common_user_product_group'); ?> 