fixes #7121 - move smart proxy action buttons to helper

It's more or less cut and paste from the existing code :-)  It just makes it easier for plug-ins to modify if it's in a helper method, it also makes the template look nicer.

There's a technical reason for the two if's: they will `nil` if the user isn't authorized, so it would result in for example:
  `['Certificates', nil]` which action_buttons will compact.

It will be more complicated in one if block.