Merge branch 'fix/13781-delete-tag-without-ajax' into 'master'
Tag deletion doesn't use AJAX anymore See merge request !2986
This commit is contained in:
commit
cb6af81670
2 changed files with 9 additions and 1 deletions
|
@ -34,6 +34,11 @@ class Projects::TagsController < Projects::ApplicationController
|
|||
def destroy
|
||||
DeleteTagService.new(project, current_user).execute(params[:id])
|
||||
|
||||
redirect_to namespace_project_tags_path(@project.namespace, @project)
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
redirect_to namespace_project_tags_path(@project.namespace, @project)
|
||||
end
|
||||
format.js
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
3
app/views/projects/tags/destroy.js.haml
Normal file
3
app/views/projects/tags/destroy.js.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
$('.js-totaltags-count').html("#{@repository.tags.size}");
|
||||
- if @repository.tags.empty?
|
||||
$('.tags').load(document.URL + ' .nothing-here-block').hide().fadeIn(1000)
|
Loading…
Reference in a new issue