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

fix reference to wiki`s text

ulferts5cc9295f8d10
diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb
index 757ec38b60f..ae334b6c2d2 100644
--- a/app/views/versions/index.html.erb
+++ b/app/views/versions/index.html.erb
@@ -48,7 +48,7 @@ See COPYRIGHT and LICENSE files for more details.
<%= link_to_version(version, name: h(version.name), id: "version-#{version.name}") %>
</h3>
<%= render partial: 'versions/overview', locals: {version: version} %>
- <%= render(partial: "wiki/content", locals: {content: version.wiki_page.content}) if version.wiki_page %>
+ <%= render(partial: "wiki/text", locals: { page: version.wiki_page }) if version.wiki_page %>
<% if (issues = @wps_by_version[version]) && issues.size > 0 %>
<form>
<fieldset class="form--fieldset -collapsible">
diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erb
index 0f180b547ef..a5967551df6 100644
--- a/app/views/versions/show.html.erb
+++ b/app/views/versions/show.html.erb
@@ -77,7 +77,7 @@ See COPYRIGHT and LICENSE files for more details.
<% if @version.wiki_page %>
<div class="widget-box -thin -wider">
- <%= render(partial: "wiki/content", locals: {content: @version.wiki_page.content}) if @version.wiki_page %>
+ <%= render(partial: "wiki/text", locals: { page: @version.wiki_page }) if @version.wiki_page %>
</div>
<% end %>
diff --git a/app/views/wiki/_content.html.erb b/app/views/wiki/_text.html.erb
similarity index 94%
rename from app/views/wiki/_content.html.erb
rename to app/views/wiki/_text.html.erb
index b40b0a21841..ea1fb4b4564 100644
--- a/app/views/wiki/_content.html.erb
+++ b/app/views/wiki/_text.html.erb
@@ -31,6 +31,6 @@ See COPYRIGHT and LICENSE files for more details.
<% if @formatted_text %>
<%= @formatted_text %>
<% else %>
- <%= format_text content, :text, attachments: content.page.attachments %>
+ <%= format_text page, :text, attachments: page.attachments %>
<% end %>
</div>
diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb
index 45048056657..69599826008 100644
--- a/app/views/wiki/show.html.erb
+++ b/app/views/wiki/show.html.erb
@@ -138,7 +138,7 @@ See COPYRIGHT and LICENSE files for more details.
</div>
<% end %>
-<%= render(partial: "wiki/content", locals: {content: @page}) %>
+<%= render(partial: "wiki/text", locals: { page: @page }) %>
<% resource = ::API::V3::WikiPages::WikiPageRepresenter.new(@page, current_user: current_user, embed_links: true) %>
<%= list_attachments(resource) %>