> -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Steffen Hoffmann > Sent: 03 August 2012 05:35 > To: [email protected] > Subject: Re: [Trac] Re: Updating new ticket layout > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 02.08.2012 10:17, Cooke, Mark wrote: > >> -----Original Message----- From: [email protected] > >> [mailto:[email protected]] On Behalf Of John of NOVA > >> Sent: 02 August 2012 00:25 To: [email protected] Cc: > >> [email protected] Subject: [Trac] Re: Updating new ticket > >> layout > >> > >> I am curious about this same issue. In fact, I want to remove the > >> entire Ticket Properties section. So only the Description, > >> email/username, or summary are showing. > > > > There are ways to do this (that have been discussed on the mailing > > list in the past, try one of the list archive search > facilities). If > > I remember correctly, you probably need to implement a genshi stream > > filter. If you look at the new ticket page at t.e.o it is different > > from the standard page... > > Yes, specifically try to implement the ITemplateStreamFilter [2] > ExtensionPoint interface, because this is the standard way, an XPATH > based selection and template manipulation [3] is done since Trac 0.11. > > As Mark pointed out before, this is best-practice, because > that approach > offers a better chance than direct template edits (and serving them in > you environment - effectively overwriting the "built-in" > default) to do > customizations that survive Trac upgrades. > > See DynamicFieldsPlugin for an alternative, JavaScript (jQuery) based > approach to the same topic. > > >>> On Thursday, January 20, 2011 4:39:03 PM UTC-5, (unknown) wrote: > >>> > >>> Hello everyone, > >>> > >>> I'm a newby here and on Trac. Does anyone know how to > >>> edit/design the "New Ticket" page layout? Is there a way to > >>> format how and where items are placed inside the properties > >>> section? > > > > Not easily, the html template is stored inside the trac egg > (assuming > > that is how you have trac installed) and any changes you did make to > > the template are likely to be discarded when you update trac. My > > understanding is that the visible fields are just displayed as they > > are with no special ordering. > > Not true, because recent Trac versions always move the owner field to > the bottom of the top ticket box, if shown at all, and there is a > directive-like order to apply to field definitions in ticket-custom > section of trac.ini to get your own sorting reliably like so: > > [ticket-custom] > due_date = time > due_date.format = date > due_date.label = bis > due_date.order = 5 > due_date.value =
Ooo, thanks for that Steffan, I need to check that out... ~ mark c > > However, there are plugins on http://trac-hacks.org/ that > > can do some of what you want and, if you are a coder, you > > can investigate using a genshi stream filter as mentioned > > above. > > As specific pointer would be TimingAndEstimationPlugin > [5][6], although > I find it a bit misleading because only the `filter_stream` method is > part of the defined interface, so make sure that you define your > template condition inside the `filter_stream` method itself. > > Steffen Hoffmann > > > [1] > http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.ITemplateStreamFilter > [2] http://trac.edgewall.org/wiki/TracDev/ComponentArchitecture > [3] http://genshi.edgewall.org/wiki/Documentation/filters.html#transformer > [4] http://trac-hacks.org/wiki/DynamicFieldsPlugin > [5] http://trac-hacks.org/wiki/TimingAndEstimationPlugin > [6] > http://trac-hacks.org/svn/timingandestimationplugin/branches/trac0.12/timingandestimationplugin/tande_filters.py -- You received this message because you are subscribed to the Google Groups "Trac Users" 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-users?hl=en.
