Project

General

Profile

Defect #37072 » remove_downcase_for_button_object_name.patch

Alexander Meindl, 2022-05-04 10:50

View differences:

app/views/calendars/show.html.erb
28 28
  <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
29 29
  <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
30 30
  <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
31
    <%= link_to_function l(:button_save_object, object_name: l(:label_query).downcase),
31
    <%= link_to_function l(:button_save_object, object_name: l(:label_query)),
32 32
                         "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
33 33
                         :class => 'icon icon-save' %>
34 34
  <% end %>
35 35
  <% if !@query.new_record? && @query.editable_by?(User.current) %>
36
    <%= link_to l(:button_edit_object, object_name: l(:label_query).downcase), edit_query_path(@query, :calendar => 1), :class => 'icon icon-edit' %>
37
    <%= delete_link query_path(@query, :calendar => 1), {}, l(:button_delete_object, object_name: l(:label_query).downcase) %>
36
    <%= link_to l(:button_edit_object, object_name: l(:label_query)), edit_query_path(@query, :calendar => 1), :class => 'icon icon-edit' %>
37
    <%= delete_link query_path(@query, :calendar => 1), {}, l(:button_delete_object, object_name: l(:label_query)) %>
38 38
  <% end %>
39 39
</p>
40 40
</div>
app/views/gantts/show.html.erb
91 91
  <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 },
92 92
              :class => 'icon icon-reload' %>
93 93
  <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
94
    <%= link_to_function l(:button_save_object, object_name: l(:label_query).downcase),
94
    <%= link_to_function l(:button_save_object, object_name: l(:label_query)),
95 95
                         "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
96 96
                         :class => 'icon icon-save' %>
97 97
  <% end %>
98 98
<% if !@query.new_record? && @query.editable_by?(User.current) %>
99
  <%= link_to l(:button_edit_object, object_name: l(:label_query).downcase), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
100
  <%= delete_link query_path(@query, :gantt => 1), {}, l(:button_delete_object, object_name: l(:label_query).downcase) %>
99
  <%= link_to l(:button_edit_object, object_name: l(:label_query)), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
100
  <%= delete_link query_path(@query, :gantt => 1), {}, l(:button_delete_object, object_name: l(:label_query)) %>
101 101
<% end %>
102 102
</p>
103 103
</div>
app/views/queries/_query_form.html.erb
57 57
  <%= link_to l(:button_clear), { :set_filter => 1, :sort => '', :project_id => @project }, :class => 'icon icon-reload'  %>
58 58
  <% if @query.new_record? %>
59 59
    <% if User.current.allowed_to?(:save_queries, @project, :global => true) %>
60
      <%= link_to_function l(:button_save_object, object_name: l(:label_query).downcase),
60
      <%= link_to_function l(:button_save_object, object_name: l(:label_query)),
61 61
                           "$('#query_type').prop('disabled',false);$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit()",
62 62
                           :class => 'icon icon-save' %>
63 63
    <% end %>
64 64
  <% else %>
65 65
    <% if @query.editable_by?(User.current) %>
66 66
      <% redirect_params = (controller_name == 'admin' && action_name == 'projects') ? {:admin_projects => 1} : {} %>
67
      <%= link_to l(:button_edit_object, object_name: l(:label_query).downcase), edit_query_path(@query, redirect_params), :class => 'icon icon-edit' %>
68
      <%= delete_link query_path(@query, redirect_params), {}, l(:button_delete_object, object_name: l(:label_query).downcase) %>
67
      <%= link_to l(:button_edit_object, object_name: l(:label_query)), edit_query_path(@query, redirect_params), :class => 'icon icon-edit' %>
68
      <%= delete_link query_path(@query, redirect_params), {}, l(:button_delete_object, object_name: l(:label_query)) %>
69 69
    <% end %>
70 70
  <% end %>
71 71
</p>
(1-1/5)