- wiki_page_title @page - add_page_specific_style 'page_bundles/wiki' - page_history = @page&.persisted? ? wiki_page_path(@wiki, @page, action: :history) : '' .wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row.gl-border-b-0 = wiki_sidebar_toggle_button .nav-text.flex-fill %span.wiki-last-edit-by - if @page.last_version = wiki_page_version_author_header(@page.last_version) = time_ago_with_tooltip(@page.last_version.authored_date) .nav-controls.pb-md-3.pb-lg-0 - if can?(current_user, :create_wiki, @wiki.container) && @page.latest? && @valid_encoding = render Pajamas::ButtonComponent.new(href: wiki_page_path(@wiki, @page, action: :edit), button_options: { class: 'js-wiki-edit', data: { testid: 'wiki-edit-button' }}) do = _('Edit') = render 'shared/wikis/main_links' #js-export-actions{ data: { options: { history: page_history, print: { target: '.js-wiki-page-content', title: @page.human_title, stylesheet: [stylesheet_path('application')] } }.to_json } } - if @page.historical? = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false) do |c| - c.with_body do = s_("WikiHistoricalPage|This is an old version of this page.") - c.with_actions do .gl-display-flex.gl-gap-3 = render Pajamas::ButtonComponent.new(category: :primary, variant: :confirm, href: wiki_page_path(@wiki, @page)) do = s_('WikiHistoricalPage|Go to most recent version') = render Pajamas::ButtonComponent.new(href: wiki_page_path(@wiki, @page, action: :history)) do = s_('WikiHistoricalPage|Browse history') .gl-mb-3 .gl-display-flex.gl-justify-content-space-between %h2.gl-mt-0.gl-mb-5{ data: { testid: 'wiki-page-title' } }= @page.human_title .js-async-wiki-page-content.md.gl-pt-2{ data: { testid: 'wiki-page-content', tracking_context: wiki_page_tracking_context(@page).to_json, get_wiki_content_url: wiki_page_render_api_endpoint(@page) } } = render 'shared/wikis/sidebar'