Skip to content

Commit

Permalink
fixed idex.phtml ,reverted, now works again
Browse files Browse the repository at this point in the history
  • Loading branch information
jipipayo committed Mar 10, 2013
1 parent 11a2212 commit 6a78054
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions application/views/scripts/index/index.phtml
Expand Up @@ -2,7 +2,6 @@
<div class="section_ads">
<h2><?php echo $this->translate('last gifts published');?></h2>
<?php if ($this->allGives): ?>
<?php $count=0; ?>
<?php

foreach ($this->allGives as $key => $val):?>
Expand Down Expand Up @@ -31,11 +30,11 @@
<a href="/'.$this->lang.'/ad/'.$this->escape($val['id']).'/'.$this->slugTitle($this->escape($val['title'])).' ">
<img alt="'.$this->escape($val['title']).'" src="/images/uploads/ads/100/'.
$this->escape($val['photo']).'" /></a></div>';

}

// if you are the ad owner or admin, then show edit link
$auth = Zend_Auth::getInstance ();
if ( ($auth->hasIdentity()) && ($val['user_owner'] == $auth->getIdentity()->id) || ($this->userRole == 1) ): ?>
if ( ($val['user_owner'] == $auth->getIdentity()->id) || ($this->userRole == 1) ): ?>
<div>
<a href="/<?php echo $this->lang ?>/ad/edit/id/<?=$val['id'] ?>">
<img alt="<?=$this->translate('Edit this ad') ?>" src="/images/edit_ad.png"/>&nbsp;<?=$this->translate('Edit this ad') ?></a>
Expand Down

0 comments on commit 6a78054

Please sign in to comment.