Campustream 1.0
A social network MQP for WPI
application/views/template/_sidebar.php
Go to the documentation of this file.
00001 <div id="user-sidebar-info">
00002 
00003         <? if(sess::isActiveUser($user)): ?>
00004                 <p>Update your status</p>
00005                 <?=View::factory('statuses/_new_form')->render()?>
00006         <? endif; ?>
00007         
00008         <div id="user-sidebar-photo">
00009                 <img src="<?=$user->avatar_url('medium')?>" alt="<?=$user->username?>" />
00010         </div>
00011         <div id="user-sidebar-bio">
00012                 <h1><?=$user->name?></h1>
00013                 <h2><a href="mailto:<?=$user->username?>@wpi.edu"><?=$user->username?></a></h2>
00014                 <p id="user-bio"><?=$user->bio?></p>
00015                 
00016                 <? if(mb_strlen($user->website) > 0): ?>
00017                 <p><a href="<?=$user->website?>"><?=$user->website_formatted?></a></p>
00018                 <? endif; ?>
00019                 
00020                 <? if($user->class_year != 0): ?>
00021                 <p>Class of <?=$user->class_year?></p>
00022                 <? endif; ?>
00023                 
00024                 <? if(mb_strlen($user->college_majors) > 0): ?>
00025                 <p>Major(s): <?=$user->college_majors?></p>
00026                 <? endif; ?>
00027                 
00028                 <? if(mb_strlen($user->college_minors) > 0): ?>
00029                 <p>Minors(s): <?=$user->college_minors?></p>
00030                 <? endif; ?>
00031         </div>
00032         <div style="clear:both;"></div>
00033         
00034         <div id="user-sidebar-social">
00035                 <? if(sess::is_logged_in() && !sess::isActiveUser($user)): ?>
00036                         <div class="follow-button">
00037                                 <? if(sess::getUser()->is_following($user)): ?>
00038                                 <a href="#" class="following">Following</a>
00039                                 <? else: ?>
00040                                 <a href="#" class="follow">Follow</a>
00041                                 <? endif; ?>
00042                         </div>
00043                 <? endif; ?>
00044                 <ul id="sidebar-social-data">
00045                         <li>
00046                                 <p class="karma-count"><?=$user->karma?></p>
00047                                 <p>Karma</p>
00048                         </li>
00049                         <li>
00050                                 <p class="follows-count"><a href="/user/<?=$user->username?>/follows"><?=$user->follows_count?></a></p>
00051                                 <p><a href="/user/<?=$user->username?>/follows">Following</a></p>
00052                         </li>
00053                         <li>
00054                                 <p class="followers-count"><a href="/user/<?=$user->username?>/followers"><?=$user->followers_count?></a></p>
00055                                 <p><a href="/user/<?=$user->username?>/followers">Followers</a></p>
00056                         </li>
00057                 </ul>
00058         </div>
00059 </div>