index.blade.php 1.58 KB
<div id=notificationsmodule>
				<div class="box span12">
					<div class="box-header">
						<h2><i class="halflings-icon align-justify"></i><span class="break"></span>Notifications</h2>
						<div class="box-icon">

						</div>
					</div>
					<div class="box-content">
						<table class="table table-condensed datatable bootstrap-datatable">
							  <thead>
								  <tr>
									  <th>All New</th>
								  </tr>
							  </thead>
							  <tbody>
@foreach($notifications as $notification)
								<tr>
<td>
						<div class="alert alert-info" style='margin-bottom:0px'>
							<button type="button" class="close" data-dismiss="alert">×</button>
							<div style=''><div style='width:30%;float:left;min-width:300px'><strong>{!!$notification->from!!} -> {!!$notification->to!!} [{!!$notification->created_at!!}]</strong> [{!!$notification->type!!}] [{!!$notification->status!!}]</div><div style='width:50%;float:left'><big><b>{!!$notification->data!!}</b></big></div><div style='clear:both'></div></div>
						</div>
</td>

								</tr>
@endforeach
							  </tbody>
						 </table>
					</div>
				</div><!--/span-->

<form class="form-horizontal">
    <div class="">
	  <button type="submit" class="btn btn-primary" onclick='clearNotifications();return false;'>Mark All Notifications as Read</button>
    </div>
</form>

</div>

<script>
@if(isset($displaymsg))
simpleNotification("{!!$displaymsg['type']!!}","topRight","{!!$displaymsg['text']!!}");
@endif

function clearNotifications()
{
  doAjax('notification/clearall','','notificationsmodule','ajax_nt_clear','singlethis','DELETE');
}
</script>