Projects (GanjooRazor -> DiwanRazor, GanjoorService.sln -> DiwanService.sln), files, folders, classes, namespaces, settings, API routes (/api/diwan) and DB tables (Diwan*). External addresses (ganjoor.net, github.com/ganjoor) unchanged. Migrations renamed consistently (no pending model changes); requires a fresh database. Upstream RUNNING_LOCALLY/SEMANTIC_SEARCH docs archived unmodified under docs/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
91 lines
3.3 KiB
Plaintext
91 lines
3.3 KiB
Plaintext
@page
|
|
@model DiwanRazor.Areas.Admin.Pages.DonationsModel
|
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@{
|
|
Layout = "_AdminLayout";
|
|
ViewData["Title"] = "کمکهای مالی";
|
|
}
|
|
<div class="up-page-header">
|
|
<h1>@ViewData["Title"]</h1>
|
|
</div>
|
|
|
|
@if (!string.IsNullOrEmpty(Model.LastMessage))
|
|
{
|
|
<div class="up-alert up-alert--info">@Model.LastMessage</div>
|
|
}
|
|
|
|
@if (!string.IsNullOrEmpty(Model.EmailContent))
|
|
{
|
|
<div class="up-field">
|
|
<label>متن ایمیل</label>
|
|
<textarea rows="5" cols="50">@Model.EmailContent</textarea>
|
|
</div>
|
|
}
|
|
|
|
@if (Model.Donation != null)
|
|
{
|
|
<div class="up-card">
|
|
<h2 class="up-card__title">کمک مالی جدید</h2>
|
|
<form method="post" class="up-form">
|
|
@Html.AntiForgeryToken()
|
|
<div class="up-field">
|
|
<label asp-for="Donation.RecordDate">تاریخ</label>
|
|
<input type="date" asp-for="Donation.RecordDate" />
|
|
</div>
|
|
<div class="up-field">
|
|
<label asp-for="Donation.Amount">مبلغ</label>
|
|
<input type="number" asp-for="Donation.Amount" />
|
|
</div>
|
|
<div class="up-field">
|
|
<label asp-for="Donation.Unit">واحد</label>
|
|
<input asp-for="Donation.Unit" />
|
|
</div>
|
|
<div class="up-field">
|
|
<label asp-for="Donation.DonorName">اهدا کننده</label>
|
|
<input size="50" asp-for="Donation.DonorName" />
|
|
</div>
|
|
<div class="up-form-actions">
|
|
<button type="submit" class="up-btn up-btn--success">ثبت کمک مالی جدید</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
}
|
|
|
|
<div class="up-form-actions" style="margin-bottom:var(--up-space-3);">
|
|
<a href="/donate" target="_blank" class="up-btn up-btn--ghost">مشاهدهٔ صفحه</a>
|
|
<a role="button" onclick="rebuildDonationsPage()" class="up-btn up-btn--ghost" title="بازسازی صفحهٔ کمکها">بازسازی صفحهٔ کمکها</a>
|
|
</div>
|
|
@if (!string.IsNullOrEmpty(Model.ShowAccountInfo))
|
|
{
|
|
<p class="up-hint">@Model.ShowAccountInfo</p>
|
|
}
|
|
|
|
@if (Model.Donations != null && Model.Donations.Length > 0)
|
|
{
|
|
<table>
|
|
<tr>
|
|
<th>تاریخ</th>
|
|
<th>مبلغ</th>
|
|
<th>اهدا کننده</th>
|
|
<th>#</th>
|
|
</tr>
|
|
@foreach (var donation in Model.Donations)
|
|
{
|
|
<tr id="tr-@donation.Id">
|
|
<td>@donation.DateString</td>
|
|
<td>@donation.AmountString</td>
|
|
<td>@donation.DonorName</td>
|
|
<td>
|
|
<a role="button" href="/Admin/DonationEdit/?id=@donation.Id" class="up-icon-btn" title="ویرایش" aria-label="ویرایش این کمک مالی">✎</a>
|
|
<a role="button" onclick="deleteItem(@donation.Id, 'کمک')" class="up-icon-btn" title="حذف" aria-label="حذف این کمک مالی">🗑</a>
|
|
<a role="button" href="/Admin/Donations?id=@donation.Id" class="up-icon-btn" title="تولید محتوای پیام" aria-label="تولید محتوای پیام">#</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</table>
|
|
}
|
|
else
|
|
{
|
|
<partial name="_EmptyState" model="@("هنوز کمک مالیای ثبت نشده است.")" />
|
|
}
|