Campustream 1.0
A social network MQP for WPI
application/views/statuses/single.php
Go to the documentation of this file.
00001 <!DOCTYPE html>
00002 <html lang="en">
00003 <head>
00004         <title>Campustream - Update from <?=$status->user->name?></title>
00005         
00006         <link type="text/css" rel="stylesheet" href="/css/reset.css" />
00007         <link href="http://fonts.googleapis.com/css?family=Lobster:regular&subset=latin" rel="stylesheet" type="text/css" >
00008         <link type="text/css" rel="stylesheet" href="/css/single.css" />
00009 </head>
00010 <body>
00011         <div id="header">
00012                 <h1><a href="/">Campustream</a></h1>
00013         </div>
00014         
00015         <div id="content-wrap">
00016                 <div id="content">
00017                         <p>
00018                         <? if($status->type == 'question'): ?>
00019                                 <?=$status->user->name?> asked: <?=$status->message?>
00020                         <? elseif($status->type == 'response'): ?>
00021                                 <?=$status->user->name?> replied: <?=$status->message?>
00022                         <? else: ?>
00023                                 <?=$status->message?>
00024                         <? endif; ?>
00025                         </p>
00026                         <div id="post-time">posted <?=date::relative_time($status->post_date)?></div>
00027                 </div>
00028                 <div id="content-meta">
00029                         <div id="user-avatar">
00030                                 <img src="<?=$status->user->avatar_url('small')?>" />
00031                         </div>
00032                         <div id="user-info">
00033                                 <h1><a href="/user/<?=$status->user->username?>"><?=$status->user->name?></a></h1>
00034                                 <p><?=$status->user->summary?></p>
00035                                 <p>Followers: <?=$status->user->followers_count()?> &mdash; Following: <?=$status->user->follows_count()?></p>
00036                         </div>
00037                 </div>
00038                 <div style="clear:both"></div>
00039                 
00040                 <? if ($status->content): ?>
00041                 <div id="content-extra-wrap">
00042                         <?=
00043                                 View::factory("statuses/_single_{$status->type}")->
00044                                         set('content', $status->content)->
00045                                         set('status', $status)->
00046                                         render()
00047                         ?>
00048                 </div>
00049                 <? endif; ?>
00050                 
00051                 <? if (count($status->comments) > 0): ?>
00052                 <div id="comments-wrap">
00053                         <h1>Comments</h1>
00054                         
00055                         <? foreach($status->comments as $comment): ?>
00056                         <div class="comment-wrap">
00057                                 <div class="comment-avatar">
00058                                         <img src="<?=$comment->user->avatar_url('small')?>" />
00059                                 </div>
00060                                 <div class="comment-content">
00061                                         <a href="/user/<?=$comment->user->username?>"><?=$comment->user->name?></a> <?=$comment->message?>
00062                                 </div>
00063                                 
00064                                 <div style="clear:both"></div>
00065                         </div>
00066                         <? endforeach; ?>
00067                 </div>
00068                 <? endif; ?>
00069         </div>
00070 </body>
00071 </html>