debian-mirror-gitlab/app/views/shared/wikis/_sidebar.html.haml

37 lines
1.9 KiB
Text
Raw Normal View History

2021-03-08 18:12:59 +05:30
- editing ||= false
2021-03-11 19:13:27 +05:30
%aside.right-sidebar.right-sidebar-expanded.wiki-sidebar.js-wiki-sidebar.js-right-sidebar{ data: { "offset-top" => "50", "spy" => "affix" }, 'aria-label': _('Wiki') }
2017-09-10 17:25:29 +05:30
.sidebar-container
2020-07-28 23:09:34 +05:30
.block.wiki-sidebar-header.gl-mb-3.w-100
2021-01-29 00:20:46 +05:30
%a.gutter-toggle.float-right.d-block.d-md-none.js-sidebar-wiki-toggle{ href: "#" }
2020-10-24 23:57:45 +05:30
= sprite_icon('chevron-double-lg-right', css_class: 'gl-icon')
2017-08-17 22:00:37 +05:30
2021-03-08 18:12:59 +05:30
.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
2022-07-23 23:45:48 +05:30
= sprite_icon('pencil', css_class: 'gl-mr-2')
2021-03-08 18:12:59 +05:30
%span= _("Edit sidebar")
2021-02-22 17:27:13 +05:30
- if @sidebar_error.present?
= render 'shared/alert_info', body: s_('Wiki|The sidebar failed to load. You can reload the page to try again.')
2017-08-17 22:00:37 +05:30
2017-09-10 17:25:29 +05:30
.blocks-container
2019-12-04 20:38:33 +05:30
.block.block-first.w-100
2018-11-18 11:00:15 +05:30
- if @sidebar_page
2019-03-02 22:35:43 +05:30
= render_wiki_content(@sidebar_page)
2021-02-22 17:27:13 +05:30
- elsif @sidebar_wiki_entries
2018-11-18 11:00:15 +05:30
%ul.wiki-pages
2023-04-23 21:23:45 +05:30
- @sidebar_wiki_entries.each do |entry|
= render partial: entry.to_partial_path, object: entry, locals: { context: 'sidebar' }
2019-12-04 20:38:33 +05:30
.block.w-100
2020-05-24 23:13:21 +05:30
- if @sidebar_limited
2021-01-03 14:25:43 +05:30
= link_to wiki_path(@wiki, action: :pages), class: 'btn gl-button btn-block', data: { qa_selector: 'view_all_pages_button' } do
2020-04-22 19:07:51 +05:30
= s_("Wiki|View All Pages")