Defect #5958
closedEmpty visible sidebar in Overview section
0%
Description
If you disable the "time tracking" module in the project settings (based on the fact that you have a default installation with no other plugins), the sidebar will be shown (even if it should not), because it contains a single space.
Fix idea: One way would be to change the has_content? query in base.rhtml to something else or to patch this method to trim the string first.
Files
Related issues
Updated by Henrik Ammer over 14 years ago
- File sidebar_empty.diff sidebar_empty.diff added
I've been thinking about this aswell. Since the CSS selector :empty
needs the element to have no white-space I did a small patch.
Updated by Daniel Felix almost 12 years ago
- File emptySidebar.png emptySidebar.png added
- Status changed from New to Confirmed
I can confirm this misbehaviour. But the applied patch won't fix this.
There still need to be some css enhancement to remove the sidebar display.
But in my opinion it would be better that the whole sidebar div won't be rendered at all if there is nothing to display. What do you think?
Updated by Jean-Baptiste Barth over 11 years ago
- Category set to UI
- Assignee set to Jean-Baptiste Barth
- Target version set to Candidate for next major release
- Affected version (unused) set to devel
I don't think introducing a CSS hack would be a good idea for this. I would prefer that ApplicationHelper#has_content?
behaves the right way. It turns out simply delegating to Rails' #content_for?
seems to work well, but I'd like to understand why Redmine had hack around it in the first place. I'll dig into that and let you know.
Updated by Jean-Baptiste Barth over 11 years ago
- File 5958-patch.diff 5958-patch.diff added
After some research, there's a very good reason redmine has hacked around it: it wasn't present in Rails 1.x and 2.x, it was introduced in 3.0.0.
This part of the code is 5 years old, and not really tested, but I guess the framework does the right thing here, so we should rely on it. Jean-Philippe: can you tell me what you think about the attached patch ? Anything I missed ? Does it need some more tests in your opinion ?
Updated by Mischa The Evil about 11 years ago
- Status changed from Confirmed to Closed
- Target version deleted (
Candidate for next major release)
Updated by Mischa The Evil about 11 years ago
- Related to Defect #15414: Empty sidebar should not be displayed in project overview added