ollyg/Catalyst-Plugin-AutoCRUD

display_name via configuration

Opened this issue · 0 comments

see [rt.cpan.org #64455]

Paul suggests that display_name can be set via configuration. My idea is to have something like

<Plugin::AutoCRUD>
  <sites>
    <default>
      <schema>
        <source>
          display_name title
        </source>
      </schema>
    </default>
  </sites>
</Plugin::AutoCRUD>

Which would make AutoCRUD call $row->get_column('title') as the row's display_name (or if not configured, fall back to the current behaviour of checking stringification and a display_name sub.

The display_name configuration could also be a list, in which case the specified columns are joined together with spaces. This would support common use cases such as "Forename Surname".