gitlab-org--gitlab-foss/app/views/projects/_md_preview.html.haml

47 lines
2.1 KiB
Plaintext
Raw Normal View History

- referenced_users = local_assigns.fetch(:referenced_users, nil)
2017-09-14 11:01:07 +00:00
- if defined?(@merge_request) && @merge_request.discussion_locked?
.issuable-note-warning
= icon('lock')
%span
= _('This merge request is locked.')
= _('Only project members can comment.')
.md-area
2016-03-30 09:00:43 +00:00
.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
2017-06-20 13:58:30 +00:00
2016-03-30 09:00:43 +00:00
%li.pull-right
2016-06-03 14:14:04 +00:00
.toolbar-group
= 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" })
2016-06-03 14:14:04 +00:00
.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" } }
= icon("arrows-alt fw")
2016-03-30 07:28:06 +00:00
.md-write-holder
= yield
.md.md-preview-holder.js-md-preview.hide.md-preview{ data: { url: url } }
.referenced-commands.hide
- if referenced_users
2016-12-23 09:37:12 +00:00
.referenced-users.hide
2015-12-03 21:40:31 +00:00
%span
2016-06-03 14:14:04 +00:00
= icon("exclamation-triangle")
You are about to add
%strong
%span.js-referenced-users-count 0
people
to the discussion. Proceed with caution.