Subversion Repositories SmartDukaan

Rev

Rev 16583 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!-- template for deals tab -->
<?php //echo $this->element('unlikemodal');?>
<?php if(!empty($appOffers) && !empty($appOffers[0])):?>
  <?php foreach ($appOffers as $key => $offer) :?>
  <?php if(empty($offer))continue;?>
  <?php $deal = $offer['AppOffer'];?>
  <div class="row card">           
    <?php //debug($deal);?>
      <div class="col-xs-4 productthumb" data-id="<?php echo $deal['id'];?>" data-url="<?php echo $deal['link'];?>" data-source="<?php echo $deal['affiliate_id'];?>" data-price="<?php echo intval($deal['offer_price']);?>">
        <img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo $deal['promoImage'];?>&h=100" />
        <div class="offerprice ">
          <span class="rupee"></span> <?php echo intval($deal['user_payout']);?>
        </div>
      </div>
      <div class="col-xs-8 productdetails " data-id="<?php echo $deal['id'];?>">
        <h5 class="producttitle" data-id="<?php echo $deal['id'];?>" data-url="<?php echo $deal['link'];?>" data-source="<?php echo $deal['affiliate_id'];?>" data-price="<?php echo intval($deal['offer_price']);?>">
          <?php echo $deal['app_name'];?> (app name)
        </h5>
        <div class="text-small">(21k <i class="glyphicon glyphicon-user"></i>, 4.5 <i class="glyphicon glyphicon-star"></i>) (play store analytics)</div>
        <div class="<?php if(!isset($deal['shortDescription'])):?>hidden<?php endif;?>" data-id="<?php echo $deal['id'];?>" data-source="<?php echo $deal['affiliate_id'];?>"  data-url="<?php echo $deal['link'];?>" data-price="<?php echo intval($deal['offer_price']);?>">
          <?php echo $deal['shortDescription'];?> (message for customer)
        </div>
              
        <div class="dealoffer <?php if(!isset($deal['longDescription']) || empty($deal['longDescription'])):?>hidden<?php endif;?> row">
            <div class="<?php if(strlen(strip_tags($deal['longDescription'],'<p>')) == strlen($deal['longDescription'])):?>offerhasnohtml<?php endif;?> col-xs-12 offertext" data-fulltext="<?php echo strip_tags($deal['longDescription']);?>">              
              <?php echo strip_tags($deal['longDescription'],'<br>');?> (message for retailer)
            </div>
        </div>  
        <div class="offercondition text-small">
          On App Download (Offer condition)
        </div>
      </div>                      
  </div>  
  <?php endforeach;?>
  <?php //if($this->Paginator->hasNext()):?>
  <p class="text-center"><a class="btn btn-primary infitescroller" href="/categories/getapps/<?php echo $id;?>/?page=<?php echo ($page+1);?>">Load More</a></p>
  <?php //endif;?>
  <?php else:?>
    <?php if($page==1):?>
      <h4>No more offers found. Please try again later.</h4>
      <div class="text-center">
        <button type="button" class="btn btn-xs btn-primary refresh">Retry</button>
      </div>
    <?php endif;?>
  <?php endif;?>