diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 50e94f057851..fc3bc92de1d6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -426,7 +426,7 @@ def locale_first_week_of_year # To avoid the menu flickering, disable it # by default unless we're in test mode def initial_menu_styles(side_displayed) - Rails.env.test? || !side_displayed ? "" : "display:none" + Rails.env.test? || request.headers["Accept"].include?("text/vnd.turbo-stream.html") || !side_displayed ? "" : "display:none" end def initial_menu_classes(side_displayed, show_decoration) diff --git a/app/views/custom_fields/edit.html.erb b/app/views/custom_fields/edit.html.erb index cce977d02363..00d0fecdd4fc 100644 --- a/app/views/custom_fields/edit.html.erb +++ b/app/views/custom_fields/edit.html.erb @@ -45,6 +45,6 @@ See COPYRIGHT and LICENSE files for more details. url: custom_field_path(@custom_field), html: { method: :put, id: 'custom_field_form' } do |f| %> <%= render partial: 'form', locals: { f: f } %> - <%= styled_button_tag t(:button_save), class: '-primary -with-icon icon-checkmark' %> + <%= styled_button_tag t(:button_save), class: '-primary -with-icon icon-checkmark', data: { turbo: false } %> <% end %> <% end %> diff --git a/app/views/enterprises/_form.html.erb b/app/views/enterprises/_form.html.erb index 2da2486690f3..d0fd56160c50 100644 --- a/app/views/enterprises/_form.html.erb +++ b/app/views/enterprises/_form.html.erb @@ -19,7 +19,7 @@ spellcheck: false %>
- <%= styled_button_tag t(:button_save), id: 'token-submit-button', class: '-primary -with-icon icon-checkmark' %> + <%= styled_button_tag t(:button_save), id: 'token-submit-button', class: '-primary -with-icon icon-checkmark', data: { turbo: false } %> <%= link_to t(:button_cancel), { action: :show }, class: 'button -with-icon icon-cancel' %> <% end %> <% end %> diff --git a/app/views/groups/_memberships.html.erb b/app/views/groups/_memberships.html.erb index 8426d22ee27b..939fdce0f6a8 100644 --- a/app/views/groups/_memberships.html.erb +++ b/app/views/groups/_memberships.html.erb @@ -146,7 +146,7 @@ See COPYRIGHT and LICENSE files for more details. <%= labeled_check_box_tags 'membership[role_ids][]', roles %> -
<%= styled_button_tag t(:button_add), class: '-primary -with-icon icon-checkmark' %>
+
<%= styled_button_tag t(:button_add), class: '-primary -with-icon icon-checkmark', data: { turbo: false } %>
<% end %> <% end %> diff --git a/app/views/individual_principals/_memberships.html.erb b/app/views/individual_principals/_memberships.html.erb index cc5a5665fd8f..f69e652adf47 100644 --- a/app/views/individual_principals/_memberships.html.erb +++ b/app/views/individual_principals/_memberships.html.erb @@ -164,7 +164,7 @@ See COPYRIGHT and LICENSE files for more details. <%= labeled_check_box_tags 'membership[role_ids][]', roles %> -
<%= styled_button_tag t(:button_add), class: '-primary -with-icon icon-checkmark' %>
+
<%= styled_button_tag t(:button_add), class: '-primary -with-icon icon-checkmark', data: { turbo: false } %>
<% end %> <% end %> diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index c3dbc96fbec6..8c41c66dd779 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -40,6 +40,8 @@ See COPYRIGHT and LICENSE files for more details. <%# Disable prefetching for now %> + + <%= content_tag :body, class: "#{body_css_classes} __overflowing_element_container __overflowing_body", @@ -57,15 +59,16 @@ See COPYRIGHT and LICENSE files for more details.

- - - + + + <% main_menu = render_main_menu(local_assigns.fetch(:menu_name, nil), @project) %> <% side_displayed = content_for?(:sidebar) || content_for?(:main_menu) || !main_menu.blank? %> <% initial_classes = initial_menu_classes(side_displayed, show_decoration) %>
<% if show_decoration %> -
+

<%= t(:label_top_menu) %> @@ -94,10 +97,9 @@ See COPYRIGHT and LICENSE files for more details. id="main-menu" class="main-menu" data-controller="menus--main" - data-application-target="dynamic" - > + data-application-target="dynamic">

<%= t(:label_main_menu) %>

- +