browsercms 4.0.0.alpha → 4.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/bcms/ckeditor.js +1 -0
  3. data/app/assets/javascripts/bcms/{ckeditor_load.js.erb → ckeditor_load.js} +4 -1
  4. data/app/assets/javascripts/bcms/ckeditor_standard_config.js +1 -13
  5. data/app/assets/javascripts/cms/application.js +1 -0
  6. data/app/assets/javascripts/cms/{attachment_manager.js.erb → attachment_manager.js} +19 -13
  7. data/app/assets/javascripts/cms/content_types.js +13 -0
  8. data/app/assets/javascripts/cms/core_library.js.erb +3 -3
  9. data/app/assets/javascripts/cms/form_builder.js +1 -1
  10. data/app/assets/javascripts/cms/page_editor.js +9 -8
  11. data/app/assets/javascripts/cms/sitemap.js +5 -5
  12. data/app/assets/javascripts/cms/user.js +1 -1
  13. data/app/assets/stylesheets/cms/_assets.css.scss +5 -0
  14. data/app/assets/stylesheets/cms/_main-area.css.scss +1 -1
  15. data/app/assets/stylesheets/cms/_sitemap.css.scss +13 -0
  16. data/app/assets/stylesheets/cms/styles/_images.css.scss +11 -0
  17. data/app/controllers/cms/application_controller.rb +0 -1
  18. data/app/controllers/cms/content_controller.rb +3 -0
  19. data/app/controllers/cms/content_types_controller.rb +14 -0
  20. data/app/controllers/cms/inline_content_controller.rb +10 -8
  21. data/app/controllers/cms/passwords_controller.rb +5 -0
  22. data/app/controllers/cms/sites/passwords_controller.rb +5 -0
  23. data/app/helpers/cms/content_types_helper.rb +4 -0
  24. data/app/helpers/cms/form_tag_helper.rb +9 -1
  25. data/app/helpers/cms/page_helper.rb +2 -6
  26. data/app/helpers/cms/path_helper.rb +9 -0
  27. data/app/helpers/cms/section_nodes_helper.rb +1 -1
  28. data/app/inputs/name_input.rb +42 -0
  29. data/app/models/cms/attachment.rb +1 -0
  30. data/app/models/cms/content_type.rb +6 -0
  31. data/app/models/cms/dynamic_view.rb +2 -1
  32. data/app/models/cms/page.rb +6 -0
  33. data/app/models/cms/persistent_user.rb +1 -0
  34. data/app/models/cms/section_node.rb +8 -0
  35. data/app/models/cms/user.rb +9 -0
  36. data/app/portlets/helpers/cms/list_portlet_helper.rb +5 -0
  37. data/app/portlets/list_portlet.rb +40 -0
  38. data/app/views/cms/application/_add_content_modal.html.erb +2 -2
  39. data/app/views/cms/application/_exception.html.erb +1 -1
  40. data/app/views/cms/attachments/_attachment.html.erb +8 -6
  41. data/app/views/cms/attachments/_attachment_manager.html.erb +35 -18
  42. data/app/views/cms/attachments/_attachment_table.html.erb +12 -7
  43. data/app/views/cms/content/editing_frame.html.erb +1 -1
  44. data/app/views/cms/content_block/_sidebar.html.erb +2 -1
  45. data/app/views/cms/content_types/_order_field.html.erb +5 -0
  46. data/app/views/cms/content_types/index.html.erb +3 -0
  47. data/app/views/cms/forms/_form.html.erb +3 -2
  48. data/app/views/cms/pages/_main_form.html.erb +1 -1
  49. data/app/views/cms/passwords/new.html.erb +16 -0
  50. data/app/views/cms/section_nodes/_children.html.erb +2 -0
  51. data/app/views/cms/section_nodes/_row_buttons.html.erb +1 -1
  52. data/app/views/cms/section_nodes/_section_node.html.erb +1 -1
  53. data/app/views/cms/sessions/new.html.erb +10 -11
  54. data/app/views/layouts/cms/application.html.erb +4 -1
  55. data/app/views/portlets/email_page/_form.html.erb +1 -1
  56. data/app/views/portlets/email_page/render.html.erb +1 -1
  57. data/app/views/portlets/list/_form.html.erb +33 -0
  58. data/app/views/portlets/list/_list.html.erb +6 -0
  59. data/app/views/portlets/list/_table.html.erb +13 -0
  60. data/app/views/portlets/list/render.html.erb +1 -0
  61. data/app/views/portlets/tag_cloud/_form.html.erb +1 -1
  62. data/config/routes.rb +10 -5
  63. data/db/browsercms.seeds.rb +10 -8
  64. data/db/migrate/20130327184912_browsercms400.rb +30 -0
  65. data/doc/features/simple_form_refactor.md +2 -2
  66. data/doc/release_notes.md +38 -1
  67. data/lib/cms/acts/cms_user.rb +2 -2
  68. data/lib/cms/authentication/test_password_strategy.rb +10 -1
  69. data/lib/cms/behaviors/connecting.rb +20 -9
  70. data/lib/cms/commands/actions.rb +1 -3
  71. data/lib/cms/configuration.rb +2 -1
  72. data/lib/cms/configure_simple_form_bootstrap.rb +9 -0
  73. data/lib/cms/engine.rb +14 -5
  74. data/lib/cms/route_extensions.rb +2 -0
  75. data/lib/cms/version.rb +1 -1
  76. data/lib/generators/cms/content_block/content_block_generator.rb +21 -0
  77. data/lib/generators/cms/content_block/templates/_form.html.erb +1 -1
  78. data/lib/generators/cms/content_block/templates/application_controller.rb.erb +4 -0
  79. data/lib/generators/cms/content_block/templates/render.html.erb +22 -20
  80. data/lib/generators/cms/portlet/templates/_form.html.erb +3 -3
  81. data/lib/generators/cms/portlet/templates/portlet.rb +2 -0
  82. metadata +25 -15
  83. data/app/inputs/cms_text_field_input.rb +0 -29
  84. data/db/migrate/20131206214021_devise_create_users.rb +0 -47
  85. data/db/migrate/20131211223908_kill_reset_password.rb +0 -5
  86. data/db/migrate/20131218222005_create_cms_external_users.rb +0 -10
@@ -29,9 +29,7 @@ module Cms
29
29
 
30
30
  # Runs `bundle install` inside the correct project directory (unless --skip_bundle was passed to the command)
31
31
  def run_bundle_install
32
- inside current_project do
33
- run "bundle install" unless options[:skip_bundle]
34
- end
32
+ run "bundle install" unless options[:skip_bundle]
35
33
  end
36
34
 
37
35
  # Run `bundle update`, exiting if it doesn't work.
@@ -10,9 +10,10 @@ module Cms
10
10
  # Determines which WYSIWYG editor is the 'default' for a BrowserCMS project
11
11
  #
12
12
  # bcms modules can changes this by overriding it in their configuration.
13
+ # @return [String] The single javascript file to include to load the proper WYSIWYG editor.
13
14
  def content_editor
14
15
  # CKEditor is the default.
15
- @wysiwig_editor ||= ['bcms/ckeditor_load', 'ckeditor-jquery']
16
+ @wysiwig_editor ||= 'ckeditor'
16
17
  end
17
18
 
18
19
  def content_editor=(editor)
@@ -9,6 +9,15 @@ SimpleForm.setup do |config|
9
9
  b.use :hint, wrap_with: {tag: 'p', class: 'help-block'}
10
10
  end
11
11
 
12
+ config.wrappers :browsercms, tag: 'div', class: 'control-group row-fluid', error_class: 'error' do |b|
13
+ b.use :html5
14
+ b.use :placeholder
15
+ b.use :label
16
+ b.use :input
17
+ b.use :error, wrap_with: {tag: 'span', class: 'help-inline'}
18
+ b.use :hint, wrap_with: {tag: 'p', class: 'help-block'}
19
+ end
20
+
12
21
  config.wrappers :checkbox, :tag => 'div', :class => 'control-group row-fluid', :error_class => 'error' do |b|
13
22
  b.use :html5
14
23
  b.use :placeholder
@@ -77,7 +77,8 @@ module Cms
77
77
 
78
78
  # Determines which ckeditor file will be used to configure all instances.
79
79
  # There should be at most ONE of these, so use manifest files which require the below one to augement it.
80
- app.config.cms.ckeditor.configuration_file = 'bcms/ckeditor_standard_config.js'
80
+ #app.config.cms.ckeditor.configuration_file = 'bcms/ckeditor_standard_config.js'
81
+ # Note: This no longer works since we are statically loading it via asset pipeline.
81
82
 
82
83
  # Define menu items to be added dynamically to the CMS Admin tab.
83
84
  app.config.cms.tools_menu = []
@@ -93,6 +94,7 @@ module Cms
93
94
  # Sets the default .css file that will be added to forms created via the Forms module.
94
95
  # Projects can override this as needed.
95
96
  app.config.cms.form_builder_css = 'cms/default-forms'
97
+
96
98
  end
97
99
 
98
100
  # Needed to ensure routes added to the main app by the Engine are available. (Since engine draws its routes after the main app)
@@ -114,13 +116,20 @@ module Cms
114
116
  ActiveSupport::Dependencies.autoload_paths += %W( #{Rails.root}/app/portlets/helpers )
115
117
  ActionController::Base.append_view_path DynamicView.base_path
116
118
  ActionController::Base.append_view_path %W( #{self.root}/app/views)
117
- ActionView::Base.default_form_builder = Cms::FormBuilder::ContentBlockFormBuilder
118
119
  require 'jdbc_adapter' if defined?(JRUBY_VERSION)
119
120
  end
120
121
 
121
- initializer "browsercms.precompile_assets" do |app|
122
- app.config.assets.precompile += ['cms/application.css']
123
- end
122
+ initializer 'browsercms.precompile_assets' do |app|
123
+ # Ensure all engine specific assets are compiled when rake asset:precompile is run.
124
+ app.config.assets.precompile += ['cms/page_toolbar.js', 'cms/page_editor.js', 'cms/site.js']
125
+
126
+ app.config.assets.precompile += ['cms/page_editor.css', 'cms/page_content_editing.css', 'cms/site.js']
124
127
 
128
+ # Ckeditor
129
+ app.config.assets.precompile += ['bcms/ckeditor_inline.js', 'bcms/ckeditor.js', 'bcms/ckeditor_standard_config.js']
130
+
131
+ # Unsure why jquery isn't getting precompiled.
132
+ app.config.assets.precompile += ['jquery']
133
+ end
125
134
  end
126
135
  end
@@ -49,6 +49,8 @@ module Cms::RouteExtensions
49
49
  devise_scope :cms_user do
50
50
  get '/forgot-password' => "cms/sites/passwords#new", :as => 'forgot_password'
51
51
  post '/forgot-password' => "cms/sites/passwords#create", as: 'cms_user_password'
52
+ get '/passwords/:id/edit' => "cms/sites/passwords#edit", as: 'edit_password'
53
+ put '/forgot-password' => "cms/sites/passwords#update", as: 'update_password'
52
54
  end
53
55
 
54
56
  # Handle 'stock' attachments
@@ -2,7 +2,7 @@
2
2
  # Allows the precise version of BrowserCMS to be determined programatically.
3
3
  #
4
4
  module Cms
5
- VERSION = "4.0.0.alpha"
5
+ VERSION = "4.0.0.beta"
6
6
 
7
7
  # Return the current version of the CMS.
8
8
  def self.version
@@ -21,6 +21,13 @@ module Cms
21
21
  end
22
22
  end
23
23
 
24
+ def generate_controller
25
+ application_controller = File.join('app/controllers', class_path, "application_controller.rb")
26
+ unless File.exists?(application_controller)
27
+ template 'application_controller.rb.erb', application_controller
28
+ end
29
+ end
30
+
24
31
  hook_for :orm, :in => :rails, :required => true, :as => :model
25
32
 
26
33
  def alter_the_model
@@ -32,8 +39,14 @@ module Cms
32
39
 
33
40
  def alter_the_migration
34
41
  migration = self.class.migration_exists?(File.absolute_path("db/migrate"), "create_#{table_name}")
42
+
43
+ if @in_core_application
44
+ gsub_file migration, "create_table :#{table_name}", "create_table :#{unnamespaced_table_name}"
45
+ end
46
+
35
47
  gsub_file migration, "create_table", "create_content_table"
36
48
 
49
+
37
50
  # Attachments do not require a FK from this model to attachments.
38
51
  self.attributes.select { |attr| attr.type == :attachment }.each do |attribute|
39
52
  gsub_file migration, "t.attachment :#{attribute.name}", ""
@@ -70,6 +83,14 @@ module Cms
70
83
 
71
84
  private
72
85
 
86
+ # @override NamedBase#table_name Copy&Paste of this method to make sure project table names are not actually namespaced in migrations.
87
+ def unnamespaced_table_name
88
+ @unnamespaced_table_name ||= begin
89
+ base = pluralize_table_names? ? plural_name : singular_name
90
+ (regular_class_path + [base]).join('_')
91
+ end
92
+ end
93
+
73
94
  def model_has_attachment?
74
95
  !attachment_attributes().empty?
75
96
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  name_attribute = attributes.delete_if {|attr| attr.name == 'name'}
4
4
  # Assumes every content block should always have a name attribute
5
- -%><%%= f.input :name, as: :cms_text_field %>
5
+ -%><%%= f.input :name, as: :name %>
6
6
  <% for attribute in attributes -%>
7
7
  <%= field_tag = case attribute.type
8
8
  when :attachment
@@ -0,0 +1,4 @@
1
+ module <%= namespace %>
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -1,21 +1,23 @@
1
- <% first_attachments = true
1
+ <dl>
2
+ <% first_attachments = true
2
3
 
3
- # This 'unless' can be removed if :name is no longer assumed to be a default attribute.
4
- unless attributes.find {|attr| attr.name == 'name'}
5
- %><p><b>Name:</b> <%%= @content_block.name %></p><% end %>
6
- <%- for attribute in attributes -%>
7
- <%- case attribute.type
8
- when :attachment -%>
9
- <p><b><%= attribute.name.titleize %>:</b> <%%= link_to "<%= attribute.name.titleize %>", attachment_path_for(@content_block.<%= attribute.name %>) %></p>
10
- <%- when :attachments
11
- if first_attachments
12
- -%>
13
- <p><b>Attachments:</b> <%%= attachment_viewer @content_block %></p>
14
- <%- first_attachments = false
15
- end -%>
16
- <%- when :category -%>
17
- <p><b>Category:</b> <%%= @content_block.category_name %></p>
18
- <%- else -%>
19
- <p><b><%= attribute.name.titleize %>:</b> <%%= @content_block.<%= attribute.name %> %></p>
20
- <%- end -%>
21
- <% end %>
4
+ # This 'unless' can be removed if :name is no longer assumed to be a default attribute.
5
+ unless attributes.find {|attr| attr.name == 'name'}
6
+ %><dt>Name:</dt><dd><%%= show :name %></dd><% end %>
7
+ <%- for attribute in attributes -%>
8
+ <%- case attribute.type
9
+ when :attachment -%>
10
+ <dt><%= attribute.name.titleize %>:</dt><dd><%%= link_to "<%= attribute.name.titleize %>", attachment_path_for(@content_block.<%= attribute.name %>) %></dd>
11
+ <%- when :attachments
12
+ if first_attachments
13
+ -%>
14
+ <dt>Attachments:</dt><dd><%%= attachment_viewer @content_block %></dd>
15
+ <%- first_attachments = false
16
+ end -%>
17
+ <%- when :category -%>
18
+ <dt>Category:</dt><dd><%%= @content_block.category_name %></dd>
19
+ <%- else -%>
20
+ <dt><%= attribute.name.titleize %>:</dt><dd><%%= show :<%= attribute.name %> %></dd>
21
+ <%- end -%>
22
+ <% end %>
23
+ </dl>
@@ -1,5 +1,5 @@
1
- <%%= f.cms_text_field :name %>
1
+ <%%= f.input :name %>
2
2
  <% for attribute in attributes -%>
3
- <%%= f.cms_text_field :<%= attribute.name %> %>
3
+ <%%= f.input :<%= attribute.name %> %>
4
4
  <% end -%>
5
- <%%= f.cms_template_editor :template %>
5
+ <%%= f.input :template, as: :template_editor %>
@@ -1,5 +1,7 @@
1
1
  class <%= class_name %>Portlet < Cms::Portlet
2
2
 
3
+ description "TODO: Provide a suitable description for this portlet."
4
+
3
5
  # Mark this as 'true' to allow the portlet's template to be editable via the CMS admin UI.
4
6
  enable_template_editor false
5
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browsercms
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.alpha
4
+ version: 4.0.0.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - BrowserMedia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-17 00:00:00.000000000 Z
11
+ date: 2014-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - ~>
102
102
  - !ruby/object:Gem::Version
103
- version: 4.0.1.1
103
+ version: 4.3.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ~>
109
109
  - !ruby/object:Gem::Version
110
- version: 4.0.1.1
110
+ version: 4.3.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: underscore-rails
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -128,28 +128,28 @@ dependencies:
128
128
  requirements:
129
129
  - - ~>
130
130
  - !ruby/object:Gem::Version
131
- version: 3.0.4
131
+ version: '3.1'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ~>
137
137
  - !ruby/object:Gem::Version
138
- version: 3.0.4
138
+ version: '3.1'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: jquery-ui-rails
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ~>
144
144
  - !ruby/object:Gem::Version
145
- version: 4.0.5
145
+ version: '4.1'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ~>
151
151
  - !ruby/object:Gem::Version
152
- version: 4.0.5
152
+ version: '4.1'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: paperclip
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -241,7 +241,7 @@ dependencies:
241
241
  - !ruby/object:Gem::Version
242
242
  version: '0'
243
243
  description: BrowserCMS is a general purpose, open source Web Content Management System
244
- (CMS) that supports Ruby on Rails v3.2. It can be used as a standalone CMS, added
244
+ (CMS) that supports Ruby on Rails v4.0. It can be used as a standalone CMS, added
245
245
  to existing Rails projects or extended using Rails Engines.
246
246
  email: github@browsermedia.com
247
247
  executables:
@@ -492,15 +492,16 @@ files:
492
492
  - app/assets/images/cms/usercontrols_bg_cap.png
493
493
  - app/assets/javascripts/bcms/ckeditor.js
494
494
  - app/assets/javascripts/bcms/ckeditor_inline.js
495
- - app/assets/javascripts/bcms/ckeditor_load.js.erb
495
+ - app/assets/javascripts/bcms/ckeditor_load.js
496
496
  - app/assets/javascripts/bcms/ckeditor_standard_config.js
497
497
  - app/assets/javascripts/ckeditor/plugins/delete_content/plugin.js
498
498
  - app/assets/javascripts/ckeditor/plugins/edit_content/plugin.js
499
499
  - app/assets/javascripts/ckeditor/plugins/move_content/plugin.js
500
500
  - app/assets/javascripts/cms/ajax.js
501
501
  - app/assets/javascripts/cms/application.js
502
- - app/assets/javascripts/cms/attachment_manager.js.erb
502
+ - app/assets/javascripts/cms/attachment_manager.js
503
503
  - app/assets/javascripts/cms/content_library.js
504
+ - app/assets/javascripts/cms/content_types.js
504
505
  - app/assets/javascripts/cms/core_library.js.erb
505
506
  - app/assets/javascripts/cms/form_builder.js
506
507
  - app/assets/javascripts/cms/namespace.js
@@ -571,6 +572,7 @@ files:
571
572
  - app/controllers/cms/connectors_controller.rb
572
573
  - app/controllers/cms/content_block_controller.rb
573
574
  - app/controllers/cms/content_controller.rb
575
+ - app/controllers/cms/content_types_controller.rb
574
576
  - app/controllers/cms/dashboard_controller.rb
575
577
  - app/controllers/cms/dynamic_views_controller.rb
576
578
  - app/controllers/cms/email_messages_controller.rb
@@ -609,6 +611,7 @@ files:
609
611
  - app/controllers/tests/pretend_controller.rb
610
612
  - app/helpers/cms/application_helper.rb
611
613
  - app/helpers/cms/content_block_helper.rb
614
+ - app/helpers/cms/content_types_helper.rb
612
615
  - app/helpers/cms/form_tag_helper.rb
613
616
  - app/helpers/cms/menu_helper.rb
614
617
  - app/helpers/cms/mobile_helper.rb
@@ -625,9 +628,9 @@ files:
625
628
  - app/helpers/login_portlet_helper.rb
626
629
  - app/inputs/attachments_input.rb
627
630
  - app/inputs/cms_text_area_input.rb
628
- - app/inputs/cms_text_field_input.rb
629
631
  - app/inputs/date_picker_input.rb
630
632
  - app/inputs/file_picker_input.rb
633
+ - app/inputs/name_input.rb
631
634
  - app/inputs/path_input.rb
632
635
  - app/inputs/tag_list_input.rb
633
636
  - app/inputs/template_editor_input.rb
@@ -683,6 +686,8 @@ files:
683
686
  - app/portlets/dynamic_portlet.rb
684
687
  - app/portlets/email_page_portlet.rb
685
688
  - app/portlets/forgot_password_portlet.rb
689
+ - app/portlets/helpers/cms/list_portlet_helper.rb
690
+ - app/portlets/list_portlet.rb
686
691
  - app/portlets/login_portlet.rb
687
692
  - app/portlets/tag_cloud_portlet.rb
688
693
  - app/presenters/cms/user_presenter.rb
@@ -726,6 +731,8 @@ files:
726
731
  - app/views/cms/content_block/show.html.erb
727
732
  - app/views/cms/content_block/show_in_isolation.html.erb
728
733
  - app/views/cms/content_block/versions.html.erb
734
+ - app/views/cms/content_types/_order_field.html.erb
735
+ - app/views/cms/content_types/index.html.erb
729
736
  - app/views/cms/dashboard/_page_drafts.html.erb
730
737
  - app/views/cms/dashboard/_tasks.html.erb
731
738
  - app/views/cms/dashboard/index.html.erb
@@ -787,6 +794,7 @@ files:
787
794
  - app/views/cms/pages/edit.html.erb
788
795
  - app/views/cms/pages/new.html.erb
789
796
  - app/views/cms/pages/versions.html.erb
797
+ - app/views/cms/passwords/new.html.erb
790
798
  - app/views/cms/redirects/_form.html.erb
791
799
  - app/views/cms/redirects/edit.html.erb
792
800
  - app/views/cms/redirects/index.html.erb
@@ -844,6 +852,10 @@ files:
844
852
  - app/views/portlets/email_page/render.html.erb
845
853
  - app/views/portlets/forgot_password/_form.html.erb
846
854
  - app/views/portlets/forgot_password/render.html.erb
855
+ - app/views/portlets/list/_form.html.erb
856
+ - app/views/portlets/list/_list.html.erb
857
+ - app/views/portlets/list/_table.html.erb
858
+ - app/views/portlets/list/render.html.erb
847
859
  - app/views/portlets/login/_form.html.erb
848
860
  - app/views/portlets/login/render.html.erb
849
861
  - app/views/portlets/portlets/_form.html.erb
@@ -855,9 +867,6 @@ files:
855
867
  - db/browsercms.seeds.rb
856
868
  - db/migrate/20080815014337_browsercms300.rb
857
869
  - db/migrate/20130327184912_browsercms400.rb
858
- - db/migrate/20131206214021_devise_create_users.rb
859
- - db/migrate/20131211223908_kill_reset_password.rb
860
- - db/migrate/20131218222005_create_cms_external_users.rb
861
870
  - db/schema.rb
862
871
  - db/seeds.rb
863
872
  - doc/design/blue_button.psd
@@ -959,6 +968,7 @@ files:
959
968
  - lib/generators/browser_cms.rb
960
969
  - lib/generators/cms/content_block/content_block_generator.rb
961
970
  - lib/generators/cms/content_block/templates/_form.html.erb
971
+ - lib/generators/cms/content_block/templates/application_controller.rb.erb
962
972
  - lib/generators/cms/content_block/templates/render.html.erb
963
973
  - lib/generators/cms/content_block/USAGE
964
974
  - lib/generators/cms/install/install_generator.rb
@@ -1,29 +0,0 @@
1
- # Adds additional attributes to text field.
2
- class CmsTextFieldInput < SimpleForm::Inputs::TextInput
3
-
4
- include Cms::FormBuilder::DefaultInput
5
-
6
- # @todo Generating a slug probably shouldn't be done as a side effect of a :name field.
7
- def input
8
-
9
- if should_autogenerate_slug?(attribute_name)
10
- input_html_options[:class] << 'slug-source'
11
- end
12
-
13
- extract_default
14
- html = @builder.text_field(attribute_name, input_html_options).html_safe
15
-
16
- html
17
- end
18
-
19
-
20
- protected
21
-
22
- def should_autogenerate_slug?(method)
23
- content_requires_slug_field?(method) && (object.new_record? || (object.name.blank? && object.slug.blank?))
24
- end
25
-
26
- def content_requires_slug_field?(method)
27
- method == :name && object.class.requires_slug?
28
- end
29
- end
@@ -1,47 +0,0 @@
1
- class DeviseCreateUsers < ActiveRecord::Migration
2
- def change
3
- change_table(:cms_users) do |t|
4
- ## Database authenticatable
5
- #t.string :email, :null => false, :default => ""
6
- t.string :encrypted_password, :null => false, :default => ""
7
-
8
- ## Recoverable
9
- t.rename :reset_token, :reset_password_token
10
- t.datetime :reset_password_sent_at
11
-
12
- ## Rememberable
13
- t.rename :remember_token_expires_at, :remember_created_at
14
- t.remove :remember_token # Not needed by devise.
15
-
16
- # Remove old SHA based encrypted passwords.
17
- # Comment out the following line if you have a strong need to preserve old hashed passwords
18
- t.remove :crypted_password
19
-
20
- ## Trackable
21
- #t.integer :sign_in_count, :default => 0, :null => false
22
- #t.datetime :current_sign_in_at
23
- #t.datetime :last_sign_in_at
24
- #t.string :current_sign_in_ip
25
- #t.string :last_sign_in_ip
26
-
27
- ## Confirmable
28
- # t.string :confirmation_token
29
- # t.datetime :confirmed_at
30
- # t.datetime :confirmation_sent_at
31
- # t.string :unconfirmed_email # Only if using reconfirmable
32
-
33
- ## Lockable
34
- # t.integer :failed_attempts, :default => 0, :null => false # Only if lock strategy is :failed_attempts
35
- # t.string :unlock_token # Only if unlock strategy is :email or :both
36
- # t.datetime :locked_at
37
-
38
-
39
- #t.timestamps
40
- end
41
-
42
- add_index :cms_users, :email, :unique => true
43
- add_index :cms_users, :reset_password_token, :unique => true
44
- # add_index :users, :confirmation_token, :unique => true
45
- # add_index :users, :unlock_token, :unique => true
46
- end
47
- end