@model IList<Message>
@{
	Layout = null;

	string utilisateurCourant = ViewBag.UtilisateurCourant;
	var listeDesMessages = Model;
}

<!DOCTYPE html>

<html>
<head>
	<meta name="viewport" content="width=device-width" />
	<title>Messagerie - Mes messages</title>
	<link href="~/Content/bootstrap.css" rel="stylesheet" />
	<link href="~/Content/Site.css" rel="stylesheet" />
</head>
<body>
	<div class="container">
		<h1>Messagerie de @utilisateurCourant</h1>
		<h2>Vos messages&nbsp;:</h2>
		<p>@Html.ActionLink( "<== Retour", "Index" )</p>
		<table class="table table-hover table-condensed">
			<tr>
				<th>#</th>
				<th>Émission</th>
				<th>Expéditeur</th>
				<th>Texte</th>
			</tr>
			@{
				int i = 1;
				foreach( var m in listeDesMessages ) {
					<tr>
						<td>@i</td>
						<td>@m.Emission.ToString( "G" )</td>
						<td>@m.Expediteur</td>
						<td>@m.Corps</td>
					</tr>
					i++;
				}
			}
		</table>
	</div>
</body>
</html>
