66 lines
2.3 KiB
Plaintext
Executable File
66 lines
2.3 KiB
Plaintext
Executable File
@model IEnumerable<Activity>
|
||
|
||
@{
|
||
ViewData["Title"] = "Home Page";
|
||
}
|
||
@section subbanner {
|
||
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="6000">
|
||
<ol class="carousel-indicators">
|
||
@{
|
||
int i=0;
|
||
|
||
foreach (var act in Model) {
|
||
if (i==0) {
|
||
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
|
||
} else {
|
||
<li data-target="#myCarousel" data-slide-to="@i"></li>
|
||
}
|
||
i++;
|
||
}
|
||
}
|
||
</ol>
|
||
<div class="carousel-inner" role="listbox">
|
||
@{
|
||
i=0;
|
||
foreach (var act in Model) {
|
||
string cls = (i==0) ? "item active":"item";
|
||
<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" >
|
||
|
||
@if (act.Children.Count>0) {
|
||
<p><em>@act.Name</em><br/>
|
||
@act.Description </p>
|
||
<a asp-route-id="@act.Code" class="btn btn-default">
|
||
@foreach (Activity c in act.Children) {
|
||
@if (!c.Hidden) { @Html.DisplayFor(subact=>c) }
|
||
}
|
||
</a>
|
||
}
|
||
else {
|
||
<p><em>@act.Name</em><br/>
|
||
@act.Description </p>
|
||
|
||
}
|
||
|
||
@foreach (var frm in act.Forms) {
|
||
<a class="btn btn-success" asp-controller="FrontOffice" asp-action="@frm.ActionName" asp-route-id="@act.Code">
|
||
@frm.Title
|
||
</a>
|
||
}
|
||
</div>
|
||
</div>
|
||
i++; }
|
||
}
|
||
</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>
|
||
}
|