diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb
index 6e5651fae..90f6a85fa 100644
--- a/app/views/gantts/show.html.erb
+++ b/app/views/gantts/show.html.erb
@@ -1,9 +1,5 @@
<% @gantt.view = self %>
-<% if !@query.new_record? && @query.editable_by?(User.current) %>
- <%= link_to l(:button_edit), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
- <%= delete_link query_path(@query, :gantt => 1) %>
-<% end %>
<%= @query.new_record? ? l(:label_gantt) : @query.name %>
@@ -80,6 +76,10 @@
"$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
:class => 'icon icon-save' %>
<% end %>
+<% if !@query.new_record? && @query.editable_by?(User.current) %>
+ <%= link_to l(:button_edit), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
+ <%= delete_link query_path(@query, :gantt => 1) %>
+<% end %>
<% end %>