RE: [viewvc-users] viewvc: Display icons based on MIME type?
Andrew Chace <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the tip! We're using actually a custom template for viewvc along with Subversion binaries from Collabnet. I'll have a look at our template this afternoon and see if I can hack something together. Andrew Chace Senior Backups Administrator Mediacom Communications Tel: +1-515-246-2204 [email protected] -----Original Message----- From: C. Michael Pilato [mailto:[email protected]] Sent: Friday, June 26, 2009 11:24 AM To: Andrew Chace Cc: [email protected] Subject: Re: [viewvc-users] viewvc: Display icons based on MIME type? Andrew Chace wrote: > Our Subversion repository contains many different types of binary files. > It would be very helpful for our users if they were able to determine > the type of the file by the icon viewvc displays next to it. I found an > old feature request (507733, see this > [http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=65234 5] > page) from 2002 for the same thing. Is anyone actively working on this? I've implemented this in the past with no changes to ViewVC itself. Each file in the directory listing carries its ViewVC-determined mimetype value already (and in ViewVC 1.1+, that could be the value from the svn:mime-type property). All that lacks is directory.ezt template logic to choose an icon based on that mimetype. Something like the following, I should think: [for entries] ... [define file_icon]/path/to/file-icon.png[end] [is entries.mimetype "application/ms-word"] [define file_icon]/path/to/word-icon.png[end] [end] [is entries.mimetype "application/pdf"] [define file_icon]/path/to/pdf-icon.png[end] [end] ... <img src="[icon]"/>... -- C. Michael Pilato <[email protected]> CollabNet <> www.collab.net <> Distributed Development On Demand ------------------------------------------------------ http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2365808 To unsubscribe from this discussion, e-mail: [[email protected]].