debian-mirror-gitlab/app/views/shared/wikis/show.html.haml

33 lines
1.8 KiB
Text
Raw Normal View History

2020-07-28 23:09:34 +05:30
- wiki_page_title @page
2021-01-03 14:25:43 +05:30
- add_page_specific_style 'page_bundles/wiki'
2015-09-25 12:07:36 +05:30
2019-12-04 20:38:33 +05:30
.wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row
2020-07-28 23:09:34 +05:30
= wiki_sidebar_toggle_button
2017-08-17 22:00:37 +05:30
2019-09-30 21:07:59 +05:30
.nav-text.flex-fill
2017-09-10 17:25:29 +05:30
%span.wiki-last-edit-by
2018-12-13 13:39:08 +05:30
- if @page.last_version
= (_("Last edited by %{name}") % { name: "<strong>#{@page.last_version.author_name}</strong>" }).html_safe
2020-07-28 23:09:34 +05:30
= time_ago_with_tooltip(@page.last_version.authored_date)
2015-09-11 14:41:01 +05:30
2019-12-04 20:38:33 +05:30
.nav-controls.pb-md-3.pb-lg-0
2020-06-23 00:09:42 +05:30
= render 'shared/wikis/main_links'
2016-04-02 18:10:28 +05:30
2017-09-10 17:25:29 +05:30
- if @page.historical?
.warning_message
2018-03-17 18:26:18 +05:30
= s_("WikiHistoricalPage|This is an old version of this page.")
2020-06-23 00:09:42 +05:30
- most_recent_link = link_to s_("WikiHistoricalPage|most recent version"), wiki_page_path(@wiki, @page)
- history_link = link_to s_("WikiHistoricalPage|history"), wiki_page_path(@wiki, @page, action: :history)
2018-03-17 18:26:18 +05:30
= (s_("WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}.") % { most_recent_link: most_recent_link, history_link: history_link }).html_safe
2014-09-02 18:07:02 +05:30
2021-01-03 14:25:43 +05:30
.gl-mt-5.gl-mb-3
.gl-display-flex.gl-justify-content-space-between
%h2.gl-mt-0.gl-mb-5{ data: { qa_selector: 'wiki_page_title', testid: 'wiki_page_title' } }= @page.human_title
%div
- if can?(current_user, :create_wiki, @wiki.container) && @page.latest? && @valid_encoding
= link_to sprite_icon('pencil', css_class: 'gl-icon'), wiki_page_path(@wiki, @page, action: :edit), title: 'Edit', role: "button", class: 'btn gl-button btn-icon btn-default js-wiki-edit', data: { qa_selector: 'edit_page_button', testid: 'wiki_edit_button' }
.js-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki_page_content', tracking_context: wiki_page_tracking_context(@page).to_json } }
2019-03-02 22:35:43 +05:30
= render_wiki_content(@page)
2017-08-17 22:00:37 +05:30
2020-06-23 00:09:42 +05:30
= render 'shared/wikis/sidebar'