diff --git a/Gemfile b/Gemfile index 54619538c..1c3bb5c0d 100644 --- a/Gemfile +++ b/Gemfile @@ -6,11 +6,11 @@ ruby file: ".ruby-version" gem "rails", "~> 7.1.0" gem "bootstrap", "~> 5.3.2" +gem "dartsass-sprockets" gem "jbuilder" gem "jquery-ui-rails" gem "nokogiri", "~> 1.16" gem "rails-i18n", "~> 7.0.x" -gem "dartsass-sprockets" gem "sprockets-rails", require: "sprockets/railtie" gem "terser" diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index a36367d37..446e4456d 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -574,12 +574,14 @@ body { } &-sidebar { - @include media-breakpoint-up(lg) { - position: sticky; - top: 0; - display: block !important; - overflow-y: auto; - height: 100% + &:not(.offcanvas) { + @include media-breakpoint-up(lg) { + position: sticky; + top: 0; + display: block !important; + overflow-y: auto; + height: 100% + } } &-links { diff --git a/app/assets/stylesheets/rooms.css.scss b/app/assets/stylesheets/rooms.css.scss index 31e68d1bd..95ae2e216 100644 --- a/app/assets/stylesheets/rooms.css.scss +++ b/app/assets/stylesheets/rooms.css.scss @@ -154,16 +154,7 @@ } .menu-rooms { - border-right: solid 1px #EAEAEA; - background-color: #F4F4F4; - padding-top: 15px; - padding-bottom: 15px; - margin-bottom: 0; min-width: 243px; - - li.active { - list-style-type: disc; - } } .room-actions { @@ -311,15 +302,19 @@ min-width: 226px; text-align: left; + a { + color: #555555; + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + .title { padding: 3px 0; font-size: small; background-color: #B3C3C3; - - a { - color: #555555; - font-weight: normal; - } } ul { @@ -347,11 +342,6 @@ max-width: 160px; margin-top: 5px; } - - a { - color: #555555; - font-size: small; - } } .minimal_card_layout { @@ -362,6 +352,10 @@ width: 8px; height: 8px; } + + td, th { + padding: 0; + } } .server { diff --git a/app/helpers/inventories_sidebar_helper.rb b/app/helpers/inventories_sidebar_helper.rb new file mode 100644 index 000000000..3bb76bbed --- /dev/null +++ b/app/helpers/inventories_sidebar_helper.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# rubocop:disable Rails/HelperInstanceVariable +module InventoriesSidebarHelper + def hide_inventories_sidebar? + @_hide_inventories_sidebar || false + end + + def hide_inventories_sidebar! + @_hide_inventories_sidebar = true + end +end +# rubocop:enable Rails/HelperInstanceVariable diff --git a/app/helpers/servers_helper.rb b/app/helpers/servers_helper.rb index a6655f419..ba3c6d33f 100644 --- a/app/helpers/servers_helper.rb +++ b/app/helpers/servers_helper.rb @@ -27,7 +27,7 @@ def ports_by_card_minimal(card:) card_type.rows.to_i.times do |row_index| html += "