diff --git a/Sitecore.DataExchange.Gutters/App_Config/Include/Sitecore.DataExchange.Gutters.config b/Sitecore.DataExchange.Gutters/App_Config/Include/Sitecore.DataExchange.Gutters.config index d0613c5..fbf6e3b 100644 --- a/Sitecore.DataExchange.Gutters/App_Config/Include/Sitecore.DataExchange.Gutters.config +++ b/Sitecore.DataExchange.Gutters/App_Config/Include/Sitecore.DataExchange.Gutters.config @@ -1,18 +1,16 @@  - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Sitecore.DataExchange.Gutters/Commands/CleanPipelineBatchSummaryCommand.cs b/Sitecore.DataExchange.Gutters/Commands/CleanPipelineBatchSummaryCommand.cs index 0a56f8f..fbcd352 100644 --- a/Sitecore.DataExchange.Gutters/Commands/CleanPipelineBatchSummaryCommand.cs +++ b/Sitecore.DataExchange.Gutters/Commands/CleanPipelineBatchSummaryCommand.cs @@ -1,12 +1,12 @@ -namespace Sitecore.DataExchange.Gutters.Commands -{ - using System; - using Data; - using Data.Items; - using Shell.Framework.Commands; - using Sitecore.Diagnostics; - using Web.UI.Sheer; +using System; +using Sitecore.Data; +using Sitecore.Data.Items; +using Sitecore.Diagnostics; +using Sitecore.Shell.Framework.Commands; +using Sitecore.Web.UI.Sheer; +namespace Sitecore.DataExchange.Gutters.Commands +{ [Serializable] public class CleanPipelineBatchSummaryCommand : Command { @@ -16,7 +16,7 @@ public override void Execute(CommandContext context) { Assert.ArgumentNotNull(context, nameof(context)); var item = context.Items[0]; - if (item.TemplateID != this.PipelineBatchTemplateId) + if (item.TemplateID != PipelineBatchTemplateId) { SheerResponse.Alert("The context item is not Pipeline Batch."); return; diff --git a/Sitecore.DataExchange.Gutters/Commands/DisplayPipelineStepsCommand.cs b/Sitecore.DataExchange.Gutters/Commands/DisplayPipelineStepsCommand.cs index 967cc07..5ae36e0 100644 --- a/Sitecore.DataExchange.Gutters/Commands/DisplayPipelineStepsCommand.cs +++ b/Sitecore.DataExchange.Gutters/Commands/DisplayPipelineStepsCommand.cs @@ -1,32 +1,31 @@ -namespace Sitecore.DataExchange.Gutters.Commands -{ - using System.Collections.Generic; - using System.Linq; - using Common; - using Data; - using Data.Items; - using localhost; - using Pipelines.GetLookupSourceItems; - using Shell.Framework.Commands; - using Sitecore.Diagnostics; - using Web.UI.Sheer; +using System.Collections.Generic; +using System.Linq; +using Sitecore.Data; +using Sitecore.Data.Fields; +using Sitecore.Data.Items; +using Sitecore.Diagnostics; +using Sitecore.Shell.Framework.Commands; +using Sitecore.Web.UI.Sheer; +namespace Sitecore.DataExchange.Gutters.Commands +{ public class DisplayPipelineStepsCommand : Command { protected readonly ID PipelineBatchTemplateId = new ID("{075C4FBD-F54E-4E6D-BD54-D49BDA0913D8}"); - + public override void Execute(CommandContext context) { Assert.ArgumentNotNull(context, nameof(context)); var item = context.Items[0]; - if (item.TemplateID != this.PipelineBatchTemplateId) + if (item.TemplateID != PipelineBatchTemplateId) { SheerResponse.Alert("The context item is not Pipeline Batch."); return; } + var db = item.Database; - var pipelines = this.GetPipelines(item); + var pipelines = GetPipelines(item); var enumerable = pipelines as ID[] ?? pipelines.ToArray(); if (!enumerable.Any()) @@ -37,14 +36,11 @@ public override void Execute(CommandContext context) var list = new List(); - foreach (var pipeline in enumerable) - { - list.AddRange(this.GetSteps(pipeline, db)); - } + foreach (var pipeline in enumerable) list.AddRange(GetSteps(pipeline, db)); - string str = string.Empty; + var str = string.Empty; - int k = 0; + var k = 0; foreach (var id in list) { ++k; @@ -52,12 +48,11 @@ public override void Execute(CommandContext context) } Sitecore.Context.ClientPage.ClientResponse.Alert(str); - } protected virtual IEnumerable GetPipelines(Item item) { - var multilistField = (Sitecore.Data.Fields.MultilistField)item.Fields["Pipelines"]; + var multilistField = (MultilistField) item.Fields["Pipelines"]; return multilistField == null ? Enumerable.Empty() : multilistField.TargetIDs; } @@ -71,11 +66,8 @@ protected virtual List GetSteps(ID pipelineId, Database database) list.Add(item.ID); if (!string.IsNullOrEmpty(item["Pipelines"])) { - var pipelines = this.GetPipelines(item); - foreach (var pipeline in pipelines) - { - list.AddRange(this.GetSteps(pipeline, database)); - } + var pipelines = GetPipelines(item); + foreach (var pipeline in pipelines) list.AddRange(GetSteps(pipeline, database)); } } diff --git a/Sitecore.DataExchange.Gutters/Commands/DisplayRequiredCommand.cs b/Sitecore.DataExchange.Gutters/Commands/DisplayRequiredCommand.cs index f66c8af..ec97523 100644 --- a/Sitecore.DataExchange.Gutters/Commands/DisplayRequiredCommand.cs +++ b/Sitecore.DataExchange.Gutters/Commands/DisplayRequiredCommand.cs @@ -1,13 +1,13 @@ -namespace Sitecore.DataExchange.Gutters.Commands -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Reflection; - using System.Text.RegularExpressions; - using Attributes; - using Shell.Framework.Commands; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text.RegularExpressions; +using Sitecore.DataExchange.Attributes; +using Sitecore.Shell.Framework.Commands; +namespace Sitecore.DataExchange.Gutters.Commands +{ public class DisplayRequiredCommand : Command { public override void Execute(CommandContext context) @@ -20,6 +20,7 @@ public override void Execute(CommandContext context) Sitecore.Context.ClientPage.ClientResponse.Alert("No Required!"); return; } + var requiredAttributes = type.GetCustomAttributes(true); var baseRequiredPluginsAttributes = requiredAttributes as BaseRequiredPluginsAttribute[] ?? requiredAttributes.ToArray(); if (!baseRequiredPluginsAttributes.Any()) @@ -27,28 +28,27 @@ public override void Execute(CommandContext context) Sitecore.Context.ClientPage.ClientResponse.Alert("No Required!"); return; } + var groupBy = baseRequiredPluginsAttributes.GroupBy(a => a.GetType()); - string str = string.Empty; + var str = string.Empty; foreach (var groupRequired in groupBy) { - int k = 0; - str = str + this.ProposeCategoryName(groupRequired.Key.Name) + "\n"; + var k = 0; + str = str + ProposeCategoryName(groupRequired.Key.Name) + "\n"; var pluginList = groupRequired.Select(a => a.RequiredPlugins); var pluginArray = pluginList as IEnumerable[] ?? pluginList.ToArray(); foreach (var plugins in pluginArray) + foreach (var plugin in plugins) { - foreach (var plugin in plugins) - { - ++k; - str = str + "\t" + k + ". " + plugin.Name + "\n"; - } - + ++k; + str = $"{str}\t{k}. {plugin.Name}\n"; } - str = str + "\n"; + str = $"{str}\n"; } + Sitecore.Context.ClientPage.ClientResponse.Alert(str); //var pluginList = baseRequiredPluginsAttributes.Select(a => a.RequiredPlugins); @@ -79,8 +79,8 @@ private string[] SplitCamelCase(string source) protected virtual string ProposeCategoryName(string source) { - var splitCamelCase = this.SplitCamelCase(source).ToList(); - splitCamelCase.RemoveAt(splitCamelCase.Count-1); + var splitCamelCase = SplitCamelCase(source).ToList(); + splitCamelCase.RemoveAt(splitCamelCase.Count - 1); return string.Join(" ", splitCamelCase); } } diff --git a/Sitecore.DataExchange.Gutters/Commands/EnableItemCommand.cs b/Sitecore.DataExchange.Gutters/Commands/EnableItemCommand.cs index 0d3a4b6..d027203 100644 --- a/Sitecore.DataExchange.Gutters/Commands/EnableItemCommand.cs +++ b/Sitecore.DataExchange.Gutters/Commands/EnableItemCommand.cs @@ -1,31 +1,31 @@ -namespace Sitecore.DataExchange.Gutters.Commands -{ - using System; - using Data.Items; - using Diagnostics; - using Globalization; - using Shell.Framework.Commands; - using Sitecore.Diagnostics; - using Version = Data.Version; +using System; +using Sitecore.Configuration; +using Sitecore.Data.Items; +using Sitecore.Diagnostics; +using Sitecore.Globalization; +using Sitecore.Shell.Framework.Commands; +using Version = Sitecore.Data.Version; - [Serializable] - public class EnableItemCommand: Command - { - public override void Execute(CommandContext context) +namespace Sitecore.DataExchange.Gutters.Commands +{ + [Serializable] + public class EnableItemCommand : Command { - Assert.ArgumentNotNull(context, nameof(context)); - string database = context.Parameters["database"]; - string id = context.Parameters["id"]; - string language = context.Parameters["language"]; - string version = context.Parameters["version"]; + public override void Execute(CommandContext context) + { + Assert.ArgumentNotNull(context, nameof(context)); + var database = context.Parameters["database"]; + var id = context.Parameters["id"]; + var language = context.Parameters["language"]; + var version = context.Parameters["version"]; - var db = Sitecore.Configuration.Factory.GetDatabase(database); - var item = db.GetItem(id, Language.Parse(language), Version.Parse(version)); + var db = Factory.GetDatabase(database); + var item = db.GetItem(id, Language.Parse(language), Version.Parse(version)); - using (new EditContext(item)) - { - item["Enabled"] = "1"; - } + using (new EditContext(item)) + { + item["Enabled"] = "1"; + } + } } - } } \ No newline at end of file diff --git a/Sitecore.DataExchange.Gutters/Commands/GoToReferenceCommand.cs b/Sitecore.DataExchange.Gutters/Commands/GoToReferenceCommand.cs index 374d31f..f78d9c3 100644 --- a/Sitecore.DataExchange.Gutters/Commands/GoToReferenceCommand.cs +++ b/Sitecore.DataExchange.Gutters/Commands/GoToReferenceCommand.cs @@ -1,21 +1,23 @@ -namespace Sitecore.DataExchange.Gutters.Commands -{ - using System; - using Shell.Framework.Commands; +using System; +using Sitecore.Shell.Framework; +using Sitecore.Shell.Framework.Commands; +using Sitecore.Text; +namespace Sitecore.DataExchange.Gutters.Commands +{ [Serializable] public class GoToReferenceCommand : Command { public override void Execute(CommandContext context) { var item = context.Items[0]; - string id = context.Parameters["id"]; + var id = context.Parameters["id"]; //Sitecore.Context.ClientPage.ClientResponse.Timer(string.Format("item:load(id={0})", id), 100); - Sitecore.Text.UrlString parameters = new Sitecore.Text.UrlString(); + var parameters = new UrlString(); parameters.Add("id", id); parameters.Add("fo", id); - Sitecore.Shell.Framework.Windows.RunApplication("Content Editor", parameters.ToString()); + Windows.RunApplication("Content Editor", parameters.ToString()); } } } \ No newline at end of file diff --git a/Sitecore.DataExchange.Gutters/Commands/PipelineBatchContextMenuCommand.cs b/Sitecore.DataExchange.Gutters/Commands/PipelineBatchContextMenuCommand.cs index ae933f4..734ddab 100644 --- a/Sitecore.DataExchange.Gutters/Commands/PipelineBatchContextMenuCommand.cs +++ b/Sitecore.DataExchange.Gutters/Commands/PipelineBatchContextMenuCommand.cs @@ -1,12 +1,11 @@ -namespace Sitecore.DataExchange.Gutters.Commands -{ - using System; - using Data; - using Shell.Framework.Commands; - using Sitecore.Diagnostics; - using Web.UI.HtmlControls; - using Web.UI.Sheer; +using System; +using Sitecore.Diagnostics; +using Sitecore.Shell.Framework.Commands; +using Sitecore.Web.UI.HtmlControls; +using Sitecore.Web.UI.Sheer; +namespace Sitecore.DataExchange.Gutters.Commands +{ [Serializable] public class PipelineBatchContextMenuCommand : Command { @@ -14,8 +13,9 @@ public override void Execute(CommandContext context) { Assert.ArgumentNotNull(context, nameof(context)); - Menu menu = new Menu(); + var menu = new Menu(); SheerResponse.DisableOutput(); + menu.Add("Run it", "Office/32x32/elements_selection.png", "dataExchange:runPipelineBatchCommand"); menu.Add("Clean Summary", "Office/32x32/document_empty.png", "dataExchange:cleanPipelineBatchSummary"); menu.Add("Display Pipeline Steps", "office/32x32/elements.png", "dataExchange:displayPipelineSteps"); diff --git a/Sitecore.DataExchange.Gutters/Commands/PipelineStepContextMenuCommand.cs b/Sitecore.DataExchange.Gutters/Commands/PipelineStepContextMenuCommand.cs index 60e9d46..4396f7f 100644 --- a/Sitecore.DataExchange.Gutters/Commands/PipelineStepContextMenuCommand.cs +++ b/Sitecore.DataExchange.Gutters/Commands/PipelineStepContextMenuCommand.cs @@ -1,12 +1,11 @@ -namespace Sitecore.DataExchange.Gutters.Commands -{ - using System; - using Data; - using Shell.Framework.Commands; - using Sitecore.Diagnostics; - using Web.UI.HtmlControls; - using Web.UI.Sheer; +using System; +using Sitecore.Diagnostics; +using Sitecore.Shell.Framework.Commands; +using Sitecore.Web.UI.HtmlControls; +using Sitecore.Web.UI.Sheer; +namespace Sitecore.DataExchange.Gutters.Commands +{ [Serializable] public class PipelineStepContextMenuCommand : Command { @@ -14,8 +13,9 @@ public override void Execute(CommandContext context) { Assert.ArgumentNotNull(context, nameof(context)); - Menu menu = new Menu(); + var menu = new Menu(); SheerResponse.DisableOutput(); + menu.Add("Display Required", "Applications/32x32/warning.png", "dataExchange:displayRequired"); SheerResponse.EnableOutput(); diff --git a/Sitecore.DataExchange.Gutters/Commands/ReferenceMenuCommand.cs b/Sitecore.DataExchange.Gutters/Commands/ReferenceMenuCommand.cs index b486be3..fa9acb7 100644 --- a/Sitecore.DataExchange.Gutters/Commands/ReferenceMenuCommand.cs +++ b/Sitecore.DataExchange.Gutters/Commands/ReferenceMenuCommand.cs @@ -1,33 +1,34 @@ -namespace Sitecore.DataExchange.Gutters.Commands -{ - using System; - using Shell.Framework.Commands; - using Web.UI.HtmlControls; - using Web.UI.Sheer; +using System; +using Sitecore.Data.Fields; +using Sitecore.Shell.Framework.Commands; +using Sitecore.Web.UI.HtmlControls; +using Sitecore.Web.UI.Sheer; +namespace Sitecore.DataExchange.Gutters.Commands +{ [Serializable] public class ReferenceMenuCommand : Command { public override void Execute(CommandContext context) { var item = context.Items[0]; - string fieldName = context.Parameters["fieldName"]; + var fieldName = context.Parameters["fieldName"]; - Sitecore.Data.Fields.MultilistField multilistField = - (Sitecore.Data.Fields.MultilistField) item.Fields[fieldName]; + MultilistField multilistField = item.Fields[fieldName]; var targetIDs = multilistField.TargetIDs; - - Menu menu = new Menu(); + + var menu = new Menu(); SheerResponse.DisableOutput(); - foreach (var targetID in targetIDs) + foreach (var targetId in targetIDs) { - var item1 = item.Database.GetItem(targetID); + var item1 = item.Database.GetItem(targetId); menu.Add(item1.DisplayName, "Office/32x32/radio_button_selected.png", - string.Concat(new object[] { "dataExchange:goToReference(id=", targetID, ")" })); + string.Concat(new object[] {"dataExchange:goToReference(id=", targetId, ")"})); } + SheerResponse.EnableOutput(); SheerResponse.ShowContextMenu(Sitecore.Context.ClientPage.ClientRequest.Control, "right", menu); } diff --git a/Sitecore.DataExchange.Gutters/Commands/ShowEnableCommand.cs b/Sitecore.DataExchange.Gutters/Commands/ShowEnableCommand.cs index ec94e6a..10189c8 100644 --- a/Sitecore.DataExchange.Gutters/Commands/ShowEnableCommand.cs +++ b/Sitecore.DataExchange.Gutters/Commands/ShowEnableCommand.cs @@ -1,29 +1,29 @@ -namespace Sitecore.DataExchange.Gutters.Commands -{ - using System; - using Diagnostics; - using Shell.Framework.Commands; - using Sitecore.Diagnostics; - using Web.UI.HtmlControls; - using Web.UI.Sheer; +using System; +using Sitecore.Diagnostics; +using Sitecore.Shell.Framework.Commands; +using Sitecore.Web.UI.HtmlControls; +using Sitecore.Web.UI.Sheer; - [Serializable] - public class ShowEnableCommand : Command - { - public override void Execute(CommandContext context) +namespace Sitecore.DataExchange.Gutters.Commands +{ + [Serializable] + public class ShowEnableCommand : Command { - Assert.ArgumentNotNull(context, nameof(context)); - string database = context.Parameters["database"]; - string id = context.Parameters["id"]; - string language = context.Parameters["language"]; - string version = context.Parameters["version"]; + public override void Execute(CommandContext context) + { + Assert.ArgumentNotNull(context, nameof(context)); + var database = context.Parameters["database"]; + var id = context.Parameters["id"]; + var language = context.Parameters["language"]; + var version = context.Parameters["version"]; + + var menu = new Menu(); + SheerResponse.DisableOutput(); - Menu menu = new Menu(); - SheerResponse.DisableOutput(); - menu.Add("Enable", "Office/32x32/selection.png", string.Concat(new object[] { "dataExchange:enableItem(id=", id, ",language=",language, ",version=", version, ",database=", database, ")" })); + menu.Add("Enable", "Office/32x32/selection.png", string.Concat(new object[] {"dataExchange:enableItem(id=", id, ",language=", language, ",version=", version, ",database=", database, ")"})); - SheerResponse.EnableOutput(); - SheerResponse.ShowContextMenu(Sitecore.Context.ClientPage.ClientRequest.Control, "right", menu); + SheerResponse.EnableOutput(); + SheerResponse.ShowContextMenu(Sitecore.Context.ClientPage.ClientRequest.Control, "right", menu); + } } - } } \ No newline at end of file diff --git a/Sitecore.DataExchange.Gutters/Commands/ValueMappingContextMenuCommand.cs b/Sitecore.DataExchange.Gutters/Commands/ValueMappingContextMenuCommand.cs index 718b808..6302de8 100644 --- a/Sitecore.DataExchange.Gutters/Commands/ValueMappingContextMenuCommand.cs +++ b/Sitecore.DataExchange.Gutters/Commands/ValueMappingContextMenuCommand.cs @@ -1,11 +1,11 @@ -namespace Sitecore.DataExchange.Gutters.Commands -{ - using System; - using Shell.Framework.Commands; - using Sitecore.Diagnostics; - using Web.UI.HtmlControls; - using Web.UI.Sheer; +using System; +using Sitecore.Diagnostics; +using Sitecore.Shell.Framework.Commands; +using Sitecore.Web.UI.HtmlControls; +using Sitecore.Web.UI.Sheer; +namespace Sitecore.DataExchange.Gutters.Commands +{ [Serializable] public class ValueMappingContextMenuCommand : Command { @@ -13,12 +13,13 @@ public override void Execute(CommandContext context) { Assert.ArgumentNotNull(context, nameof(context)); - Menu menu = new Menu(); + var menu = new Menu(); SheerResponse.DisableOutput(); - menu.Add("Source Accessor", "Office/32x32/radio_button_selected.png", string.Concat(new object[] { "dataExchange:referenceMenu(fieldName=", "SourceAccessor", ")" })); - menu.Add("Target Accessor", "Office/32x32/radio_button_selected.png", string.Concat(new object[] { "dataExchange:referenceMenu(fieldName=", "TargetAccessor", ")" })); - menu.Add("Source Pre Transformer", "Office/32x32/graph_from.png", string.Concat(new object[] { "dataExchange:referenceMenu(fieldName=", "SourceValuePreTransformer", ")" })); - menu.Add("Source Transformer", "Office/32x32/graph_from.png", string.Concat(new object[] { "dataExchange:referenceMenu(fieldName=", "SourceValueTransformer", ")" })); + + menu.Add("Source Accessor", "Office/32x32/radio_button_selected.png", string.Concat(new object[] {"dataExchange:referenceMenu(fieldName=", "SourceAccessor", ")"})); + menu.Add("Target Accessor", "Office/32x32/radio_button_selected.png", string.Concat(new object[] {"dataExchange:referenceMenu(fieldName=", "TargetAccessor", ")"})); + menu.Add("Source Pre Transformer", "Office/32x32/graph_from.png", string.Concat(new object[] {"dataExchange:referenceMenu(fieldName=", "SourceValuePreTransformer", ")"})); + menu.Add("Source Transformer", "Office/32x32/graph_from.png", string.Concat(new object[] {"dataExchange:referenceMenu(fieldName=", "SourceValueTransformer", ")"})); SheerResponse.EnableOutput(); SheerResponse.ShowContextMenu(Sitecore.Context.ClientPage.ClientRequest.Control, "right", menu); diff --git a/Sitecore.DataExchange.Gutters/ItemDisabledGutter.cs b/Sitecore.DataExchange.Gutters/ItemDisabledGutter.cs index f72ac32..6d77074 100644 --- a/Sitecore.DataExchange.Gutters/ItemDisabledGutter.cs +++ b/Sitecore.DataExchange.Gutters/ItemDisabledGutter.cs @@ -1,25 +1,26 @@ -namespace Sitecore.DataExchange.Gutters -{ - using Data; - using Data.Items; - using Shell.Applications.ContentEditor.Gutters; - using Sitecore.Diagnostics; +using Sitecore.Data; +using Sitecore.Data.Items; +using Sitecore.Diagnostics; +using Sitecore.Shell.Applications.ContentEditor.Gutters; +namespace Sitecore.DataExchange.Gutters +{ public class ItemDisabledGutter : GutterRenderer - { - protected readonly ID EnabledField = new ID("{506BAD49-3DA6-474C-ACB5-7BCB509BFBD7}"); - - protected override GutterIconDescriptor GetIconDescriptor(Item item) { - Assert.ArgumentNotNull(item, nameof(item)); - - if (item.Fields.Contains(this.EnabledField) && item.Fields["Enabled"].Value != "1" && item.Fields["Enabled"].Section == "Administration") - { - var gutterIconDescriptor = new GutterIconDescriptor() {Icon = "Office/32x32/selection_delete.png", Tooltip = item.DisplayName + " is disabled."}; - gutterIconDescriptor.Click = string.Concat(new object[] { "dataExchange:showEnable(id=", item.ID,",language=",item.Language,",version=",item.Version, ",database=", item.Database.Name,")" }); - return gutterIconDescriptor; - } - return null; + protected readonly ID EnabledField = new ID("{506BAD49-3DA6-474C-ACB5-7BCB509BFBD7}"); + + protected override GutterIconDescriptor GetIconDescriptor(Item item) + { + Assert.ArgumentNotNull(item, nameof(item)); + + if (item.Fields.Contains(EnabledField) && item.Fields["Enabled"].Value != "1" && item.Fields["Enabled"].Section == "Administration") + { + var gutterIconDescriptor = new GutterIconDescriptor {Icon = "Office/32x32/selection_delete.png", Tooltip = item.DisplayName + " is disabled."}; + gutterIconDescriptor.Click = string.Concat("dataExchange:showEnable(id=", item.ID, ",language=", item.Language, ",version=", item.Version, ",database=", item.Database.Name, ")"); + return gutterIconDescriptor; + } + + return null; + } } - } } \ No newline at end of file diff --git a/Sitecore.DataExchange.Gutters/PipelineBatchGutter.cs b/Sitecore.DataExchange.Gutters/PipelineBatchGutter.cs index a880c2f..c5521d5 100644 --- a/Sitecore.DataExchange.Gutters/PipelineBatchGutter.cs +++ b/Sitecore.DataExchange.Gutters/PipelineBatchGutter.cs @@ -1,26 +1,26 @@ -namespace Sitecore.DataExchange.Gutters -{ - using Data; - using Data.Items; - using Data.Managers; - using Diagnostics; - using Shell.Applications.ContentEditor.Gutters; - using Sitecore.Diagnostics; +using Sitecore.Data; +using Sitecore.Data.Items; +using Sitecore.Data.Managers; +using Sitecore.Diagnostics; +using Sitecore.Shell.Applications.ContentEditor.Gutters; +namespace Sitecore.DataExchange.Gutters +{ public class PipelineBatchGutter : GutterRenderer - { - protected readonly ID PipelineBatchTemplateId = new ID("{075C4FBD-F54E-4E6D-BD54-D49BDA0913D8}"); - - protected override GutterIconDescriptor GetIconDescriptor(Item item) { - Assert.ArgumentNotNull(item, nameof(item)); - if (item.TemplateID == this.PipelineBatchTemplateId) - { - var gutterIconDescriptor = new GutterIconDescriptor() {Icon = TemplateManager.GetTemplate(item).Icon, Tooltip = item.DisplayName}; - gutterIconDescriptor.Click = "dataExchange:pipelineBatchContextMenu()"; - return gutterIconDescriptor; - } - return null; + protected readonly ID PipelineBatchTemplateId = new ID("{075C4FBD-F54E-4E6D-BD54-D49BDA0913D8}"); + + protected override GutterIconDescriptor GetIconDescriptor(Item item) + { + Assert.ArgumentNotNull(item, nameof(item)); + if (item.TemplateID == PipelineBatchTemplateId) + { + var gutterIconDescriptor = new GutterIconDescriptor {Icon = TemplateManager.GetTemplate(item).Icon, Tooltip = item.DisplayName}; + gutterIconDescriptor.Click = "dataExchange:pipelineBatchContextMenu()"; + return gutterIconDescriptor; + } + + return null; + } } - } } \ No newline at end of file diff --git a/Sitecore.DataExchange.Gutters/PipelineStepGutter.cs b/Sitecore.DataExchange.Gutters/PipelineStepGutter.cs index aae65f2..ddec473 100644 --- a/Sitecore.DataExchange.Gutters/PipelineStepGutter.cs +++ b/Sitecore.DataExchange.Gutters/PipelineStepGutter.cs @@ -1,25 +1,26 @@ -namespace Sitecore.DataExchange.Gutters -{ - using Data; - using Data.Items; - using Data.Managers; - using Shell.Applications.ContentEditor.Gutters; - using Sitecore.Diagnostics; +using Sitecore.Data; +using Sitecore.Data.Items; +using Sitecore.Data.Managers; +using Sitecore.Diagnostics; +using Sitecore.Shell.Applications.ContentEditor.Gutters; +namespace Sitecore.DataExchange.Gutters +{ public class PipelineStepGutter : GutterRenderer { - protected readonly ID PipelineTemplateId = new ID("{2DC9C843-B841-483C-BB9B-AE0C9386404C}"); protected readonly ID PipelinesFolderId = new ID("{70ED1D4D-3796-400D-A64E-E538D933E12C}"); + protected readonly ID PipelineTemplateId = new ID("{2DC9C843-B841-483C-BB9B-AE0C9386404C}"); protected override GutterIconDescriptor GetIconDescriptor(Item item) { Assert.ArgumentNotNull(item, nameof(item)); - if (item.TemplateID != this.PipelinesFolderId && item.ParentID != ID.Null && item.Parent.TemplateID == this.PipelineTemplateId) + if (item.TemplateID != PipelinesFolderId && item.ParentID != ID.Null && item.Parent.TemplateID == PipelineTemplateId) { - var gutterIconDescriptor = new GutterIconDescriptor() { Icon = TemplateManager.GetTemplate(item).Icon, Tooltip = item.DisplayName }; + var gutterIconDescriptor = new GutterIconDescriptor {Icon = TemplateManager.GetTemplate(item).Icon, Tooltip = item.DisplayName}; gutterIconDescriptor.Click = "dataExchange:pipelineStepContextMenu()"; return gutterIconDescriptor; } + return null; } } diff --git a/Sitecore.DataExchange.Gutters/Properties/AssemblyInfo.cs b/Sitecore.DataExchange.Gutters/Properties/AssemblyInfo.cs index a2670cc..dfde942 100644 --- a/Sitecore.DataExchange.Gutters/Properties/AssemblyInfo.cs +++ b/Sitecore.DataExchange.Gutters/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -33,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/Sitecore.DataExchange.Gutters/Sitecore.DataExchange.Gutters.csproj b/Sitecore.DataExchange.Gutters/Sitecore.DataExchange.Gutters.csproj index 00f25b2..e1933c9 100644 --- a/Sitecore.DataExchange.Gutters/Sitecore.DataExchange.Gutters.csproj +++ b/Sitecore.DataExchange.Gutters/Sitecore.DataExchange.Gutters.csproj @@ -9,7 +9,7 @@ Properties Sitecore.DataExchange.Gutters Sitecore.DataExchange.Gutters - v4.6.2 + v4.7.1 512 @@ -31,17 +31,29 @@ 4 - - ..\..\DataExchange\code\Sitecore.DataExchange\bin\Debug\Sitecore.DataExchange.dll - False + + ..\packages\Sitecore.DataExchange.4.0.0\lib\net471\Sitecore.DataExchange.dll - - ..\..\..\wwwroot\dataexchange\Website\bin\Sitecore.Kernel.dll - False + + ..\packages\Sitecore.Kernel.9.3.0\lib\net471\Sitecore.Kernel.dll + + + + + + + + + + + + + + @@ -69,6 +81,7 @@ +