Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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