Problem/Motivation
Currently theme functions like theme_redhen_contact_list() for presenting lists of entities contain mainly logic rather than presentation. Perhaps this approach was chosen with the aim of allowing complete freedom when overriding presentation (e.g., not limiting to a table). However, the result is that there is a lot of logic that must be repeated in any theme override. And #1778126: "Actions" links on entity browsing screens not tested for access points to additional logic that's needed.
Proposed resolution
Pull all of the logic out of the theme function and into functions that currently call the theme functions. node_admin_nodes() is a good model here. If all items are in a render array, any site wishing to completely override display can still do so through a form alter, changing the #theme property.
Minor side note: at the same time, maybe consider renaming the "Actions" header "Operations" for consistency with Drupal core.
Comments
Comment #1
levelos commentedComment #2
tauno commentedStill room for improvement, but the recent commits should help.