unclecheese / silverstripe-gridfield-betterbuttons

Adds new form actions and buttons to the GridField detail form

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Save & Publish button should show just when stagesDiffer

banglashi opened this issue · comments

Hi @unclecheese
first of all great work you do for the SilverStripe community. Thanks.

Just a quick question regarding following line:
https://github.com/unclecheese/silverstripe-gridfield-betterbuttons/blob/master/code/buttons/BetterButton_Publish.php#L57

Is there any reason you also check for $this->gridFieldRequest->recordIsDeletedFromStage()?

The behaviour for me makes more sense when not checking against it. When is it possible to delete an DataObject from Stage without unpublishing before?

Thanks for a clarification.