diff options
Diffstat (limited to 'app/views/shared/snippets')
-rw-r--r-- | app/views/shared/snippets/_form.html.haml | 10 | ||||
-rw-r--r-- | app/views/shared/snippets/_header.html.haml | 4 | ||||
-rw-r--r-- | app/views/shared/snippets/_snippet.html.haml | 5 |
3 files changed, 5 insertions, 14 deletions
diff --git a/app/views/shared/snippets/_form.html.haml b/app/views/shared/snippets/_form.html.haml index 396b6e56ea9..4695692fb53 100644 --- a/app/views/shared/snippets/_form.html.haml +++ b/app/views/shared/snippets/_form.html.haml @@ -1,7 +1,3 @@ -- if Feature.disabled?(:monaco_snippets) - - content_for :page_specific_javascripts do - = page_specific_javascript_tag('lib/ace.js') - - if Feature.enabled?(:snippets_edit_vue) #js-snippet-edit.snippet-form{ data: {'project_path': @snippet.project&.full_path, 'snippet-gid': @snippet.new_record? ? '' : @snippet.to_global_id, 'markdown-preview-path': preview_markdown_path(parent), 'markdown-docs-path': help_page_path('user/markdown'), 'visibility-help-link': help_page_path("public_access/public_access") } } - else @@ -24,7 +20,7 @@ = text_field_tag nil, nil, class: 'form-control', placeholder: description_placeholder, data: { qa_selector: 'description_placeholder' } .js-expanded{ class: ('d-none' if !is_expanded) } = render layout: 'projects/md_preview', locals: { url: preview_markdown_path(@project), referenced_users: true } do - = render 'projects/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: description_placeholder, qa_selector: 'description_field' + = render 'projects/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: description_placeholder, qa_selector: 'snippet_description_field' = render 'shared/notes/hints' .form-group.file-editor @@ -48,9 +44,9 @@ .form-actions - if @snippet.new_record? - = f.submit 'Create snippet', class: "btn-success btn qa-create-snippet-button" + = f.submit 'Create snippet', class: "btn-success btn", data: { qa_selector: 'submit_button' } - else - = f.submit 'Save changes', class: "btn-success btn" + = f.submit 'Save changes', class: "btn-success btn", data: { qa_selector: 'submit_button' } - if @snippet.project_id = link_to "Cancel", project_snippets_path(@project), class: "btn btn-cancel" diff --git a/app/views/shared/snippets/_header.html.haml b/app/views/shared/snippets/_header.html.haml index 1243bdab6dd..e663d57ae6a 100644 --- a/app/views/shared/snippets/_header.html.haml +++ b/app/views/shared/snippets/_header.html.haml @@ -21,7 +21,7 @@ = markdown_field(@snippet, :title) - if @snippet.description.present? - .description{ data: { qa_selector: 'snippet_description' } } + .description{ data: { qa_selector: 'snippet_description_field' } } .md = markdown_field(@snippet, :description) %textarea.hidden.js-task-list-field @@ -34,7 +34,7 @@ .embed-snippet .input-group .input-group-prepend - %button.btn.btn-svg.embed-toggle.input-group-text.qa-embed-type{ 'data-toggle': 'dropdown', type: 'button' } + %button.btn.btn-svg.embed-toggle.input-group-text{ 'data-toggle': 'dropdown', type: 'button' } %span.js-embed-action= _("Embed") = sprite_icon('angle-down', size: 12, css_class: 'caret-down') %ul.dropdown-menu.dropdown-menu-selectable.embed-toggle-list diff --git a/app/views/shared/snippets/_snippet.html.haml b/app/views/shared/snippets/_snippet.html.haml index 3fea2c1e3fc..128ddbb8e8b 100644 --- a/app/views/shared/snippets/_snippet.html.haml +++ b/app/views/shared/snippets/_snippet.html.haml @@ -1,6 +1,5 @@ - link_project = local_assigns.fetch(:link_project, false) - notes_count = @noteable_meta_data[snippet.id].user_notes_count -- file_name = snippet_file_name(snippet) %li.snippet-row.py-3 = image_tag avatar_icon_for_user(snippet.author), class: "avatar s40 d-none d-sm-block", alt: '' @@ -8,10 +7,6 @@ .title = link_to gitlab_snippet_path(snippet) do = snippet.title - - if file_name.present? - %span.snippet-filename.d-none.d-sm-inline-block.ml-2 - = sprite_icon('doc-code', size: 16, css_class: 'file-icon align-text-bottom') - = file_name %ul.controls %li |