BigW Consortium Gitlab

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

3
.md-area
4
  .md-header
5
    %ul.nav-links.clearfix
6
      %li.active
7
        %a.js-md-write-button{ href: "#md-write-holder", tabindex: -1 }
8 9
          Write
      %li
10
        %a.js-md-preview-button{ href: "#md-preview-holder", tabindex: -1 }
11
          Preview
12

13
      - if defined?(@issue) && @issue.confidential?
14 15 16
        %li.confidential-issue-warning
          = icon('warning')
          %span This is a confidential issue. Your comment will not be visible to the public.
17

18
      %li.pull-right
19
        .toolbar-group
20 21 22 23 24 25 26
          = 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" })
27
        .toolbar-group
28
          %button.toolbar-btn.js-zen-enter.has-tooltip{ type: "button", tabindex: -1, aria: { label: "Go full screen" }, title: "Go full screen", data: { container: "body" } }
29
            = icon("arrows-alt fw")
30

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

36
  - if referenced_users
37
    .referenced-users.hide
Douglas Barbosa Alexandre committed
38
      %span
39
        = icon("exclamation-triangle")
40 41 42 43 44
        You are about to add
        %strong
          %span.js-referenced-users-count 0
          people
        to the discussion. Proceed with caution.