diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-01-25 12:39:06 +0300 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-02-05 21:26:39 +0300 |
commit | c51b7f8ee64ddec37fe2ec2a3cba463dd7356087 (patch) | |
tree | c2318ca765491e0197a4d24a381f355152177f35 /app | |
parent | 4f57b0c6bfb6b6c635fbc131b061a18f77e04baf (diff) |
Merge branch '56424-fix-gl-form-init-tag-editing' into 'master'
Init GLForm instance on form while editing tags
Closes #56424
See merge request gitlab-org/gitlab-ce!24645
(cherry picked from commit 15a7f3c6af5286dee5188af045d3e80f95323472)
7506275e Init GLForm instance on form while editing tags
b0746e79 Add changelog entry
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/pages/projects/tags/releases/index.js | 8 | ||||
-rw-r--r-- | app/views/projects/tags/_tag.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/tags/show.html.haml | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/pages/projects/tags/releases/index.js b/app/assets/javascripts/pages/projects/tags/releases/index.js new file mode 100644 index 00000000000..d6afc71fb03 --- /dev/null +++ b/app/assets/javascripts/pages/projects/tags/releases/index.js @@ -0,0 +1,8 @@ +import $ from 'jquery'; +import ZenMode from '~/zen_mode'; +import GLForm from '~/gl_form'; + +document.addEventListener('DOMContentLoaded', () => { + new ZenMode(); // eslint-disable-line no-new + new GLForm($('.release-form')); // eslint-disable-line no-new +}); diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index f55202c2c5f..cc203cfad86 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -28,7 +28,7 @@ = render 'projects/buttons/download', project: @project, ref: tag.name, pipeline: @tags_pipelines[tag.name] - if can?(current_user, :push_code, @project) - = link_to edit_project_tag_release_path(@project, tag.name), class: 'btn has-tooltip', title: s_('TagsPage|Edit release notes'), data: { container: "body" } do + = link_to edit_project_tag_release_path(@project, tag.name), class: 'btn btn-edit has-tooltip', title: s_('TagsPage|Edit release notes'), data: { container: "body" } do = icon("pencil") - if can?(current_user, :admin_project, @project) diff --git a/app/views/projects/tags/show.html.haml b/app/views/projects/tags/show.html.haml index 15a960f81b8..feeaf799f51 100644 --- a/app/views/projects/tags/show.html.haml +++ b/app/views/projects/tags/show.html.haml @@ -20,7 +20,7 @@ .nav-controls.controls-flex - if can?(current_user, :push_code, @project) - = link_to edit_project_tag_release_path(@project, @tag.name), class: 'btn controls-item has-tooltip', title: s_('TagsPage|Edit release notes') do + = link_to edit_project_tag_release_path(@project, @tag.name), class: 'btn btn-edit controls-item has-tooltip', title: s_('TagsPage|Edit release notes') do = icon("pencil") = link_to project_tree_path(@project, @tag.name), class: 'btn controls-item has-tooltip', title: s_('TagsPage|Browse files') do = icon('files-o') |