Empty visible sidebar in Overview section
|Assignee:||Jean-Baptiste Barth||% Done:|
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.
#2 Updated by Daniel Felix over 5 years ago
- File 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?
#3 Updated by Jean-Baptiste Barth about 5 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.
#4 Updated by Jean-Baptiste Barth about 5 years ago
- File 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 ?