sugar 0.0.25 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/sugar/actionview.rb +8 -8
- data/sugar.gemspec +1 -1
- metadata +1 -1
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.26
|
data/lib/sugar/actionview.rb
CHANGED
@@ -15,9 +15,9 @@ module Sugar
|
|
15
15
|
when 'index'
|
16
16
|
controller_name.camelize
|
17
17
|
when 'new', 'create'
|
18
|
-
|
18
|
+
"#{t('new', :default => 'New')} #{controller_name.classify.constantize.human_name}"
|
19
19
|
when 'edit', 'update'
|
20
|
-
|
20
|
+
"#{t('edit', :default => 'Editing')} #{controller_name.classify.constantize.human_name}"
|
21
21
|
else
|
22
22
|
t("#{controller_name}.#{view_name}.title")
|
23
23
|
end
|
@@ -41,7 +41,7 @@ module Sugar
|
|
41
41
|
# Put submit with proper text
|
42
42
|
def submit(form, title = nil)
|
43
43
|
title ||= t("#{controller.controller_name}.#{view_name}.submit",
|
44
|
-
:default => form.object.new_record? ? "#{t('
|
44
|
+
:default => form.object.new_record? ? "#{t('create', :default => 'Add')} #{form.object.class.human_name}" : "#{t('update', :default => 'Save')} #{form.object.class.human_name}")
|
45
45
|
form.submit(title)
|
46
46
|
end
|
47
47
|
|
@@ -110,7 +110,7 @@ module Sugar
|
|
110
110
|
|
111
111
|
def image_button_to_delete(something)
|
112
112
|
image_to('icons/delete.png',
|
113
|
-
t('.delete'),
|
113
|
+
t('.delete', :default => 'Delete'),
|
114
114
|
polymorphic_path(something),
|
115
115
|
:class => 'delete action',
|
116
116
|
:method => :delete,
|
@@ -119,8 +119,8 @@ module Sugar
|
|
119
119
|
|
120
120
|
def link_to_delete(something)
|
121
121
|
link_to(image_tag('icons/delete.png',
|
122
|
-
:alt => t('.delete'),
|
123
|
-
:title => t('.delete')),
|
122
|
+
:alt => t('.delete', :default => 'Delete'),
|
123
|
+
:title => t('.delete', :default => 'Delete')),
|
124
124
|
polymorphic_path(something),
|
125
125
|
:class => 'ajax action delete')
|
126
126
|
end
|
@@ -128,8 +128,8 @@ module Sugar
|
|
128
128
|
def default_new_link_options
|
129
129
|
@default_new_link_options ||= {
|
130
130
|
:image => 'icons/add.png',
|
131
|
-
:alt => t('.add'),
|
132
|
-
:title => t('.add')
|
131
|
+
:alt => t('.add', :default => 'Add'),
|
132
|
+
:title => t('.add', :default => 'Add')
|
133
133
|
}
|
134
134
|
end
|
135
135
|
|
data/sugar.gemspec
CHANGED