Am 04.11.2006 um 17:37 schrieb Sid Wiesner:
> I'm working on a MilestoneQuery macro that allows you to use custom
> queries to create a milestone in any wiki field. For example:
> [[MilestoneQuery(owner=sid)]]
I'd suggest calling that macro "TicketStats" or "TicketProgress" (or
similar), as it isn't really related to milestones except for sharing
the same style of presentation.
Another option would be to add it to the existing TicketQuery macro,
with a style flag called "progress" or sth.
And ideally, grouping should produce an output similar to that on the
milestone details page.
> could give me a milestone view into all tickets that have ever been
> assigned to me. This can be used also in tickets similar to the master
> tickets idea (#886), assuming you flag some tickets with keywords.
>
> Attached is a diff based on trunk.
>
> I'd like to get the HTML code out of the macro.. is there a better way
> to do this?
Sure, you could use a template (and we could even reuse that template
in the milestone view)
In trunk, you'd use something like this:
stream = Chrome(self.env).render_template('ticket_stats.html',
data, fragment=True)
return stream
> Also, I tried to write this as a normal macro, but had trouble because
> I could not load the stylesheet in a normal macro since the <head>
> block had already been written. Any ideas?
What do you mean with "normal macro"? Starting with 0.11, the style
you used is the only kind of macro supported.
Cheers,
Chris
--
Christopher Lenz
cmlenz at gmx.de
http://www.cmlenz.net/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Trac Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---