Hi all,

Tracker seems inexcusably basic right now. I was disappointed to discover I can't theme the output (add a column, change the table headers, etc.) because the tracker_page menu callback function spits mark-up straight out without routing it through a theme function of tpl file. =(

I propose this really ought to be fixed in D7, so you can theme the Tracker page properly. In its most basic, it would simply involve creating a hook_theme and moving this code in tracker_page() (see tracker.pages.inc) to a theme function:

  $output = '<div id="tracker">';
  $output .= theme('table', $header, $rows);
  $output .= theme('pager', NULL, 25, 0);
  $output .= '</div>';

Or we could go to the next step and make a preprocess function and a tpl file for it.

Either way, I'm happy to create this patch if the wider community agrees. =)

Comments

tayzlor’s picture

Status: Active » Needs review
StatusFileSize
new2.3 KB
new480 bytes

attaching couple of patch files which need reviewing, tracker now runs through the theme API in the supplied patch.

Status: Needs review » Needs work

The last submitted patch failed testing.

tayzlor’s picture

StatusFileSize
new558 bytes

submitting patch file 1 of 2.
i know this is incomplete, just checking this patch actually passes first then will submit the next one =)

tayzlor’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

greg.harvey’s picture

Status: Needs work » Needs review
StatusFileSize
new586 bytes

Let's try that again... *sigh*

tayzlor’s picture

Status: Needs review » Needs work
StatusFileSize
new4.31 KB

and the 2nd one.... fingers crossed...

tayzlor’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

swentel’s picture

@tazylor
it's quite normal that second patch fails, it fires a query on the comments table, while it's now 'comment'. (I'm not sure, but it's possible it might also fail on the theme function since when only this patch is applied, drupal does not know of the tracker_theme hook)

Merge those two patches in one file, should give you more succes :)

tayzlor’s picture

StatusFileSize
new5.33 KB

this is fun... :)

tayzlor’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

catch’s picture

Patch still has {comments} in it - try cvs update before rolling the patch.

tayzlor’s picture

StatusFileSize
new3.58 KB

cheers for the help catch =)
re-rolled patch... aaandd again.. comme on!! :p

tayzlor’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

pasqualle’s picture

Status: Needs work » Closed (won't fix)

Tracker output was changed to render array, and the module has views support. Therefore the output can be easily changed now.