1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
- @content_class = "limit-container-width" unless fluid_layout
- wiki_page_title @page
- add_page_specific_style 'page_bundles/wiki'
- page_history = @page&.persisted? ? wiki_page_path(@wiki, @page, action: :history) : ''
- @gfm_form = true
- @noteable_type = 'Wiki'
- templates = @templates.map { |t| wiki_page_basic_info(t) }
= form_errors(@page, truncate: :title)
#js-vue-wiki-content-app{ data: {
testid: 'wiki-page-content-app',
page_heading: @page.human_title,
content_api: wiki_page_render_api_endpoint(@page),
show_edit_button: (can?(current_user, :create_wiki, @wiki.container) && @page.latest? && @valid_encoding).to_s,
page_info: wiki_page_info(@page, uploads_path: wiki_attachment_upload_url).to_json,
is_page_template: @page.template?.to_s,
is_page_historical: @page.historical?.to_s,
last_version: @page.last_version,
page_version: @page.historical? ? @page.version.commit.to_json : @page.last_version.to_json,
wiki_path: @wiki.path,
clone_ssh_url: ssh_clone_url_to_repo(@wiki),
clone_http_url: http_clone_url_to_repo(@wiki),
page_persisted: (@page.persisted? && can?(current_user, :create_wiki, @wiki.container)).to_s,
wiki_url: wiki_page_path(@wiki, @page),
edit_button_url: wiki_page_path(@wiki, @page, action: :edit),
new_url: @page.template? ? wiki_page_path(@wiki, "#{Wiki::TEMPLATES_DIR}/#{SecureRandom.uuid}", random_title: true) : wiki_path(@wiki, action: :new),
author_url: wiki_page_version_author_url(@page.historical? ? @page.version.commit : @page.last_version),
history_url: page_history,
templates_url: wiki_page_path(@wiki, Wiki::TEMPLATES_DIR),
format_options: wiki_markup_hash_by_name_id.to_json,
templates: templates.to_json,
} }
= render 'shared/wikis/sidebar'
|