Project

General

Profile

Patch #28602 » 0001-align-query-buttons-with-other-query-based-views.patch

Bernhard Rohloff, 2018-04-22 08:59

View differences:

app/views/gantts/show.html.erb
1 1
<% @gantt.view = self %>
2 2
<div class="contextual">
3
<% if !@query.new_record? && @query.editable_by?(User.current) %>
4
  <%= link_to l(:button_edit), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
5
  <%= delete_link query_path(@query, :gantt => 1) %>
6
<% end %>
7 3
</div>
8 4

  
9 5
<h2><%= @query.new_record? ? l(:label_gantt) : @query.name %></h2>
......
81 77
                         "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
82 78
                         :class => 'icon icon-save' %>
83 79
  <% end %>
80
<% if !@query.new_record? && @query.editable_by?(User.current) %>
81
  <%= link_to l(:button_edit), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
82
  <%= delete_link query_path(@query, :gantt => 1) %>
83
<% end %>
84 84
</p>
85 85
</div>
86 86
<% end %>
(3-3/3)