ChatMVC/Chat/Views/Documents/Index.cshtml
2025-01-31 18:19:35 -03:00

50 lines
1.7 KiB
Plaintext

@using ChatMvc.Controllers
@model IEnumerable<TextResponse>
<div class="container">
<div class="card shadow-lg mt-4">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center mb-4">
<h2 class="card-title">Documentos</h2>
<a href="@Url.Action("New", "Documents")" class="btn btn-primary">
<i class="fas fa-plus mr-2"></i>Novo
</a>
</div>
<table class="table">
<thead>
<tr>
<th>Título</th>
<th>Conteúdo</th>
<th>Ações</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>@item.Title</td>
<td>@(item.Content?.Length > 80 ? item.Content.Substring(0, 80) + "..." : item.Content)</td>
<td>
<a href="@Url.Action("Edit", "Documents", new { id = item.Id })" class="btn btn-primary btn-sm">
<i class="fas fa-edit"></i> Editar
</a>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
</div>
@section Styles {
<style>
body {
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}
.card {
border: none;
border-radius: 15px;
}
</style>
}