aesmail / kaffy

Powerfully simple admin package for phoenix applications
https://kaffy.fly.dev/admin/
MIT License
1.3k stars 153 forks source link

[FEATURE-REQUEST] Hide action buttons in show template #283

Closed JessikaCastellano closed 10 months ago

JessikaCastellano commented 10 months ago

Describe the problem you're proposing to solve

Certain scenarios require hiding actions within show templates. For instance, when the category is populated via integration or ETL, users should be able to view the categories list and details. However, modifying or deleting should not be enable

Screen Shot 2023-08-29 at 15 04 06

Describe the solution you'd like

Depending on the default_actions configure in resource hide the actions

Describe alternatives you've considered

Additional context

I fork the repo and add the condition to the show.html.eex. Here is the diff

I tested it out and this is how it looks when

  def default_actions(_schema) do
    []
  end
Screen Shot 2023-08-29 at 15 14 11
aesmail commented 10 months ago

@JessikaCastellano Thank you. This has been implemented and will be available in the upcoming release.