diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-06 23:08:15 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-06 23:08:15 +0000 |
commit | 5bbab5f8e6fbcf7b16b62975a34b3798541e177d (patch) | |
tree | 8c8c42374e490cd0ae0f445224614197daf368f3 /app/views | |
parent | 13db8424228bdda74539ec0ccdce5f8c9777f4d3 (diff) | |
download | redmine-5bbab5f8e6fbcf7b16b62975a34b3798541e177d.tar.gz redmine-5bbab5f8e6fbcf7b16b62975a34b3798541e177d.zip |
Makes the sidebar collapsible and stateful (#21808).
Patch inspired from user:jkraemer.
git-svn-id: https://svn.redmine.org/redmine/trunk@23218 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/base.html.erb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index 89ea2ef80..865ca9928 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -100,10 +100,20 @@ <% end %> </div> -<div id="main" class="<%= sidebar_content? ? '' : 'nosidebar' %>"> +<div id="main" class="<%= sidebar_content? ? 'collapsiblesidebar' : 'nosidebar' %>"> + <%= javascript_tag "$('#main.collapsiblesidebar').collapsibleSidebar();" if sidebar_content? %> <div id="sidebar"> - <%= yield :sidebar %> - <%= view_layouts_base_sidebar_hook_response %> + <% if sidebar_content? %> + <div id="sidebar-switch-panel" style="visibility: hidden;"> + <a id="sidebar-switch-button" class="" href="#"> + <%= sprite_icon("chevrons-right", size: 20) %></a> + </div> + <%= javascript_tag "$('#sidebar-switch-panel').css('visibility', 'visible');" %> + <% end %> + <div id=sidebar-wrapper %> + <%= yield :sidebar %> + <%= view_layouts_base_sidebar_hook_response %> + </div> </div> <div id="content"> |