From 3fadfaf6327fdfcf5ca93e738995075f098dbc58 Mon Sep 17 00:00:00 2001 From: Warren Date: Thu, 2 Aug 2018 09:55:48 +0100 Subject: [PATCH] Kaboom - now the View Audit Trial Context menu item & its dialog is gone. As you can see this on the content node under info --- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 1 - .../Umbraco/dialogs/viewAuditTrail.aspx | 73 ------------------ .../Application/UmbracoApplicationActions.js | 8 +- .../Trees/ContentTreeController.cs | 1 - .../Trees/LegacyTreeDataConverter.cs | 5 -- src/Umbraco.Web/Umbraco.Web.csproj | 11 --- .../_Legacy/Actions/ActionAudit.cs | 75 ------------------- .../umbraco/dialogs/viewAuditTrail.aspx | 72 ------------------ .../umbraco/dialogs/viewAuditTrail.aspx.cs | 74 ------------------ .../dialogs/viewAuditTrail.aspx.designer.cs | 24 ------ 10 files changed, 1 insertion(+), 343 deletions(-) delete mode 100644 src/Umbraco.Web.UI/Umbraco/dialogs/viewAuditTrail.aspx delete mode 100644 src/Umbraco.Web/_Legacy/Actions/ActionAudit.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.designer.cs diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 8b43700810..1a872fd564 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -390,7 +390,6 @@ - Designer diff --git a/src/Umbraco.Web.UI/Umbraco/dialogs/viewAuditTrail.aspx b/src/Umbraco.Web.UI/Umbraco/dialogs/viewAuditTrail.aspx deleted file mode 100644 index 7af2b34b51..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/dialogs/viewAuditTrail.aspx +++ /dev/null @@ -1,73 +0,0 @@ -<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master"Codebehind="viewAuditTrail.aspx.cs" AutoEventWireup="True" - Inherits="umbraco.presentation.umbraco.dialogs.viewAuditTrail" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %> - - - - - - - - - -
- - - - - - <%=Services.TextService.Localize("action")%>   - - - - <%# FormatAction(DataBinder.Eval(Container.DataItem, "LogType", "{0}")) %> - - - - - - <%=Services.TextService.Localize("user")%> - - - - <%--TODO: N+1 !!!!!!!!!!!!--%> - <%# Services.UserService.GetUserById(int.Parse(DataBinder.Eval(Container.DataItem, "UserId", "{0}"))).Name%> - - - - - - <%=Services.TextService.Localize("date")%> - - - - <%# DataBinder.Eval(Container.DataItem, "Timestamp", "{0:D} {0:T}") %> - - - - - - <%=Services.TextService.Localize("comment")%> - - - - <%# DataBinder.Eval(Container.DataItem, "Comment", "{0}") %> - - - - -
-
- -
- - - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoApplicationActions.js b/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoApplicationActions.js index 2ee35ee696..6280b19554 100644 --- a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoApplicationActions.js +++ b/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoApplicationActions.js @@ -301,13 +301,7 @@ Umbraco.Application.Actions = function() { UmbClientMgr.openModalWindow("dialogs/importDocumentType.aspx?rnd=" + this._utils.generateRandom(), uiKeys['actions_importDocumentType'], true, 460, 400); } }, - - actionAudit: function() { - /// - - UmbClientMgr.openModalWindow('dialogs/viewAuditTrail.aspx?nodeId=' + UmbClientMgr.mainTree().getActionNode().nodeId + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_auditTrail'], true, 550, 500); - }, - + actionPackage: function() { /// }, diff --git a/src/Umbraco.Web/Trees/ContentTreeController.cs b/src/Umbraco.Web/Trees/ContentTreeController.cs index da5ba8fd74..64787b8954 100644 --- a/src/Umbraco.Web/Trees/ContentTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTreeController.cs @@ -231,7 +231,6 @@ namespace Umbraco.Web.Trees AddActionNode(item, menu, true, true); AddActionNode(item, menu, convert: true); - AddActionNode(item, menu, convert: true); AddActionNode(item, menu, convert: true); AddActionNode(item, menu, convert: true); AddActionNode(item, menu, convert: true); diff --git a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs index f483b69b5d..b8b59013e1 100644 --- a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs +++ b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs @@ -273,11 +273,6 @@ namespace Umbraco.Web.Trees new LegacyUrlAction( "dialogs/importDocumentType.aspx", Current.Services.TextService.Localize("actions/importDocumentType"))); - case "UmbClientMgr.appActions().actionAudit()": - return Attempt.Succeed( - new LegacyUrlAction( - "dialogs/viewAuditTrail.aspx?nodeId=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, - Current.Services.TextService.Localize("actions/auditTrail"))); } return Attempt.Fail(); diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 4597651d2b..671282c52c 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -461,7 +461,6 @@ - @@ -1318,13 +1317,6 @@ sendToTranslation.aspx - - viewAuditTrail.aspx - ASPXCodeBehind - - - viewAuditTrail.aspx - DictionaryItemList.aspx ASPXCodeBehind @@ -1493,9 +1485,6 @@ ASPXCodeBehind
- - ASPXCodeBehind - diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionAudit.cs b/src/Umbraco.Web/_Legacy/Actions/ActionAudit.cs deleted file mode 100644 index 17d25308c5..0000000000 --- a/src/Umbraco.Web/_Legacy/Actions/ActionAudit.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Web.UI.Pages; - -namespace Umbraco.Web._Legacy.Actions -{ - /// - /// This action is invoked upon viewing audittrailing on a document - /// - [ActionMetadata(Constants.Conventions.PermissionCategories.AdministrationCategory)] - public class ActionAudit : IAction - { - public static ActionAudit Instance { get; } = new ActionAudit(); - - #region IAction Members - - public char Letter - { - get - { - return 'Z'; - } - } - - public string JsFunctionName - { - get - { - return string.Format("{0}.actionAudit()", ClientTools.Scripts.GetAppActions); - } - } - - public string JsSource - { - get - { - return null; - } - } - - public string Alias - { - get - { - return "auditTrail"; - } - } - - public string Icon - { - get - { - return "time"; - } - } - - public bool ShowInNotifier - { - get - { - return false; - } - } - public bool CanBePermissionAssigned - { - get - { - return true; - } - } - - #endregion - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx deleted file mode 100644 index 740b069006..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx +++ /dev/null @@ -1,72 +0,0 @@ -<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master"Codebehind="viewAuditTrail.aspx.cs" AutoEventWireup="True" - Inherits="umbraco.presentation.umbraco.dialogs.viewAuditTrail" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" %> - - - - - - - - -
- - - - - - <%=Services.TextService.Localize("action")%>   - - - - <%# FormatAction(DataBinder.Eval(Container.DataItem, "LogType", "{0}")) %> - - - - - - <%=Services.TextService.Localize("user")%> - - - - <%--TODO: N+1 !!!! and no null checks--%> - <%# Services.UserService.GetUserById(int.Parse(DataBinder.Eval(Container.DataItem, "UserId", "{0}"))).Name%> - - - - - - <%=Services.TextService.Localize("date")%> - - - - <%# DataBinder.Eval(Container.DataItem, "Timestamp", "{0:D} {0:T}") %> - - - - - - <%=Services.TextService.Localize("comment")%> - - - - <%# DataBinder.Eval(Container.DataItem, "Comment", "{0}") %> - - - - -
-
- -
- - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.cs deleted file mode 100644 index f80fa5d064..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; -using Umbraco.Core; -using Umbraco.Core.Services; -using Umbraco.Web; -using Umbraco.Web.Composing; -using Umbraco.Web._Legacy.Actions; -using Action = Umbraco.Web._Legacy.Actions.Action; - -namespace umbraco.presentation.umbraco.dialogs -{ - /// - /// Summary description for viewAuditTrail. - /// - public partial class viewAuditTrail : Umbraco.Web.UI.Pages.UmbracoEnsuredPage - { - public viewAuditTrail() - { - CurrentApp = Constants.Applications.Content.ToString(); - - } - - protected void Page_Load(object sender, System.EventArgs e) - { - // Put user code to initialize the page here - //nodeName.Text = new cms.businesslogic.CMSNode(int.Parse(helper.Request("nodeID"))).Text; - auditLog.DataSource = Services.AuditService.GetLogs(int.Parse(Request["nodeID"])); - auditLog.DataBind(); - auditLog.BorderWidth = 0; - auditLog.BorderStyle = BorderStyle.None; - } - - public string FormatAction(string action) - { - action = action.ToLower(); - if (action == "new") - action = "create"; - var actions = Current.Actions; - foreach (var a in actions) - { - return Services.TextService.Localize(action); - } - return action; - } - - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - - } - #endregion - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.designer.cs deleted file mode 100644 index fa69f92d4e..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.designer.cs +++ /dev/null @@ -1,24 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation.umbraco.dialogs { - - - public partial class viewAuditTrail { - - /// - /// auditLog control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.DataGrid auditLog; - } -}