mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Miscellaneous tweaks, refactorings and renames.
This commit is contained in:
@@ -27,7 +27,6 @@ namespace Orchard.AuditTrail.Controllers {
|
||||
public dynamic New { get; private set; }
|
||||
|
||||
public ActionResult Index(PagerParameters pagerParameters, AuditTrailOrderBy? orderBy = null) {
|
||||
|
||||
if(!_authorizer.Authorize(Permissions.ViewAuditTrail))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
|
@@ -78,11 +78,12 @@
|
||||
<None Include="Placement.info" />
|
||||
<Content Include="Lib\XmlDiffPatch\xmldiffpatch.dll" />
|
||||
<Content Include="Recipes\audit-trail.recipe.xml" />
|
||||
<Content Include="Scripts\audittrail-admin.js" />
|
||||
<Content Include="Scripts\audittrail-expando.js" />
|
||||
<Content Include="Scripts\audittrail-checkall.js" />
|
||||
<Content Include="Scripts\audittrail-disabledcontent.js" />
|
||||
<Content Include="Styles\audittrail-admin.css" />
|
||||
<Content Include="Styles\audittrail-display.css" />
|
||||
<Content Include="Styles\audittrail-disabledcontent.css" />
|
||||
<Content Include="Styles\audittrail-part.css" />
|
||||
<Content Include="Styles\audittrail-settings.css" />
|
||||
<Content Include="Styles\audittrail-grid.css" />
|
||||
<Content Include="Styles\menu.audit-trail-admin.css" />
|
||||
|
@@ -24,12 +24,12 @@ namespace Orchard.AuditTrail.Providers.ContentDefinition {
|
||||
|
||||
public override void Describe(DescribeContext context) {
|
||||
context.For("ContentType", T("Content Type"))
|
||||
.Event(this, Created, T("Created"), T("Content Type was created."), enableByDefault: true)
|
||||
.Event(this, Removed, T("Removed"), T("Content Type was removed."), enableByDefault: true)
|
||||
.Event(this, PartAdded, T("Part added"), T("Content Part was added."), enableByDefault: true)
|
||||
.Event(this, PartRemoved, T("Part removed"), T("Content Part was removed."), enableByDefault: true)
|
||||
.Event(this, TypeSettingsUpdated, T("Type Settings updated"), T("Content Type settings were updated."), enableByDefault: true)
|
||||
.Event(this, PartSettingsUpdated, T("Part Settings updated"), T("Content Part settings were updated."), enableByDefault: true);
|
||||
.Event(this, Created, T("Created"), T("A content type was created."), enableByDefault: true)
|
||||
.Event(this, Removed, T("Removed"), T("A content type was removed."), enableByDefault: true)
|
||||
.Event(this, PartAdded, T("Part added"), T("A content part was added to a content type."), enableByDefault: true)
|
||||
.Event(this, PartRemoved, T("Part removed"), T("A content part was removed from a content type."), enableByDefault: true)
|
||||
.Event(this, TypeSettingsUpdated, T("Type settings updated"), T("The settings of a content type were updated."), enableByDefault: true)
|
||||
.Event(this, PartSettingsUpdated, T("Part settings updated"), T("The settings of a content part were updated."), enableByDefault: true);
|
||||
|
||||
context.QueryFilter(QueryFilter);
|
||||
context.DisplayFilter(DisplayFilter);
|
||||
|
@@ -1,17 +0,0 @@
|
||||
(function($) {
|
||||
|
||||
var initExpandoControl = function() {
|
||||
$(".expando-wrapper legend").expandoControl(
|
||||
function(controller) {
|
||||
return controller.nextAll(".expando");
|
||||
}, {
|
||||
collapse: true,
|
||||
remember: true
|
||||
});
|
||||
};
|
||||
|
||||
$(function() {
|
||||
initExpandoControl();
|
||||
});
|
||||
|
||||
})(jQuery);
|
@@ -0,0 +1,11 @@
|
||||
$(function() {
|
||||
$(".expando-wrapper > legend").expandoControl(
|
||||
function(controller) {
|
||||
return controller.nextAll(".expando");
|
||||
},
|
||||
{
|
||||
collapse: true,
|
||||
remember: true
|
||||
}
|
||||
);
|
||||
});
|
@@ -1,20 +0,0 @@
|
||||
.audit-trail-filter {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.audit-trail-filter fieldset label {
|
||||
display: inline-block;
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
.audit-trail-filter fieldset label.inline {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.audit-trail-list .info {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.audit-trail-list .event-content .version {
|
||||
font-size: 0.8em;
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
.audittrail-filter {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.audittrail-filter fieldset label {
|
||||
display: inline-block;
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
.audittrail-filter fieldset label.inline {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.audittrail-event-metadata-section {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.audittrail-event-metadata-section strong {
|
||||
font-weight: bold;
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
.audittrail-list-wrapper {
|
||||
padding-top: 1em !important;
|
||||
}
|
||||
|
||||
.audittrail-list {
|
||||
width: auto !important;
|
||||
}
|
@@ -1,22 +1,18 @@
|
||||
@model Orchard.AuditTrail.ViewModels.AuditTrailDetailsViewModel
|
||||
@{
|
||||
Style.Include("audittrail-admin.css");
|
||||
}
|
||||
@{
|
||||
Style.Include("audittrail-display.css");
|
||||
|
||||
var record = Model.Record;
|
||||
var descriptor = Model.Descriptor;
|
||||
|
||||
Layout.Title = T("Audit Trail Event");
|
||||
}
|
||||
<section class="audit-trail-event">
|
||||
<fieldset>
|
||||
<legend>@descriptor.Name - <span>@descriptor.CategoryDescriptor.Name</span></legend>
|
||||
<div>
|
||||
<span>@T("On: <strong>{0}</strong>", Display.DateTime(DateTimeUtc: record.CreatedUtc, CustomFormat: T("g")))</span>
|
||||
@if (!String.IsNullOrWhiteSpace(record.UserName)) {
|
||||
@T(" | ")<span>@T("By: <strong>{0}</strong>", record.UserName)</span>
|
||||
}
|
||||
</div>
|
||||
</fieldset>
|
||||
<section class="audittrail-event-metadata-section">
|
||||
@T("Event:") <strong>@descriptor.Name</strong><br />
|
||||
@T("Category:") <strong>@descriptor.CategoryDescriptor.Name</strong><br />
|
||||
@T("Timestamp:") <strong>@Display.DateTime(DateTimeUtc: record.CreatedUtc, CustomFormat: T("g"))</strong><br />
|
||||
@T("Username:") <strong>@record.UserName</strong>
|
||||
</section>
|
||||
<section class="audit-trail-event-details">
|
||||
<section class="audittrail-event-details-section">
|
||||
@Display(Model.DetailsShape)
|
||||
</section>
|
@@ -1,18 +1,18 @@
|
||||
@using Orchard.AuditTrail.Services.Models
|
||||
@model Orchard.AuditTrail.ViewModels.AuditTrailViewModel
|
||||
@{
|
||||
Style.Include("audittrail-admin.css");
|
||||
Style.Include("audittrail-display.css");
|
||||
Style.Include("audittrail-grid.css");
|
||||
var orderBy = Model.OrderBy;
|
||||
var orderByItems = new List<SelectListItem> {
|
||||
new SelectListItem {Text = T("Date (desc)").Text, Value = AuditTrailOrderBy.DateDescending.ToString(), Selected = Model.OrderBy == AuditTrailOrderBy.DateDescending},
|
||||
new SelectListItem {Text = T("Category (asc)").Text, Value = AuditTrailOrderBy.CategoryAscending.ToString(), Selected = Model.OrderBy == AuditTrailOrderBy.CategoryAscending},
|
||||
new SelectListItem {Text = T("Event (asc)").Text, Value = AuditTrailOrderBy.EventAscending.ToString(), Selected = Model.OrderBy == AuditTrailOrderBy.EventAscending},
|
||||
new SelectListItem {Text = T("Date (newest first)").Text, Value = AuditTrailOrderBy.DateDescending.ToString(), Selected = Model.OrderBy == AuditTrailOrderBy.DateDescending},
|
||||
new SelectListItem {Text = T("Category (alphabetical)").Text, Value = AuditTrailOrderBy.CategoryAscending.ToString(), Selected = Model.OrderBy == AuditTrailOrderBy.CategoryAscending},
|
||||
new SelectListItem {Text = T("Event name (alphabetical)").Text, Value = AuditTrailOrderBy.EventAscending.ToString(), Selected = Model.OrderBy == AuditTrailOrderBy.EventAscending},
|
||||
};
|
||||
|
||||
Layout.Title = T("Audit Trail");
|
||||
}
|
||||
<section class="audit-trail-filter">
|
||||
<section class="audittrail-filter">
|
||||
@using (Html.BeginForm("Index", "Admin", new { area = "Orchard.AuditTrail" }, FormMethod.Get)) {
|
||||
<div class="table">
|
||||
<div class="row">
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="cell span-4">
|
||||
@Display(Model.FilterLayout.TripleFirst)
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => orderBy, T("Ordered by:"))
|
||||
@Html.LabelFor(m => orderBy, T("Sort by:"))
|
||||
@Html.DropDownListFor(m => orderBy, orderByItems)
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
}
|
||||
</section>
|
||||
<section class="audit-trail-list">
|
||||
<section class="audittrail-list">
|
||||
@if (!Model.Records.Any()) {
|
||||
<p class="info">@T("There are no records to display.")</p>
|
||||
}
|
||||
@@ -56,7 +56,7 @@
|
||||
<th>@T("User")</th>
|
||||
<th>@T("Timestamp")</th>
|
||||
<th>@T("Comment")</th>
|
||||
<th>@T("Event Data")</th>
|
||||
<th>@T("Summary")</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@@ -5,6 +5,6 @@
|
||||
var newRetentionPeriod = eventData.Get<int>("NewRetentionPeriod");
|
||||
}
|
||||
|
||||
<fieldset>
|
||||
<section class="audittrail-settings-summary">
|
||||
@T("Trimming retention period changed from <strong>{0}</strong> to <strong>{1}</strong>", oldRetentionPeriod, newRetentionPeriod)
|
||||
</fieldset>
|
||||
</section>
|
@@ -6,7 +6,8 @@
|
||||
var contentItemVersionNumber = eventData.Get<int>("VersionNumber");
|
||||
}
|
||||
|
||||
<section class="event-content">
|
||||
<span class="version">@T("version {0}", contentItemVersionNumber)</span>@T(" - ")
|
||||
<a href="@Url.Action("Detail", "Content", new { area = "Orchard.AuditTrail", id = contentItemId, version = contentItemVersionNumber })" class="event-contentitem">@title</a>
|
||||
<section class="audittrail-content-summary">
|
||||
@T("Version {0}", contentItemVersionNumber)
|
||||
@T(" - ")
|
||||
<a href="@Url.Action("Detail", "Content", new { area = "Orchard.AuditTrail", id = contentItemId, version = contentItemVersionNumber })">@T("View")</a>
|
||||
</section>
|
@@ -3,45 +3,50 @@
|
||||
@using Orchard.ContentManagement
|
||||
@{
|
||||
var record = (AuditTrailEventRecord)Model.Record;
|
||||
var contentItem = (ContentItem) Model.ContentItem;
|
||||
var previousVersion = (ContentItem) Model.PreviousVersion;
|
||||
var diffNodes = (IEnumerable<DiffNode>) Model.DiffNodes;
|
||||
var contentItem = (ContentItem)Model.ContentItem;
|
||||
var previousVersion = (ContentItem)Model.PreviousVersion;
|
||||
var diffNodes = (IEnumerable<DiffNode>)Model.DiffNodes;
|
||||
}
|
||||
|
||||
<fieldset>
|
||||
<strong>@Html.ItemDisplayText(contentItem)</strong>@T(" - ")@contentItem.ContentType
|
||||
<span class="hint">@T("Version {0}", contentItem.Version)</span>
|
||||
<section class="audittrail-event-metadata-section">
|
||||
@T("ID:") <strong>@contentItem.Id</strong><br />
|
||||
@contentItem.ContentType: <strong>@Html.ItemDisplayText(contentItem)</strong><br />
|
||||
@T("Version:") <strong>@contentItem.Version</strong>
|
||||
@if (!String.IsNullOrWhiteSpace(record.Comment)) {
|
||||
<text>"@record.Comment"</text>
|
||||
<br />
|
||||
@T("Comment:")<br />
|
||||
@record.Comment
|
||||
}
|
||||
</fieldset>
|
||||
@if (previousVersion != null) {
|
||||
<table class="items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@T("Diff Type")</th>
|
||||
<th>@T("Context")</th>
|
||||
<th>@T("Before")</th>
|
||||
<th>@T("After")</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (!diffNodes.Any()) {
|
||||
</section>
|
||||
|
||||
<section class="audittrail-event-changes-section">
|
||||
@if (previousVersion != null) {
|
||||
<table class="items">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="4">@T("")</td>
|
||||
<th>@T("Action")</th>
|
||||
<th>@T("Context")</th>
|
||||
<th>@T("Before")</th>
|
||||
<th>@T("After")</th>
|
||||
</tr>
|
||||
}
|
||||
else {
|
||||
foreach (var node in diffNodes) {
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (!diffNodes.Any()) {
|
||||
<tr>
|
||||
<td>@T(node.Type.ToString())</td>
|
||||
<td>@node.Context</td>
|
||||
<td>@node.Previous</td>
|
||||
<td>@node.Current</td>
|
||||
<td colspan="4">@T("")</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
}
|
||||
else {
|
||||
foreach (var node in diffNodes) {
|
||||
<tr>
|
||||
<td>@T(node.Type.ToString())</td>
|
||||
<td>@node.Context</td>
|
||||
<td>@node.Previous</td>
|
||||
<td>@node.Current</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Created the <strong>{0}</strong> content part.", contentPartName)
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Created the <strong>{0}</strong> content part.", contentPartName)
|
||||
</section>
|
@@ -7,6 +7,6 @@
|
||||
var contentDisplayName = eventData.Get<string>("ContentDisplayName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Added the <strong>{0}</strong> content field of type <strong>{1}</strong> to the <strong>{2}</strong> content part.", contentFieldName, contentFieldTypeName, contentPartName)
|
||||
</section>
|
@@ -7,6 +7,6 @@
|
||||
var contentDisplayName = eventData.Get<string>("ContentDisplayName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Added the <strong>{0}</strong> content field of type <strong>{1}</strong> to the <strong>{2}</strong> content part.", contentFieldName, contentFieldTypeName, contentPartName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentFieldName = eventData.Get<string>("ContentFieldName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Removed the <strong>{0}</strong> content field from the <strong>{1}</strong> content part.", contentFieldName, contentPartName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentFieldName = eventData.Get<string>("ContentFieldName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Removed the <strong>{0}</strong> content field from the <strong>{1}</strong> content part.", contentFieldName, contentPartName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentFieldName = eventData.Get<string>("ContentFieldName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Settings for the <strong>{0}</strong> content field of the <strong>{1}</strong> content part were updated.", contentFieldName, contentPartName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentFieldName = eventData.Get<string>("ContentFieldName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Settings for the <strong>{0}</strong> content field of the <strong>{1}</strong> content part were updated.", contentFieldName, contentPartName)
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Settings for the <strong>{0}</strong> content part were updated.", contentPartName)
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Settings for the <strong>{0}</strong> content part were updated.", contentPartName)
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Removed the <strong>{0}</strong> content part.", contentPartName)
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-part">
|
||||
<section class="audittrail-contentpart-summary">
|
||||
@T("Removed the <strong>{0}</strong> content part.", contentPartName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentTypeDisplayName = eventData.Get<string>("ContentTypeDisplayName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Created the <strong>{0}</strong> content type.", contentTypeName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentTypeDisplayName = eventData.Get<string>("ContentTypeDisplayName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Created the <strong>{0}</strong> content type.", contentTypeName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Added the <strong>{0}</strong> content part to the <strong>{1}</strong> content type.", contentPartName, contentTypeName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Added the <strong>{0}</strong> content part to the <strong>{1}</strong> content type.", contentPartName, contentTypeName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Removed the <strong>{0}</strong> content part from the <strong>{1}</strong> content type.", contentPartName, contentTypeName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Removed the <strong>{0}</strong> content part from the <strong>{1}</strong> content type.", contentPartName, contentTypeName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Settings for the <strong>{0}</strong> content part attached to the <strong>{1}</strong> content type were updated.", contentPartName, contentTypeName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentPartName = eventData.Get<string>("ContentPartName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Settings for the <strong>{0}</strong> content part attached to the <strong>{1}</strong> content type were updated.", contentPartName, contentTypeName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentTypeDisplayName = eventData.Get<string>("ContentTypeDisplayName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Removed the <strong>{0}</strong> content type.", contentTypeName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var contentTypeDisplayName = eventData.Get<string>("ContentTypeDisplayName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Removed the <strong>{0}</strong> content type.", contentTypeName)
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var contentTypeName = eventData.Get<string>("ContentTypeName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Settings for the <strong>{0}</strong> content type were updated.", contentTypeName)
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var contentTypeName = eventData.Get<string>("ContentTypeName");
|
||||
}
|
||||
|
||||
<section class="event-content-type">
|
||||
<section class="audittrail-contenttype-summary">
|
||||
@T("Settings for the <strong>{0}</strong> content type were updated.", contentTypeName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var permissionName = eventData.Get<string>("PermissionName");
|
||||
}
|
||||
|
||||
<section class="event-role">
|
||||
<section class="audittrail-role-summary">
|
||||
@T("Added the <strong>{0}</strong> permission to the <strong>{1}</strong> role.", permissionName, roleName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var permissionName = eventData.Get<string>("PermissionName");
|
||||
}
|
||||
|
||||
<section class="event-role">
|
||||
<section class="audittrail-role-summary">
|
||||
@T("Added the <strong>{0}</strong> permission to the <strong>{1}</strong> role.", permissionName, roleName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var permissionName = eventData.Get<string>("PermissionName");
|
||||
}
|
||||
|
||||
<section class="event-role">
|
||||
<section class="audittrail-role-summary">
|
||||
@T("Removed the <strong>{0}</strong> permission from the <strong>{1}</strong> role.", permissionName, roleName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var permissionName = eventData.Get<string>("PermissionName");
|
||||
}
|
||||
|
||||
<section class="event-role">
|
||||
<section class="audittrail-role-summary">
|
||||
@T("Removed the <strong>{0}</strong> permission from the <strong>{1}</strong> role.", permissionName, roleName)
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var roleName = eventData.Get<string>("RoleName");
|
||||
}
|
||||
|
||||
<section class="event-role">
|
||||
<section class="audittrail-role-summary">
|
||||
@T("Created <strong>{0}</strong> role.", roleName)
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var roleName = eventData.Get<string>("RoleName");
|
||||
}
|
||||
|
||||
<section class="event-role">
|
||||
<section class="audittrail-role-summary">
|
||||
@T("Created <strong>{0}</strong> role.", roleName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var newRoleName = eventData.Get<string>("NewRoleName");
|
||||
}
|
||||
|
||||
<section class="event-role">
|
||||
<section class="audittrail-role-summary">
|
||||
@T("Renamed <strong>{0}</strong> to <strong>{1}</strong>.", previousRoleName, newRoleName)
|
||||
</section>
|
@@ -5,6 +5,6 @@
|
||||
var newRoleName = eventData.Get<string>("NewRoleName");
|
||||
}
|
||||
|
||||
<section class="event-role">
|
||||
<section class="audittrail-role-summary">
|
||||
@T("Renamed <strong>{0}</strong> to <strong>{1}</strong>.", previousRoleName, newRoleName)
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var userName = eventData.Get<string>("UserName");
|
||||
}
|
||||
|
||||
<section class="event-user">
|
||||
<section class="audittrail-user-summary">
|
||||
<span>@T("Attempted user name: {0}", userName)</span>
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var userName = eventData.Get<string>("UserName");
|
||||
}
|
||||
|
||||
<section class="event-user">
|
||||
<section class="audittrail-user-summary">
|
||||
<span>@T("User: {0}", userName)</span>
|
||||
</section>
|
@@ -4,6 +4,6 @@
|
||||
var userName = eventData.Get<string>("UserName");
|
||||
}
|
||||
|
||||
<section class="event-user">
|
||||
<section class="audittrail-user-summary">
|
||||
<span>@T("User: {0}", userName)</span>
|
||||
</section>
|
@@ -1,61 +1,59 @@
|
||||
@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-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="expando-wrapper audit-trail">
|
||||
<fieldset class="audittrail-list-wrapper expando-wrapper">
|
||||
<legend>@T("Audit Trail")</legend>
|
||||
<div class="expando">
|
||||
<section class="audit-trail-list">
|
||||
@if (!records.Any()) {
|
||||
<p class="info">@T("There are no audit trail events to display.")</p>
|
||||
}
|
||||
else {
|
||||
<table class="items">
|
||||
<thead>
|
||||
<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>
|
||||
<th>@T("Event")</th>
|
||||
<th>@T("Category")</th>
|
||||
<th>@T("User")</th>
|
||||
<th>@T("Timestamp")</th>
|
||||
<th>@T("Comment")</th>
|
||||
<th>@T("Event Data")</th>
|
||||
<th></th>
|
||||
<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>
|
||||
</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>
|
||||
</div>
|
||||
</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>
|
||||
}
|
||||
|
Reference in New Issue
Block a user