yavsc/Yavsc/Views/Home/Index.cshtml

62 lines
2.3 KiB
Text
Raw Normal View History

2016-05-17 18:22:18 +02:00
@{
ViewData["Title"] = "Home Page";
}
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="6000">
<ol class="carousel-indicators">
2017-01-15 18:49:48 +01:00
@{
int i=0;
foreach (var act in Model) {
if (i==0) {
2016-05-17 18:22:18 +02:00
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
2017-01-15 18:49:48 +01:00
} else {
<li data-target="#myCarousel" data-slide-to="@i"></li>
}
i++;
}
}
2016-05-17 18:22:18 +02:00
</ol>
2017-01-15 18:49:48 +01:00
<div class="carousel-inner" role="listbox">
@{
i=0;
foreach (var act in Model) {
string cls = (i==0) ? "item active":"item";
2017-02-08 01:44:34 +01:00
<div class="@cls" style="background-image: url('@act.Photo'); background-repeat: no-repeat; ">
<!-- <img src="@act.Photo" alt="@act.Name" class="img-responsive" /> -->
<div class="carousel-caption-s" >
2017-02-19 20:19:58 +01:00
@if (act.Children.Count>0) {
2017-02-21 20:49:07 +01:00
<p><em>@act.Name</em><br/>
2017-02-19 20:19:58 +01:00
@act.Description </p>
<a asp-route-id="@act.Code">
2017-02-19 20:42:00 +01:00
@foreach (Activity c in act.Children) {
2017-02-20 15:53:25 +01:00
@if (!c.Hidden) { @Html.DisplayFor(subact=>c) }
2017-02-19 20:19:58 +01:00
}
</a>
}
else {
2017-01-15 18:49:48 +01:00
<p><em>@act.Name</em><br/>
@act.Description </p>
2017-02-19 20:19:58 +01:00
}
2017-01-24 10:43:42 +01:00
@foreach (var form in act.Forms) {
2017-01-31 13:19:12 +01:00
<a class="btn btn-default" asp-controller="FrontOffice" asp-action="@form.Action" asp-route-id="@act.Code">
2017-01-24 10:43:42 +01:00
@form.Title
2016-05-17 18:22:18 +02:00
</a>
2017-01-24 10:43:42 +01:00
}
2016-05-17 18:22:18 +02:00
</div>
</div>
2017-01-15 18:49:48 +01:00
i++; }
}
2016-05-17 18:22:18 +02:00
</div>
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Précédent</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Suivant</span>
</a>
</div>