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')
|
2022-08-27 11:52:29 +05:30
|
|
|
- create_link = link_to s_('WikiEmpty|Create your first page'), create_path, class: 'btn gl-button btn-confirm', title: s_('WikiEmpty|Create your first page'), data: { qa_selector: 'create_first_page_link' }
|
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'),
|
2022-07-23 23:45:48 +05:30
|
|
|
edit_project_settings_integration_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)
|
|
|
|
|
|
|
|
= 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 }
|
2021-04-29 21:17:54 +05:30
|
|
|
- if show_new_issue_link?(@project)
|
|
|
|
= 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
|
|
|
|
|
|
|
- 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)
|