Bug #531
Clicking on filename in repository should show file contents first
Status: | In Progress | Start date: | 2012-10-26 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Chris Cannam | % Done: | 0% | |
Category: | - | |||
Target version: | - |
Description
In the repo view, clicking on a filename takes you to a page with the history for the file in it. That page has tabs at the top to choose between history, file contents, etc.
It would be far more useful if clicking on the filename took you directly to the file contents page, with History as simply one of the other options along the top.
History
#1 Updated by Chris Cannam about 12 years ago
Ah, but -- only if the file is of a type that can actually be displayed in the repo browser! If we can't show the contents, we need to show the history or something else useful instead rather than just downloading the file.
#2 Updated by Chris Cannam about 12 years ago
Bah! Humbug. The way the repo browser determines whether it can display a file or not is to read the entire file and check whether its contents appear to be binary. If so, repositories_controller returns raw data from "entry" instead of rendering a view. We obviously can't do that when listing the directory contents merely to determine which link to show for a file.
Probably we'd need to take the alternative tack: change the "entry" controller so it always shows something in a page, make the filename always link to "entry" instead of "changes", and require people to click on Download to download it. But how to do this?
#3 Updated by Chris Cannam about 12 years ago
Working on this now -- from 997f6d7738f7 the entry action is the default and just shows "Binary data" if it can't display the file.
#4 Updated by Chris Cannam about 12 years ago
- Status changed from New to In Progress