Skip to content

Commit

Permalink
menu ok, locales en+pt, listing starting, new form starting
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframezen committed Jul 5, 2011
1 parent 8c2a8cd commit 660095e
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/controllers/customfieldsdeps_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def index
end

def list
@teste = [1,2,3]
@custs = Customfielddep.find(:all,:order=>'name')
end


Expand Down
2 changes: 0 additions & 2 deletions app/models/customfielddeps.rb.bak
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Customfielddeps < ActiveRecord::Base
unloadable
belongs_to :custom_field, :foreign_key: "parent_id"
acts_as_tree :order => "name"

end
4 changes: 2 additions & 2 deletions app/views/customfieldsdeps/list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<h2>Custom Fields Deps</h2>

<% if @teste.any? %>
<% if @custs.any? %>
<%= @teste %>
<%= @custs%>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
Expand Down
2 changes: 2 additions & 0 deletions app/views/customfieldsdeps/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h2><%= link_to l(:l_custdeps_plural), :controller => 'Customfieldsdeps', :action => 'list' %> &#187; <%=l(:l_custdeps_new)%></h2>

Binary file added config/locales/.pt.yml.swp
Binary file not shown.
5 changes: 3 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# English strings go here for Rails i18n
en:
my_label: "My label"
l_custdeps_plural: "Custom Fields deps"
l_custdeps_new: "New custom dep"

4 changes: 4 additions & 0 deletions config/locales/pt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pt:
l_custdeps_plural: "Campos personalizados especiais"
l_custdeps_new: "Nova dependência especial"

2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
author_url 'http://mainframezen.com'
menu :admin_menu, :customfieldsdeps,
{ :controller => 'customfieldsdeps', :action => 'list' },
:caption => 'Custom Fields Dependencies',
:caption => :l_custdeps_plural,
:html => {:class => 'custom_fields'}
end
5 changes: 3 additions & 2 deletions lang/en.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# English strings go here
my_label: "My label"
l_custdeps_plural: "Custom Fields deps"
l_custdeps_new: "New custom dep"

0 comments on commit 660095e

Please sign in to comment.