Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[31085] Add missing gon settings to my page

Oliver Günther54eb6387a8ab
diff --git a/modules/my_page/app/controllers/my_page/angular_controller.rb b/modules/my_page/app/controllers/my_page/angular_controller.rb
index 010cdf4606c..18f72b0b255 100644
--- a/modules/my_page/app/controllers/my_page/angular_controller.rb
+++ b/modules/my_page/app/controllers/my_page/angular_controller.rb
@@ -30,8 +30,10 @@
class MyPage::AngularController < ::ApplicationController
before_action :require_login
+ include OpenProject::ClientPreferenceExtractor
def no_menu
+ gon.settings = client_preferences
render layout: 'no_menu'
end
end
diff --git a/modules/my_page/app/views/my_page/angular/no_menu.html.erb b/modules/my_page/app/views/my_page/angular/no_menu.html.erb
index c6917e5a818..09357e3fa2a 100644
--- a/modules/my_page/app/views/my_page/angular/no_menu.html.erb
+++ b/modules/my_page/app/views/my_page/angular/no_menu.html.erb
@@ -27,4 +27,10 @@ See docs/COPYRIGHT.rdoc for more details.
++#%>
+<%= content_for :header_tags do %>
+ <%= nonced_javascript_tag do %>
+ <%= include_gon(need_tag: false) -%>
+ <% end %>
+<% end -%>
+
<openproject-base></openproject-base>