Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/controllers/api_docs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@ class APIDocsController < ApplicationController

def index
render_404 unless Setting.apiv3_docs_enabled?

render locals: { skip_base_tag: true }
end
end
4 changes: 3 additions & 1 deletion app/views/layouts/_common_head.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<% relative_url_root = OpenProject::Configuration["rails_relative_url_root"] || "" %>
<meta name="app_title" content="<%= page_title(*html_title_parts) %>">
<meta name="app_base_path" content="<%= relative_url_root %>">
<base href="<%= relative_url_root %>/">
<% unless local_assigns[:skip_base_tag] %>
<base href="<%= relative_url_root %>/">
<% end %>
<% if @project %>
<meta name="current_project"
data-project-name="<%= h @project.name %>"
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ See COPYRIGHT and LICENSE files for more details.
xml:lang="<%= I18n.locale.to_s %>"
class="<%= "in_modal" unless show_decoration %>">
<head>
<%= render partial: "layouts/common_head" %>
<%= render partial: "layouts/common_head", locals: local_assigns %>
<!-- project specific tags -->
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
Expand Down
Loading