_md_preview.html.haml 2.1 KB
Newer Older
1 2
- referenced_users = local_assigns.fetch(:referenced_users, nil)

L
Luke "Jared" Bennett 已提交
3 4 5 6 7 8 9
- if defined?(@merge_request) && @merge_request.discussion_locked?
.issuable-note-warning
  = icon('lock')
  %span
    = _('This merge request is locked.')
    = _('Only project members can comment.')

10
.md-area
P
Phil Hughes 已提交
11
  .md-header
12
    %ul.nav-links.clearfix
13
      %li.active
14
        %a.js-md-write-button{ href: "#md-write-holder", tabindex: -1 }
15 16
          Write
      %li
17
        %a.js-md-preview-button{ href: "#md-preview-holder", tabindex: -1 }
18
          Preview
19

P
Phil Hughes 已提交
20
      %li.pull-right
P
Phil Hughes 已提交
21
        .toolbar-group
22 23 24 25 26 27 28
          = markdown_toolbar_button({ icon: "bold fw", data: { "md-tag" => "**" }, title: "Add bold text" })
          = markdown_toolbar_button({ icon: "italic fw", data: { "md-tag" => "*" }, title: "Add italic text" })
          = markdown_toolbar_button({ icon: "quote-right fw", data: { "md-tag" => "> ", "md-prepend" => true }, title: "Insert a quote" })
          = markdown_toolbar_button({ icon: "code fw", data: { "md-tag" => "`", "md-block" => "```" }, title: "Insert code" })
          = markdown_toolbar_button({ icon: "list-ul fw", data: { "md-tag" => "* ", "md-prepend" => true }, title: "Add a bullet list" })
          = markdown_toolbar_button({ icon: "list-ol fw", data: { "md-tag" => "1. ", "md-prepend" => true }, title: "Add a numbered list" })
          = markdown_toolbar_button({ icon: "check-square-o fw", data: { "md-tag" => "* [ ] ", "md-prepend" => true }, title: "Add a task list" })
P
Phil Hughes 已提交
29
        .toolbar-group
30
          %button.toolbar-btn.js-zen-enter.has-tooltip{ type: "button", tabindex: -1, aria: { label: "Go full screen" }, title: "Go full screen", data: { container: "body" } }
31
            = icon("arrows-alt fw")
32

33 34
  .md-write-holder
    = yield
35 36
  .md.md-preview-holder.js-md-preview.hide.md-preview{ data: { url: url } }
  .referenced-commands.hide
37

38
  - if referenced_users
39
    .referenced-users.hide
D
Douglas Barbosa Alexandre 已提交
40
      %span
P
Phil Hughes 已提交
41
        = icon("exclamation-triangle")
42 43 44 45 46
        You are about to add
        %strong
          %span.js-referenced-users-count 0
          people
        to the discussion. Proceed with caution.