brilliant_cms 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/images/brilliant_cms/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  6. data/app/assets/images/brilliant_cms/bootstrap-colorpicker/alpha.png +0 -0
  7. data/app/assets/images/brilliant_cms/bootstrap-colorpicker/hue-horizontal.png +0 -0
  8. data/app/assets/images/brilliant_cms/bootstrap-colorpicker/hue.png +0 -0
  9. data/app/assets/images/brilliant_cms/bootstrap-colorpicker/saturation.png +0 -0
  10. data/app/assets/images/brilliant_cms/light-bulb.svg +38 -0
  11. data/app/assets/images/brilliant_cms/user.png +0 -0
  12. data/app/assets/javascripts/brilliant_cms/application.js +6 -0
  13. data/app/assets/javascripts/brilliant_cms/dashboard.js +2 -0
  14. data/app/assets/javascripts/brilliant_cms/data/flot.js +58 -0
  15. data/app/assets/javascripts/brilliant_cms/data/gauge.js +21 -0
  16. data/app/assets/javascripts/brilliant_cms/data/linegraphs.coffee +23 -0
  17. data/app/assets/javascripts/brilliant_cms/data/load.js +1 -0
  18. data/app/assets/javascripts/brilliant_cms/data/map.coffee +17 -0
  19. data/app/assets/javascripts/brilliant_cms/datepicker.coffee +107 -0
  20. data/app/assets/javascripts/brilliant_cms/entries.js +2 -0
  21. data/app/assets/javascripts/brilliant_cms/skycons.coffee +18 -0
  22. data/app/assets/javascripts/brilliant_cms/vendor/bootstrap-progressbar.min.js +2 -0
  23. data/app/assets/javascripts/brilliant_cms/vendor/chart.min.js +11 -0
  24. data/app/assets/javascripts/brilliant_cms/vendor/daterangepicker.js +1 -0
  25. data/app/assets/javascripts/brilliant_cms/vendor/flot/a.jquery.flot.js +2 -0
  26. data/app/assets/javascripts/brilliant_cms/vendor/flot/b.jquery.flot.pie.js +820 -0
  27. data/app/assets/javascripts/brilliant_cms/vendor/flot/c.jquery.flot.orderBars.js +187 -0
  28. data/app/assets/javascripts/brilliant_cms/vendor/flot/d.jquery.flot.time.min.js +1 -0
  29. data/app/assets/javascripts/brilliant_cms/vendor/flot/e.date.js +104 -0
  30. data/app/assets/javascripts/brilliant_cms/vendor/flot/f.jquery.flot.spline.js +212 -0
  31. data/app/assets/javascripts/brilliant_cms/vendor/flot/g.jquery.flot.stack.js +188 -0
  32. data/app/assets/javascripts/brilliant_cms/vendor/flot/h.curvedLines.js +483 -0
  33. data/app/assets/javascripts/brilliant_cms/vendor/flot/i.jquery.flot.resize.js +57 -0
  34. data/app/assets/javascripts/brilliant_cms/vendor/flot/jquery.flot.tooltip.min.js +12 -0
  35. data/app/assets/javascripts/brilliant_cms/vendor/gauge.min.js +61 -0
  36. data/app/assets/javascripts/brilliant_cms/vendor/jquery.nicescroll.min.js +111 -0
  37. data/app/assets/javascripts/brilliant_cms/vendor/load.js +11 -0
  38. data/app/assets/javascripts/brilliant_cms/vendor/maps/jquery-jvectormap.js +2 -0
  39. data/app/assets/javascripts/brilliant_cms/vendor/maps/jvectormap-us-aea-en.js +1 -0
  40. data/app/assets/javascripts/brilliant_cms/vendor/maps/jvectormap-world-mill-en.js +1 -0
  41. data/app/assets/javascripts/brilliant_cms/vendor/maps/z.gdp-data.js +185 -0
  42. data/app/assets/javascripts/brilliant_cms/vendor/moment.js +3606 -0
  43. data/app/assets/javascripts/brilliant_cms/vendor/nprogress.js +491 -0
  44. data/app/assets/javascripts/brilliant_cms/vendor/skycons.js +730 -0
  45. data/app/assets/javascripts/brilliant_cms/vendor/template.js +317 -0
  46. data/app/assets/stylesheets/brilliant_cms/application.css +6 -0
  47. data/app/assets/stylesheets/brilliant_cms/dashboard.css +4 -0
  48. data/app/assets/stylesheets/brilliant_cms/entries.css +4 -0
  49. data/app/assets/stylesheets/brilliant_cms/layout.scss +6389 -0
  50. data/app/assets/stylesheets/brilliant_cms/vendor/animate.min.css +11 -0
  51. data/app/assets/stylesheets/brilliant_cms/vendor/maps/jquery-jvectormap-2.0.1.css +129 -0
  52. data/app/controllers/brilliant_cms/application_controller.rb +35 -0
  53. data/app/controllers/brilliant_cms/dashboard_controller.rb +12 -0
  54. data/app/controllers/brilliant_cms/entries_controller.rb +87 -0
  55. data/app/controllers/brilliant_cms/registrations_controller.rb +19 -0
  56. data/app/helpers/brilliant_cms/application_helper.rb +9 -0
  57. data/app/helpers/brilliant_cms/dashboard_helper.rb +4 -0
  58. data/app/helpers/brilliant_cms/entries_helper.rb +4 -0
  59. data/app/models/brilliant_cms/article.rb +9 -0
  60. data/app/models/brilliant_cms/blog_link.rb +10 -0
  61. data/app/models/brilliant_cms/blog_post.rb +9 -0
  62. data/app/models/brilliant_cms/concerns/searchable.rb +37 -0
  63. data/app/models/brilliant_cms/entry.rb +25 -0
  64. data/app/models/brilliant_cms/entry_search_data.rb +19 -0
  65. data/app/models/brilliant_cms/user.rb +8 -0
  66. data/app/views/brilliant_cms/dashboard/index.html.erb +0 -0
  67. data/app/views/brilliant_cms/entries/_form.html.erb +21 -0
  68. data/app/views/brilliant_cms/entries/edit.html.erb +6 -0
  69. data/app/views/brilliant_cms/entries/index.html.erb +38 -0
  70. data/app/views/brilliant_cms/entries/new.html.erb +3 -0
  71. data/app/views/brilliant_cms/entries/show.html.erb +28 -0
  72. data/app/views/layouts/brilliant_cms/_footer.html.erb +10 -0
  73. data/app/views/layouts/brilliant_cms/_notifications.html.erb +6 -0
  74. data/app/views/layouts/brilliant_cms/_sidemenu.html.erb +87 -0
  75. data/app/views/layouts/brilliant_cms/_topbar.html.erb +31 -0
  76. data/app/views/layouts/brilliant_cms/application.html.erb +40 -0
  77. data/config/initializers/assets.rb +1 -0
  78. data/config/initializers/devise.rb +267 -0
  79. data/config/initializers/simple_form.rb +165 -0
  80. data/config/initializers/simple_form_bootstrap.rb +149 -0
  81. data/config/locales/devise.en.yml +62 -0
  82. data/config/locales/simple_form.en.yml +31 -0
  83. data/config/routes.rb +27 -0
  84. data/db/migrate/20160218214729_create_brilliant_cms_entries.rb +15 -0
  85. data/db/migrate/20160219045419_create_brilliant_cms_entry_search_data.rb +14 -0
  86. data/db/migrate/20160219065450_devise_create_brilliant_cms_users.rb +42 -0
  87. data/lib/brilliant_cms.rb +6 -0
  88. data/lib/brilliant_cms/configuration.rb +17 -0
  89. data/lib/brilliant_cms/engine.rb +11 -0
  90. data/lib/brilliant_cms/version.rb +3 -0
  91. data/lib/tasks/brilliant_cms_tasks.rake +4 -0
  92. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  93. data/test/brilliant_cms_test.rb +7 -0
  94. data/test/controllers/brilliant_cms/dashboard_controller_test.rb +13 -0
  95. data/test/controllers/brilliant_cms/entries_controller_test.rb +13 -0
  96. data/test/dummy/README.rdoc +28 -0
  97. data/test/dummy/Rakefile +6 -0
  98. data/test/dummy/app/assets/javascripts/application.js +13 -0
  99. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  100. data/test/dummy/app/controllers/application_controller.rb +5 -0
  101. data/test/dummy/app/helpers/application_helper.rb +2 -0
  102. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  103. data/test/dummy/bin/bundle +3 -0
  104. data/test/dummy/bin/rails +4 -0
  105. data/test/dummy/bin/rake +4 -0
  106. data/test/dummy/bin/setup +29 -0
  107. data/test/dummy/config.ru +4 -0
  108. data/test/dummy/config/application.rb +26 -0
  109. data/test/dummy/config/boot.rb +5 -0
  110. data/test/dummy/config/database.yml +85 -0
  111. data/test/dummy/config/environment.rb +5 -0
  112. data/test/dummy/config/environments/development.rb +41 -0
  113. data/test/dummy/config/environments/production.rb +79 -0
  114. data/test/dummy/config/environments/test.rb +42 -0
  115. data/test/dummy/config/initializers/assets.rb +11 -0
  116. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  117. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  118. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  119. data/test/dummy/config/initializers/inflections.rb +16 -0
  120. data/test/dummy/config/initializers/mime_types.rb +4 -0
  121. data/test/dummy/config/initializers/session_store.rb +3 -0
  122. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  123. data/test/dummy/config/locales/en.yml +23 -0
  124. data/test/dummy/config/routes.rb +4 -0
  125. data/test/dummy/config/secrets.yml +22 -0
  126. data/test/dummy/public/404.html +67 -0
  127. data/test/dummy/public/422.html +67 -0
  128. data/test/dummy/public/500.html +66 -0
  129. data/test/dummy/public/favicon.ico +0 -0
  130. data/test/fixtures/brilliant_cms/entries.yml +11 -0
  131. data/test/fixtures/brilliant_cms/entry_search_data.yml +13 -0
  132. data/test/fixtures/brilliant_cms/users.yml +11 -0
  133. data/test/integration/navigation_test.rb +8 -0
  134. data/test/models/brilliant_cms/entry_search_data_test.rb +9 -0
  135. data/test/models/brilliant_cms/entry_test.rb +9 -0
  136. data/test/models/brilliant_cms/user_test.rb +9 -0
  137. data/test/test_helper.rb +21 -0
  138. metadata +407 -0
@@ -0,0 +1,165 @@
1
+ # Use this setup block to configure all options available in SimpleForm.
2
+ SimpleForm.setup do |config|
3
+ # Wrappers are used by the form builder to generate a
4
+ # complete input. You can remove any component from the
5
+ # wrapper, change the order or even add your own to the
6
+ # stack. The options given below are used to wrap the
7
+ # whole input.
8
+ config.wrappers :default, class: :input,
9
+ hint_class: :field_with_hint, error_class: :field_with_errors do |b|
10
+ ## Extensions enabled by default
11
+ # Any of these extensions can be disabled for a
12
+ # given input by passing: `f.input EXTENSION_NAME => false`.
13
+ # You can make any of these extensions optional by
14
+ # renaming `b.use` to `b.optional`.
15
+
16
+ # Determines whether to use HTML5 (:email, :url, ...)
17
+ # and required attributes
18
+ b.use :html5
19
+
20
+ # Calculates placeholders automatically from I18n
21
+ # You can also pass a string as f.input placeholder: "Placeholder"
22
+ b.use :placeholder
23
+
24
+ ## Optional extensions
25
+ # They are disabled unless you pass `f.input EXTENSION_NAME => true`
26
+ # to the input. If so, they will retrieve the values from the model
27
+ # if any exists. If you want to enable any of those
28
+ # extensions by default, you can change `b.optional` to `b.use`.
29
+
30
+ # Calculates maxlength from length validations for string inputs
31
+ b.optional :maxlength
32
+
33
+ # Calculates pattern from format validations for string inputs
34
+ b.optional :pattern
35
+
36
+ # Calculates min and max from length validations for numeric inputs
37
+ b.optional :min_max
38
+
39
+ # Calculates readonly automatically from readonly attributes
40
+ b.optional :readonly
41
+
42
+ ## Inputs
43
+ b.use :label_input
44
+ b.use :hint, wrap_with: { tag: :span, class: :hint }
45
+ b.use :error, wrap_with: { tag: :span, class: :error }
46
+
47
+ ## full_messages_for
48
+ # If you want to display the full error message for the attribute, you can
49
+ # use the component :full_error, like:
50
+ #
51
+ # b.use :full_error, wrap_with: { tag: :span, class: :error }
52
+ end
53
+
54
+ # The default wrapper to be used by the FormBuilder.
55
+ config.default_wrapper = :default
56
+
57
+ # Define the way to render check boxes / radio buttons with labels.
58
+ # Defaults to :nested for bootstrap config.
59
+ # inline: input + label
60
+ # nested: label > input
61
+ config.boolean_style = :nested
62
+
63
+ # Default class for buttons
64
+ config.button_class = 'btn'
65
+
66
+ # Method used to tidy up errors. Specify any Rails Array method.
67
+ # :first lists the first message for each field.
68
+ # Use :to_sentence to list all errors for each field.
69
+ # config.error_method = :first
70
+
71
+ # Default tag used for error notification helper.
72
+ config.error_notification_tag = :div
73
+
74
+ # CSS class to add for error notification helper.
75
+ config.error_notification_class = 'error_notification'
76
+
77
+ # ID to add for error notification helper.
78
+ # config.error_notification_id = nil
79
+
80
+ # Series of attempts to detect a default label method for collection.
81
+ # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
82
+
83
+ # Series of attempts to detect a default value method for collection.
84
+ # config.collection_value_methods = [ :id, :to_s ]
85
+
86
+ # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
87
+ # config.collection_wrapper_tag = nil
88
+
89
+ # You can define the class to use on all collection wrappers. Defaulting to none.
90
+ # config.collection_wrapper_class = nil
91
+
92
+ # You can wrap each item in a collection of radio/check boxes with a tag,
93
+ # defaulting to :span.
94
+ # config.item_wrapper_tag = :span
95
+
96
+ # You can define a class to use in all item wrappers. Defaulting to none.
97
+ # config.item_wrapper_class = nil
98
+
99
+ # How the label text should be generated altogether with the required text.
100
+ # config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
101
+
102
+ # You can define the class to use on all labels. Default is nil.
103
+ # config.label_class = nil
104
+
105
+ # You can define the default class to be used on forms. Can be overriden
106
+ # with `html: { :class }`. Defaulting to none.
107
+ # config.default_form_class = nil
108
+
109
+ # You can define which elements should obtain additional classes
110
+ # config.generate_additional_classes_for = [:wrapper, :label, :input]
111
+
112
+ # Whether attributes are required by default (or not). Default is true.
113
+ # config.required_by_default = true
114
+
115
+ # Tell browsers whether to use the native HTML5 validations (novalidate form option).
116
+ # These validations are enabled in SimpleForm's internal config but disabled by default
117
+ # in this configuration, which is recommended due to some quirks from different browsers.
118
+ # To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
119
+ # change this configuration to true.
120
+ config.browser_validations = false
121
+
122
+ # Collection of methods to detect if a file type was given.
123
+ # config.file_methods = [ :mounted_as, :file?, :public_filename ]
124
+
125
+ # Custom mappings for input types. This should be a hash containing a regexp
126
+ # to match as key, and the input type that will be used when the field name
127
+ # matches the regexp as value.
128
+ # config.input_mappings = { /count/ => :integer }
129
+
130
+ # Custom wrappers for input types. This should be a hash containing an input
131
+ # type as key and the wrapper that will be used for all inputs with specified type.
132
+ # config.wrapper_mappings = { string: :prepend }
133
+
134
+ # Namespaces where SimpleForm should look for custom input classes that
135
+ # override default inputs.
136
+ # config.custom_inputs_namespaces << "CustomInputs"
137
+
138
+ # Default priority for time_zone inputs.
139
+ # config.time_zone_priority = nil
140
+
141
+ # Default priority for country inputs.
142
+ # config.country_priority = nil
143
+
144
+ # When false, do not use translations for labels.
145
+ # config.translate_labels = true
146
+
147
+ # Automatically discover new inputs in Rails' autoload path.
148
+ # config.inputs_discovery = true
149
+
150
+ # Cache SimpleForm inputs discovery
151
+ # config.cache_discovery = !Rails.env.development?
152
+
153
+ # Default class for inputs
154
+ # config.input_class = nil
155
+
156
+ # Define the default class of the input wrapper of the boolean input.
157
+ config.boolean_label_class = 'checkbox'
158
+
159
+ # Defines if the default input wrapper class should be included in radio
160
+ # collection wrappers.
161
+ # config.include_default_input_wrapper_class = true
162
+
163
+ # Defines which i18n scope will be used in Simple Form.
164
+ # config.i18n_scope = 'simple_form'
165
+ end
@@ -0,0 +1,149 @@
1
+ # Use this setup block to configure all options available in SimpleForm.
2
+ SimpleForm.setup do |config|
3
+ config.error_notification_class = 'alert alert-danger'
4
+ config.button_class = 'btn btn-default'
5
+ config.boolean_label_class = nil
6
+
7
+ config.wrappers :vertical_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
8
+ b.use :html5
9
+ b.use :placeholder
10
+ b.optional :maxlength
11
+ b.optional :pattern
12
+ b.optional :min_max
13
+ b.optional :readonly
14
+ b.use :label, class: 'control-label'
15
+
16
+ b.use :input, class: 'form-control'
17
+ b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
18
+ b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
19
+ end
20
+
21
+ config.wrappers :vertical_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
22
+ b.use :html5
23
+ b.use :placeholder
24
+ b.optional :maxlength
25
+ b.optional :readonly
26
+ b.use :label, class: 'control-label'
27
+
28
+ b.use :input
29
+ b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
30
+ b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
31
+ end
32
+
33
+ config.wrappers :vertical_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
34
+ b.use :html5
35
+ b.optional :readonly
36
+
37
+ b.wrapper tag: 'div', class: 'checkbox' do |ba|
38
+ ba.use :label_input
39
+ end
40
+
41
+ b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
42
+ b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
43
+ end
44
+
45
+ config.wrappers :vertical_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
46
+ b.use :html5
47
+ b.optional :readonly
48
+ b.use :label, class: 'control-label'
49
+ b.use :input
50
+ b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
51
+ b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
52
+ end
53
+
54
+ config.wrappers :horizontal_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
55
+ b.use :html5
56
+ b.use :placeholder
57
+ b.optional :maxlength
58
+ b.optional :pattern
59
+ b.optional :min_max
60
+ b.optional :readonly
61
+ b.use :label, class: 'col-sm-3 control-label'
62
+
63
+ b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
64
+ ba.use :input, class: 'form-control'
65
+ ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
66
+ ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
67
+ end
68
+ end
69
+
70
+ config.wrappers :horizontal_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
71
+ b.use :html5
72
+ b.use :placeholder
73
+ b.optional :maxlength
74
+ b.optional :readonly
75
+ b.use :label, class: 'col-sm-3 control-label'
76
+
77
+ b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
78
+ ba.use :input
79
+ ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
80
+ ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
81
+ end
82
+ end
83
+
84
+ config.wrappers :horizontal_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
85
+ b.use :html5
86
+ b.optional :readonly
87
+
88
+ b.wrapper tag: 'div', class: 'col-sm-offset-3 col-sm-9' do |wr|
89
+ wr.wrapper tag: 'div', class: 'checkbox' do |ba|
90
+ ba.use :label_input
91
+ end
92
+
93
+ wr.use :error, wrap_with: { tag: 'span', class: 'help-block' }
94
+ wr.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
95
+ end
96
+ end
97
+
98
+ config.wrappers :horizontal_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
99
+ b.use :html5
100
+ b.optional :readonly
101
+
102
+ b.use :label, class: 'col-sm-3 control-label'
103
+
104
+ b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
105
+ ba.use :input
106
+ ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
107
+ ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
108
+ end
109
+ end
110
+
111
+ config.wrappers :inline_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
112
+ b.use :html5
113
+ b.use :placeholder
114
+ b.optional :maxlength
115
+ b.optional :pattern
116
+ b.optional :min_max
117
+ b.optional :readonly
118
+ b.use :label, class: 'sr-only'
119
+
120
+ b.use :input, class: 'form-control'
121
+ b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
122
+ b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
123
+ end
124
+
125
+ config.wrappers :multi_select, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
126
+ b.use :html5
127
+ b.optional :readonly
128
+ b.use :label, class: 'control-label'
129
+ b.wrapper tag: 'div', class: 'form-inline' do |ba|
130
+ ba.use :input, class: 'form-control'
131
+ ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
132
+ ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
133
+ end
134
+ end
135
+ # Wrappers for forms and inputs using the Bootstrap toolkit.
136
+ # Check the Bootstrap docs (http://getbootstrap.com)
137
+ # to learn about the different styles for forms and inputs,
138
+ # buttons and other elements.
139
+ config.default_wrapper = :vertical_form
140
+ config.wrapper_mappings = {
141
+ check_boxes: :vertical_radio_and_checkboxes,
142
+ radio_buttons: :vertical_radio_and_checkboxes,
143
+ file: :vertical_file_input,
144
+ boolean: :vertical_boolean,
145
+ datetime: :multi_select,
146
+ date: :multi_select,
147
+ time: :multi_select
148
+ }
149
+ end
@@ -0,0 +1,62 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your email address has been successfully confirmed."
7
+ send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
9
+ failure:
10
+ already_authenticated: "You are already signed in."
11
+ inactive: "Your account is not activated yet."
12
+ invalid: "Invalid %{authentication_keys} or password."
13
+ locked: "Your account is locked."
14
+ last_attempt: "You have one more attempt before your account is locked."
15
+ not_found_in_database: "Invalid %{authentication_keys} or password."
16
+ timeout: "Your session expired. Please sign in again to continue."
17
+ unauthenticated: "You need to sign in or sign up before continuing."
18
+ unconfirmed: "You have to confirm your email address before continuing."
19
+ mailer:
20
+ confirmation_instructions:
21
+ subject: "Confirmation instructions"
22
+ reset_password_instructions:
23
+ subject: "Reset password instructions"
24
+ unlock_instructions:
25
+ subject: "Unlock instructions"
26
+ password_change:
27
+ subject: "Password Changed"
28
+ omniauth_callbacks:
29
+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
30
+ success: "Successfully authenticated from %{kind} account."
31
+ passwords:
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
+ send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
34
+ 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."
35
+ updated: "Your password has been changed successfully. You are now signed in."
36
+ updated_not_active: "Your password has been changed successfully."
37
+ registrations:
38
+ destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
39
+ signed_up: "Welcome! You have signed up successfully."
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
+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
43
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
44
+ updated: "Your account has been updated successfully."
45
+ sessions:
46
+ signed_in: "Signed in successfully."
47
+ signed_out: "Signed out successfully."
48
+ already_signed_out: "Signed out successfully."
49
+ unlocks:
50
+ send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
51
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
52
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
53
+ errors:
54
+ messages:
55
+ already_confirmed: "was already confirmed, please try signing in"
56
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
57
+ expired: "has expired, please request a new one"
58
+ not_found: "not found"
59
+ not_locked: "was not locked"
60
+ not_saved:
61
+ one: "1 error prohibited this %{resource} from being saved:"
62
+ other: "%{count} errors prohibited this %{resource} from being saved:"
@@ -0,0 +1,31 @@
1
+ en:
2
+ simple_form:
3
+ "yes": 'Yes'
4
+ "no": 'No'
5
+ required:
6
+ text: 'required'
7
+ mark: '*'
8
+ # You can uncomment the line below if you need to overwrite the whole required html.
9
+ # When using html, text and mark won't be used.
10
+ # html: '<abbr title="required">*</abbr>'
11
+ error_notification:
12
+ default_message: "Please review the problems below:"
13
+ # Examples
14
+ # labels:
15
+ # defaults:
16
+ # password: 'Password'
17
+ # user:
18
+ # new:
19
+ # email: 'E-mail to sign in.'
20
+ # edit:
21
+ # email: 'E-mail.'
22
+ # hints:
23
+ # defaults:
24
+ # username: 'User name to sign in.'
25
+ # password: 'No special characters, please.'
26
+ # include_blanks:
27
+ # defaults:
28
+ # age: 'Rather not say'
29
+ # prompts:
30
+ # defaults:
31
+ # age: 'Select your age'
@@ -0,0 +1,27 @@
1
+ # Application route
2
+ Rails.application.routes.draw do
3
+ mount BrilliantCms::Engine, at: '/admin'
4
+ end
5
+
6
+ # Engine routes
7
+ BrilliantCms::Engine.routes.draw do
8
+ devise_for :users,
9
+ class_name: "BrilliantCms::User",
10
+ module: :devise,
11
+ controllers: {
12
+ registrations: 'brilliant_cms/registrations'
13
+ },
14
+ path: '', path_names: {
15
+ edit: 'settings',
16
+ sign_up: 'start',
17
+ sign_in: 'login',
18
+ sign_out:'logout'
19
+ }
20
+
21
+ scope "/:content_class" do
22
+ get 'search', to: 'entries#search', as: :search
23
+ resources :entries
24
+ end
25
+
26
+ root 'dashboard#index'
27
+ end
@@ -0,0 +1,15 @@
1
+ class CreateBrilliantCmsEntries < ActiveRecord::Migration
2
+ def change
3
+ create_table :brilliant_cms_entries do |t|
4
+ t.string :type, index: true
5
+ t.string :title
6
+ t.string :slug, index: true
7
+ t.json :payload
8
+ t.integer :user_id, index: true
9
+ t.string :author_name
10
+
11
+ t.datetime :published_at
12
+ t.timestamps null: false
13
+ end
14
+ end
15
+ end