066a99b6e9
Currently, we have markdown files in many places (e.g. comments, new issues, etc.). This Merge Request detects if the file being edited is a markdown file and adds markdown buttons and their functionality to the single file editor (Not the web IDE)
36 lines
1.1 KiB
Text
36 lines
1.1 KiB
Text
- referenced_users = local_assigns.fetch(:referenced_users, nil)
|
|
|
|
- if defined?(@merge_request) && @merge_request.discussion_locked?
|
|
.issuable-note-warning
|
|
= sprite_icon('lock', size: 16, css_class: 'icon')
|
|
%span
|
|
= _('This merge request is locked.')
|
|
= _('Only project members can comment.')
|
|
|
|
.md-area
|
|
.md-header
|
|
%ul.nav.nav-tabs.nav-links.clearfix
|
|
%li.md-header-tab.active
|
|
%button.js-md-write-button{ tabindex: -1 }
|
|
Write
|
|
%li.md-header-tab
|
|
%button.js-md-preview-button{ tabindex: -1 }
|
|
Preview
|
|
|
|
%li.md-header-toolbar.active
|
|
= render 'projects/blob/markdown_buttons', show_fullscreen_button: true
|
|
|
|
.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.
|