Files
constructdemo/ConstructorAppUI/Views/Project/Index.cshtml
2025-05-01 15:18:30 +03:00

92 lines
5.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@using static ConstructorApp.EntityLayer.Entities.Project
@using static ConstructorAppUI.Helpers.EnumExtensions
@model List<ResultProjectDto>
@{
ViewData["Title"] = "Index";
Layout = "~/Views/AdminLayout/Index.cshtml";
int count = 0;
}
<div class="content">
<div class="container-fluid">
<h4 class="page-title">Ana Sayfa Projelerimiz İşlemleri</h4>
<a href="/Project/CreateProject/" class="btn btn-outline-primary">Yeni Ekle</a>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-body">
<table class="table table-head-bg-success table-striped table-hover">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Oturum Tarihi</th>
<th scope="col">Başlık</th>
<th scope="col">Sayfa Adı</th>
<th scope="col">Lokasyon</th>
<th scope="col">GoogleMap IFrame</th>
<th scope="col">Video Url</th>
<th scope="col">Kapak Görseli</th>
<th scope="col">Kat Planı</th>
<th scope="col">Yayın Durumu</th>
<th scope="col">Proje Durumu</th>
<th scope="col">İşlemler</th>
</tr>
</thead>
<tbody>
@if (Model == null || !Model.Any())
{
<tr>
<td colspan="3">Kayıt bulunamadı.</td>
</tr>
}
else
{
@foreach (var item in Model)
{
count++;
<tr>
<td>@count</td>
<td>@item.Date</td>
<td>@item.Title</td>
<td>@item.Slug</td>
<td>@(item.Location?.Length > 8 ? item.Location.Substring(0, 8) + "..." : item.Location)</td>
<td>@(item.GoogleMapIFrame?.Length > 8 ? item.GoogleMapIFrame.Substring(0, 8) + "..." : item.GoogleMapIFrame)</td>
<td>@(item.VideoUrl?.Length > 8 ? item.VideoUrl.Substring(0, 8) + "..." : item.VideoUrl)</td>
<td>
<img width="75" height="75" src="@item.CoverUrl" alt="Görsel" />
</td>
<td>
<img width="75" height="75" src="@item.FloorPlanUrl" alt="Görsel" />
</td>
<td>
<span class="badge @(item.IsActive? "bg-success text-white" : "bg-secondary text-white")">
@(item.IsActive ? "Aktif" : "Pasif")
</span>
</td>
<td>
<span class="badge
@(item.Status == ProjectStatus.Planned ? "bg-warning text-dark" :
item.Status == ProjectStatus.UnderConstruction ? "bg-info text-white" :
"bg-success text-white")">
@item.Status.GetDisplayName()
</span>
</td>
<td>
<a href="/Project/UpdateProject/@item.ProjectID" class="btn btn-outline-success">Güncelle</a>
<a href="/Project/ProjectStatusActive/@item.ProjectID" class="btn btn-outline-info @(item.IsActive == true ? "disabled" : "")">Aktif</a>
<a href="/Project/ProjectStatusPassive/@item.ProjectID" class="btn btn-outline-dark @(item.IsActive == false ? "disabled" : "")">Pasif</a>
</td>
</tr>
}
}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>