Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save islaytitans/1143bea627386a90db0b to your computer and use it in GitHub Desktop.
Save islaytitans/1143bea627386a90db0b to your computer and use it in GitHub Desktop.
BuildPublishTypes within the PublishForm class
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