<!DOCTYPE html>
<html lang="en-US">
	<head>
		<meta charset="utf-8">
		<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
	</head>
	<body>
		<div class="container">
			<h4><strong>A new comment has been posted on of the tasks that you are following #{!! $data->related_id !!}.</strong></h4>
			<hr>

			<div class="panel panel-default">
				<?php
					switch ($data->related_type) {
						case 'message':
							echo '<div class="panel-heading">Message <a href="'. URL::to('messages/' . $data->related_id) .'">Message '. $data->related_id .'</a></div>';
							break;

						case 'project':
							echo '<div class="panel-heading">[<a href="'. URL::to('projects/' . $data->related_id) .'">Order '. $data->related_id .'</a>]</div>';
							break;

						default:
							echo '<div class="panel-heading">[<a href="'. URL::to('tasks/'.$data->related->type.'/' . $data->related_id) .'">'. $data->related_id .'</a>] '.$data->related->title.'</div>';
							break;
					}

				?>

				<div class="panel-body">
					<?php
						if ( $data->related->problem ) echo '<blockquote>'. $data->related->problem .'</blockquote>';
						if ( $data->related->assigned_to ) echo '<p>Assigned to: '.$data->related->user->name.'</p>';
					?>

					<hr>
					<div class="media">
						<a class="pull-left" href="#">
							<img class="media-object" src="{!! Auth::user()->profile_photo_url !!}" alt="profile photo" style="width: 80px; height: 80px;">
						</a>
						<div class="media-body">
							<h4 class="media-heading">{!! $data->creator->name !!} wrote:</h4>
							{!! $data->message !!}
						</div>
					</div>
					<hr>
					<p><small>DO NOT REPLY TO THIS EMAIL!</small></p>
					<br>
				</div>
			</div>
		</div>

	</body>
</html>