Created
August 24, 2015 18:23
-
-
Save islaytitans/1143bea627386a90db0b to your computer and use it in GitHub Desktop.
BuildPublishTypes within the PublishForm class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void BuildPublishTypes() | |
{ | |
if (!Settings.Publishing.Enabled) | |
{ | |
this.PublishChildrenPane.Visible = false; | |
} | |
else | |
{ | |
bool flag = Policy.IsAllowed("Publish/Can Publish Related Items"); | |
this.IncrementalPublishPane.Visible = Policy.IsAllowed("Publish/Can Perform Incremental Publish"); | |
this.SmartPublishPane.Visible = Policy.IsAllowed("Publish/Can Perform Smart Publish"); | |
this.RepublishPane.Visible = Policy.IsAllowed("Publish/Can Perform Republish"); | |
this.ConfirmedOptions = false; | |
if (!Policy.IsAllowed("Publish/Can Perform Republish") && Policy.IsAllowed("Publish/Can Perform Smart Publish")) | |
{ | |
UserOptions.Publishing.Republish = false; | |
UserOptions.Publishing.SmartPublish = true; | |
} | |
if (!string.IsNullOrEmpty(this.ItemID)) | |
{ | |
this.IncrementalPublishPane.Style["display"] = "none"; | |
if (this.IncrementalPublish.Checked) | |
{ | |
this.IncrementalPublish.Checked = false; | |
this.SmartPublish.Checked = true; | |
UserOptions.Publishing.IncrementalPublish = false; | |
UserOptions.Publishing.SmartPublish = true; | |
} | |
} | |
else if (this.Rebuild) | |
{ | |
this.PublishingPanel.Style["display"] = "none"; | |
this.LanguagesPanel.Style["display"] = "none"; | |
this.IncrementalPublish.Checked = false; | |
this.SmartPublish.Checked = false; | |
UserOptions.Publishing.IncrementalPublish = false; | |
UserOptions.Publishing.SmartPublish = false; | |
} | |
else | |
{ | |
this.PublishChildrenPane.Visible = false; | |
UserOptions.Publishing.PublishChildren = false; | |
Assert.CanRunApplication("Publish"); | |
} | |
if (this.IsGetItemRefencesPipelineDefined() && flag) | |
return; | |
this.PublishRelatedItems.Visible = false; | |
this.PublishRelatedItems.Checked = false; | |
UserOptions.Publishing.PublishRelatedItems = false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment