fesplugas-typus 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. data/.gitignore +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +80 -0
  4. data/Rakefile +61 -0
  5. data/VERSION +1 -0
  6. data/app/controllers/admin/master_controller.rb +324 -0
  7. data/app/controllers/typus_controller.rb +127 -0
  8. data/app/helpers/admin/form_helper.rb +351 -0
  9. data/app/helpers/admin/master_helper.rb +99 -0
  10. data/app/helpers/admin/public_helper.rb +24 -0
  11. data/app/helpers/admin/sidebar_helper.rb +259 -0
  12. data/app/helpers/admin/table_helper.rb +227 -0
  13. data/app/helpers/typus_helper.rb +169 -0
  14. data/app/models/typus_mailer.rb +14 -0
  15. data/app/models/typus_user.rb +5 -0
  16. data/app/views/admin/dashboard/_sidebar.html.erb +9 -0
  17. data/app/views/admin/resources/edit.html.erb +29 -0
  18. data/app/views/admin/resources/index.html.erb +28 -0
  19. data/app/views/admin/resources/new.html.erb +27 -0
  20. data/app/views/admin/resources/show.html.erb +21 -0
  21. data/app/views/admin/shared/_footer.html.erb +1 -0
  22. data/app/views/admin/shared/_pagination.html.erb +28 -0
  23. data/app/views/layouts/admin.html.erb +72 -0
  24. data/app/views/layouts/typus.html.erb +29 -0
  25. data/app/views/typus/dashboard.html.erb +13 -0
  26. data/app/views/typus/recover_password.html.erb +7 -0
  27. data/app/views/typus/reset_password.html.erb +13 -0
  28. data/app/views/typus/sign_in.html.erb +9 -0
  29. data/app/views/typus/sign_up.html.erb +7 -0
  30. data/app/views/typus_mailer/reset_password_link.erb +11 -0
  31. data/config/locales/es.yml +106 -0
  32. data/config/locales/pt-BR.yml +108 -0
  33. data/config/locales/typus_hacks.yml +14 -0
  34. data/config/routes.rb +14 -0
  35. data/generators/typus/templates/config/initializers/typus.rb +27 -0
  36. data/generators/typus/templates/config/typus/application.yml +45 -0
  37. data/generators/typus/templates/config/typus/application_roles.yml +23 -0
  38. data/generators/typus/templates/config/typus/typus.yml +14 -0
  39. data/generators/typus/templates/config/typus/typus_roles.yml +2 -0
  40. data/generators/typus/templates/db/create_typus_users.rb +21 -0
  41. data/generators/typus/templates/public/images/admin/arrow_down.gif +0 -0
  42. data/generators/typus/templates/public/images/admin/arrow_up.gif +0 -0
  43. data/generators/typus/templates/public/images/admin/spinner.gif +0 -0
  44. data/generators/typus/templates/public/images/admin/status_false.gif +0 -0
  45. data/generators/typus/templates/public/images/admin/status_true.gif +0 -0
  46. data/generators/typus/templates/public/images/admin/trash.gif +0 -0
  47. data/generators/typus/templates/public/javascripts/admin/application.js +14 -0
  48. data/generators/typus/templates/public/stylesheets/admin/reset.css +68 -0
  49. data/generators/typus/templates/public/stylesheets/admin/screen.css +709 -0
  50. data/generators/typus/typus_generator.rb +141 -0
  51. data/generators/typus_update_schema_to_01/templates/config/typus.yml +14 -0
  52. data/generators/typus_update_schema_to_01/templates/migration.rb +11 -0
  53. data/generators/typus_update_schema_to_01/typus_update_schema_to_01_generator.rb +19 -0
  54. data/init.rb +19 -0
  55. data/lib/typus/active_record.rb +298 -0
  56. data/lib/typus/authentication.rb +155 -0
  57. data/lib/typus/configuration.rb +92 -0
  58. data/lib/typus/format.rb +56 -0
  59. data/lib/typus/generator.rb +173 -0
  60. data/lib/typus/hash.rb +10 -0
  61. data/lib/typus/locale.rb +17 -0
  62. data/lib/typus/object.rb +22 -0
  63. data/lib/typus/quick_edit.rb +33 -0
  64. data/lib/typus/reloader.rb +17 -0
  65. data/lib/typus/string.rb +11 -0
  66. data/lib/typus/user.rb +137 -0
  67. data/lib/typus.rb +133 -0
  68. data/lib/vendor/active_record.rb +15 -0
  69. data/lib/vendor/paginator.rb +143 -0
  70. data/tasks/typus_tasks.rake +26 -0
  71. data/test/config/broken/application.yml +68 -0
  72. data/test/config/broken/application_roles.yml +20 -0
  73. data/test/config/broken/empty.yml +0 -0
  74. data/test/config/broken/empty_roles.yml +0 -0
  75. data/test/config/broken/undefined.yml +3 -0
  76. data/test/config/broken/undefined_roles.yml +6 -0
  77. data/test/config/default/typus.yml +14 -0
  78. data/test/config/default/typus_roles.yml +2 -0
  79. data/test/config/empty/empty_01.yml +0 -0
  80. data/test/config/empty/empty_01_roles.yml +0 -0
  81. data/test/config/empty/empty_02.yml +0 -0
  82. data/test/config/empty/empty_02_roles.yml +0 -0
  83. data/test/config/locales/es.yml +10 -0
  84. data/test/config/ordered/001_roles.yml +2 -0
  85. data/test/config/ordered/002_roles.yml +2 -0
  86. data/test/config/unordered/app_one_roles.yml +2 -0
  87. data/test/config/unordered/app_two_roles.yml +2 -0
  88. data/test/config/working/application.yml +67 -0
  89. data/test/config/working/application_roles.yml +22 -0
  90. data/test/config/working/typus.yml +14 -0
  91. data/test/config/working/typus_roles.yml +2 -0
  92. data/test/fixtures/app/controllers/admin/assets_controller.rb +2 -0
  93. data/test/fixtures/app/controllers/admin/categories_controller.rb +2 -0
  94. data/test/fixtures/app/controllers/admin/comments_controller.rb +2 -0
  95. data/test/fixtures/app/controllers/admin/pages_controller.rb +2 -0
  96. data/test/fixtures/app/controllers/admin/posts_controller.rb +2 -0
  97. data/test/fixtures/app/controllers/admin/status_controller.rb +6 -0
  98. data/test/fixtures/app/controllers/admin/typus_users_controller.rb +2 -0
  99. data/test/fixtures/app/controllers/admin/watch_dog_controller.rb +6 -0
  100. data/test/fixtures/app/views/admin/comments/_edit_bottom.html.erb +1 -0
  101. data/test/fixtures/app/views/admin/comments/_edit_sidebar.html.erb +1 -0
  102. data/test/fixtures/app/views/admin/comments/_edit_top.html.erb +1 -0
  103. data/test/fixtures/app/views/admin/comments/_index_bottom.html.erb +1 -0
  104. data/test/fixtures/app/views/admin/comments/_index_sidebar.html.erb +1 -0
  105. data/test/fixtures/app/views/admin/comments/_index_top.html.erb +1 -0
  106. data/test/fixtures/app/views/admin/comments/_new_bottom.html.erb +1 -0
  107. data/test/fixtures/app/views/admin/comments/_new_sidebar.html.erb +1 -0
  108. data/test/fixtures/app/views/admin/comments/_new_top.html.erb +1 -0
  109. data/test/fixtures/app/views/admin/comments/_show_bottom.html.erb +1 -0
  110. data/test/fixtures/app/views/admin/comments/_show_sidebar.html.erb +1 -0
  111. data/test/fixtures/app/views/admin/comments/_show_top.html.erb +1 -0
  112. data/test/fixtures/app/views/admin/dashboard/_bottom.html.erb +1 -0
  113. data/test/fixtures/app/views/admin/dashboard/_sidebar.html.erb +1 -0
  114. data/test/fixtures/app/views/admin/dashboard/_top.html.erb +1 -0
  115. data/test/fixtures/app/views/admin/shared/_footer.html.erb +1 -0
  116. data/test/fixtures/app/views/admin/status/index.html.erb +1 -0
  117. data/test/fixtures/app/views/admin/templates/_datepicker.html.erb +1 -0
  118. data/test/fixtures/assets.yml +11 -0
  119. data/test/fixtures/categories.yml +14 -0
  120. data/test/fixtures/comments.yml +27 -0
  121. data/test/fixtures/pages.yml +41 -0
  122. data/test/fixtures/posts.yml +37 -0
  123. data/test/fixtures/typus_users.yml +54 -0
  124. data/test/functional/admin/assets_controller_test.rb +57 -0
  125. data/test/functional/admin/categories_controller_test.rb +106 -0
  126. data/test/functional/admin/comments_controller_test.rb +121 -0
  127. data/test/functional/admin/master_controller_test.rb +5 -0
  128. data/test/functional/admin/posts_controller_test.rb +278 -0
  129. data/test/functional/admin/status_controller_test.rb +43 -0
  130. data/test/functional/admin/typus_users_controller_test.rb +239 -0
  131. data/test/functional/typus_controller_test.rb +315 -0
  132. data/test/helper.rb +51 -0
  133. data/test/helpers/admin/form_helper_test.rb +316 -0
  134. data/test/helpers/admin/master_helper_test.rb +65 -0
  135. data/test/helpers/admin/public_helper_test.rb +22 -0
  136. data/test/helpers/admin/sidebar_helper_test.rb +351 -0
  137. data/test/helpers/admin/table_helper_test.rb +255 -0
  138. data/test/helpers/typus_helper_test.rb +106 -0
  139. data/test/lib/active_record_test.rb +372 -0
  140. data/test/lib/configuration_test.rb +91 -0
  141. data/test/lib/hash_test.rb +11 -0
  142. data/test/lib/routes_test.rb +82 -0
  143. data/test/lib/string_test.rb +25 -0
  144. data/test/lib/typus_test.rb +105 -0
  145. data/test/models.rb +51 -0
  146. data/test/schema.rb +64 -0
  147. data/test/unit/typus_mailer_test.rb +33 -0
  148. data/test/unit/typus_test.rb +17 -0
  149. data/test/unit/typus_user_roles_test.rb +90 -0
  150. data/test/unit/typus_user_test.rb +177 -0
  151. data/test/vendor/active_record_test.rb +18 -0
  152. data/test/vendor/paginator_test.rb +138 -0
  153. data/typus.gemspec +225 -0
  154. metadata +241 -0
@@ -0,0 +1,29 @@
1
+ <% content_for :sidebar do %>
2
+ <%= typus_block :resource => @resource[:self], :partial => :edit_sidebar %>
3
+ <%= actions %>
4
+ <% end %>
5
+
6
+ <%= typus_block :resource => @resource[:self], :partial => :edit %>
7
+
8
+ <%= display_link_to_previous if params[:back_to] %>
9
+
10
+ <h2><%= link_to _('Dashboard'), admin_dashboard_path %> &rsaquo;
11
+ <%= link_to _(@resource[:class].human_name.pluralize), :action => 'index' %> &rsaquo;
12
+ <%= _('Edit') %></h2>
13
+
14
+ <%= typus_block :resource => @resource[:self], :partial => :edit_top %>
15
+
16
+ <% form_for @item,
17
+ :url => { :action => 'update',
18
+ :id => @item.id ,
19
+ :back_to => params[:back_to],
20
+ :resource => params[:resource],
21
+ :resource_id => params[:resource_id]},
22
+ :html => { :multipart => true } do |f| %>
23
+ <%= build_form(@fields) %>
24
+ <p><%= submit_tag _('Update entry'), :class => 'button' %></p>
25
+ <% end %>
26
+
27
+ <%= typus_relationships %>
28
+
29
+ <%= typus_block :resource => @resource[:self], :partial => :edit_bottom %>
@@ -0,0 +1,28 @@
1
+ <% content_for :sidebar do %>
2
+ <%= typus_block :resource => @resource[:self], :partial => :index_sidebar %>
3
+ <%= actions %>
4
+ <%= search %>
5
+ <%= filters %>
6
+ <% end %>
7
+
8
+ <%= typus_block :resource => @resource[:self], :partial => :index %>
9
+
10
+ <h2><%= link_to _('Dashboard'), admin_dashboard_path %> &rsaquo;
11
+ <%= _(@resource[:class].human_name.pluralize) %> <%= remove_filter_link %></h2>
12
+
13
+ <%= typus_block :resource => @resource[:self], :partial => :index_top %>
14
+
15
+ <% unless @items.count.zero? -%>
16
+ <%= build_list(@resource[:class], @fields, @items) %>
17
+ <%= render :partial => 'admin/shared/pagination' if @items.prev || @items.next %>
18
+ <% else %>
19
+ <div id="flash" class="notice">
20
+ <% if @resource[:class].count.zero? %>
21
+ <p><%= _("There are no {{records}}.", :records => @resource[:class].human_name.pluralize.downcase) %></p>
22
+ <% else %>
23
+ <p><%= _("There are no {{records}} under this filter.", :records => @resource[:class].human_name.pluralize.downcase) %></p>
24
+ <% end %>
25
+ </div>
26
+ <% end %>
27
+
28
+ <%= typus_block :resource => @resource[:self], :partial => :index_bottom %>
@@ -0,0 +1,27 @@
1
+ <% content_for :sidebar do %>
2
+ <%= typus_block :resource => @resource[:self], :partial => :new_sidebar %>
3
+ <%= actions %>
4
+ <% end %>
5
+
6
+ <%= typus_block :resource => @resource[:self], :partial => :new %>
7
+
8
+ <%= display_link_to_previous if params[:back_to] %>
9
+
10
+ <h2><%= link_to _('Dashboard'), admin_dashboard_path %> &rsaquo;
11
+ <%= link_to _(@resource[:class].human_name.pluralize), :action => 'index' %> &rsaquo;
12
+ <%= _('New') %></h2>
13
+
14
+ <%= typus_block :resource => @resource[:self], :partial => :new_top %>
15
+
16
+ <% form_for @item,
17
+ :url => { :action => 'create',
18
+ :back_to => params[:back_to],
19
+ :selected => params[:selected],
20
+ :resource => params[:resource],
21
+ :resource_id => params[:resource_id] },
22
+ :html => { :multipart => true } do |f| %>
23
+ <%= build_form(@fields) %>
24
+ <p><%= submit_tag _('Create entry'), :class => 'button' %></p>
25
+ <% end %>
26
+
27
+ <%= typus_block :resource => @resource[:self], :partial => :new_bottom %>
@@ -0,0 +1,21 @@
1
+ <% content_for :sidebar do %>
2
+ <%= typus_block :resource => @resource[:self], :partial => :show_sidebar %>
3
+ <%= actions %>
4
+ <% end %>
5
+
6
+ <%= typus_block :resource => @resource[:self], :partial => :show %>
7
+
8
+ <h2><%= link_to _('Dashboard'), admin_dashboard_path %> &rsaquo;
9
+ <%= link_to _(@resource[:class].human_name.pluralize), :action => 'index' %> &rsaquo;
10
+ <%= _('Show') %></h2>
11
+
12
+ <%= typus_block :resource => @resource[:self], :partial => :show_top %>
13
+
14
+ <dl>
15
+ <%- @fields.map { |u| u.first }.each do |column| -%>
16
+ <dt><%=h @resource[:class].human_attribute_name(column) %></dt>
17
+ <dd><%=h (!@item.send(column).blank?) ? @item.send(column) : 'nil' %></dd>
18
+ <%- end -%>
19
+ </dl>
20
+
21
+ <%= typus_block :resource => @resource[:self], :partial => :show_bottom %>
@@ -0,0 +1 @@
1
+ <p><a href="http://intraducibles.com/projects/typus">Typus</a> is the effortless backend interface for <a href="http://rubyonrails.org/">Ruby on Rails</a> applications.</p>
@@ -0,0 +1,28 @@
1
+ <div class="pagination">
2
+
3
+ <% if @items.prev? %>
4
+ <%= link_to _("&larr; Previous"), params.merge(:page => @items.prev.number) %>
5
+ <% else %>
6
+ <span class="disabled"><%= _("&larr; Previous") %></span>
7
+ <% end %>
8
+
9
+ <% last_page = 0 -%>
10
+
11
+ <% build_pagination(@pager) do |n| -%>
12
+ <% if @items.number == n -%>
13
+ <span class="current"><%= n %></span>
14
+ <% else -%>
15
+ <%= "..." if last_page + 1 < n %>
16
+ <%= link_to n, params.merge(:page => n) %>
17
+ <% end -%>
18
+ <% last_page = n -%>
19
+
20
+ <% end -%>
21
+
22
+ <% if @items.next? %>
23
+ <%= link_to _("Next &rarr;"), params.merge(:page => @items.next.number) %>
24
+ <% else %>
25
+ <span class="disabled"><%= _("Next &rarr;") %></span>
26
+ <% end %>
27
+
28
+ </div>
@@ -0,0 +1,72 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+
6
+ <head>
7
+
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+
10
+ <title><%= page_title %></title>
11
+
12
+ <%= stylesheet_link_tag 'admin/reset', :media => 'screen' %>
13
+ <%= stylesheet_link_tag 'admin/screen', :media => 'screen' %>
14
+ <%= yield :stylesheets -%>
15
+
16
+ <%= javascript_include_tag 'admin/application' %>
17
+ <%= yield :javascripts -%>
18
+
19
+ </head>
20
+
21
+ <body>
22
+
23
+ <div id="header_wrapper">
24
+
25
+ <div id="header">
26
+ <div class="left">
27
+ <%= header %>
28
+ </div>
29
+ <div class="right">
30
+ <%= login_info %>
31
+ </div>
32
+ <div class="clear"></div>
33
+ </div>
34
+
35
+ </div>
36
+
37
+ <div id="wrapper">
38
+
39
+ <div id="content_wrapper">
40
+
41
+ <div id="content">
42
+ <%= display_flash_message %>
43
+ <%= yield %>
44
+ </div>
45
+
46
+ <div id="sidebar">
47
+ <%= yield :sidebar %>
48
+ </div>
49
+
50
+ <div class="clear"></div>
51
+
52
+ </div>
53
+
54
+ </div>
55
+
56
+ <div id="footer_wrapper">
57
+
58
+ <div id="footer">
59
+ <div class="left">
60
+ <%= typus_block :location => 'shared', :partial => 'footer' %>
61
+ </div>
62
+ <div class="right">
63
+ <%= locales %>
64
+ </div>
65
+ <div class="clear"></div>
66
+ </div>
67
+
68
+ </div>
69
+
70
+ </body>
71
+
72
+ </html>
@@ -0,0 +1,29 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+
6
+ <head>
7
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
8
+ <meta name="apple-mobile-web-app-capable" content="yes" />
9
+ <meta name="viewport" content="width=500, initial-scale=0.60, minimum-scale=0.60" />
10
+ <title><%= page_title %></title>
11
+ <%= stylesheet_link_tag 'admin/reset', :media => 'screen' %>
12
+ <%= stylesheet_link_tag 'admin/screen', :media => 'screen' %>
13
+ </head>
14
+
15
+ <body>
16
+
17
+ <div id="dialog">
18
+ <h1><%= link_to Typus::Configuration.options[:app_name], admin_sign_in_path %></h1>
19
+ <%= display_flash_message %>
20
+ <%= yield %>
21
+ </div>
22
+
23
+ <div id="bottom_dialog">
24
+ <%= typus_block :location => 'shared', :partial => 'footer' %>
25
+ </div>
26
+
27
+ </body>
28
+
29
+ </html>
@@ -0,0 +1,13 @@
1
+ <% content_for :sidebar do %>
2
+ <%= typus_block :location => 'dashboard', :partial => 'sidebar' %>
3
+ <% end %>
4
+
5
+ <h2><%= _("Dashboard") %></h2>
6
+
7
+ <%= typus_block :location => 'dashboard', :partial => 'top' %>
8
+
9
+ <%= resources %>
10
+
11
+ <%= applications %>
12
+
13
+ <%= typus_block :location => 'dashboard', :partial => 'bottom' %>
@@ -0,0 +1,7 @@
1
+ <% form_tag admin_recover_password_path do %>
2
+ <ul>
3
+ <li><label for="email"><%= _("Email") %></label>
4
+ <%= text_field :user, :email, :size => "20", :class => 'text' %></li>
5
+ <li><%= submit_tag _("Recover password"), :class => 'button' %> <%= link_to _("I remember my password"), admin_sign_in_path %></li>
6
+ </ul>
7
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <% form_tag admin_reset_password_path do %>
2
+
3
+ <%= hidden_field_tag :token, @user.token %>
4
+
5
+ <ul>
6
+ <li><label for="password"><%= _("Password") %></label>
7
+ <%= password_field :user, :password, :size => 20, :class => 'text' %></li>
8
+ <li><label for="password"><%= _("Password confirm") %></label>
9
+ <%= password_field :user, :password_confirmation, :size => 20, :class => 'text' %></li>
10
+ <li><%= submit_tag _("Change password"), :class => 'button' %> <%= link_to _("I remember my password"), admin_sign_in_path %></li>
11
+ </ul>
12
+
13
+ <% end %>
@@ -0,0 +1,9 @@
1
+ <% form_tag admin_sign_in_path(:back_to => params[:back_to]) do %>
2
+ <ul>
3
+ <li><label for="email"><%= _("Email") %></label>
4
+ <%= text_field :user, :email, :size => 20, :class => 'text' %></li>
5
+ <li><label for="password"><%= _("Password") %></label>
6
+ <%= password_field :user, :password, :size => 20, :class => 'text' %></li>
7
+ <li><%= submit_tag _("Sign in"), :class => 'button' %> <%= link_to _("Recover password"), admin_recover_password_path if Typus::Configuration.options[:recover_password] %></li>
8
+ </ul>
9
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <% form_tag admin_sign_up_path do %>
2
+ <ul>
3
+ <li><label for="email"><%= _("Email") %></label>
4
+ <%= text_field :user, :email, :size => 20, :class => 'text' %></li>
5
+ <li><%= submit_tag _("Sign up"), :class => 'button' %></li>
6
+ </ul>
7
+ <% end %>
@@ -0,0 +1,11 @@
1
+
2
+ <%= _("You can update your password at") %>:
3
+
4
+ <%= url_for admin_reset_password_url(:token => @user.token) %>
5
+
6
+ <%= _("If you didn't request a password update, you can ignore this message") %>
7
+
8
+ <%= _("Have a nice day") %>
9
+
10
+ --
11
+ <%= Typus::Configuration.options[:app_name] %>
@@ -0,0 +1,106 @@
1
+ es:
2
+ "Email": "Correo"
3
+ "Password": "Contraseña"
4
+ "Password confirmation": "Confirmar contraseña"
5
+ "Sign in": "Entrar"
6
+ "Recover password": "Recuperar contraseña"
7
+ "Sign up": "Crear cuenta"
8
+ "Enter your email below to create the first user": "Introduce tu email para crear el primer usuario."
9
+ "That doesn't seem like a valid email address": "Eso no parecia una dirección válida de correo electrónico."
10
+ "I remember my password": "Recuerdo mi contraseña"
11
+ "Password recovery link sent to your email": "Enlace de recuperación de contraseña enviado a tu correo electrónico."
12
+ "You can login with your new password": "Puedes acceder con tu nueva contraseña."
13
+ "Passwords don't match": "Las Contraseñas no coinciden."
14
+ "A valid token is required": "Se requiere un token válido."
15
+ "The email and/or password you entered is invalid": "El correo y/o la contraseña proporcionadas no son válidas."
16
+ "There are not defined applications in config/typus/*.yml": "There are not defined applications in config/typus/*.yml"
17
+ "Overview": "Visión general"
18
+ "Options": "Opciones"
19
+ "Password confirm": "Confirmación de contraseña"
20
+ "Change password": "Cambiar contraseña"
21
+ "There are no {{records}}": "No hay {{records}}."
22
+ "There are no {{records}} under this filter": "No hay {{records}} con este filtro."
23
+ "Dashboard": "Dashboard"
24
+ "Create entry": "Crear entrada"
25
+ "Update entry": "Actualizar entrada"
26
+ "New": "Nuevo"
27
+ "Show": "Mostrar"
28
+ "Edit": "Editar"
29
+ "Login": "Login"
30
+ "Setup": "Configurar"
31
+ "Create": "Crear"
32
+ "Sign out": "Salir"
33
+ "Update": "Actualizado"
34
+ "View site": "Ver web"
35
+ "Logged as": "Autenticado como"
36
+ "Remove filter": "Quitar filtro"
37
+ "Back to list": "Volver al listado"
38
+ "Actions": "Acciones"
39
+ "Add": "Añadir"
40
+ "&larr; Previous": "&larr; Anterior"
41
+ "Next &rarr;": "Siguente &rarr;"
42
+ "Previous": "Anterior"
43
+ "Next": "Siguiente"
44
+ "Search": "Búsqueda"
45
+ "Search by": "Buscar por"
46
+ "{{model}} successfully updated": "{{model}} satisfactoriamente actualizado."
47
+ "{{model}} successfully created": "{{model}} satisfactoriamente creado."
48
+ "{{model}} successfully removed": "{{model}} satisfactoriamente eliminado."
49
+ "{{model}} {{attribute}} changed": "{{model}} {{attribute}} cambiado."
50
+ "You're adding a new {{resource_from}} to {{resource_to}}": "Estas añadiendo un nuevo {{resource_from}} a {{resource_to}}."
51
+ "You're adding a new {{resource_from}}": "Estas añadiendo un nuevo {{resource_from}}."
52
+ "You're updating a {{resource_from}} for {{resource_to}}": "Estas actualizando un {{resource_from}} de {{resource_to}}."
53
+ "You're updating a {{resource_from}}": "Estas actualizando un {{resource_from}}."
54
+ "Toggle is disabled": "Toggle is disabled."
55
+ "Record moved {{to}}": "Record moved {{to}}."
56
+ "{{model_a}} related to {{model_b}}": "{{model_a}} relacionado con {{model_b}}."
57
+ "{{model_a}} successfully assigned to {{model_b}}": "{{model_a}} asignado satisfactoriamente a {{model_b}}."
58
+ "{{model_a}} unrelated from {{model_b}}": "{{model_a}} no esta relacionado con {{model_b}}."
59
+ "{{model_a}} removed from {{model_b}}": "{{model_a}} borrado de {{model_b}}."
60
+ "Your new password is {{password}}": "Tu nueva contraseña es {{password}}."
61
+ "Add entry": "Añadir entrada"
62
+ "Go to": "Ir a"
63
+ "First name": "Nombre"
64
+ "Last name": "Apellidos"
65
+ "Roles": "Roles"
66
+ "Status": "Estado"
67
+ "Typus User": "Typus User"
68
+ "System Users Administration": "Administrar Usuarios del Sistema"
69
+ "Resources": "Recursos"
70
+ "Up": "Subir"
71
+ "Down": "Bajar"
72
+ "filter by": "filtrar por"
73
+ "Checked if active": "Marca para activar"
74
+ "As you're not the admin or the owner of this record you cannot edit it": "Como no eres el admin o el propietario de este registro no puedes editarlo."
75
+ "You can't change your role": "No puedes cambiar tu propio rol."
76
+ "Error! Typus User or role doesn't exist": "Error! Typus User o el role no existen."
77
+ "You can't toggle your status": "No puedes cambiar tu estado."
78
+ "You're not allowed to toggle status": "No se te permite cambiar tu estado."
79
+ "You can't remove yourself": "No te puedes eliminar a ti mismo."
80
+ "You're not allowed to remove Typus Users": "No se te permite borrar usuarios de typus."
81
+ "{{current_user_role}} can't perform action. ({{action}})": "{{current_user_role}} no puede realizar la acción. ({{action}})"
82
+ "{{current_user_role}} can't go to {{action}} on {{controller}}": "{{current_user_role}} no pude ir a {{action}} en {{controller}}."
83
+ "{{current_user_role}} can't delete this item": "{{current_user_role}} no puede borrar este elemento."
84
+ "{{current_user_role}} can't perform action ({{action}})": "{{current_user_role}} no puede relizar la accion ({{action}})"
85
+ "Record owned by another user": "Registro propiedad de otro usuario."
86
+ "{{current_user_role}} can't display items": "{{current_user_role}} no puede mostrar los elementos."
87
+ "Submodules": "Submodulos"
88
+ "Parent module": "Modulo padre"
89
+ "You can update your password at": "Puedes actualizar tu contraseña en"
90
+ "If you didn't request a password update, you can ignore this message": "Si no pediste una actualización de tu contraseña, puedes ignorar este mensaje."
91
+ "Have a nice day": "Que tengas un buen dia."
92
+ "Reset password": "Cambiar contraseña"
93
+ "Add new": "Añadir nuevo"
94
+ "Do you want to cancel it?": " ¿Quieres cancelarlo? "
95
+ "Click here": "Pulsa aquí"
96
+ "Are you sure you want to leave this page?": "¿Estas seguro que quieres abandonar esta página?"
97
+ "If you have made any changes to the fields without clicking the Save/Update entry button, your changes will be lost": "Si has relizado algún cambio en los campos sin pulsar en el botón de Guardar/Actualizar, tus cambios se perderán."
98
+ "Click OK to continue, or click Cancel to stay on this page": "Pulse OK para continuar, o pulse Cancelar para permanecer en esta página."
99
+ "Remove entry?": "¿Borrar entrada?"
100
+ "Unrelate {{unrelate_model}} from {{unrelate_model_from}}?": "Unrelate {{unrelate_model}} from {{unrelate_model_from}}?"
101
+ "Change {{attribute}}?": "Change {{attribute}}?"
102
+ "Set language": "Cambiar idioma"
103
+ "Today": "Hoy"
104
+ "Past 7 days": "Últimos 7 dias"
105
+ "This month": "Este mes"
106
+ "This year": "Este año"
@@ -0,0 +1,108 @@
1
+ pt-BR:
2
+ "Email": "Email"
3
+ "Password": "Senha"
4
+ "Password confirmation": "Senha confirmação"
5
+ "Sign in": "Entrar"
6
+ "Recover password": "Recuperar senha"
7
+ "Sign up": "Criar conta"
8
+ "Enter your email below to create the first user": "Escreva seu email para criar o primeiro usuário"
9
+ "That doesn't seem like a valid email address": "Este não parece um email válido"
10
+ "I remember my password": "Lembro minha senha"
11
+ "Password recovery link sent to your email": "Link para recuperar senha enviado para seu email."
12
+ "You can login with your new password": "Você já pode entrar com sua nova senha."
13
+ "Passwords don't match": "As senhas não conferem."
14
+ "A valid token is required": "É necessário um token válido."
15
+ "The email and/or password you entered is invalid": "O email e/ou a senha que você colocou são inválidos."
16
+ "There are not defined applications in config/typus/*.yml": "Não há aplicativos definidos em config/typus/*.yml"
17
+ "Overview": "Visão geral"
18
+ "Options": "Opções"
19
+ "Password confirmation": "Confirmação de senha"
20
+ "Change password": "Trocar senha"
21
+ "There are no {{records}}": "Não há {{records}}."
22
+ "There are no {{records}} under this filter": "Não há {{records}} com este filtro."
23
+ "Dashboard": "Painel"
24
+ "Create entry": "Criar entrada"
25
+ "Update entry": "Atualizar entrada"
26
+ "New": "Novo"
27
+ "Show": "Mostrar"
28
+ "Edit": "Editar"
29
+ "Login": "Login"
30
+ "Setup": "Configurar"
31
+ "Create": "Criar"
32
+ "Sign out": "Sair"
33
+ "Update": "Atualizado"
34
+ "View site": "Ver site"
35
+ "Logged as": "Logado como"
36
+ "Remove filter": "Remover filtro"
37
+ "Back to list": "Voltar à lista"
38
+ "Actions": "Ações"
39
+ "Add": "Adicionar"
40
+ "&larr; Previous": "&larr; Anterior"
41
+ "Next &rarr;": "Próximo &rarr;"
42
+ "Previous": "Anterior"
43
+ "Next": "Próximo"
44
+ "Search": "Busca"
45
+ "Search by": "Buscar por"
46
+ "{{model}} successfully updated": "{{model}} atualizado com sucesso."
47
+ "{{model}} successfully created": "{{model}} criado com sucesso."
48
+ "{{model}} successfully removed": "{{model}} removido com sucesso."
49
+ "{{model}} {{attribute}} changed": "{{model}} {{attribute}} atualizado."
50
+ "You're adding a new {{resource_from}} to {{resource_to}}": "Você está adicionando um novo {{resource_from}} a {{resource_to}}."
51
+ "You're adding a new {{resource_from}}": "Você está adicionando um novo {{resource_from}}."
52
+ "You're updating a {{resource_from}} for {{resource_to}}": "Você está atualizando um {{resource_from}} de {{resource_to}}."
53
+ "You're updating a {{resource_from}}": "Você está atualizando um {{resource_from}}."
54
+ "Toggle is disabled": "Toggle está desabilitado."
55
+ "Record moved {{to}}": "Registro movido {{to}}."
56
+ "{{model_a}} related to {{model_b}}": "{{model_a}} relacionado com {{model_b}}."
57
+ "{{model_a}} successfully assigned to {{model_b}}": "{{model_a}} atribuído com sucesso a {{model_b}}."
58
+ "{{model_a}} unrelated from {{model_b}}": "{{model_a}} não está relacionado com {{model_b}}."
59
+ "{{model_a}} removed from {{model_b}}": "{{model_a}} removido de {{model_b}}."
60
+ "Your new password is {{password}}": "Sua nova senha é {{password}}."
61
+ "Add entry": "Adicionar entrada"
62
+ "Go to": "Ir a"
63
+ "First name": "Primeiro nome"
64
+ "Last name": "Sobrenome"
65
+ "Roles": "Função"
66
+ "Status": "Status"
67
+ "Typus User": "Usuário do sistema"
68
+ "System Users Administration": "Administrar usuários do sistema"
69
+ "Resources": "Recursos"
70
+ "Up": "Subir"
71
+ "Down": "Descer"
72
+ "filter by": "filtrar por"
73
+ "Checked if active": "Marcar para ativar"
74
+ "As you're not the admin or the owner of this record you cannot edit it": "Como você não é o dono desse registro ou o admin, você não pode editá-lo."
75
+ "You can't change your role": "Você não pode mudar sua própria função no sistema."
76
+ "Error! Typus User or role doesn't exist": "Erro! Usuário ou função não existe."
77
+ "You can't toggle your status": "Você não pode mudar seu status."
78
+ "You're not allowed to toggle status": "Você não está autorizado a mudar o status."
79
+ "You can't remove yourself": "Você não pode apagar a si mesmo."
80
+ "You're not allowed to remove Typus Users": "Você não está autorizado a apagar usuários do sistema."
81
+ "{{current_user_role}} can't perform action. ({{action}})": "{{current_user_role}} não pode realizar a ação. ({{action}})"
82
+ "{{current_user_role}} can't go to {{action}} on {{controller}}": "{{current_user_role}} não pode ir a {{action}} no {{controller}}."
83
+ "{{current_user_role}} can't delete this item": "{{current_user_role}} não pode apagar este item."
84
+ "{{current_user_role}} can't perform action ({{action}})": "{{current_user_role}} não pode realizar a ação ({{action}})"
85
+ "Record owned by another user": "Registro é propriedade de outro usuário."
86
+ "{{current_user_role}} can't display items": "{{current_user_role}} não pode mostrar os items."
87
+ "Submodules": "Submódulos"
88
+ "Parent module": "Módulo pai"
89
+ "You can update your password at": "Você pode atualizar sua senha em"
90
+ "If you didn't request a password update, you can ignore this message": "Se você não pediu uma renovação de senha, por favor ignore esta mensagem."
91
+ "Have a nice day": "Tenha um bom dia."
92
+ "Reset password": "Trocar senha"
93
+ "Add new": "Adicionar novo"
94
+ "Do you want to cancel it?": "Quer cancelar?"
95
+ "Click here": "Clique aqui"
96
+ "Are you sure you want to leave this page?": "Tem certeza que quer sair desta página?"
97
+ "If you have made any changes to the fields without clicking the Save/Update entry button, your changes will be lost": "Se você fez alterações nos campos e não clicou no botão de Salvar/Atualizar, suas alterações serão perdidas"
98
+ "Click OK to continue, or click Cancel to stay on this page": "Clique OK para continuar, ou clique em Cancelar para ficar nesta página."
99
+ "Remove entry?": "Remover entrada?"
100
+ "Unrelate {{unrelate_model}} from {{unrelate_model_from}}?": "Desvincular {{unrelate_model}} de {{unrelate_model_from}}?"
101
+ "Change {{attribute}}?": "Mudar {{attribute}}?"
102
+ "Set language": "Mudar idioma"
103
+ "Today": "Hoje"
104
+ "Past 7 days": "Últimos 7 dias"
105
+ "This month": "Este mês"
106
+ "This year": "Este ano"
107
+ "Created at": "Criado em"
108
+ "Updated at": "Atualizado em"
@@ -0,0 +1,14 @@
1
+ en:
2
+ activerecord:
3
+ models:
4
+ typus_user: "Typus user"
5
+
6
+ es:
7
+ activerecord:
8
+ models:
9
+ typus_user: "Typus user"
10
+
11
+ pt-BR:
12
+ activerecord:
13
+ models:
14
+ typus_user: "Typus user"
data/config/routes.rb ADDED
@@ -0,0 +1,14 @@
1
+ ActionController::Routing::Routes.draw do |map|
2
+
3
+ map.with_options :controller => 'typus', :path_prefix => 'admin' do |i|
4
+ i.admin_quick_edit 'quick_edit', :action => 'quick_edit'
5
+ i.admin_dashboard '', :action => 'dashboard'
6
+ i.admin_sign_in 'sign_in', :action => 'sign_in'
7
+ i.admin_sign_out 'sign_out', :action => 'sign_out'
8
+ i.admin_sign_up 'sign_up', :action => 'sign_up'
9
+ i.admin_recover_password 'recover_password', :action => 'recover_password'
10
+ i.admin_reset_password 'reset_password', :action => 'reset_password'
11
+ i.admin_set_locale 'set_locale', :action => 'set_locale'
12
+ end
13
+
14
+ end
@@ -0,0 +1,27 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # System wide options
4
+
5
+ Typus::Configuration.options[:app_name] = '<%= application %>'
6
+ # Typus::Configuration.options[:config_folder] = 'config/typus'
7
+ # Typus::Configuration.options[:email] = 'admin@example.com'
8
+ # Typus::Configuration.options[:locales] = [ [ "English", :en ], [ "Español", :es ] ]
9
+ # Typus::Configuration.options[:recover_password] = true
10
+ # Typus::Configuration.options[:root] = 'admin'
11
+ # Typus::Configuration.options[:ssl] = false
12
+ # Typus::Configuration.options[:templates_folder] = 'admin/templates'
13
+ # Typus::Configuration.options[:user_class_name] = 'TypusUser'
14
+ # Typus::Configuration.options[:user_fk] = 'typus_user_id'
15
+
16
+ # Model options which can also be defined by model on the yaml files.
17
+
18
+ # Typus::Configuration.options[:index_after_save] = true
19
+ # Typus::Configuration.options[:end_year] = Time.now.year + 1
20
+ # Typus::Configuration.options[:form_rows] = 10
21
+ # Typus::Configuration.options[:icon_on_boolean] = false
22
+ # Typus::Configuration.options[:minute_step] = 5
23
+ # Typus::Configuration.options[:nil] = 'nil'
24
+ # Typus::Configuration.options[:per_page] = 15
25
+ # Typus::Configuration.options[:sidebar_selector] = 5
26
+ # Typus::Configuration.options[:start_year] = Time.now.year - 10
27
+ # Typus::Configuration.options[:toggle] = true
@@ -0,0 +1,45 @@
1
+ ###
2
+ ## Typus Configuration File
3
+ ##
4
+ #
5
+ # Post:
6
+ # fields:
7
+ # list: id, title, category_id, created_at, is_published?
8
+ # form: title, body, is_published?, created_at
9
+ # show: title, category, is_published?
10
+ # relationship: title, status
11
+ # options:
12
+ # auto_generated:
13
+ # booleans:
14
+ # is_published: ["Yes, it is", "No, it isn't"]
15
+ # date_formats:
16
+ # created_at: post_long
17
+ # selectors:
18
+ # read_only:
19
+ # actions:
20
+ # index: cleanup
21
+ # edit: send_as_newsletter
22
+ # show: rebuild
23
+ # export: csv, xml, pdf
24
+ # order_by: created_at
25
+ # relationships:
26
+ # filters: is_published?, created_at, category_id
27
+ # search: title, body
28
+ # application: Application
29
+ # description: Some text to describe the model
30
+ # options:
31
+ # default_action_on_item: show
32
+ # end_year: 2015
33
+ # form_rows: 25
34
+ # icon_on_boolean: true
35
+ # index_after_save: false
36
+ # minute_step: 15
37
+ # nil: 'nil'
38
+ # per_page: 5
39
+ # sidebar_selector: 5
40
+ # start_year: 1990
41
+ # toggle: true
42
+ #
43
+ ###
44
+
45
+ <%= configuration[:base] %>