mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Incremental work.
This commit is contained in:
@@ -4,14 +4,12 @@ using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using Orchard.AuditTrail.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Events;
|
||||
using Orchard.ImportExport.Services;
|
||||
|
||||
namespace Orchard.AuditTrail.ImportExport {
|
||||
public interface IExportEventHandler : IEventHandler {
|
||||
void Exporting(dynamic context);
|
||||
void Exported(dynamic context);
|
||||
}
|
||||
|
||||
[OrchardFeature("Orchard.AuditTrail.ImportExport")]
|
||||
public class AuditTrailExportEventHandler : IExportEventHandler {
|
||||
private readonly IRepository<AuditTrailEventRecord> _auditTrailEventRepository;
|
||||
|
||||
@@ -19,10 +17,10 @@ namespace Orchard.AuditTrail.ImportExport {
|
||||
_auditTrailEventRepository = auditTrailEventRepository;
|
||||
}
|
||||
|
||||
public void Exporting(dynamic context) {
|
||||
public void Exporting(ExportContext context) {
|
||||
}
|
||||
|
||||
public void Exported(dynamic context) {
|
||||
public void Exported(ExportContext context) {
|
||||
|
||||
if (!((IEnumerable<string>)context.ExportOptions.CustomSteps).Contains("AuditTrail")) {
|
||||
return;
|
||||
|
@@ -1,11 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Events;
|
||||
using Orchard.ImportExport.Services;
|
||||
|
||||
namespace Orchard.AuditTrail.ImportExport {
|
||||
public interface ICustomExportStep : IEventHandler {
|
||||
void Register(IList<string> steps);
|
||||
}
|
||||
|
||||
[OrchardFeature("Orchard.AuditTrail.ImportExport")]
|
||||
public class AuditTrailExportStep : ICustomExportStep {
|
||||
public void Register(IList<string> steps) {
|
||||
steps.Add("AuditTrail");
|
||||
|
@@ -2,10 +2,12 @@
|
||||
using Orchard.AuditTrail.Models;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Data;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Recipes.Models;
|
||||
using Orchard.Recipes.Services;
|
||||
|
||||
namespace Orchard.AuditTrail.ImportExport {
|
||||
[OrchardFeature("Orchard.AuditTrail.ImportExport")]
|
||||
public class AuditTrailImportHandler : Component, IRecipeHandler {
|
||||
private readonly IRepository<AuditTrailEventRecord> _auditTrailEventRepository;
|
||||
|
||||
|
@@ -4,15 +4,20 @@ Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.8.1
|
||||
OrchardVersion: 1.8
|
||||
Description: Logs user initiated events, such as content changes, providing a trail for auditing.
|
||||
Description: Provides a log for recording and viewing back-end changes.
|
||||
Features:
|
||||
Orchard.AuditTrail:
|
||||
Name: Audit Trail
|
||||
Description: Provides the core audit trail framework.
|
||||
Description: Provides a log for recording and viewing back-end changes.
|
||||
Category: Security
|
||||
Dependencies: Orchard.Users, Orchard.Roles, Orchard.ContentTypes
|
||||
Orchard.AuditTrail.ImportExport:
|
||||
Name: Audit Trail Import Export
|
||||
Description: Provides import/export functionality for the Audit Trail feature.
|
||||
Category: Security
|
||||
Dependencies: Orchard.AuditTrail, Orchard.ImportExport
|
||||
Orchard.AuditTrail.Trimming:
|
||||
Name: Audit Trail Trimming
|
||||
Description: A background task that trims the audit trail.
|
||||
Description: Provides a background task that regularly deletes old audit trail records.
|
||||
Category: Security
|
||||
Dependencies: Orchard.AuditTrail
|
@@ -138,6 +138,10 @@
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.ImportExport\Orchard.ImportExport.csproj">
|
||||
<Project>{fe5c5947-d2d5-42c5-992a-13d672946135}</Project>
|
||||
<Name>Orchard.ImportExport</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
|
@@ -1,8 +1,6 @@
|
||||
@model Orchard.AuditTrail.Models.AuditTrailPart
|
||||
<fieldset>
|
||||
<div>
|
||||
@Html.LabelFor(m => m.Comment, T("Audit Trail Comment"))
|
||||
@Html.TextBoxFor(m => m.Comment, new { @class = "text large" })
|
||||
<span class="hint">@T("Optionally provide a comment about this change. This comment will be stored as part of an audit trail event.")</span>
|
||||
</div>
|
||||
@Html.LabelFor(m => m.Comment, T("Comment"))
|
||||
@Html.TextAreaFor(m => m.Comment)
|
||||
<span class="hint">@T("Optionally provide a comment about this change for the audit trail.")</span>
|
||||
</fieldset>
|
@@ -224,7 +224,7 @@
|
||||
<AutoAssignPort>False</AutoAssignPort>
|
||||
<DevelopmentServerPort>30321</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/OrchardLocal</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:30321/OrchardLocal</IISUrl>
|
||||
<IISUrl>http://localhost:30322/OrchardLocal</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
|
Reference in New Issue
Block a user