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

1.7 KB
Raw Blame
<%= error_messages_for :page %>

<% resource = ::API::V3::WikiPages::WikiPageRepresenter.new(@page, current_user: current_user, embed_links: true) %>

<div class="form--field -required">
  <%= f.text_field :title, label: t(:label_page_title) %>
</div>

<div class="attributes-group wiki--content--attribute ckeditor--content-scrollable form--field -visible-overflow">
  <%= f.text_area :text,
                  cols: 100,
                  rows: 25,
                  class: "wiki-edit",
                  accesskey: accesskey(:edit),
                  with_text_formatting: true,
                  resource: resource,
                  label_options: { class: "sr-only" },
                  preview_context: preview_context(@page, @project) %>
</div>

<div class="form--field -required">
  <%= f.hidden_field :parent_id %>
  <%= f.select :parent_id,
               wiki_page_options_for_select(@wiki.pages),
               { label: WikiPage.human_attribute_name(:parent_title), include_blank: false, container_class: "-wide" } %>
</div>

<div class="form--field">
  <%= f.text_field :journal_notes,
                   class: "-border-on-hover-only -hide-placeholder-on-focus",
                   label_options: { class: "sr-only", label: :"attributes.comment" },
                   autocomplete: "off",
                   container_class: "-wide",
                   placeholder: t(:text_what_did_you_change_click_to_add_comment) %>
</div>

<%= f.button t(:button_save), class: "button -primary -with-icon icon-checkmark" %>

<%= link_to t(:button_cancel),
            { controller: "/wiki", action: "show", project_id: @project, id: (@page.new_record? ? nil : @page) },
            data: { turbo_confirm: t(:text_are_you_sure) },
            class: "button -with-icon icon-cancel" %>