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

_md_preview.html.haml « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f8a2ea18989179363c9356707e5949a01a1ea4e7 (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
37
38
39
40
41
42
43
44
45
46
- referenced_users = local_assigns.fetch(:referenced_users, nil)

- if defined?(@merge_request) && @merge_request.discussion_locked?
  .issuable-note-warning
    = icon('lock', class: 'icon')
    %span
      = _('This merge request is locked.')
      = _('Only project members can comment.')

.md-area
  .md-header
    %ul.nav-links.clearfix
      %li.active
        %a.js-md-write-button{ href: "#md-write-holder", tabindex: -1 }
          Write
      %li
        %a.js-md-preview-button{ href: "#md-preview-holder", tabindex: -1 }
          Preview

      %li.pull-right
        .toolbar-group
          = markdown_toolbar_button({ icon: "bold", data: { "md-tag" => "**" }, title: "Add bold text" })
          = markdown_toolbar_button({ icon: "italic", data: { "md-tag" => "*" }, title: "Add italic text" })
          = markdown_toolbar_button({ icon: "quote", data: { "md-tag" => "> ", "md-prepend" => true }, title: "Insert a quote" })
          = markdown_toolbar_button({ icon: "code", data: { "md-tag" => "`", "md-block" => "```" }, title: "Insert code" })
          = markdown_toolbar_button({ icon: "list-bulleted", data: { "md-tag" => "* ", "md-prepend" => true }, title: "Add a bullet list" })
          = markdown_toolbar_button({ icon: "list-numbered", data: { "md-tag" => "1. ", "md-prepend" => true }, title: "Add a numbered list" })
          = markdown_toolbar_button({ icon: "task-done", data: { "md-tag" => "* [ ] ", "md-prepend" => true }, title: "Add a task list" })
        .toolbar-group
          %button.toolbar-btn.js-zen-enter.has-tooltip{ type: "button", tabindex: -1, aria: { label: "Go full screen" }, title: "Go full screen", data: { container: "body" } }
            = sprite_icon("screen-full")

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

  - if referenced_users
    .referenced-users.hide
      %span
        = icon("exclamation-triangle")
        You are about to add
        %strong
          %span.js-referenced-users-count 0
          people
        to the discussion. Proceed with caution.