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

levelos’s picture

Assigned: Unassigned » tauno
tauno’s picture

Status: Active » Fixed

Still room for improvement, but the recent commits should help.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 26c1df0 on 7.x-1.x, tests, redhen-donation by tauno:
    Issues #1778146, #1778126: Refactoring organization listing to cleanup...
  • Commit 399a5b3 on 7.x-1.x, tests, redhen-donation by tauno:
    Issues #1778146, #1778126: Refactoring contact listings to cleanup theme...
  • Commit b9ab169 on 7.x-1.x, tests, redhen-donation by tauno:
    Issues #1778146, #1778126: Refactoring notes listing to cleanup theme...

  • Commit 26c1df0 on 7.x-1.x, tests, redhen-donation, relation-roles by tauno:
    Issues #1778146, #1778126: Refactoring organization listing to cleanup...
  • Commit 399a5b3 on 7.x-1.x, tests, redhen-donation, relation-roles by tauno:
    Issues #1778146, #1778126: Refactoring contact listings to cleanup theme...
  • Commit b9ab169 on 7.x-1.x, tests, redhen-donation, relation-roles by tauno:
    Issues #1778146, #1778126: Refactoring notes listing to cleanup theme...