dillingham / nova-button

Add buttons on Nova index, detail and lens views.
MIT License
265 stars 33 forks source link

Display the Button on Create and Update forms #59

Open phpMuhammed opened 4 years ago

CaddyDz commented 4 years ago

You would think changing public property $showOnCreation on Button.php Line 22 to true would solve the issue but it doesn't

public $showOnCreation = true;

Doesn't do anything, still only shows on Detail screen

bernhardh commented 4 years ago

Yeah, its a pitty, that this doesn't work.

@dillingham Any plans to make it work?

CaddyDz commented 4 years ago

You can use/check my fork, I didn't have time to turn it to a proper PR candidate // @bernhardh

bernhardh commented 4 years ago

@CaddyDz Thanks for feedback. Maybe a stupid question, but how can I use your package? Its not on packagist, right?

I have added

    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/CaddyDz/nova-button.git"
        }
    ]

To my composer.json, but I still get the dillingham version?

CaddyDz commented 4 years ago

@bernhardh almost correct, replace "type": "git" by "type": "vcs" and make sure to place master as the version

bernhardh commented 4 years ago

Thats not working. I think the reason is, that the dillingham master branch is "newer" then yours. He updated it 9 days ago. But thanks for your help, I have done another solution with the CustomEditHeader.vue

dillingham commented 4 years ago

@bernhardh sorry I've been slammed.. I'll try to get this added soon

bernhardh commented 3 years ago

@dillingham: no problem.

I have now created a pull request with that feature plus moved code logic to mixin

bernhardh commented 3 years ago

@dillingham: Would be really nice if you could merge this?

kevinnivek commented 3 years ago

@CaddyDz I just integrated your fork to replace this package and I am still not seeing the button on create/update forms

Button::make('BUTTON')->link('https://nova.laravel.com'),

Am I missing something?