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:
Rémy Coutable 2016-03-02 13:02:41 +00:00
commit cb6af81670
2 changed files with 9 additions and 1 deletions

View file

@ -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

View 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)