luyadev / luya-module-admin

Administration base module for all LUYA admin modules
https://luya.io
MIT License
48 stars 56 forks source link

More control for CRUD list interface elements #492

Open Antikon opened 4 years ago

Antikon commented 4 years ago

Currently, in fact, we can control the appearance of CRUD list table in a one way: we can call actionIndex in controller with $inline = true. And this will hide header. That's all.

CRUD-interface

I suggest adding to actionIndex $interface parameter that will contain an array responsible for on/off switching of various elements of the CRUD list table.

nadar commented 4 years ago

sure, why not.

  1. sure we could make an option to overridethe title
  2. settings can be configured alreadyhttps://luya.io/api/luya-admin-ngrest-base-Controller#$globalButtons-detail
  3. we could introduce a variable to turn this off
  4. we could introduce a variable to turn this off.
  5. only available if filters are defined.
  6. we could introduce a variable to turn this off.
Antikon commented 4 years ago

Overriding the current title will be good. But I still insist on the ability to show or hide individual elements of the interface, regardless of how they are configured in the model.

For example, we can define filters in a model in ngRestFilters(). However, the issue of displaying or hiding filters on a page is a matter of View. We can use the same model in different controllers on different pages. And in one case, we will need to display filters, but in the other not.