On Monday, June 18, 2012 1:31:25 AM UTC-7, Brettschneider Falk wrote: > > while programming on http://trac-hacks.org/wiki/SimpleMultiProjectPluginthis > question occurs to us: > Currently, we have an additional page Admin=>Projects=>Components for > mapping the components to certain projects. We'd rather use the already > existing edit page of Admin=>TicketSystem=>Components to add a > multi-selection box for projects there. What is the data manipulation hook > for those pages? > > There is > http://www.edgewall.org/docs/branches-0.12-stable/epydoc/trac.web.api.IRequestFilter-class.htmlbut > it doesn't work for us with Admin panels, or we made a simple stupid > mistake in using it. We know how to edit the component edit web page on > client side, but we need the something we can hook on on server side to let > the plugin do its work there. >
I think you'll want to work with ITemplateStreamFilter, to implement something like this: from genshi.builder import tag from genshi.filters import Transformer from trac.core import * from trac.web.api import ITemplateStreamFilter class AdminPanelStreamFilter(Component): implements(ITemplateStreamFilter) def filter_stream(self, req, method, filename, stream, data): if req.path_info == '/admin/general/logging': stream = stream | Transformer("//div[@class='field']//input[@id='log_file']").after( tag.input(type='button', value='Browse...')) return stream -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To view this discussion on the web visit https://groups.google.com/d/msg/trac-dev/-/DGwdEk7VKfkJ. To post to this group, send email to trac-dev@googlegroups.com. To unsubscribe from this group, send email to trac-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.