-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alex Willmer wrote:
> On Tue, Nov 9, 2010 at 10:02 PM, Steffen Hoffmann <[email protected]> wrote:
>> Speaking of Trac plugins, care should be taken to provide kind of
>> ITicketRelationProvider
>> ITicketRelationValidator
>
> The ticket-links branch defines ITicketLinkController and the
> TicketLinks class, which implements ITicketLinkController and
> ITicketManipulator. These should provide what you're seeking, ticket
> link validation is done as part of ticket validation. I've added
> ITicketLinkController.is_blocker() to query blocking behaviour for a
> link type.
Most probably, yes.
>> ITicketRelationPresenter
>
> I'm afraid I shan't be abstracting presentation logic.
Why now? Certainly you don't have to do this on your own. But providing
an option to allow for different displays would be preferred over an
ExtensionPoint-free solution, where one would have to utilize a template
stream filter to remove that and replace with his/her own version. At
least give an option like ITicketRelationPresenter(nodelist)
nodelist = [{'type': relation, 'node': tickedID}, {'type': ...}]
with expected output being a dict like
{'presentation_type': type; 'element': genshi_element}
with type being png|html|rst|... and the element just some object ready
to be inserted into the ticket structure with Markup(genshi_element).
The longer I think about it, the type might be obsolete here, if we
don't expect different types of elements, i.e. by wrapping everything in
a element from the Genshi element factory. You could even start with a
dummy implementation returning an empty <div> or literally None and
postpone the «local gantt» or other display creation.
I know, this needs to be backed by some real code to show, what I mean,
and maybe I'll really do that.
Steffen Hoffmann
(hasienda)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkza+7kACgkQ31DJeiZFuHdV5gCdEaNinvvAETsGbIggHjok4TqS
xN4AnRoqlKkPvDGUByHi9xSBfy+J1uhZ
=wtjQ
-----END PGP SIGNATURE-----
--
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.