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

_sidebar.html.haml « wikis « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8b8c981da96d81ec2985f11a239834db62ad77cd (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
- editing ||= false

%aside.right-sidebar.right-sidebar-expanded.wiki-sidebar.js-wiki-sidebar.js-right-sidebar{ data: { "offset-top" => "50", "spy" => "affix" }, 'aria-label': _('Wiki') }
  .sidebar-container
    .block.wiki-sidebar-header.gl-mb-3.w-100
      %a.gutter-toggle.float-right.d-block.d-md-none.js-sidebar-wiki-toggle{ href: "#" }
        = sprite_icon('chevron-double-lg-right', css_class: 'gl-icon')

      .gl-display-flex.gl-flex-wrap
        - git_access_url = wiki_path(@wiki, action: :git_access)
        = link_to git_access_url, class: 'gl-mr-5' + (active_nav_link?(path: 'wikis#git_access') ? ' active' : ''), data: { qa_selector: 'clone_repository_link' } do
          = sprite_icon('download', css_class: 'gl-mr-2')
          %span= _("Clone repository")

        - if can?(current_user, :create_wiki, @wiki)
          - edit_sidebar_url = wiki_page_path(@wiki, Wiki::SIDEBAR, action: :edit)
          - link_class = (editing && @page&.slug == Wiki::SIDEBAR) ? 'active' : ''
          = link_to edit_sidebar_url, class: link_class, data: { qa_selector: 'edit_sidebar_link' } do
            = sprite_icon('pencil', css_class: 'gl-mr-2')
            %span= _("Edit sidebar")

    - if @sidebar_error.present?
      = render 'shared/alert_info', body: s_('Wiki|The sidebar failed to load. You can reload the page to try again.')

    .blocks-container
      .block.block-first.w-100
        - if @sidebar_page
          = render_wiki_content(@sidebar_page)
        - elsif @sidebar_wiki_entries
          %ul.wiki-pages
            - @sidebar_wiki_entries.each do |entry|
              = render partial: entry.to_partial_path, object: entry, locals: { context: 'sidebar' }
      .block.w-100
        - if @sidebar_limited
          = link_to wiki_path(@wiki, action: :pages), class: 'btn gl-button btn-block', data: { qa_selector: 'view_all_pages_button' } do
            = s_("Wiki|View All Pages")