File: _md_preview.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (36 lines) | stat: -rw-r--r-- 1,637 bytes parent folder | download
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
- referenced_users = local_assigns.fetch(:referenced_users, nil)
- supports_quick_actions = local_assigns.fetch(:supports_quick_actions, false)

- if @merge_request&.discussion_locked?
  .issuable-note-warning
    = sprite_icon('lock', css_class: 'icon')
    %span
      = _('The discussion in this merge request is locked.')
      = _('Only project members can comment.')

.md-area.position-relative
  .md-header.gl-px-3.gl-rounded-t-base.gl-border-b.gl-border-gray-100
    .gl-flex.gl-items-top.gl-flex-nowrap.gl-justify-between
      .md-header-toolbar.gl-flex.gl-py-3.gl-flex-wrap.gl-gap-y-3
        = render Pajamas::ButtonComponent.new(category: :tertiary, size: :small, button_options: { class: 'js-md-preview-button', value: 'preview' }) do
          = _('Preview')
        .gl-flex.gl-py-2.haml-markdown-button
          .gl-border-l.gl-ml-2.gl-pl-3
        = render 'shared/blob/markdown_buttons', supports_quick_actions: supports_quick_actions
      .full-screen.gl-py-3
        = render Pajamas::ButtonComponent.new(icon: 'maximize', category: :tertiary, size: :small, button_options: { 'tabindex': -1, 'title': _("Go full screen"), 'aria-label': _("Go full screen"), class: 'has-tooltip js-zen-enter', data: { container: 'body' } })

  .md-write-holder
    = yield
  .md.md-preview-holder.gl-px-5.js-md-preview.hide{ data: { url: url } }
  .referenced-commands.hide

  - if referenced_users
    .referenced-users.hide
      %span
        = sprite_icon('warning-solid')
        You are about to add
        %strong
          %span.js-referenced-users-count 0
          people
        to the discussion. Proceed with caution.