Campustream 1.0
A social network MQP for WPI
application/views/notifications/main.php
Go to the documentation of this file.
00001 <? $notify = notifications::load(); ?>
00002 
00003 <div id="notification-count-wrap">
00004         <div id="notification-count" <?=$notify->numUnread() > 0 ? 'class="unread"' : ''?>>
00005                 <?=$notify->numUnread()?>
00006         </div>
00007         <div style="clear:both"></div>
00008 </div>
00009 
00010 <div id="notification-wrap">
00011         <div id="notification-close">Close Notifications</div>
00012 
00013         <div id="notification-cols">
00014                 <div class="notification-col">
00015                         <h2>News/Events</h2>
00016                         
00017                         <? if ($notify->numUnread('news') > 0): ?>
00018                         <div id="news-mark-read" class="notification-mark-read">Mark as Read</div>
00019                         <? endif; ?>
00020                         
00021                         <ul>
00022                         <? foreach (array_merge($notify->get('news'), $notify->get('newscomment')) as $n): ?>
00023                                 <li onclick="window.location.href='/ne/<?=$n->link_id?>'" class="notification-<?=$n->is_read ? 'read' : 'unread'?>">
00024                                         <a href="/user/<?=$n->user->username?>"><?=$n->user->name?></a> <?=$n->message?>
00025                                 </li>
00026                         <? endforeach; ?>
00027                         </ul>
00028                 </div>
00029                 
00030                 <div class="notification-col">
00031                         <h2>Collaboration</h2>
00032                         
00033                         <? if ($notify->numUnread('collaborate') > 0): ?>
00034                         <div id="collaborate-mark-read" class="notification-mark-read">Mark as Read</div>
00035                         <? endif; ?>
00036                         
00037                         <ul>
00038                         <? foreach ($notify->get('collaborate') as $n): ?>
00039                                 <li onclick="window.location.href='/collaborate/q/<?=$n->link_id?>'" class="notification-<?=$n->is_read ? 'read' : 'unread'?>">
00040                                         <a href="/user/<?=$n->user->username?>"><?=$n->user->name?></a> <?=$n->message?>
00041                                 </li>
00042                         <? endforeach; ?>
00043                         </ul>
00044                 </div>
00045                 
00046                 <div class="notification-col">
00047                         <h2>Status Comments</h2>
00048                         
00049                         <? if ($notify->numUnread('reply') > 0): ?>
00050                         <div id="reply-mark-read" class="notification-mark-read">Mark as Read</div>
00051                         <? endif; ?>
00052                         
00053                         <ul>
00054                         <? foreach ($notify->get('reply') as $n): ?>
00055                                 <li onclick="window.location.href='/s/<?=$n->link_id?>'" class="notification-<?=$n->is_read ? 'read' : 'unread'?>">
00056                                         <a href="/user/<?=$n->user->username?>"><?=$n->user->name?></a> <?=$n->message?>
00057                                 </li>
00058                         <? endforeach; ?>
00059                         </ul>
00060                 </div>
00061         
00062                 <div style="clear:both"></div>
00063         </div>
00064 </div>