i18n_shoulda_generator 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/rails_generators/shoulda_scaffold/templates/erb/edit.html.erb +3 -3
- data/rails_generators/shoulda_scaffold/templates/erb/index.html.erb +5 -5
- data/rails_generators/shoulda_scaffold/templates/erb/new.html.erb +2 -2
- data/rails_generators/shoulda_scaffold/templates/erb/show.html.erb +2 -2
- data/rails_generators/shoulda_scaffold/templates/haml/_form.html.haml +2 -2
- data/rails_generators/shoulda_scaffold/templates/haml/edit.html.haml +6 -6
- data/rails_generators/shoulda_scaffold/templates/haml/index.html.haml +10 -10
- data/rails_generators/shoulda_scaffold/templates/haml/layout.html.haml +11 -11
- data/rails_generators/shoulda_scaffold/templates/haml/new.html.haml +4 -4
- data/rails_generators/shoulda_scaffold/templates/haml/show.html.haml +5 -5
- metadata +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
<h1>Editing <%= singular_name.humanize %></h1>
|
1
|
+
<h1> <%= t("Editing") %> <%= singular_name.humanize %></h1>
|
2
2
|
|
3
3
|
<%% form_for(@<%= singular_name %>) do |form| %>
|
4
4
|
<%%= render :partial => 'form', :locals => {:form => form} %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<%% end %>
|
7
7
|
|
8
8
|
<p>
|
9
|
-
<%%= link_to '
|
9
|
+
<%%= link_to t('show'), @<%= singular_name %> %>
|
10
10
|
|
|
11
|
-
<%%= link_to '
|
11
|
+
<%%= link_to t('back'), <%= plural_name %>_path %>
|
12
12
|
</p>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<h1> Listing <%= plural_name.humanize %></h1>
|
1
|
+
<h1> <%= t("Listing") %> <%= plural_name.humanize %></h1>
|
2
2
|
|
3
3
|
<table>
|
4
4
|
<tr>
|
@@ -12,11 +12,11 @@
|
|
12
12
|
<% for attribute in attributes -%>
|
13
13
|
<td><%%= h <%= singular_name %>.<%= attribute.name %> %></td>
|
14
14
|
<% end -%>
|
15
|
-
<td><%%= link_to
|
16
|
-
<td><%%= link_to
|
17
|
-
<td><%%= link_to
|
15
|
+
<td><%%= link_to t('show'), <%= singular_name %> %></td>
|
16
|
+
<td><%%= link_to t('edit'), edit_<%= singular_name %>_path(<%= singular_name %>) %></td>
|
17
|
+
<td><%%= link_to t('destroy'), <%= singular_name %>, :confirm => 'Are you sure?', :method => :delete %></td>
|
18
18
|
</tr>
|
19
19
|
<%% end %>
|
20
20
|
</table>
|
21
21
|
|
22
|
-
<p><%%= link_to '
|
22
|
+
<p><%%= link_to(t('new') + " " + '<%= singular_name.humanize %>', new_<%= singular_name %>_path) %></p>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<h1>New <%= singular_name.humanize %></h1>
|
1
|
+
<h1> <%= t("New") %> <%= singular_name.humanize %></h1>
|
2
2
|
|
3
3
|
<%% form_for(@<%= singular_name %>) do |form| %>
|
4
4
|
<%%= render :partial => 'form', :locals => {:form => form} %>
|
5
5
|
<p><%%= form.submit 'Create' %></p>
|
6
6
|
<%% end %>
|
7
7
|
|
8
|
-
<p><%%= link_to '
|
8
|
+
<p><%%= link_to t('back'), <%= plural_name %>_path %></p>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
</dl>
|
7
7
|
|
8
8
|
<p>
|
9
|
-
<%%= link_to '
|
9
|
+
<%%= link_to t('edit'), edit_<%= singular_name %>_path(@<%= singular_name %>)%>
|
10
10
|
|
|
11
|
-
<%%= link_to '
|
11
|
+
<%%= link_to t('back'), <%= plural_name %>_path %>
|
12
12
|
</p>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
%h1
|
2
|
-
|
3
|
-
|
2
|
+
= t("Editing")
|
3
|
+
<%= singular_name.humanize %>
|
4
4
|
|
5
5
|
- form_for(@<%= singular_name %>) do |form|
|
6
|
-
|
7
|
-
|
6
|
+
= render :partial => 'form', :locals => {:form => form}
|
7
|
+
%p= form.submit t('update')
|
8
8
|
|
9
9
|
%p
|
10
|
-
|
11
|
-
|
10
|
+
= link_to t('show'), @<%= singular_name %>
|
11
|
+
= link_to t('back'), <%= plural_name %>_path
|
@@ -1,20 +1,20 @@
|
|
1
1
|
%h1
|
2
|
-
|
3
|
-
|
2
|
+
= t("Listing")
|
3
|
+
<%= plural_name.humanize %>
|
4
4
|
|
5
5
|
%table
|
6
|
-
|
6
|
+
%tr
|
7
7
|
<% for attribute in attributes -%>
|
8
|
-
|
8
|
+
%th <%= attribute.column.human_name %>
|
9
9
|
<% end -%>
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
- for <%= singular_name %> in @<%= plural_name %>
|
12
|
+
%tr
|
13
13
|
<% for attribute in attributes -%>
|
14
|
-
|
14
|
+
%td= h <%= singular_name %>.<%= attribute.name %>
|
15
15
|
<% end -%>
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
%td= link_to t('show'), <%= singular_name %>
|
17
|
+
%td= link_to t('edit'), edit_<%= singular_name %>_path(<%= singular_name %>)
|
18
|
+
%td= link_to t('destroy'), <%= singular_name %>, :confirm => t('sure destroy'), :method => :delete
|
19
19
|
|
20
20
|
%p= link_to (t('new') + " " + '<%= singular_name.humanize %>', new_<%= singular_name %>_path)
|
@@ -1,15 +1,15 @@
|
|
1
1
|
!!! Transitional
|
2
2
|
%html
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
%head
|
4
|
+
%title= "#{controller.controller_name}: #{controller.action_name}"
|
5
|
+
= stylesheet_link_tag 'blueprint/screen', :media => 'screen'
|
6
|
+
= stylesheet_link_tag 'blueprint/print', :media => 'print'
|
7
|
+
= "<!--[if IE]>#{stylesheet_link_tag 'blueprint/ie', :media => 'screen'}<![endif]-->"
|
8
|
+
%body
|
9
|
+
.container
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
#content{:class => 'column span-24'}
|
12
|
+
- flash.each do |key, value|
|
13
|
+
%div{:class => key}= h(value)
|
14
14
|
|
15
|
-
|
15
|
+
= yield
|
@@ -1,9 +1,9 @@
|
|
1
1
|
%h1
|
2
|
-
|
3
|
-
|
2
|
+
= t("New")
|
3
|
+
<%= singular_name.humanize %>
|
4
4
|
|
5
5
|
- form_for(@<%= singular_name %>) do |form|
|
6
|
-
|
7
|
-
|
6
|
+
= render :partial => 'form', :locals => {:form => form}
|
7
|
+
%p= form.submit t("create")
|
8
8
|
|
9
9
|
%p= link_to t('back'), <%= plural_name %>_path
|
@@ -1,10 +1,10 @@
|
|
1
1
|
%dl
|
2
2
|
<% for attribute in attributes -%>
|
3
|
-
|
4
|
-
|
3
|
+
%dt <%= attribute.column.human_name %>
|
4
|
+
%dd= h @<%= singular_name %>.<%= attribute.name %>
|
5
5
|
<% end -%>
|
6
6
|
|
7
7
|
%p
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
= link_to t('edit'), edit_<%= singular_name %>_path(@<%= singular_name %>)
|
9
|
+
|
|
10
|
+
= link_to t('back'), <%= plural_name %>_path
|