<?php if($this->list){ ?>
	<?php $unread_num = count($this->list); $this->list = array_slice($this->list, 0, 5); ?>
	<?php foreach($this->list AS $key => $val) { ?>
	<p><?php if ($val['extend_count'] > 1) { ?>
			<?php if ($val['model_type'] == notify_class::CATEGORY_QUESTION) {?>
				<?php echo $val['extend_count']; ?> Items on the issue <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
			<?php } ?>
		<?php }else{ ?>
			<?php if ($val['action_type'] == notify_class::TYPE_PEOPLE_FOCUS) { ?>
				<a href="<?php echo $val['key_url']; ?>" title="<?php echo $val['p_username']; ?>"><?php echo $val['p_username']; ?></a> following
			<?php }else if ($val['action_type'] == notify_class::TYPE_NEW_ANSWER) { ?>
				<?php if($val['anonymous']){ ?>Anonymous<?php }else{ ?><a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a><?php } ?> replied <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
			<?php }else if ($val['action_type'] == notify_class::TYPE_COMMENT_AT_ME) { ?>
				<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> In question <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a> The review mentioned you
			<?php }else if ($val['action_type'] == notify_class::TYPE_INVITE_QUESTION) { ?>
				<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> Invites you to participate in problem <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
			<?php }else if ($val['action_type'] == notify_class::TYPE_ANSWER_COMMENT) { ?>
				<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> Commented on your question <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a> Replies
			<?php }else if ($val['action_type'] == notify_class::TYPE_QUESTION_COMMENT) { ?>
				<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> Commented on your question initiated <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
			<?php }else if ($val['action_type'] == notify_class::TYPE_ANSWER_AGREE) { ?>
				<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> Agree on your question <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a> Replies
			<?php }else if ($val['action_type'] == notify_class::TYPE_ANSWER_THANK) { ?>
				<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> Thank you in question <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a> Replies
			<?php }else if ($val['action_type'] == notify_class::TYPE_MOD_QUESTION) { ?>
				<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> Edit your question posted <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
			<?php }else if ($val['action_type'] == notify_class::TYPE_REMOVE_ANSWER) { ?>
				<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> You removed the question <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a> Replies
			<?php }else if ($val['action_type'] == notify_class::TYPE_REDIRECT_QUESTION) { ?>
				<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> Redirect your question initiated <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
			<?php }else if ($val['action_type'] == notify_class::TYPE_QUESTION_THANK) { ?>
				<a href="<?php echo $val['p_url']; ?>"><?php echo $val['p_username']; ?></a> Thank you initiated the problem <a href="<?php echo $val['key_url']; ?>"><?php echo $val['title']; ?></a>
			<?php }else if ($val['action_type'] == notify_class::TYPE_CONTEXT) { ?>
				<?php echo $val['content']; ?>
			<?php } ?>
		<?php } ?>
		<span style="display:none;" id="ex_more" class="ex_more">
		<?php if ($val['extend_count'] > 1) { ?>
			<?php foreach($val['extend_details'] as $action_type => $extend) { ?>
				<?php if ($action_type == notify_class::TYPE_NEW_ANSWER) { ?>
					<small><?php echo $extend['count'];?> New reply, press answer see:<?php $count = 0; foreach($extend['users'] as $user) { ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if ($count < count($extend['users'])) { ?>, <?php } ?><?php } ?></small>
				<?php }else if ($action_type == notify_class::TYPE_ANSWER_COMMENT) { ?>
					<small><?php echo $extend['count'];?> A new comment, according to commentators see:<?php $count = 0; foreach($extend['users'] as $user) { ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if ($count < count($extend['users'])) { ?>, <?php } ?><?php } ?></small>
				<?php }else if ($action_type == notify_class::TYPE_ANSWER_AGREE) { ?>
					<small><?php echo $extend['count'];?> New Agree, press Agree who see:<?php $count = 0; foreach($extend['users'] as $user) { ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if ($count < count($extend['users'])) { ?>, <?php } ?><?php } ?></small>
				<?php }else if ($action_type == notify_class::TYPE_ANSWER_THANK) { ?>
					<small><?php echo $extend['count'];?> New thanks, press thanks to those who see:<?php $count = 0; foreach($extend['users'] as $user) { ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if ($count < count($extend['users'])) { ?>, <?php } ?><?php } ?></small>
				<?php }else if ($action_type == notify_class::TYPE_MOD_QUESTION) { ?>
					<small><?php echo $extend['count'];?> Times editorial issues, according to the editor view:<?php $count = 0; foreach($extend['users'] as $user) { ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if ($count < count($extend['users'])) { ?>, <?php } ?><?php } ?></small>
				<?php }else if ($action_type == notify_class::TYPE_REDIRECT_QUESTION) { ?>
					<small><?php $count = 0; foreach($extend['users'] as $user) { ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if ($count < count($extend['users'])) { ?>, <?php } ?><?php } ?> Post your question redirected</small>
				<?php }else if ($action_type == notify_class::TYPE_REMOVE_ANSWER) { ?>
					<small><?php echo $extend['count'];?> Replies are deleted</small>
				<?php }else if ($action_type == notify_class::TYPE_INVITE_QUESTION) { ?>
					<small><?php $count = 0; foreach($extend['users'] as $user) { ?><a href="<?php echo $user['url']; ?>"><?php echo $user['username']; ?></a><?php $count++; if ($count < count($extend['users'])) { ?>, <?php } ?><?php } ?> Invites you to participate in problem</small>
				<?php } ?>
			<?php } ?>
		<?php } ?>

	</span>
	<span class="s tny-cl_02">
		<em class="x tny-small tny-right" title="Delete" onclick="$.I.removeNotmsg(this,'<?php echo $val['notification_id']; ?>',event);">X</em>
		<?php if ($val['extend_count'] > 1) { ?>
			<mark title="Expand»" class="tny-right tny-cl_02" onclick="$.I.msg(this,'p');">Expand</mark>
		<?php } ?>
		<?php echo date('Y-m-d H:i:s', $val['add_time']); ?>
	</span>
	</p>
	<?php } ?>
	<?php if($unread_num > 5){ ?>
	<a href="notifications/" style="margin:10px;" class="btn-blue">See more »</a>
	<?php } ?>
<?php } ?>