Feature #34494 » diff.patch
app/helpers/application_helper.rb | ||
---|---|---|
1492 | 1492 |
html.html_safe |
1493 | 1493 |
end |
1494 | 1494 | |
1495 |
def delete_link(url, options={}) |
|
1495 |
def delete_link(url, options={}, button_name=l(:button_delete))
|
|
1496 | 1496 |
options = { |
1497 | 1497 |
:method => :delete, |
1498 | 1498 |
:data => {:confirm => l(:text_are_you_sure)}, |
1499 | 1499 |
:class => 'icon icon-del' |
1500 | 1500 |
}.merge(options) |
1501 | 1501 | |
1502 |
link_to l(:button_delete), url, options
|
|
1502 |
link_to button_name, url, options
|
|
1503 | 1503 |
end |
1504 | 1504 | |
1505 | 1505 |
def link_to_function(name, function, html_options={}) |
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), |
|
31 |
<%= link_to_function l(:button_save_object, object_name: l(:label_query).downcase),
|
|
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), edit_query_path(@query, :calendar => 1), :class => 'icon icon-edit' %> |
|
37 |
<%= delete_link query_path(@query, :calendar => 1) %> |
|
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) %>
|
|
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), |
|
94 |
<%= link_to_function l(:button_save_object, object_name: l(:label_query).downcase),
|
|
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), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %> |
|
100 |
<%= delete_link query_path(@query, :gantt => 1) %> |
|
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) %>
|
|
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), |
|
60 |
<%= link_to_function l(:button_save_object, object_name: l(:label_query).downcase),
|
|
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 |
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %> |
|
67 |
<%= delete_link query_path(@query) %> |
|
66 |
<%= link_to l(:button_edit_object, object_name: l(:label_query).downcase), edit_query_path(@query), :class => 'icon icon-edit' %>
|
|
67 |
<%= delete_link query_path(@query), {}, l(:button_delete_object, object_name: l(:label_query).downcase) %>
|
|
68 | 68 |
<% end %> |
69 | 69 |
<% end %> |
70 | 70 |
</p> |
config/locales/en.yml | ||
---|---|---|
1161 | 1161 |
button_filter: Filter |
1162 | 1162 |
button_actions: Actions |
1163 | 1163 |
button_add_subtask: Add subtask |
1164 |
button_save_object: "Save %{object_name}" |
|
1165 |
button_edit_object: "Edit %{object_name}" |
|
1166 |
button_delete_object: "Delete %{object_name}" |
|
1164 | 1167 | |
1165 | 1168 |
status_active: active |
1166 | 1169 |
status_registered: registered |
config/locales/ja.yml | ||
---|---|---|
868 | 868 |
button_configure: 設定 |
869 | 869 |
button_quote: 引用 |
870 | 870 |
button_show: 表示 |
871 |
button_save_object: "%{object_name}を保存" |
|
872 |
button_edit_object: "%{object_name}を編集" |
|
873 |
button_delete_object: "%{object_name}を削除" |
|
871 | 874 | |
872 | 875 |
status_active: 有効 |
873 | 876 |
status_registered: 登録 |
- « Previous
- 1
- 2
- 3
- Next »