debian-mirror-gitlab/app/views/shared/empty_states/_wikis.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.7 KiB
Text
Raw Normal View History

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'),
2022-03-02 08:16:31 +05:30
edit_project_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)