Defect #5958
closed
Empty visible sidebar in Overview section
Added by Marc Kaiser over 14 years ago.
Updated about 11 years ago.
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
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.
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?
- 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.
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 ?
- Status changed from Confirmed to Closed
- Target version deleted (
Candidate for next major release)
This issue is superseded by #15414, which itself is fixed - like suggested by Jean-Baptiste - in r12310.
- Related to Defect #15414: Empty sidebar should not be displayed in project overview added
Also available in: Atom
PDF