-
Notifications
You must be signed in to change notification settings - Fork 822
Description
In silverstripe/framework
, the templates/SilverStripe/Forms/GridField/GridFieldViewButton.ss
template is only used in very specific situations.
With silverstripe/frameworktest
installed you can see the temoplate is used in the GridField at /admin/arbitrary-data
.

However, this template isn't normally used for the GridFieldViewButton
. For example at /admin/test
if you remove all buttons and add GridFieldViewButton
a completely different button appearance is used - but the templates/SilverStripe/Forms/GridField/GridFieldViewButton.ss
template still gets rendered out before being replaced.

We shouldn't render out the template if we're not actually using it.
Ideally, there would also only be one template used to render out the view button even if it has multiple context-dependent representations - the context should be passed into the template and used as a condition to change what gets rendered.