@using Sevomin.Models.Helpers
|
|
@model IQueryable<Sevomin.Models.Ad>
|
|
|
|
@if (Model.Any())
|
|
{
|
|
<div class="row">
|
|
<div class="col-md-12 rtl">
|
|
<div class="panel panel-default" id="ad-management-panel">
|
|
<div class="panel-heading">
|
|
<h4 class="panel-title"><a data-toggle="collapse" data-parent="ad-management-panel" href="#ad-management-panel-body">مدیریت آگهی ها</a></h4>
|
|
</div>
|
|
<div id="ad-management-panel-body" class="panel-collapse collapse in">
|
|
<div class="panel-body">
|
|
<div class="panel-heading">
|
|
<div class="panel-title">
|
|
آگهی های فعال
|
|
</div>
|
|
</div>
|
|
<div class="panel-body">
|
|
<ul class="list-unstyled">
|
|
@foreach (var ad in Model.Where(m => m.Active))
|
|
{
|
|
<li>
|
|
@using (Html.BeginForm("ChangeDays", "God", FormMethod.Post))
|
|
{
|
|
<div class="row">
|
|
<div class="col-md-2">
|
|
@DateAssist.GetFullPersianDate(ad.CreatedDate)
|
|
</div>
|
|
<div class="col-md-7">
|
|
@ad.Description
|
|
</div>
|
|
<div class="col-md-3">
|
|
@ad.Title
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-1">
|
|
<a href="@Url.Action("ToggleAd", new {id = ad.Id})" class="btn btn-default">غیر فعالسازی</a>
|
|
</div>
|
|
<div class="col-md-1">
|
|
<button class="btn btn-default" type="submit">تغییر روز</button>
|
|
</div>
|
|
<input type="hidden" name="id" value="@ad.Id" />
|
|
<div class="col-md-2">
|
|
<input type="number" placeholder="تغییر روز" name="days" value="@ad.Duration"/>
|
|
</div>
|
|
<div class="col-md-2">
|
|
تعداد کلیک ها: @ad.ClickCount
|
|
</div>
|
|
<div class="col-md-2">
|
|
روز: @ad.Duration
|
|
</div>
|
|
<div class="col-md-3">
|
|
<a href="@ad.Link">@ad.Link</a>
|
|
</div>
|
|
</div>
|
|
}
|
|
</li>
|
|
}
|
|
</ul>
|
|
</div>
|
|
<div class="panel-heading">
|
|
<div class="panel-title">
|
|
آگهی های غیر فعال
|
|
</div>
|
|
</div>
|
|
<div class="panel-body">
|
|
<ul class="list-unstyled">
|
|
@foreach (var ad in Model.Where(m => !m.Active))
|
|
{
|
|
<li>
|
|
<div class="col-md-2">
|
|
<a href="@Url.Action("ToggleAd", new { id = ad.Id })" class="btn btn-default">فعالسازی</a>
|
|
</div>
|
|
<div class="col-md-7">
|
|
@ad.Description
|
|
</div>
|
|
<div class="col-md-3">
|
|
@ad.Title
|
|
</div>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|