Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_wikis.html.haml « empty_states « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9e628a1f4099e38fbe1bd15b7f0965f22b832e79 (plain)
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
36
- layout_path = 'shared/empty_states/wikis_layout'
- messages = wiki_empty_state_messages(@wiki)
- hide_create = local_assigns[:hide_create]

- if !hide_create && can?(current_user, :create_wiki, @wiki.container)
  - create_path = wiki_page_path(@wiki, params[:id], view: 'create')
  - create_link = link_button_to s_('WikiEmpty|Create your first page'), create_path, title: s_('WikiEmpty|Create your first page'), data: { qa_selector: 'create_first_page_link' }, variant: :confirm

  = render layout: layout_path, locals: { image_path: 'illustrations/wiki_login_empty.svg' } do
    %h4.text-left
      = messages.dig(:writable, :title)
    %p.text-left
      = messages.dig(:writable, :body)
    = create_link
    - if show_enable_confluence_integration?(@wiki.container)
      = link_to s_('WikiEmpty|Enable the Confluence Wiki integration'),
          edit_project_settings_integration_path(@project, :confluence),
          class: 'btn gl-button', title: s_('WikiEmpty|Enable the Confluence Wiki integration')

- elsif @project && can?(current_user, :read_issue, @project)
  - 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
      = messages.dig(:issuable, :title)
    %p.text-left
      = messages.dig(:issuable, :body).html_safe % { issues_link: issues_link }
    - if show_new_issue_link?(@project)
      = link_button_to s_('WikiEmpty|Suggest wiki improvement'), new_project_issue_path(@project), title: s_('WikiEmptyIssueMessage|Suggest wiki improvement'), variant: :confirm

- else
  = render layout: layout_path, locals: { image_path: 'illustrations/wiki_logout_empty.svg' } do
    %h4
      = messages.dig(:readonly, :title)
    %p
      = messages.dig(:readonly, :body)