Skip to content

Instantly share code, notes, and snippets.

@martisj
Created September 6, 2012 11:28
Show Gist options
  • Save martisj/3655130 to your computer and use it in GitHub Desktop.
Save martisj/3655130 to your computer and use it in GitHub Desktop.
view that handles the different types of activities
<?if(count($groups) == 0) :?>
<div class="home_note">
<div class="home_bg">
<div class="inner_padding">
<div class="clear"></div>
<h1 class="uni">WHAT'S NEXT?</h1>
<p>As you and fellow students use UCROO relevant information will appear in this Home Feed.
In the mean time here are a few things you can do to get started.</p><br>
<ul>
<li>Check out the <?=anchor('classes','classes')?> - try posting a question!</li>
<li>Connect with other <?=anchor('connection','students')?></li>
<li>Update your <?=anchor('profile','profile')?></li>
<li>Check out the <?=anchor('feed','campus feed')?></li>
</ul>
<br>
<table width="100%">
<tr>
<td width="25%" align="center">
<img src="<?=image_path()?>index/icon-heading-classes.png" alt="Ucroo Classes" class="icon-index"/>
</td>
<td width="25%" align="center">
<img src="<?=image_path()?>index/icon-heading-connections.png" alt="Ucroo Connections" class="icon-index"/>
</td>
<td width="25%" align="center">
<img src="<?=image_path()?>index/icon-heading-campus_feed.png" alt="Ucroo Feed" class="icon-index"/>
</td>
<td width="25%" align="center">
<img src="<?=image_path()?>index/icon-heading-points.png" alt="Ucroo Points" class="icon-index"/>
</td>
</tr>
</table>
<br>
</div>
</div>
</div>
<?endif;?>
<div id="posting">
<? foreach($groups as $key=>$group): ?>
<?echo $key?>
<? // var_doctrine($) ?>
<?php $data['notification'] = $group['notifications'][0]; ?>
<?php $data['all_notifications'] = $group['notifications']; ?>
<?php $data['user_count'] = count($group['notifications']); ?>
<?$check = $data['notification']; //bit of a work around for deleted entites. need to refine?>
<?$does_exsits = em()->getRepository('models\\'.$check->get_entity_type())->findOneById($check->get_entity_id()); ?>
<? $check->get_entity_type() == 'Unit_rating' ? $does_exsits = FALSE : '' ; //codeout unit ratings?>
<?if($does_exsits):?>
<?
$unitacademic_exsits = TRUE;
if($check->get_entity_type() == 'Academic_rating' ||
$check->get_entity_type() == 'Academic'){
// $unitacademic_exsits = em()->getRepository('models\Academic')->findOneById($does_exsits->getAcademic_id());
$unitacademic_exsits = false; //skip academic ratings
}
else if($check->get_entity_type() == 'Unit_rating') {
$unitacademic_exsits = em()->getRepository('models\Unit')->findOneById($does_exsits->getUnit_id());
}
?>
<?if($unitacademic_exsits):?>
<div class="home_area">
<div class="home-main">
<?= $this->load->view('home/_'.$data['notification']->get_type(), $data, true)?>
</div>
<div class="home-time-right">
<span class="home-time-date"><?= how_long_ago($data['notification']->get_date_created()->format(MYSQL_TIME));?></span>
<div class="clear"></div>
</div>
</div>
<?endif;?>
<?endif;?>
<? endforeach ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment