releaf 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (201) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +15 -12
  3. data/Rakefile +8 -0
  4. data/app/assets/javascripts/releaf/controllers/base.js +0 -40
  5. data/app/assets/javascripts/releaf/include/field.type_date_or_datetime_or_time.js +43 -0
  6. data/app/assets/javascripts/releaf/include/nested_fields.js +58 -65
  7. data/app/assets/javascripts/releaf/include/sortable.js +19 -17
  8. data/app/assets/stylesheets/releaf/controllers/releaf/content.css.erb +6 -0
  9. data/app/assets/stylesheets/releaf/include/field.css.erb +37 -13
  10. data/app/controllers/releaf/admins_controller.rb +13 -6
  11. data/app/controllers/releaf/base_application_controller.rb +4 -1
  12. data/app/controllers/releaf/base_controller.rb +415 -154
  13. data/app/controllers/releaf/content_controller.rb +62 -45
  14. data/app/controllers/releaf/roles_controller.rb +11 -9
  15. data/app/controllers/releaf/sessions_controller.rb +23 -1
  16. data/app/controllers/releaf/translations_controller.rb +21 -25
  17. data/app/helpers/releaf/admin_helper.rb +0 -20
  18. data/app/models/releaf/admin.rb +9 -0
  19. data/app/models/releaf/blank_node_base.rb +29 -0
  20. data/app/models/releaf/node.rb +6 -5
  21. data/app/models/releaf/node_base.rb +9 -3
  22. data/app/models/releaf/role.rb +9 -2
  23. data/app/views/layouts/releaf/admin.html.haml +12 -6
  24. data/app/views/layouts/releaf/devise.html.haml +32 -0
  25. data/app/views/releaf/aliases/{_edit.body.haml → _edit.body.html.haml} +0 -0
  26. data/app/views/releaf/aliases/{_edit.header.haml → _edit.header.html.haml} +1 -1
  27. data/app/views/releaf/aliases/_index.row.html.haml +5 -0
  28. data/app/views/releaf/aliases/{_secondary_panel.haml → _secondary_panel.html.haml} +0 -0
  29. data/app/views/releaf/base/_edit.body.html.haml +11 -0
  30. data/app/views/releaf/base/_edit.field.html.haml +23 -0
  31. data/app/views/releaf/base/{_edit.field.type_autocomplete.haml → _edit.field_type_autocomplete.html.haml} +1 -1
  32. data/app/views/releaf/base/{_edit.field.type_checkbox.haml → _edit.field_type_boolean.html.haml} +1 -1
  33. data/app/views/releaf/base/{_edit.field.type_date.haml → _edit.field_type_date.html.haml} +0 -0
  34. data/app/views/releaf/base/{_edit.field.type_datetime.haml → _edit.field_type_datetime.html.haml} +0 -0
  35. data/app/views/releaf/base/{_edit.field.type_delete_nested.haml → _edit.field_type_delete_nested.html.haml} +0 -0
  36. data/app/views/releaf/base/{_edit.field.type_file.haml → _edit.field_type_file.html.haml} +0 -0
  37. data/app/views/releaf/base/_edit.field_type_image.html.haml +12 -0
  38. data/app/views/releaf/base/_edit.field_type_item.html.haml +31 -0
  39. data/app/views/releaf/base/{_edit.field.type_link.haml → _edit.field_type_link.html.haml} +0 -0
  40. data/app/views/releaf/base/_edit.field_type_link_i18n.html.haml +26 -0
  41. data/app/views/releaf/base/{_edit.field.type_password.haml → _edit.field_type_password.html.haml} +0 -0
  42. data/app/views/releaf/base/{_edit.field.type_richtext.haml → _edit.field_type_richtext.html.haml} +0 -0
  43. data/app/views/releaf/base/{_edit.field.type_richtext_i18n.haml → _edit.field_type_richtext_i18n.html.haml} +0 -0
  44. data/app/views/releaf/base/{_edit.field.type_text.haml → _edit.field_type_text.html.haml} +0 -0
  45. data/app/views/releaf/base/{_edit.field.type_text_i18n.haml → _edit.field_type_text_i18n.html.haml} +0 -0
  46. data/app/views/releaf/base/{_edit.field.type_textarea.haml → _edit.field_type_textarea.html.haml} +0 -0
  47. data/app/views/releaf/base/{_edit.field.type_textarea_i18n.haml → _edit.field_type_textarea_i18n.html.haml} +0 -0
  48. data/app/views/releaf/base/{_edit.field.type_time.haml → _edit.field_type_time.html.haml} +0 -0
  49. data/app/views/releaf/base/_edit.fields.association.html.haml +48 -0
  50. data/app/views/releaf/base/_edit.fields.has_many_template.html.haml +15 -0
  51. data/app/views/releaf/base/_edit.fields.html.haml +20 -0
  52. data/app/views/releaf/base/{_edit.footer.haml → _edit.footer.html.haml} +2 -2
  53. data/app/views/releaf/base/_edit.form.html.haml +4 -0
  54. data/app/views/releaf/base/_edit.header.html.haml +3 -0
  55. data/app/views/releaf/base/{_index.body.haml → _index.body.html.haml} +2 -2
  56. data/app/views/releaf/base/_index.cell.html.haml +20 -0
  57. data/app/views/releaf/base/_index.footer.html.haml +28 -0
  58. data/app/views/releaf/base/_index.header.html.haml +4 -0
  59. data/app/views/releaf/base/_index.row.html.haml +6 -0
  60. data/app/views/releaf/base/_index.search.html.haml +5 -0
  61. data/app/views/releaf/base/_index.table.html.haml +24 -0
  62. data/app/views/releaf/base/_secondary_panel.html.haml +10 -0
  63. data/app/views/releaf/base/_show.body.html.haml +3 -0
  64. data/app/views/releaf/base/_show.field.html.haml +20 -0
  65. data/app/views/releaf/base/_show.field_type_date.html.haml +9 -0
  66. data/app/views/releaf/base/_show.field_type_date_time.html.haml +9 -0
  67. data/app/views/releaf/base/_show.field_type_email.html.haml +6 -0
  68. data/app/views/releaf/base/_show.field_type_file.html.haml +7 -0
  69. data/app/views/releaf/base/_show.field_type_image.html.haml +10 -0
  70. data/app/views/releaf/base/_show.field_type_item.html.haml +11 -0
  71. data/app/views/releaf/base/_show.field_type_link.html.haml +14 -0
  72. data/app/views/releaf/base/_show.field_type_password.html.haml +6 -0
  73. data/app/views/releaf/base/_show.field_type_richtext.html.haml +6 -0
  74. data/app/views/releaf/base/_show.field_type_text.html.haml +6 -0
  75. data/app/views/releaf/base/_show.field_type_textarea.html.haml +6 -0
  76. data/app/views/releaf/base/_show.field_type_time.html.haml +9 -0
  77. data/app/views/releaf/base/_show.field_type_url.html.haml +7 -0
  78. data/app/views/releaf/base/_show.fields.association.html.haml +36 -0
  79. data/app/views/releaf/base/_show.fields.has_many_template.html.haml +12 -0
  80. data/app/views/releaf/base/_show.fields.html.haml +17 -0
  81. data/app/views/releaf/base/{_show.footer.haml → _show.footer.html.haml} +6 -4
  82. data/app/views/releaf/base/_show.header.html.haml +3 -0
  83. data/app/views/releaf/base/confirm_destroy.html.haml +17 -0
  84. data/app/views/releaf/base/edit.html.haml +1 -0
  85. data/app/views/releaf/base/index.html.haml +3 -0
  86. data/app/views/releaf/base/new.html.haml +1 -0
  87. data/app/views/releaf/base/show.html.haml +3 -0
  88. data/app/views/releaf/content/{_edit.body.haml → _edit.body.html.haml} +7 -6
  89. data/app/views/releaf/content/_edit.content_fields.html.haml +11 -0
  90. data/app/views/releaf/content/_edit.fields.html.haml +17 -0
  91. data/app/views/releaf/content/{_edit.slug.haml → _edit.slug.html.haml} +0 -0
  92. data/app/views/releaf/content/{_get_content_form.haml → _get_content_form.html.haml} +2 -2
  93. data/app/views/releaf/content/{_secondary_panel.haml → _secondary_panel.html.haml} +0 -0
  94. data/app/views/releaf/content/{_tree_level.haml → _tree_level.html.haml} +0 -0
  95. data/app/views/releaf/content/{ajax.new.haml → ajax.new.html.haml} +0 -0
  96. data/app/views/releaf/content/{index.haml → index.html.haml} +0 -0
  97. data/app/views/releaf/roles/_edit.field.permissions.html.haml +5 -0
  98. data/app/views/releaf/roles/{_show.field.default.haml → _show.field.default.html.haml} +1 -1
  99. data/app/views/releaf/roles/{_show.field.permissions.haml → _show.field.permissions.html.haml} +2 -2
  100. data/app/views/releaf/translations/{_edit.body.haml → _edit.body.html.haml} +0 -0
  101. data/app/views/releaf/translations/{_edit.header.haml → _edit.header.html.haml} +1 -1
  102. data/app/views/releaf/translations/_index.row.html.haml +5 -0
  103. data/app/views/releaf/translations/{_secondary_panel.haml → _secondary_panel.html.haml} +0 -0
  104. data/lib/generators/releaf/templates/initializers/releaf.rb +0 -39
  105. data/lib/generators/releaf/templates/initializers/releaf_i18n.rb +17 -0
  106. data/lib/generators/releaf/templates/javascripts/3rd_party/jquery.jcarousel.js +1058 -0
  107. data/lib/generators/releaf/templates/javascripts/lib/init_jcarousel.js +40 -0
  108. data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +1 -0
  109. data/lib/generators/releaf/templates/migrations/create_releaf_tinymce_assets.rb +1 -0
  110. data/lib/generators/releaf/templates/models/admin_ability.rb +1 -1
  111. data/lib/i18n/backend/releaf.rb +5 -4
  112. data/lib/i18n/backend/releaf/translation.rb +5 -0
  113. data/lib/i18n/backend/releaf/translation_data.rb +7 -0
  114. data/lib/i18n/backend/releaf/translation_group.rb +4 -0
  115. data/lib/releaf.rb +4 -0
  116. data/lib/releaf/boolean_at.rb +77 -0
  117. data/lib/releaf/globalize3/fallbacks.rb +19 -0
  118. data/lib/releaf/resources.rb +101 -0
  119. data/lib/releaf/slug.rb +99 -60
  120. data/lib/releaf/version.rb +1 -1
  121. data/spec/spec_helper.rb +6 -0
  122. data/templates/releaf/installer.rb +15 -4
  123. metadata +275 -329
  124. data/app/views/releaf/aliases/_index.row.haml +0 -5
  125. data/app/views/releaf/base/_edit.body.haml +0 -19
  126. data/app/views/releaf/base/_edit.field.haml +0 -96
  127. data/app/views/releaf/base/_edit.field.type_image.haml +0 -14
  128. data/app/views/releaf/base/_edit.field.type_select.haml +0 -11
  129. data/app/views/releaf/base/_edit.form.haml +0 -4
  130. data/app/views/releaf/base/_edit.has_many_associations.haml +0 -45
  131. data/app/views/releaf/base/_edit.header.haml +0 -3
  132. data/app/views/releaf/base/_index.cell.haml +0 -19
  133. data/app/views/releaf/base/_index.footer.haml +0 -22
  134. data/app/views/releaf/base/_index.header.haml +0 -4
  135. data/app/views/releaf/base/_index.row.haml +0 -6
  136. data/app/views/releaf/base/_index.search.haml +0 -5
  137. data/app/views/releaf/base/_index.table.haml +0 -8
  138. data/app/views/releaf/base/_secondary_panel.haml +0 -9
  139. data/app/views/releaf/base/_show.body.haml +0 -7
  140. data/app/views/releaf/base/_show.field.haml +0 -78
  141. data/app/views/releaf/base/_show.field.type_html.haml +0 -1
  142. data/app/views/releaf/base/_show.header.haml +0 -3
  143. data/app/views/releaf/base/confirm_destroy.haml +0 -10
  144. data/app/views/releaf/base/edit.haml +0 -1
  145. data/app/views/releaf/base/index.haml +0 -3
  146. data/app/views/releaf/base/new.haml +0 -1
  147. data/app/views/releaf/base/show.haml +0 -3
  148. data/app/views/releaf/content/_edit.content_fields.haml +0 -19
  149. data/app/views/releaf/content/_show.field.content.haml +0 -11
  150. data/app/views/releaf/roles/_edit.field.admins.haml +0 -0
  151. data/app/views/releaf/roles/_edit.field.permissions.haml +0 -5
  152. data/app/views/releaf/translations/_index.row.haml +0 -5
  153. data/spec/dummy/README.rdoc +0 -261
  154. data/spec/dummy/Rakefile +0 -7
  155. data/spec/dummy/app/assets/images/rails.png +0 -0
  156. data/spec/dummy/app/assets/javascripts/application.js +0 -15
  157. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  158. data/spec/dummy/app/controllers/application_controller.rb +0 -3
  159. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  160. data/spec/dummy/app/models/admin_ability.rb +0 -51
  161. data/spec/dummy/app/models/settings.rb +0 -2
  162. data/spec/dummy/app/views/layouts/application.html.haml +0 -10
  163. data/spec/dummy/config.ru +0 -4
  164. data/spec/dummy/config/application.rb +0 -68
  165. data/spec/dummy/config/boot.rb +0 -6
  166. data/spec/dummy/config/common_fields.yml.example +0 -17
  167. data/spec/dummy/config/database.yml +0 -42
  168. data/spec/dummy/config/environment.rb +0 -5
  169. data/spec/dummy/config/environments/development.rb +0 -37
  170. data/spec/dummy/config/environments/production.rb +0 -67
  171. data/spec/dummy/config/environments/test.rb +0 -37
  172. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  173. data/spec/dummy/config/initializers/devise.rb +0 -232
  174. data/spec/dummy/config/initializers/dragonfly.rb +0 -1
  175. data/spec/dummy/config/initializers/inflections.rb +0 -15
  176. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  177. data/spec/dummy/config/initializers/releaf.rb +0 -59
  178. data/spec/dummy/config/initializers/releaf_i18n.rb +0 -8
  179. data/spec/dummy/config/initializers/releaf_store_current_template.rb +0 -25
  180. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  181. data/spec/dummy/config/initializers/session_store.rb +0 -8
  182. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  183. data/spec/dummy/config/locales/devise.en.yml +0 -58
  184. data/spec/dummy/config/locales/en.yml +0 -5
  185. data/spec/dummy/config/routes.rb +0 -11
  186. data/spec/dummy/db/migrate/20130204164516_create_settings.rb +0 -17
  187. data/spec/dummy/db/migrate/20130204164523_create_releaf_nodes.rb +0 -25
  188. data/spec/dummy/db/migrate/20130204164524_create_releaf_roles.rb +0 -11
  189. data/spec/dummy/db/migrate/20130204164525_create_releaf_translations.rb +0 -31
  190. data/spec/dummy/db/migrate/20130204164526_create_releaf_admins.rb +0 -53
  191. data/spec/dummy/db/schema.rb +0 -112
  192. data/spec/dummy/db/seeds.rb +0 -64
  193. data/spec/dummy/doc/README_FOR_APP +0 -2
  194. data/spec/dummy/log/development.log +0 -74
  195. data/spec/dummy/log/test.log +0 -129
  196. data/spec/dummy/public/404.html +0 -26
  197. data/spec/dummy/public/422.html +0 -26
  198. data/spec/dummy/public/500.html +0 -25
  199. data/spec/dummy/public/favicon.ico +0 -0
  200. data/spec/dummy/script/rails +0 -6
  201. data/spec/dummy/tmp/cache/9C5/660/settings%3Ai18n_updated_at +0 -1
@@ -1 +0,0 @@
1
- require 'dragonfly/rails/images'
@@ -1,15 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # ActiveSupport::Inflector.inflections do |inflect|
6
- # inflect.plural /^(ox)$/i, '\1en'
7
- # inflect.singular /^(ox)en/i, '\1'
8
- # inflect.irregular 'person', 'people'
9
- # inflect.uncountable %w( fish sheep )
10
- # end
11
- #
12
- # These inflection rules are supported but not enabled by default:
13
- # ActiveSupport::Inflector.inflections do |inflect|
14
- # inflect.acronym 'RESTful'
15
- # end
@@ -1,5 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1,59 +0,0 @@
1
- Releaf.setup do |conf|
2
- # Default settings are commented out
3
-
4
- ### setup main menu
5
- # conf.main_menu = [
6
- # 'releaf/content',
7
- # 'releaf/translations',
8
- # '*permissions',
9
- # ]
10
-
11
- # conf.base_menu = {
12
- # '*permissions' => [
13
- # ['permissions', %w[releaf/admins releaf/roles]],
14
- # ]
15
- # }
16
-
17
- # conf.layout = 'releaf/admin'
18
- # conf.devise_for 'releaf/admin'
19
-
20
- end
21
-
22
-
23
- module ActionDispatch::Routing
24
- class Mapper
25
- def mount_releaf_at(mount_location)
26
-
27
- post '/tinymce_assets' => 'releaf/tinymce_assets#create'
28
-
29
- devise_for Releaf.devise_for, :path => mount_location, :controllers => { :sessions => "releaf/sessions" }
30
-
31
- scope mount_location do
32
- namespace :releaf, :path => nil do
33
-
34
- resources :admins, :roles do
35
- get :confirm_destroy, :on => :member
36
- match :urls, :on => :collection
37
- end
38
-
39
- resources :nodes, :controller => "content", :path => "content" do
40
- member do
41
- get :confirm_destroy
42
- get :get_content_form
43
- end
44
-
45
- get :generate_url, :on => :collection
46
- end
47
-
48
- resources :translation_groups, :controller => "translations", :path => "translations" do
49
- get :confirm_destroy, :on => :member
50
- match :urls, :on => :collection
51
- end
52
- root :to => "content#index"
53
- end
54
- end
55
-
56
- end
57
- end
58
- end
59
-
@@ -1,8 +0,0 @@
1
- I18N_CACHE = ActiveSupport::Cache::MemoryStore.new
2
- require 'i18n/backend/releaf'
3
- I18n.backend = I18n::Backend::Releaf.new
4
-
5
- # skip cache loading for rake tasks and cucumber (ex. migrations)
6
- if !($0.end_with?('rake') || $0.end_with?('cucumber'))
7
- I18n.backend.reload_cache
8
- end
@@ -1,25 +0,0 @@
1
- class ActionController::Base
2
- attr_accessor :active_template
3
-
4
- def active_template_virtual_path
5
- self.active_template.virtual_path if self.active_template
6
- end
7
- end
8
-
9
- class ActionMailer::Base
10
- attr_accessor :active_template
11
-
12
- def active_template_virtual_path
13
- self.active_template.virtual_path if self.active_template
14
- end
15
- end
16
-
17
- class ActionView::TemplateRenderer
18
-
19
- alias_method :_render_template_original, :render_template
20
-
21
- def render_template(template, layout_name = nil, locals = {})
22
- @view.controller.active_template = template if @view.controller && !@view.controller.active_template
23
- return _render_template_original( template, layout_name, locals)
24
- end
25
- end
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
- # Make sure the secret is at least 30 characters and all random,
6
- # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = '60b8245a7315f6856f6699abaf2a94c7a7c814533b974de49cd0cfc6cd4e1ec43cb324960925f085cd9439ffcfd40eae40286b97f46229c46e386cb06c5ac3e5'
@@ -1,8 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
-
5
- # Use the database for sessions instead of the cookie-based default,
6
- # which shouldn't be used to store highly confidential information
7
- # (create the session table with "rails generate session_migration")
8
- # Dummy::Application.config.session_store :active_record_store
@@ -1,14 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
- #
3
- # This file contains settings for ActionController::ParamsWrapper which
4
- # is enabled by default.
5
-
6
- # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json]
9
- end
10
-
11
- # Disable root element in JSON by default.
12
- ActiveSupport.on_load(:active_record) do
13
- self.include_root_in_json = false
14
- end
@@ -1,58 +0,0 @@
1
- # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
-
3
- en:
4
- errors:
5
- messages:
6
- expired: "has expired, please request a new one"
7
- not_found: "not found"
8
- already_confirmed: "was already confirmed, please try signing in"
9
- not_locked: "was not locked"
10
- not_saved:
11
- one: "1 error prohibited this %{resource} from being saved:"
12
- other: "%{count} errors prohibited this %{resource} from being saved:"
13
-
14
- devise:
15
- failure:
16
- already_authenticated: 'You are already signed in.'
17
- unauthenticated: 'You need to sign in or sign up before continuing.'
18
- unconfirmed: 'You have to confirm your account before continuing.'
19
- locked: 'Your account is locked.'
20
- invalid: 'Invalid email or password.'
21
- invalid_token: 'Invalid authentication token.'
22
- timeout: 'Your session expired, please sign in again to continue.'
23
- inactive: 'Your account was not activated yet.'
24
- sessions:
25
- signed_in: 'Signed in successfully.'
26
- signed_out: 'Signed out successfully.'
27
- passwords:
28
- send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
29
- updated: 'Your password was changed successfully. You are now signed in.'
30
- updated_not_active: 'Your password was changed successfully.'
31
- send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
32
- no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
33
- confirmations:
34
- send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
35
- send_paranoid_instructions: 'If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
36
- confirmed: 'Your account was successfully confirmed. You are now signed in.'
37
- registrations:
38
- signed_up: 'Welcome! You have signed up successfully.'
39
- signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
40
- signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
41
- signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
42
- updated: 'You updated your account successfully.'
43
- update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
44
- destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
45
- unlocks:
46
- send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
47
- unlocked: 'Your account has been unlocked successfully. Please sign in to continue.'
48
- send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
49
- omniauth_callbacks:
50
- success: 'Successfully authenticated from %{kind} account.'
51
- failure: 'Could not authenticate you from %{kind} because "%{reason}".'
52
- mailer:
53
- confirmation_instructions:
54
- subject: 'Confirmation instructions'
55
- reset_password_instructions:
56
- subject: 'Reset password instructions'
57
- unlock_instructions:
58
- subject: 'Unlock Instructions'
@@ -1,5 +0,0 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
- en:
5
- hello: "Hello world"
@@ -1,11 +0,0 @@
1
- Dummy::Application.routes.draw do
2
- mount_releaf_at '/admin'
3
-
4
- namespace :admin do
5
- resources :admins, :roles do
6
- get :confirm_destroy, :on => :member
7
- match :urls, :on => :collection
8
- end
9
- end
10
-
11
- end
@@ -1,17 +0,0 @@
1
- class CreateSettings < ActiveRecord::Migration
2
- def self.up
3
- create_table :settings do |t|
4
- t.string :var, :null => false
5
- t.text :value, :null => true
6
- t.integer :thing_id, :null => true
7
- t.string :thing_type, :limit => 30, :null => true
8
- t.timestamps
9
- end
10
-
11
- add_index :settings, [ :thing_type, :thing_id, :var ], :unique => true
12
- end
13
-
14
- def self.down
15
- drop_table :settings
16
- end
17
- end
@@ -1,25 +0,0 @@
1
- class CreateReleafNodes < ActiveRecord::Migration
2
- def change
3
- create_table "releaf_nodes", :force => true do |t|
4
- t.string "name"
5
- t.string "slug"
6
- t.integer "parent_id"
7
- t.integer "lft"
8
- t.integer "rgt"
9
- t.string "content_type"
10
- t.integer "content_id"
11
- t.text "data"
12
- t.datetime "created_at", :null => false
13
- t.datetime "updated_at", :null => false
14
- t.string "content_string"
15
- t.integer "position"
16
- t.boolean 'visible', :null => false, :default => true
17
- t.boolean 'protected', :null => false, :default => false
18
- end
19
- add_index :releaf_nodes, :parent_id
20
- add_index :releaf_nodes, [:content_type, :content_id]
21
- add_index :releaf_nodes, :lft
22
- add_index :releaf_nodes, :rgt
23
- add_index :releaf_nodes, :slug
24
- end
25
- end
@@ -1,11 +0,0 @@
1
- class CreateReleafRoles < ActiveRecord::Migration
2
- def change
3
- create_table :releaf_roles do |t|
4
- t.string :name, :null => false
5
- t.text :permissions
6
- t.boolean :default, :null => false, :default => false
7
-
8
- t.timestamps
9
- end
10
- end
11
- end
@@ -1,31 +0,0 @@
1
- class CreateReleafTranslations < ActiveRecord::Migration
2
- def change
3
- create_table :releaf_translation_groups do |t|
4
- t.string :scope, :null => false
5
- t.timestamps
6
- end
7
- add_index :releaf_translation_groups, :scope, :unique => true
8
-
9
-
10
- create_table :releaf_translations do |t|
11
- t.integer :group_id, :null => false
12
- t.string :key, :null => false
13
-
14
- t.timestamps
15
- end
16
- add_index :releaf_translations, [:group_id, :key], :unique => true
17
- add_index :releaf_translations, :group_id
18
-
19
-
20
- create_table :releaf_translation_data do |t|
21
- t.integer :translation_id, :null => false
22
- t.string :lang, :null => false, :limit => 5
23
- t.text :localization
24
-
25
- t.timestamps
26
- end
27
- add_index :releaf_translation_data, :lang
28
- add_index :releaf_translation_data, :translation_id
29
- add_index :releaf_translation_data, [:lang, :translation_id], :unique => true
30
- end
31
- end
@@ -1,53 +0,0 @@
1
- class CreateReleafAdmins < ActiveRecord::Migration
2
- def change
3
- create_table :releaf_admins do |t|
4
- t.string :name, :null => false
5
- t.string :surname, :null => false
6
- t.string :phone
7
- t.string :avatar_uid
8
- t.integer :role_id
9
-
10
-
11
- ## Database authenticatable
12
- t.string :email, :null => false, :default => ""
13
- t.string :encrypted_password, :null => false, :default => ""
14
-
15
- ## Recoverable
16
- t.string :reset_password_token
17
- t.datetime :reset_password_sent_at
18
-
19
- ## Rememberable
20
- t.datetime :remember_created_at
21
-
22
- ## Trackable
23
- t.integer :sign_in_count, :default => 0
24
- t.datetime :current_sign_in_at
25
- t.datetime :last_sign_in_at
26
- t.string :current_sign_in_ip
27
- t.string :last_sign_in_ip
28
-
29
- ## Confirmable
30
- # t.string :confirmation_token
31
- # t.datetime :confirmed_at
32
- # t.datetime :confirmation_sent_at
33
- # t.string :unconfirmed_email # Only if using reconfirmable
34
-
35
- ## Lockable
36
- # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
37
- # t.string :unlock_token # Only if unlock strategy is :email or :both
38
- # t.datetime :locked_at
39
-
40
- ## Token authenticatable
41
- # t.string :authentication_token
42
-
43
- t.timestamps
44
- end
45
-
46
- add_index :releaf_admins, :role_id
47
- add_index :releaf_admins, :email, :unique => true
48
- add_index :releaf_admins, :reset_password_token, :unique => true
49
- # add_index :releaf_admins, :confirmation_token, :unique => true
50
- # add_index :releaf_admins, :unlock_token, :unique => true
51
- # add_index :releaf_admins, :authentication_token, :unique => true
52
- end
53
- end
@@ -1,112 +0,0 @@
1
- # encoding: UTF-8
2
- # This file is auto-generated from the current state of the database. Instead
3
- # of editing this file, please use the migrations feature of Active Record to
4
- # incrementally modify your database, and then regenerate this schema definition.
5
- #
6
- # Note that this schema.rb definition is the authoritative source for your
7
- # database schema. If you need to create the application database on another
8
- # system, you should be using db:schema:load, not running all the migrations
9
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
- # you'll amass, the slower it'll run and the greater likelihood for issues).
11
- #
12
- # It's strongly recommended to check this file into your version control system.
13
-
14
- ActiveRecord::Schema.define(:version => 20130204164526) do
15
-
16
- create_table "releaf_admins", :force => true do |t|
17
- t.string "name", :null => false
18
- t.string "surname", :null => false
19
- t.string "phone"
20
- t.string "avatar_uid"
21
- t.integer "role_id"
22
- t.string "email", :default => "", :null => false
23
- t.string "encrypted_password", :default => "", :null => false
24
- t.string "reset_password_token"
25
- t.datetime "reset_password_sent_at"
26
- t.datetime "remember_created_at"
27
- t.integer "sign_in_count", :default => 0
28
- t.datetime "current_sign_in_at"
29
- t.datetime "last_sign_in_at"
30
- t.string "current_sign_in_ip"
31
- t.string "last_sign_in_ip"
32
- t.datetime "created_at", :null => false
33
- t.datetime "updated_at", :null => false
34
- end
35
-
36
- add_index "releaf_admins", ["email"], :name => "index_releaf_admins_on_email", :unique => true
37
- add_index "releaf_admins", ["reset_password_token"], :name => "index_releaf_admins_on_reset_password_token", :unique => true
38
- add_index "releaf_admins", ["role_id"], :name => "index_releaf_admins_on_role_id"
39
-
40
- create_table "releaf_nodes", :force => true do |t|
41
- t.string "name"
42
- t.string "slug"
43
- t.integer "parent_id"
44
- t.integer "lft"
45
- t.integer "rgt"
46
- t.string "content_type"
47
- t.integer "content_id"
48
- t.text "data"
49
- t.datetime "created_at", :null => false
50
- t.datetime "updated_at", :null => false
51
- t.string "content_string"
52
- t.integer "position"
53
- t.boolean "visible", :default => true, :null => false
54
- t.boolean "protected", :default => false, :null => false
55
- end
56
-
57
- add_index "releaf_nodes", ["content_type", "content_id"], :name => "index_releaf_nodes_on_content_type_and_content_id"
58
- add_index "releaf_nodes", ["lft"], :name => "index_releaf_nodes_on_lft"
59
- add_index "releaf_nodes", ["parent_id"], :name => "index_releaf_nodes_on_parent_id"
60
- add_index "releaf_nodes", ["rgt"], :name => "index_releaf_nodes_on_rgt"
61
- add_index "releaf_nodes", ["slug"], :name => "index_releaf_nodes_on_slug"
62
-
63
- create_table "releaf_roles", :force => true do |t|
64
- t.string "name", :null => false
65
- t.text "permissions"
66
- t.boolean "default", :default => false, :null => false
67
- t.datetime "created_at", :null => false
68
- t.datetime "updated_at", :null => false
69
- end
70
-
71
- create_table "releaf_translation_data", :force => true do |t|
72
- t.integer "translation_id", :null => false
73
- t.string "lang", :limit => 5, :null => false
74
- t.text "localization"
75
- t.datetime "created_at", :null => false
76
- t.datetime "updated_at", :null => false
77
- end
78
-
79
- add_index "releaf_translation_data", ["lang", "translation_id"], :name => "index_releaf_translation_data_on_lang_and_translation_id", :unique => true
80
- add_index "releaf_translation_data", ["lang"], :name => "index_releaf_translation_data_on_lang"
81
- add_index "releaf_translation_data", ["translation_id"], :name => "index_releaf_translation_data_on_translation_id"
82
-
83
- create_table "releaf_translation_groups", :force => true do |t|
84
- t.string "scope", :null => false
85
- t.datetime "created_at", :null => false
86
- t.datetime "updated_at", :null => false
87
- end
88
-
89
- add_index "releaf_translation_groups", ["scope"], :name => "index_releaf_translation_groups_on_scope", :unique => true
90
-
91
- create_table "releaf_translations", :force => true do |t|
92
- t.integer "group_id", :null => false
93
- t.string "key", :null => false
94
- t.datetime "created_at", :null => false
95
- t.datetime "updated_at", :null => false
96
- end
97
-
98
- add_index "releaf_translations", ["group_id", "key"], :name => "index_releaf_translations_on_group_id_and_key", :unique => true
99
- add_index "releaf_translations", ["group_id"], :name => "index_releaf_translations_on_group_id"
100
-
101
- create_table "settings", :force => true do |t|
102
- t.string "var", :null => false
103
- t.text "value"
104
- t.integer "thing_id"
105
- t.string "thing_type", :limit => 30
106
- t.datetime "created_at", :null => false
107
- t.datetime "updated_at", :null => false
108
- end
109
-
110
- add_index "settings", ["thing_type", "thing_id", "var"], :name => "index_settings_on_thing_type_and_thing_id_and_var", :unique => true
111
-
112
- end