On Wednesday, June 26, 2013 5:16:09 PM UTC-5, hasienda wrote:
>
> -----BEGIN PGP SIGNED MESSAGE----- 
> Hash: SHA1 
>
> On 26.06.2013 22:34, Lukasz Szybalski wrote: 
> > Hello, 
> > 
> > We recently upgrade to 0.12.3 (Debian 7). 
> > 
> > 1. Is there a way to default that "modify" tab is ALWAYS OPEN? This 
> > really slows down the processing time for people who watch incoming new 
> > tickets and assign them out to proper milestones? Can I overwrite that 
> > somewhere in code if there is not setting for it? 
>
> Just been discussed and pointed out by Ryan here: 
>
> http://trac.edgewall.org/ticket/9807#comment:18 
>
> > Also less critical : 
> > 
> > A). Is there a way to remove the preview. We either get PDF or TIFF 
> > files in one of the trac instances we setup. PDF has no preview so you 
> > need download in original format anyway, and TIFF files have multiple 
> > pages which the preview does not show. When people click on the 
> > attachment I want them to go straight into download in original format? 
> > What part of the trac would this be in so I can customize the link? 
> > ( I know there is a download arrow next to attachment name but that does 
> > not work in firefox 20+, and a lot of people don't see it). 
>
> See PdfRedirectorPlugin [1], should be possible to do/customize for 
> other extensions too. 
>

Perfect....
I've modified it and add tif

 if len(path) > 1 and path[-1].lower().endswith('.pdf'):
            if path[0] == 'attachment' and not req.args.get('action') == 
'delete':
                filepath = req.href(*(['raw-attachment'] + path[1:]))
                req.redirect(filepath)
            elif path[0] == 'browser':
                path[0] = 'export'
                rev = req.args.get('rev', 'HEAD')
                path.insert(1, rev)
                filepath = req.href('/'.join(path))
                req.redirect(filepath)
        if len(path) > 1 and path[-1].lower().endswith('.tif'):
            if path[0] == 'attachment' and not req.args.get('action') == 
'delete':
                filepath = req.href(*(['raw-attachment'] + path[1:]))
                req.redirect(filepath)
            elif path[0] == 'browser':
                path[0] = 'export'
                rev = req.args.get('rev', 'HEAD')
                path.insert(1, rev)
                filepath = req.href('/'.join(path))
                req.redirect(filepath)

Works perfectly.
 

>
> > B)  Is there a plugin that would allow displaying "show under each 
> > result: attachments". Similar how  "Show under each result: Description" 
> > gives you description..I want to show attachments so that you can click 
> > on them while you are in the query. 
>
> I see your point, but have not recognized something like that in 
> existing hacks, at least not at trac-hacks.org yet. But extending each 
> ticket match in query by querying for attachments of that ticket and 
> display matches as a list with links pointing at that attachments sounds 
> like a doable task. 
>
> Got some development foo and time? I see this way to get what you want: 
>
> Using the IRequestFilter [2] extension interface to catch calls to 
> '/query', maybe check for results (matching tickets), before kicking in 
> at all, 
> iterate over results and query each ticket for associated attachments, 
> extend the data object, that will be passed on by a list of matching 
> files, 
> implant a Genshi fragment containing generator code with 
> ITemplateStreamFilter [3] to render that list(s) as a linked list per 
> ticket row in trac/ticket/templates/query_results.html. 
>
> Once done, name it TicketQueryAttachmentListPlugin or similar. :-) 
>
>
I would like to have the option to show attachments do? See screenshot. 
Like here you see "Show under each result: Checkbox for 
Description,,,another checkbox for attachments.

Would that be possible the way you have the above layout?

Would that be something you could do? Possibly on a paid basis?

Thanks
Lucas



 

> Steffen Hoffmann 
>
>
> [1] http://trac-hacks.org/wiki/PdfRedirectorPlugin 
> [2] 
>
> http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.IRequestFilter
>  
> [3] 
>
> http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.ITemplateStreamFilter
>  
> -----BEGIN PGP SIGNATURE----- 
> Version: GnuPG v1.4.10 (GNU/Linux) 
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ 
>
> iEYEARECAAYFAlHLaCgACgkQ31DJeiZFuHebNQCgwIP5NJAjMbVvsH/4fFbMCS9m 
> MycAn3bUHUhGtmdwG3DsURTS+TU84REY 
> =ezrK 
> -----END PGP SIGNATURE----- 
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


<<attachment: Selection_328.png>>

Reply via email to