mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
60 lines
2.6 KiB
Plaintext
60 lines
2.6 KiB
Plaintext
@using Orchard.AuditTrail.Models
|
|
@using Orchard.AuditTrail.ViewModels
|
|
@{
|
|
Style.Include("audittrail-part.css");
|
|
Script.Require("ShapesBase");
|
|
Script.Include("~/Themes/TheAdmin/scripts/admin.js").AtFoot();
|
|
Script.Include("audittrail-expando.js").AtFoot();
|
|
}
|
|
@{
|
|
var records = (IEnumerable<AuditTrailEventSummaryViewModel>)Model.Records;
|
|
var auditTrailPart = (AuditTrailPart)Model.ContentPart;
|
|
}
|
|
@if (auditTrailPart.Id > 0) {
|
|
<fieldset class="audittrail-list-wrapper expando-wrapper">
|
|
<legend>@T("Audit Trail")</legend>
|
|
<section class="audittrail-list-section expando">
|
|
@if (!records.Any()) {
|
|
<p class="info">@T("There are no audit trail events to display.")</p>
|
|
}
|
|
else {
|
|
<table class="audittrail-list items">
|
|
<thead>
|
|
<tr>
|
|
<th>@T("Event")</th>
|
|
<th>@T("Category")</th>
|
|
<th>@T("User")</th>
|
|
<th>@T("Timestamp")</th>
|
|
<th>@T("Comment")</th>
|
|
<th>@T("Summary")</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var record in records) {
|
|
<tr>
|
|
<td>@record.EventDescriptor.Name</td>
|
|
<td>@record.CategoryDescriptor.Name</td>
|
|
<td>@record.Record.UserName</td>
|
|
<td>@Display.DateTime(DateTimeUtc: record.Record.CreatedUtc, CustomFormat: T("g"))</td>
|
|
<td>@record.Record.Comment</td>
|
|
<td>@Display(record.SummaryShape)</td>
|
|
<td>@Html.ActionLink(T("Details").Text, "Detail", "Admin", new { id = record.Record.Id, area = "Orchard.AuditTrail" }, null)</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
@if (Model.Pager.TotalItemCount > Model.Pager.PageSize) {
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="6">
|
|
@Html.ActionLink(T("Show more events").Text, "Index", "Admin", new { content = auditTrailPart.Id, page = 2, area = "Orchard.AuditTrail" }, null)
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
}
|
|
</table>
|
|
}
|
|
</section>
|
|
</fieldset>
|
|
}
|