Very useful for dev, which was annoying me a lot as I can't seem to move round casetracker easily when I install. May be of use to smaller overall installations for user viewing too. Halfway through writing it I discovered Project has one of these built-in. There you go.
Notes:
Quite a big patch for what it does. First, it extends hook_block with the new block, of course. But then I split all the functionality out in various ways, as it's proving too useful,
casetracker_page_info() looks at the page URL and tells you if it's a casetracker node, and what sort. Must have used this four or five times alredy, and is likely to be a permanent fix in my theming.
casetracker_select_projects() is a node selector. Quite small, but these functions grow big in other modules (despite the leverage of Views), so that's split out too.
And I themed it, just to be friendly.
Comment | File | Size | Author |
---|---|---|---|
add_projectselect_block.patch | 4.35 KB | rcrowther |
Comments
Comment #1
rcrowther CreditAttribution: rcrowther commentedJust to add, the point of using casetracker_page_info(), not strictly part of the patch, is that with it the select box can default to the current module, if the page is a casetracker project page. Keeps the users visuals nice and positive.
Rob