engine_room 0.5.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 (214) hide show
  1. data/.gitignore +10 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +159 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.rdoc +44 -0
  6. data/Rakefile +30 -0
  7. data/TODO +3 -0
  8. data/app/controllers/engine_room/content_controller.rb +117 -0
  9. data/app/controllers/engine_room/fields_controller.rb +119 -0
  10. data/app/controllers/engine_room/models_controller.rb +89 -0
  11. data/app/controllers/engine_room/pages_controller.rb +17 -0
  12. data/app/controllers/engine_room/sections_controller.rb +74 -0
  13. data/app/controllers/engine_room/users_controller.rb +84 -0
  14. data/app/controllers/er_devise/passwords_controller.rb +6 -0
  15. data/app/controllers/er_devise/registrations_controller.rb +8 -0
  16. data/app/controllers/er_devise/sessions_controller.rb +6 -0
  17. data/app/helpers/engine_room/content_helper.rb +103 -0
  18. data/app/helpers/engine_room/models_helper.rb +21 -0
  19. data/app/models/field.rb +89 -0
  20. data/app/models/section.rb +68 -0
  21. data/app/models/user.rb +31 -0
  22. data/app/views/engine_room/content/_form.html.erb +13 -0
  23. data/app/views/engine_room/content/_overview.html.erb +28 -0
  24. data/app/views/engine_room/content/_sidebar.html.erb +14 -0
  25. data/app/views/engine_room/content/edit.html.erb +38 -0
  26. data/app/views/engine_room/content/index.html.erb +1 -0
  27. data/app/views/engine_room/content/new.html.erb +1 -0
  28. data/app/views/engine_room/content/overview.html.erb +3 -0
  29. data/app/views/engine_room/fields/_form.html.erb +57 -0
  30. data/app/views/engine_room/fields/edit.html.erb +1 -0
  31. data/app/views/engine_room/fields/new.html.erb +1 -0
  32. data/app/views/engine_room/models/_form.html.erb +0 -0
  33. data/app/views/engine_room/models/edit.html.erb +14 -0
  34. data/app/views/engine_room/models/index.html.erb +16 -0
  35. data/app/views/engine_room/models/new.html.erb +14 -0
  36. data/app/views/engine_room/models/overview.html.erb +14 -0
  37. data/app/views/engine_room/pages/dashboard.html.erb +1 -0
  38. data/app/views/engine_room/pages/settings.html.erb +1 -0
  39. data/app/views/engine_room/sections/_form.html.erb +34 -0
  40. data/app/views/engine_room/sections/_sidebar.html.erb +11 -0
  41. data/app/views/engine_room/sections/edit.html.erb +81 -0
  42. data/app/views/engine_room/sections/index.html.erb +3 -0
  43. data/app/views/engine_room/sections/new.html.erb +1 -0
  44. data/app/views/engine_room/users/_form.html.erb +47 -0
  45. data/app/views/engine_room/users/edit.html.erb +11 -0
  46. data/app/views/engine_room/users/index.html.erb +24 -0
  47. data/app/views/engine_room/users/new.html.erb +1 -0
  48. data/app/views/er_devise/mailer/confirmation_instructions.html.erb +5 -0
  49. data/app/views/er_devise/mailer/reset_password_instructions.html.erb +8 -0
  50. data/app/views/er_devise/mailer/unlock_instructions.html.erb +7 -0
  51. data/app/views/er_devise/passwords/edit.html.erb +16 -0
  52. data/app/views/er_devise/passwords/new.html.erb +13 -0
  53. data/app/views/er_devise/registrations/edit.html.erb +42 -0
  54. data/app/views/er_devise/registrations/new.html.erb +21 -0
  55. data/app/views/er_devise/sessions/new.html.erb +23 -0
  56. data/app/views/er_devise/shared/_links.erb +19 -0
  57. data/app/views/layouts/engine_room.html.erb +103 -0
  58. data/app/views/layouts/login.html.erb +71 -0
  59. data/app/views/shared/_content_layout_selector.html.erb +45 -0
  60. data/app/views/shared/_error_messages.html.erb +17 -0
  61. data/config/initializers/devise.rb +146 -0
  62. data/config/initializers/locale.rb +5 -0
  63. data/config/locales/devise.de.yml +42 -0
  64. data/config/locales/devise.en.yml +39 -0
  65. data/config/locales/engine_room.de.yml +33 -0
  66. data/config/locales/engine_room.en.yml +42 -0
  67. data/config/routes.rb +62 -0
  68. data/engine_room.gemspec +35 -0
  69. data/lib/engine_room.rb +17 -0
  70. data/lib/engine_room/action_controller/controller_methods.rb +21 -0
  71. data/lib/engine_room/action_view/view_methods.rb +8 -0
  72. data/lib/engine_room/active_record/record_methods.rb +18 -0
  73. data/lib/engine_room/crummy/custom_renderer.rb +63 -0
  74. data/lib/engine_room/engine.rb +40 -0
  75. data/lib/engine_room/railties/tasks.rake +6 -0
  76. data/lib/engine_room/version.rb +3 -0
  77. data/lib/generators/engine_room/create_image_generator.rb +26 -0
  78. data/lib/generators/engine_room/setup_generator.rb +30 -0
  79. data/lib/generators/engine_room/templates/001_devise_create_users.rb +28 -0
  80. data/lib/generators/engine_room/templates/002_create_sections.rb +16 -0
  81. data/lib/generators/engine_room/templates/003_create_fields.rb +18 -0
  82. data/lib/generators/engine_room/templates/004_create_images.rb +19 -0
  83. data/lib/generators/engine_room/templates/image.rb +4 -0
  84. data/lib/tasks/dummy.rake +45 -0
  85. data/lib/tasks/templates/migrate/050_create_dogs.rb +18 -0
  86. data/lib/tasks/templates/models/dog.rb +3 -0
  87. data/public/images/er/accept.png +0 -0
  88. data/public/images/er/add.png +0 -0
  89. data/public/images/er/add_small.png +0 -0
  90. data/public/images/er/ajax-loader.gif +0 -0
  91. data/public/images/er/attach.png +0 -0
  92. data/public/images/er/back_disabled.jpg +0 -0
  93. data/public/images/er/back_enabled.jpg +0 -0
  94. data/public/images/er/bg/header_gradient_center.jpg +0 -0
  95. data/public/images/er/bg/header_gradient_left.jpg +0 -0
  96. data/public/images/er/bg/header_gradient_right.jpg +0 -0
  97. data/public/images/er/cancel.png +0 -0
  98. data/public/images/er/cog.png +0 -0
  99. data/public/images/er/database_add.png +0 -0
  100. data/public/images/er/delete.png +0 -0
  101. data/public/images/er/delete_small.png +0 -0
  102. data/public/images/er/down_arrow.gif +0 -0
  103. data/public/images/er/down_arrow.png +0 -0
  104. data/public/images/er/email.png +0 -0
  105. data/public/images/er/exclamation.png +0 -0
  106. data/public/images/er/forward_disabled.jpg +0 -0
  107. data/public/images/er/forward_enabled.jpg +0 -0
  108. data/public/images/er/help.png +0 -0
  109. data/public/images/er/image_add.png +0 -0
  110. data/public/images/er/information.png +0 -0
  111. data/public/images/er/link.png +0 -0
  112. data/public/images/er/loader.gif +0 -0
  113. data/public/images/er/telephone.png +0 -0
  114. data/public/images/er/up_arrow.gif +0 -0
  115. data/public/images/er/up_arrow.png +0 -0
  116. data/public/images/er/user.png +0 -0
  117. data/public/images/er/wrench.png +0 -0
  118. data/public/images/er/zoom.png +0 -0
  119. data/public/javascripts/er/dd_belatedpng.js +328 -0
  120. data/public/javascripts/er/fancybox/blank.gif +0 -0
  121. data/public/javascripts/er/fancybox/fancy_close.png +0 -0
  122. data/public/javascripts/er/fancybox/fancy_loading.png +0 -0
  123. data/public/javascripts/er/fancybox/fancy_nav_left.png +0 -0
  124. data/public/javascripts/er/fancybox/fancy_nav_right.png +0 -0
  125. data/public/javascripts/er/fancybox/fancy_shadow_e.png +0 -0
  126. data/public/javascripts/er/fancybox/fancy_shadow_n.png +0 -0
  127. data/public/javascripts/er/fancybox/fancy_shadow_ne.png +0 -0
  128. data/public/javascripts/er/fancybox/fancy_shadow_nw.png +0 -0
  129. data/public/javascripts/er/fancybox/fancy_shadow_s.png +0 -0
  130. data/public/javascripts/er/fancybox/fancy_shadow_se.png +0 -0
  131. data/public/javascripts/er/fancybox/fancy_shadow_sw.png +0 -0
  132. data/public/javascripts/er/fancybox/fancy_shadow_w.png +0 -0
  133. data/public/javascripts/er/fancybox/fancy_title_left.png +0 -0
  134. data/public/javascripts/er/fancybox/fancy_title_main.png +0 -0
  135. data/public/javascripts/er/fancybox/fancy_title_over.png +0 -0
  136. data/public/javascripts/er/fancybox/fancy_title_right.png +0 -0
  137. data/public/javascripts/er/fancybox/fancybox-x.png +0 -0
  138. data/public/javascripts/er/fancybox/fancybox-y.png +0 -0
  139. data/public/javascripts/er/fancybox/fancybox.png +0 -0
  140. data/public/javascripts/er/fancybox/jquery.fancybox-1.3.4.css +359 -0
  141. data/public/javascripts/er/fancybox/jquery.fancybox-1.3.4.pack.js +46 -0
  142. data/public/javascripts/er/jquery-1.4.4.min.js +167 -0
  143. data/public/javascripts/er/jquery-ui-1.8.6.custom.min.js +477 -0
  144. data/public/javascripts/er/modernizr-1.5.min.js +28 -0
  145. data/public/javascripts/er/plugins.js +48 -0
  146. data/public/javascripts/er/rails.js +156 -0
  147. data/public/javascripts/er/script.js +50 -0
  148. data/public/stylesheets/.gitkeep +0 -0
  149. data/public/stylesheets/admin.css +417 -0
  150. data/public/stylesheets/boilerplate.css +264 -0
  151. data/public/stylesheets/handheld.css +7 -0
  152. data/public/stylesheets/login.css +125 -0
  153. data/public/stylesheets/skin.css +2 -0
  154. data/public/stylesheets/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  155. data/public/stylesheets/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  156. data/public/stylesheets/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  157. data/public/stylesheets/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  158. data/public/stylesheets/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  159. data/public/stylesheets/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  160. data/public/stylesheets/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  161. data/public/stylesheets/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  162. data/public/stylesheets/smoothness/images/ui-icons_222222_256x240.png +0 -0
  163. data/public/stylesheets/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  164. data/public/stylesheets/smoothness/images/ui-icons_454545_256x240.png +0 -0
  165. data/public/stylesheets/smoothness/images/ui-icons_888888_256x240.png +0 -0
  166. data/public/stylesheets/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  167. data/public/stylesheets/smoothness/jquery-ui-1.8.6.custom.css +479 -0
  168. data/spec/controllers/content_controller_spec.rb +132 -0
  169. data/spec/controllers/fields_controller_spec.rb +103 -0
  170. data/spec/controllers/models_controller_spec.rb +65 -0
  171. data/spec/controllers/pages_controller_spec.rb +40 -0
  172. data/spec/controllers/sections_controller_spec.rb +124 -0
  173. data/spec/dummy/Rakefile +7 -0
  174. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  175. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  176. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  177. data/spec/dummy/config.ru +4 -0
  178. data/spec/dummy/config/application.rb +45 -0
  179. data/spec/dummy/config/boot.rb +10 -0
  180. data/spec/dummy/config/database.yml +22 -0
  181. data/spec/dummy/config/environment.rb +5 -0
  182. data/spec/dummy/config/environments/development.rb +26 -0
  183. data/spec/dummy/config/environments/production.rb +49 -0
  184. data/spec/dummy/config/environments/test.rb +35 -0
  185. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  186. data/spec/dummy/config/initializers/inflections.rb +10 -0
  187. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  188. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  189. data/spec/dummy/config/initializers/session_store.rb +8 -0
  190. data/spec/dummy/config/locales/en.yml +5 -0
  191. data/spec/dummy/config/routes.rb +58 -0
  192. data/spec/dummy/public/404.html +26 -0
  193. data/spec/dummy/public/422.html +26 -0
  194. data/spec/dummy/public/500.html +26 -0
  195. data/spec/dummy/public/favicon.ico +0 -0
  196. data/spec/dummy/public/javascripts/application.js +2 -0
  197. data/spec/dummy/public/javascripts/controls.js +965 -0
  198. data/spec/dummy/public/javascripts/dragdrop.js +974 -0
  199. data/spec/dummy/public/javascripts/effects.js +1123 -0
  200. data/spec/dummy/public/javascripts/prototype.js +6001 -0
  201. data/spec/dummy/public/javascripts/rails.js +175 -0
  202. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  203. data/spec/dummy/script/rails +6 -0
  204. data/spec/engine_room_spec.rb +7 -0
  205. data/spec/factories.rb +32 -0
  206. data/spec/integration/navigation_spec.rb +9 -0
  207. data/spec/models/dog_spec.rb +14 -0
  208. data/spec/models/field_spec.rb +74 -0
  209. data/spec/models/section_spec.rb +70 -0
  210. data/spec/models/user_spec.rb +77 -0
  211. data/spec/routing/models_routing_spec.rb +66 -0
  212. data/spec/spec_helper.rb +39 -0
  213. data/spec/support/devise.rb +3 -0
  214. metadata +492 -0
@@ -0,0 +1,45 @@
1
+ <%
2
+ require 'engine_room/crummy/custom_renderer'
3
+ crummy_renderer = Crummy::CustomRenderer.new
4
+ @layout ||= ''
5
+ @sidebar ||= params[:controller]
6
+
7
+ %>
8
+
9
+ <div id="content" class="clearfix <%= @layout %>">
10
+
11
+ <% if @layout=='columns' %>
12
+
13
+ <div id="main">
14
+ <%- flash.each do |name, msg| -%>
15
+ <div id="flash_<%= name %>">
16
+ <%= msg %>
17
+ <a class="close">&nbsp;</a>
18
+ </div>
19
+ <%- end -%>
20
+
21
+ <h1><%= render_crumbs(:seperator => " / ", :renderer => crummy_renderer) %></h1>
22
+ <%= yield %>
23
+ </div>
24
+
25
+ <div id="sidebar">
26
+ <%= render :partial => "#{@sidebar}/sidebar" %>
27
+ </div>
28
+
29
+ <% else %>
30
+
31
+ <%- flash.each do |name, msg| -%>
32
+ <div id="flash_<%= name %>">
33
+ <%= msg %>
34
+ <a class="close">&nbsp;</a>
35
+ </div>
36
+ <%- end -%>
37
+
38
+ <h1><%= render_crumbs(:seperator => " / ", :renderer => crummy_renderer) %></h1>
39
+ <%= yield %>
40
+
41
+ <% end %>
42
+
43
+ </div><!-- #content -->
44
+
45
+
@@ -0,0 +1,17 @@
1
+ <% if !object.respond_to?(:id) %>
2
+ <div id="error_explanation">
3
+ <p>No element was found.</p>
4
+ </div>
5
+ <% elsif object.errors.any? %>
6
+ <div id="error_explanation">
7
+ <h2><%= pluralize(object.errors.count, "error") %>
8
+ prohibited this <%= object.class.to_s.underscore.humanize.downcase %>
9
+ from being saved:</h2>
10
+ <p>There were problems with the following fields:</p>
11
+ <ul>
12
+ <% object.errors.full_messages.each do |msg| %>
13
+ <li><%= msg %></li>
14
+ <% end %>
15
+ </ul>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,146 @@
1
+ require 'devise'
2
+
3
+ # Use this hook to configure devise mailer, warden hooks and so forth. The first
4
+ # four configuration values can also be set straight in your models.
5
+ Devise.setup do |config|
6
+
7
+ # ==> Mailer Configuration
8
+ # Configure the e-mail address which will be shown in DeviseMailer.
9
+ config.mailer_sender = "please-change-me@config-initializers-devise.com"
10
+
11
+ # Configure the class responsible to send e-mails.
12
+ # config.mailer = "Devise::Mailer"
13
+
14
+ # ==> ORM configuration
15
+ # Load and configure the ORM. Supports :active_record (default) and
16
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
17
+ # available as additional gems.
18
+ require 'devise/orm/active_record'
19
+
20
+ # ==> Configuration for any authentication mechanism
21
+ # Configure which keys are used when authenticating an user. By default is
22
+ # just :email. You can configure it to use [:username, :subdomain], so for
23
+ # authenticating an user, both parameters are required. Remember that those
24
+ # parameters are used only when authenticating and not when retrieving from
25
+ # session. If you need permissions, you should implement that in a before filter.
26
+ config.authentication_keys = [ :username ]
27
+
28
+ # Tell if authentication through request.params is enabled. True by default.
29
+ # config.params_authenticatable = true
30
+
31
+ # Tell if authentication through HTTP Basic Auth is enabled. True by default.
32
+ # config.http_authenticatable = true
33
+
34
+ # Set this to true to use Basic Auth for AJAX requests. True by default.
35
+ # config.http_authenticatable_on_xhr = true
36
+
37
+ # The realm used in Http Basic Authentication
38
+ # config.http_authentication_realm = "Application"
39
+
40
+ # ==> Configuration for :database_authenticatable
41
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
42
+ # using other encryptors, it sets how many times you want the password re-encrypted.
43
+ config.stretches = 10
44
+
45
+ # Define which will be the encryption algorithm. Devise also supports encryptors
46
+ # from others authentication tools as :clearance_sha1, :authlogic_sha512 (then
47
+ # you should set stretches above to 20 for default behavior) and :restful_authentication_sha1
48
+ # (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
49
+ config.encryptor = :bcrypt
50
+
51
+ # Setup a pepper to generate the encrypted password.
52
+ config.pepper = "a76b48da1ac09a77f6279288c979b503225caf6326de5c6389403e378d01635d7b62b01518366c1f337f17132fd36cb65ba358fe04e94322042cdf0f61be2363"
53
+
54
+ # ==> Configuration for :confirmable
55
+ # The time you want to give your user to confirm his account. During this time
56
+ # he will be able to access your application without confirming. Default is nil.
57
+ # When confirm_within is zero, the user won't be able to sign in without confirming.
58
+ # You can use this to let your user access some features of your application
59
+ # without confirming the account, but blocking it after a certain period
60
+ # (ie 2 days).
61
+ # config.confirm_within = 2.days
62
+
63
+ # ==> Configuration for :rememberable
64
+ # The time the user will be remembered without asking for credentials again.
65
+ # config.remember_for = 2.weeks
66
+
67
+ # If true, a valid remember token can be re-used between multiple browsers.
68
+ # config.remember_across_browsers = true
69
+
70
+ # If true, extends the user's remember period when remembered via cookie.
71
+ # config.extend_remember_period = false
72
+
73
+ # ==> Configuration for :validatable
74
+ # Range for password length
75
+ # config.password_length = 6..20
76
+
77
+ # Regex to use to validate the email address
78
+ # config.email_regexp = /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
79
+
80
+ # ==> Configuration for :timeoutable
81
+ # The time you want to timeout the user session without activity. After this
82
+ # time the user will be asked for credentials again.
83
+ # config.timeout_in = 10.minutes
84
+
85
+ # ==> Configuration for :lockable
86
+ # Defines which strategy will be used to lock an account.
87
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
88
+ # :none = No lock strategy. You should handle locking by yourself.
89
+ # config.lock_strategy = :failed_attempts
90
+
91
+ # Defines which strategy will be used to unlock an account.
92
+ # :email = Sends an unlock link to the user email
93
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
94
+ # :both = Enables both strategies
95
+ # :none = No unlock strategy. You should handle unlocking by yourself.
96
+ # config.unlock_strategy = :both
97
+
98
+ # Number of authentication tries before locking an account if lock_strategy
99
+ # is failed attempts.
100
+ # config.maximum_attempts = 20
101
+
102
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
103
+ # config.unlock_in = 1.hour
104
+
105
+ # ==> Configuration for :token_authenticatable
106
+ # Defines name of the authentication token params key
107
+ # config.token_authentication_key = :auth_token
108
+
109
+ # ==> Scopes configuration
110
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
111
+ # "users/sessions/new". It's turned off by default because it's slower if you
112
+ # are using only default views.
113
+ # config.scoped_views = true
114
+
115
+ # Configure the default scope given to Warden. By default it's the first
116
+ # devise role declared in your routes.
117
+ # config.default_scope = :user
118
+
119
+ # Configure sign_out behavior.
120
+ # By default sign_out is scoped (i.e. /users/sign_out affects only :user scope).
121
+ # In case of sign_out_all_scopes set to true any logout action will sign out all active scopes.
122
+ # config.sign_out_all_scopes = false
123
+
124
+ # ==> Navigation configuration
125
+ # Lists the formats that should be treated as navigational. Formats like
126
+ # :html, should redirect to the sign in page when the user does not have
127
+ # access, but formats like :xml or :json, should return 401.
128
+ # If you have any extra navigational formats, like :iphone or :mobile, you
129
+ # should add them to the navigational formats lists. Default is [:html]
130
+ # config.navigational_formats = [:html, :iphone]
131
+
132
+ # ==> Warden configuration
133
+ # If you want to use other strategies, that are not (yet) supported by Devise,
134
+ # you can configure them inside the config.warden block. The example below
135
+ # allows you to setup OAuth, using http://github.com/roman/warden_oauth
136
+ #
137
+ # config.warden do |manager|
138
+ # manager.oauth(:twitter) do |twitter|
139
+ # twitter.consumer_secret = <YOUR CONSUMER SECRET>
140
+ # twitter.consumer_key = <YOUR CONSUMER KEY>
141
+ # twitter.options :site => 'http://twitter.com'
142
+ # end
143
+ # manager.default_strategies(:scope => :user).unshift :twitter_oauth
144
+ # end
145
+
146
+ end
@@ -0,0 +1,5 @@
1
+ # tell the I18n library where to find your translations
2
+ #I18n.load_path += Dir[EngineRoom::Engine::root.join('config', 'locale', '*.{rb,yml}')]
3
+
4
+ # set default locale to something other than :en
5
+ #I18n.default_locale = :en
@@ -0,0 +1,42 @@
1
+ de:
2
+ errors:
3
+ messages:
4
+ not_found: "nicht gefunden"
5
+ already_confirmed: "wurde bereits bestätigt"
6
+ not_locked: "ist nicht gesperrt"
7
+
8
+ devise:
9
+ failure:
10
+ unauthenticated: 'Sie müssen sich anmelden oder registrieren, bevor Sie weiterfahren können.'
11
+ unconfirmed: 'Sie müssen Ihren Account bestätigen, bevor Sie weiterfahren können.'
12
+ locked: 'Ihr Account ist gesperrt.'
13
+ invalid: 'Ungültige Anmeldedaten.'
14
+ invalid_token: 'Invalid authentication token.'
15
+ timeout: 'Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an.'
16
+ inactive: 'Ihr Account ist nicht aktiv.'
17
+ sessions:
18
+ signed_in: 'Erfolgreich angemeldet.'
19
+ signed_out: 'Erfolgreich abgemeldet.'
20
+ passwords:
21
+ send_instructions: 'Sie erhalten in wenigen Minuten eine E-Mail mit der Anleitung, wie Sie ihr Passwort zurücksetzten können.'
22
+ updated: 'Ihr Passwort wurde geändert. Sie sind angemeldet.'
23
+ confirmations:
24
+ send_instructions: 'Sie erhalten in wenigen Minuten eine E-Mail mit der Anleitung, wie Sie ihr Passwort zurücksetzten können.'
25
+ updated: 'Ihr Passwort wurde geändert. Sie sind angemeldet.'
26
+ registrations:
27
+ signed_up: 'Sie haben sich erfolgreich registriert. Es kann sein, dass Sie eine Aktivierungs-E-Mail erhalten.'
28
+ updated: 'Die Angaben wurden erfolgreich geändert.'
29
+ destroyed: 'Ihr Account wurde erfolgreich gelöscht.'
30
+ unlocks:
31
+ send_instructions: 'Sie erhalten in wenigen Minuten eine E-Mail mit der Anleitung, wie Sie Ihren Account entsperren können.'
32
+ unlocked: 'Ihr Account wurde entsperrt. Sie sind angemeldet.'
33
+ oauth_callbacks:
34
+ success: 'Erfolgreich mit dem %{kind}-Account angemeldet.'
35
+ failure: 'Sie konnten nicht mit dem %{kind}-Account angemeldet werden, weil "%{reason}".'
36
+ mailer:
37
+ confirmation_instructions:
38
+ subject: 'Anleitung zur Bestätigung Ihres Accounts'
39
+ reset_password_instructions:
40
+ subject: 'Anleitung um das Passwort zurückzusetzten'
41
+ unlock_instructions:
42
+ subject: 'Anleitung um Ihren Account freizuschalten'
@@ -0,0 +1,39 @@
1
+ en:
2
+ errors:
3
+ messages:
4
+ not_found: "not found"
5
+ already_confirmed: "was already confirmed"
6
+ not_locked: "was not locked"
7
+
8
+ devise:
9
+ failure:
10
+ unauthenticated: 'You need to sign in or sign up before continuing.'
11
+ unconfirmed: 'You have to confirm your account before continuing.'
12
+ locked: 'Your account is locked.'
13
+ invalid: 'Invalid email or password ppp.'
14
+ invalid_token: 'Invalid authentication token.'
15
+ timeout: 'Your session expired, please sign in again to continue.'
16
+ inactive: 'Your account was not activated yet.'
17
+ sessions:
18
+ signed_in: 'Signed in successfully. 000'
19
+ signed_out: 'Signed out successfully. 111'
20
+ passwords:
21
+ send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
22
+ updated: 'Your password was changed successfully. You are now signed in.'
23
+ confirmations:
24
+ send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
25
+ confirmed: 'Your account was successfully confirmed. You are now signed in.'
26
+ registrations:
27
+ signed_up: 'You have signed up successfully. If enabled, a confirmation was sent to your e-mail.'
28
+ updated: 'You updated your account successfully.'
29
+ destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
30
+ unlocks:
31
+ send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
32
+ unlocked: 'Your account was successfully unlocked. You are now signed in.'
33
+ mailer:
34
+ confirmation_instructions:
35
+ subject: 'Confirmation instructions'
36
+ reset_password_instructions:
37
+ subject: 'Reset password instructions'
38
+ unlock_instructions:
39
+ subject: 'Unlock Instructions'
@@ -0,0 +1,33 @@
1
+
2
+ de:
3
+ time:
4
+ formats:
5
+ short: "%d.%m.%Y %H:%M"
6
+ long: "%B %d, %Y %H:%M"
7
+ log_out: "ausloggen"
8
+ preview: "Vorschau öffnen"
9
+ nav:
10
+ dashboard: "Übersicht"
11
+ models: "Seiten"
12
+ settings: "Einstellungen"
13
+ user: "Benutzer"
14
+ engine_room:
15
+ pages:
16
+ dashboard:
17
+ title: "Übersicht"
18
+ models:
19
+ overview:
20
+ title: "Tabellen"
21
+ er_devise:
22
+ registrations:
23
+ edit:
24
+ title: "Benutzer Editieren"
25
+ submit_button: "Aktualisieren"
26
+ cancel_account: "Account löschen"
27
+ activerecord:
28
+ models:
29
+ user: "Benutzer"
30
+ attributes:
31
+ user:
32
+ username: "Benutzername"
33
+ email: "E-Mail"
@@ -0,0 +1,42 @@
1
+
2
+ en:
3
+ time:
4
+ formats:
5
+ short: "%b %d, %Y %H:%M"
6
+ long: "%B %d, %Y %H:%M"
7
+ log_out: "log out"
8
+ preview: "open preview"
9
+ nav:
10
+ dashboard: "Dashboard"
11
+ content: "Content"
12
+ sections: "Sections"
13
+ models: "Models"
14
+ user: "Users"
15
+ engine_room:
16
+ pages:
17
+ dashboard:
18
+ title: "Dashboard"
19
+ settings:
20
+ title: "Settings"
21
+ models:
22
+ overview:
23
+ title: "Pages"
24
+ sections:
25
+ index:
26
+ title: "Sections"
27
+ add_section: "Add Section"
28
+ er_devise:
29
+ registrations:
30
+ edit:
31
+ title: "Edit User"
32
+ submit_button: "Update"
33
+ cancel_account: "Cancel Account"
34
+ activerecord:
35
+ models:
36
+ user: "User"
37
+ attributes:
38
+ user:
39
+ username: "Username"
40
+ email: "Email"
41
+
42
+
data/config/routes.rb ADDED
@@ -0,0 +1,62 @@
1
+ Rails.application.routes.draw do
2
+
3
+ engine_room_path = 'admin'
4
+
5
+ namespace :er_devise, :path => engine_room_path do
6
+ devise_for :users, :path_names => { :sign_in => 'login', :sign_out => 'logout', :password => 'secret', :sign_up => 'register' }
7
+ end
8
+
9
+ namespace :engine_room, :path => engine_room_path do
10
+
11
+ root :to => "pages#dashboard"
12
+
13
+ get 'settings' => "pages#settings"
14
+
15
+ get 'users/current' => "users#edit_current_user", :as => :current_user
16
+ put 'users/current' => "users#update_current_user", :as => :current_user
17
+ delete 'users/current' => "users#destroy_current_user", :as => :current_user
18
+ resources :users
19
+
20
+ resources :sections do
21
+ resources :fields
22
+ end
23
+
24
+ controller :content do
25
+ #get 'content/:belongs_to_section/:belongs_to_id/:section_name/new' => :new
26
+ #get 'content/:belongs_to_section/:belongs_to_id/:section_name' => :index
27
+ #post 'content/:belongs_to_section/:belongs_to_id/:section_name' => :create
28
+ #get 'content/:belongs_to_section/:belongs_to_id/:section_name/:id' => :show, :constraints => { :belongs_to_id => /\d+/ }
29
+ #get 'content/:belongs_to_section/:belongs_to_id/:section_name/:id/edit' => :edit, :constraints => { :belongs_to_id => /\d+/ }
30
+ #put 'content/:belongs_to_section/:belongs_to_id/:section_name/:id' => :update, :constraints => { :belongs_to_id => /\d+/ }
31
+ #delete 'content/:belongs_to_section/:belongs_to_id/:section_name/:id' => :destroy, :constraints => { :belongs_to_id => /\d+/ }
32
+
33
+ get 'content' => :overview
34
+ get 'content/:section_name' => :index
35
+ get 'content/:section_name/new' => :new
36
+ post 'content/:section_name' => :create
37
+ get 'content/:section_name/:id' => :show, :constraints => { :id => /\d+/ }
38
+ get 'content/:section_name/:id/edit' => :edit, :constraints => { :id => /\d+/ }
39
+ put 'content/:section_name/:id' => :update, :constraints => { :id => /\d+/ }
40
+ delete 'content/:section_name/:id' => :destroy, :constraints => { :id => /\d+/ }
41
+ end
42
+
43
+ # workaround for models resource for including dynamic segment
44
+ # resources :models
45
+ controller :models do
46
+ get 'models' => :overview
47
+ get 'model/:modelname' => :index
48
+ get 'model/:modelname/new' => :new
49
+ post 'model/:modelname' => :create
50
+ get 'model/:modelname/:id' => :show
51
+ get 'model/:modelname/:id/edit' => :edit
52
+ put 'model/:modelname/:id' => :update
53
+ delete 'model/:modelname/:id' => :destroy
54
+ end
55
+ end
56
+
57
+ #mount_at = EngineRoom::Engine.config.mount_at
58
+ #resources :tests, :controller => "engine_room/tests", :only => [ :index ]
59
+ #:path_prefix => mount_at,
60
+ #:name_prefix => "er_"
61
+
62
+ end
@@ -0,0 +1,35 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "engine_room/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "engine_room"
7
+ s.version = EngineRoom::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Boris Searles"]
10
+ s.email = ["boris@lucidgardens.com"]
11
+ s.homepage = "http://github.com/bozz/engine_room"
12
+ s.summary = %q{Unobtrusive rails admin interface}
13
+ s.description = %q{EngineRoom aims to be a simple to use, unobtrusive admin interface for rails applications. It is designed to be an add-on for existing web apps and not a full blown CMS. Just add EngineRoom to an app and it will create a customizable interface for editing the content data.}
14
+
15
+ s.rubyforge_project = "engine_room"
16
+
17
+ s.add_dependency 'devise', '~> 1.1.3'
18
+ #s.add_dependency 'cancan', '~> 0.8.2'
19
+ s.add_dependency 'rails', '~> 3.0.3'
20
+ s.add_dependency 'crummy', '~> 1.0.1'
21
+ s.add_dependency 'will_paginate', '3.0.pre2'
22
+ s.add_dependency 'paperclip'
23
+ s.add_development_dependency 'capybara', '>= 0.3.9'
24
+ s.add_development_dependency 'webrat' ## TODO: remove?
25
+ s.add_development_dependency 'rspec-rails', '~> 2.3.0'
26
+ s.add_development_dependency 'factory_girl_rails', '1.0'
27
+ s.add_development_dependency 'spork'
28
+ s.add_development_dependency 'fuubar'
29
+ s.add_development_dependency 'sqlite3-ruby'
30
+
31
+ s.files = `git ls-files`.split("\n")
32
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
33
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
34
+ s.require_paths = ["lib"]
35
+ end