2018-11-08 19:23:39 +05:30
- layout_path = 'shared/empty_states/wikis_layout'
2020-06-23 00:09:42 +05:30
- messages = wiki_empty_state_messages(@wiki)
2018-11-08 19:23:39 +05:30
2020-06-23 00:09:42 +05:30
- if can?(current_user, :create_wiki, @wiki.container)
- create_path = wiki_page_path(@wiki, params[:id], view: 'create')
2021-04-17 20:07:23 +05:30
- create_link = link_to s_('WikiEmpty|Create your first page'), create_path, class: 'btn gl-button btn-confirm qa-create-first-page-link', title: s_('WikiEmpty|Create your first page')
2018-11-08 19:23:39 +05:30
= render layout: layout_path, locals: { image_path: 'illustrations/wiki_login_empty.svg' } do
2018-12-13 13:39:08 +05:30
%h4.text-left
2020-06-23 00:09:42 +05:30
= messages.dig(:writable, :title)
2018-11-08 19:23:39 +05:30
%p.text-left
2020-06-23 00:09:42 +05:30
= messages.dig(:writable, :body)
2018-11-08 19:23:39 +05:30
= create_link
2020-07-28 23:09:34 +05:30
- if show_enable_confluence_integration?(@wiki.container)
= link_to s_('WikiEmpty|Enable the Confluence Wiki integration'),
edit_project_service_path(@project, :confluence),
2021-03-08 18:12:59 +05:30
class: 'btn gl-button', title: s_('WikiEmpty|Enable the Confluence Wiki integration')
2018-11-08 19:23:39 +05:30
2020-06-23 00:09:42 +05:30
- elsif @project && can?(current_user, :read_issue, @project)
2018-11-08 19:23:39 +05:30
- issues_link = link_to s_('WikiEmptyIssueMessage|issue tracker'), project_issues_path(@project)
2021-04-17 20:07:23 +05:30
- new_issue_link = link_to s_('WikiEmpty|Suggest wiki improvement'), new_project_issue_path(@project), class: 'btn gl-button btn-confirm', title: s_('WikiEmptyIssueMessage|Suggest wiki improvement')
2018-11-08 19:23:39 +05:30
= render layout: layout_path, locals: { image_path: 'illustrations/wiki_logout_empty.svg' } do
%h4
2020-06-23 00:09:42 +05:30
= messages.dig(:issuable, :title)
2018-11-08 19:23:39 +05:30
%p.text-left
2020-06-23 00:09:42 +05:30
= messages.dig(:issuable, :body).html_safe % { issues_link: issues_link }
2018-11-08 19:23:39 +05:30
= new_issue_link
- else
= render layout: layout_path, locals: { image_path: 'illustrations/wiki_logout_empty.svg' } do
%h4
2020-06-23 00:09:42 +05:30
= messages.dig(:readonly, :title)
2018-11-08 19:23:39 +05:30
%p
2020-06-23 00:09:42 +05:30
= messages.dig(:readonly, :body)