cms-fortress 1.3.5 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile.lock +68 -56
  3. data/app/assets/javascripts/cms/fortress/media.js.coffee +5 -0
  4. data/app/assets/javascripts/cms/fortress/themes/wide.js.erb +3 -3
  5. data/app/assets/stylesheets/cms/fortress/admin_overrides.css +9 -0
  6. data/app/helpers/cms/fortress/application_helper.rb +3 -3
  7. data/app/helpers/cms/fortress/sprocket_helper.rb +17 -14
  8. data/app/helpers/comfy/admin/cms/pages_helper.rb +4 -4
  9. data/app/views/cms/fortress/themes/wide/_menu.html.haml +1 -1
  10. data/app/views/cms/fortress/users/passwords/edit.html.haml +4 -4
  11. data/app/views/cms/fortress/users/passwords/new.html.haml +2 -2
  12. data/app/views/comfy/admin/cms/files/_page_form.html.haml +17 -0
  13. data/app/views/comfy/admin/cms/pages/edit.html.haml +13 -14
  14. data/app/views/devise/shared/_links.html.haml +18 -0
  15. data/app/views/layouts/cms/fortress/session.html.haml +0 -1
  16. data/app/views/layouts/comfy/admin/cms/_head.html.haml +3 -7
  17. data/cms-fortress.gemspec +7 -7
  18. data/config/locales/da.yml +22 -1
  19. data/config/locales/de.yml +21 -1
  20. data/config/locales/en.yml +22 -1
  21. data/config/locales/es.yml +22 -1
  22. data/config/locales/fr.yml +22 -1
  23. data/config/locales/it.yml +22 -1
  24. data/config/locales/ja.yml +22 -1
  25. data/config/locales/nl.yml +22 -1
  26. data/config/locales/pl.yml +22 -1
  27. data/config/locales/pt-BR.yml +23 -1
  28. data/config/locales/ru.yml +23 -1
  29. data/config/locales/sv.yml +22 -1
  30. data/config/locales/zh-CN.yml +22 -1
  31. data/config/routes.rb +0 -0
  32. data/db/schema.rb +1 -1
  33. data/lib/cms-fortress.rb +1 -0
  34. data/lib/cms/fortress/rails/engine.rb +1 -1
  35. data/test/controllers/comfy/admin/cms/pages_controller_test.rb +1 -1
  36. data/test/fixtures/comfy/cms/pages.yml +2 -2
  37. data/test/models/comfy/cms/page_test.rb +0 -1
  38. metadata +74 -81
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f2bca720ab1f1da2525484105683827daabd9a25
4
+ data.tar.gz: 95d00bdc7e0a0f2e23b7ed3e5512060d1b084a38
5
+ SHA512:
6
+ metadata.gz: 7f3fd08e8942bd50309526206a530c9c32c0075202053083269f7440ff3c1b696050fe86ae03904a49ec8f55e36d142eeb3cc4a37763a455ba2f5a0be7b50239
7
+ data.tar.gz: f99d3f5f81118ea2f369c998ed5a12be1d241a2fb49f02400481f53f8541076c5a18151b9b286ecb65370301efcc8e338f8cb9209df4b5d2ae459a3fb46dceee
data/Gemfile.lock CHANGED
@@ -1,57 +1,61 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cms-fortress (1.3.4)
5
- aasm (~> 3.2)
4
+ cms-fortress (1.3.6)
5
+ aasm (~> 4.0)
6
6
  cancancan (~> 1.9)
7
- comfortable_mexican_sofa (~> 1.12.3)
7
+ comfortable_mexican_sofa (~> 1.12, >= 1.12.5)
8
8
  delayed_job (~> 4)
9
9
  devise (~> 3.2)
10
- rails (>= 4.0.0)
11
- tinymce-rails (~> 4.0.0)
10
+ rails (~> 4.0, >= 4.0.0)
11
+ tinymce-rails (~> 4.1, >= 4.1.0)
12
12
  tinymce-rails-langs (~> 4.0)
13
13
 
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
- aasm (3.4.0)
18
- actionmailer (4.0.12)
19
- actionpack (= 4.0.12)
17
+ aasm (4.0.8)
18
+ actionmailer (4.0.13)
19
+ actionpack (= 4.0.13)
20
20
  mail (~> 2.5, >= 2.5.4)
21
- actionpack (4.0.12)
22
- activesupport (= 4.0.12)
21
+ actionpack (4.0.13)
22
+ activesupport (= 4.0.13)
23
23
  builder (~> 3.1.0)
24
24
  erubis (~> 2.7.0)
25
25
  rack (~> 1.5.2)
26
26
  rack-test (~> 0.6.2)
27
27
  active_link_to (1.0.2)
28
28
  actionpack
29
- activemodel (4.0.12)
30
- activesupport (= 4.0.12)
29
+ activemodel (4.0.13)
30
+ activesupport (= 4.0.13)
31
31
  builder (~> 3.1.0)
32
- activerecord (4.0.12)
33
- activemodel (= 4.0.12)
32
+ activerecord (4.0.13)
33
+ activemodel (= 4.0.13)
34
34
  activerecord-deprecated_finders (~> 1.0.2)
35
- activesupport (= 4.0.12)
35
+ activesupport (= 4.0.13)
36
36
  arel (~> 4.0.0)
37
37
  activerecord-deprecated_finders (1.0.3)
38
- activesupport (4.0.12)
38
+ activesupport (4.0.13)
39
39
  i18n (~> 0.6, >= 0.6.9)
40
40
  minitest (~> 4.2)
41
41
  multi_json (~> 1.3)
42
42
  thread_safe (~> 0.1)
43
43
  tzinfo (~> 0.3.37)
44
- ansi (1.4.3)
44
+ ansi (1.5.0)
45
45
  arel (4.0.2)
46
+ autoprefixer-rails (5.0.0.3)
47
+ execjs
48
+ json
46
49
  bcrypt (3.1.9)
47
- bootstrap-sass (3.3.1.0)
48
- sass (~> 3.2)
50
+ bootstrap-sass (3.3.3)
51
+ autoprefixer-rails (>= 5.0.0.1)
52
+ sass (>= 3.2.19)
49
53
  bootstrap_form (2.2.0)
50
54
  builder (3.1.4)
51
- cancancan (1.9.2)
55
+ cancancan (1.10.1)
52
56
  climate_control (0.0.3)
53
57
  activesupport (>= 3.0)
54
- cocaine (0.5.4)
58
+ cocaine (0.5.5)
55
59
  climate_control (>= 0.0.3, < 1.0)
56
60
  codemirror-rails (4.8)
57
61
  railties (>= 3.0, < 5)
@@ -62,7 +66,7 @@ GEM
62
66
  coffee-script-source
63
67
  execjs
64
68
  coffee-script-source (1.8.0)
65
- comfortable_mexican_sofa (1.12.3)
69
+ comfortable_mexican_sofa (1.12.6)
66
70
  active_link_to (>= 1.0.0)
67
71
  bootstrap-sass (>= 3.2.0)
68
72
  bootstrap_form (>= 2.2.0)
@@ -71,16 +75,14 @@ GEM
71
75
  haml-rails (>= 0.3.0)
72
76
  jquery-rails (>= 3.0.0)
73
77
  jquery-ui-rails (>= 5.0.0)
74
- kaminari (>= 0.14.0)
75
78
  kramdown (>= 1.0.0)
76
79
  paperclip (>= 4.0.0)
77
80
  plupload-rails (>= 1.2.1)
78
81
  rails (>= 4.0.0, < 5)
79
82
  rails-i18n (>= 4.0.0)
80
83
  sass-rails (>= 4.0.3)
81
- tinymce-rails (>= 4.0.0)
82
- delayed_job (4.0.4)
83
- activesupport (>= 3.0, < 4.2)
84
+ delayed_job (4.0.6)
85
+ activesupport (>= 3.0, < 5.0)
84
86
  devise (3.4.1)
85
87
  bcrypt (~> 3.0)
86
88
  orm_adapter (~> 0.1)
@@ -93,28 +95,32 @@ GEM
93
95
  execjs (2.2.2)
94
96
  haml (4.0.6)
95
97
  tilt
96
- haml-rails (0.5.3)
98
+ haml-rails (0.7.0)
97
99
  actionpack (>= 4.0.1)
98
100
  activesupport (>= 4.0.1)
99
101
  haml (>= 3.1, < 5.0)
102
+ html2haml (>= 1.0.1)
100
103
  railties (>= 4.0.1)
101
104
  hashie (3.3.2)
102
105
  hike (1.2.3)
103
- i18n (0.6.11)
106
+ html2haml (2.0.0)
107
+ erubis (~> 2.7.0)
108
+ haml (~> 4.0.0)
109
+ nokogiri (~> 1.6.0)
110
+ ruby_parser (~> 3.5)
111
+ i18n (0.7.0)
104
112
  jquery-rails (3.1.2)
105
113
  railties (>= 3.0, < 5.0)
106
114
  thor (>= 0.14, < 2.0)
107
115
  jquery-ui-rails (5.0.3)
108
116
  railties (>= 3.2.16)
109
- json (1.8.1)
110
- kaminari (0.16.1)
111
- actionpack (>= 3.0.0)
112
- activesupport (>= 3.0.0)
117
+ json (1.8.2)
113
118
  kramdown (1.5.0)
114
119
  mail (2.6.3)
115
120
  mime-types (>= 1.16, < 3)
116
121
  mime-types (2.4.3)
117
- minitest (4.7.3)
122
+ mini_portile (0.6.2)
123
+ minitest (4.7.5)
118
124
  minitest-rails (1.0.1)
119
125
  minitest (~> 4.7)
120
126
  minitest-test (~> 1.0)
@@ -130,47 +136,53 @@ GEM
130
136
  minitest-test (1.1.0)
131
137
  minitest (~> 4.0)
132
138
  multi_json (1.10.1)
139
+ nokogiri (1.6.6.2)
140
+ mini_portile (~> 0.6.0)
133
141
  orm_adapter (0.5.0)
134
- paperclip (4.2.0)
142
+ paperclip (4.2.1)
135
143
  activemodel (>= 3.0.0)
136
144
  activesupport (>= 3.0.0)
137
145
  cocaine (~> 0.5.3)
138
146
  mime-types
139
147
  plupload-rails (1.2.1)
140
148
  rails (>= 3.1)
141
- powerbar (1.0.11)
142
- ansi (~> 1.4.0)
149
+ powerbar (1.0.12)
150
+ ansi (~> 1.5.0)
143
151
  hashie (>= 1.1.0)
144
152
  rack (1.5.2)
145
- rack-test (0.6.2)
153
+ rack-test (0.6.3)
146
154
  rack (>= 1.0)
147
- rails (4.0.12)
148
- actionmailer (= 4.0.12)
149
- actionpack (= 4.0.12)
150
- activerecord (= 4.0.12)
151
- activesupport (= 4.0.12)
155
+ rails (4.0.13)
156
+ actionmailer (= 4.0.13)
157
+ actionpack (= 4.0.13)
158
+ activerecord (= 4.0.13)
159
+ activesupport (= 4.0.13)
152
160
  bundler (>= 1.3.0, < 2.0)
153
- railties (= 4.0.12)
161
+ railties (= 4.0.13)
154
162
  sprockets-rails (~> 2.0)
155
163
  rails-i18n (4.0.3)
156
164
  i18n (~> 0.6)
157
165
  railties (~> 4.0)
158
- railties (4.0.12)
159
- actionpack (= 4.0.12)
160
- activesupport (= 4.0.12)
166
+ railties (4.0.13)
167
+ actionpack (= 4.0.13)
168
+ activesupport (= 4.0.13)
161
169
  rake (>= 0.8.7)
162
170
  thor (>= 0.18.1, < 2.0)
163
- rake (10.4.0)
164
- rdoc (4.1.2)
171
+ rake (10.4.2)
172
+ rdoc (4.2.0)
165
173
  json (~> 1.4)
166
174
  responders (1.1.2)
167
175
  railties (>= 3.2, < 4.2)
168
- sass (3.2.19)
169
- sass-rails (4.0.5)
176
+ ruby_parser (3.6.4)
177
+ sexp_processor (~> 4.1)
178
+ sass (3.4.10)
179
+ sass-rails (5.0.1)
170
180
  railties (>= 4.0.0, < 5.0)
171
- sass (~> 3.2.2)
172
- sprockets (~> 2.8, < 3.0)
173
- sprockets-rails (~> 2.0)
181
+ sass (~> 3.1)
182
+ sprockets (>= 2.8, < 4.0)
183
+ sprockets-rails (>= 2.0, < 4.0)
184
+ tilt (~> 1.1)
185
+ sexp_processor (4.4.5)
174
186
  simplecov (0.9.1)
175
187
  docile (~> 1.1.0)
176
188
  multi_json (~> 1.0)
@@ -181,7 +193,7 @@ GEM
181
193
  multi_json (~> 1.0)
182
194
  rack (~> 1.0)
183
195
  tilt (~> 1.1, != 1.3.0)
184
- sprockets-rails (2.2.2)
196
+ sprockets-rails (2.2.4)
185
197
  actionpack (>= 3.0)
186
198
  activesupport (>= 3.0)
187
199
  sprockets (>= 2.8, < 4.0)
@@ -189,7 +201,7 @@ GEM
189
201
  thor (0.19.1)
190
202
  thread_safe (0.3.4)
191
203
  tilt (1.4.1)
192
- tinymce-rails (4.0.28.2)
204
+ tinymce-rails (4.1.6)
193
205
  railties (>= 3.1.1)
194
206
  tinymce-rails-langs (4.20140129)
195
207
  tinymce-rails (~> 4.0)
@@ -203,7 +215,7 @@ PLATFORMS
203
215
  DEPENDENCIES
204
216
  bundler
205
217
  cms-fortress!
206
- minitest (~> 4.7.3)
218
+ minitest (~> 4.7, >= 4.7.3)
207
219
  minitest-rails
208
220
  minitest-reporters
209
221
  minitest-spec-rails
@@ -2,6 +2,11 @@ window.media =
2
2
  init: ->
3
3
  this.dlg = $("#media-box-dialog")
4
4
  # this.dlg.modal(show: false, backdrop: false)
5
+ @eventListeners()
6
+
7
+ eventListeners: ->
8
+ ($ 'button.js-blank').on 'click', (e) =>
9
+ ($ e.target).closest('form').attr('target', '_blank')
5
10
 
6
11
  loading: "<p>Loading...</p>"
7
12
 
@@ -1,9 +1,9 @@
1
- #= require tinymce-jquery
2
- #= require '../site_selector'
1
+ //= require tinymce-jquery
2
+ //= require '../site_selector'
3
3
 
4
4
 
5
5
  window.CMS.wysiwyg = function () {
6
- return <%= tinymce_init %>
6
+ return <%= tinymce_init %>
7
7
  }
8
8
 
9
9
  $(document).ready( function() {
@@ -28,3 +28,12 @@
28
28
  .site_selector {
29
29
  width: 250px;
30
30
  }
31
+
32
+ h2.pull-right{
33
+ font-size: 27px;
34
+ }
35
+ .btn-scheduled, .btn-drafted, .btn-reviewed, .btn-published{color:#fff;}
36
+ .btn-scheduled{background-color:#f0ad4e;}
37
+ .btn-drafted{background-color:#5bc0de;}
38
+ .btn-reviewed{background-color:#428bca;}
39
+ .btn-published{background-color:#5cb85c;}
@@ -74,7 +74,7 @@ module Cms::Fortress::ApplicationHelper
74
74
  elsif type.eql?(:video)
75
75
  cms_fortress_files_videos_path
76
76
  else
77
- cms_fortress_files_others_url(format: :json)
77
+ cms_fortress_files_others_path(format: :json)
78
78
  end
79
79
  end
80
80
  end
@@ -122,8 +122,8 @@ module Cms::Fortress::ApplicationHelper
122
122
  include?(controller_name)
123
123
  end
124
124
 
125
- def settings
126
- Cms::Fortress::Settings.new(:global_settings)
125
+ def settings(type = :global_settings)
126
+ Cms::Fortress::Settings.new(type)
127
127
  end
128
128
  end
129
129
 
@@ -2,12 +2,7 @@ module Cms::Fortress::SprocketHelper
2
2
  include TinyMCE::Rails::Helper
3
3
 
4
4
  def tinymce_init
5
- path = File.join(Rails.root, 'config', 'tinymce.yml')
6
- if File.exist?(path)
7
- config = YAML.load_file(path)
8
- else
9
- config = {}
10
- end
5
+ config = Cms::Fortress::Settings.new(:tinymce).to_h rescue {}
11
6
 
12
7
  options = {
13
8
  menubar: "tools format view",
@@ -15,16 +10,16 @@ module Cms::Fortress::SprocketHelper
15
10
  toolbar2: "",
16
11
  plugins: ["code", "fullscreen", "media", "link", "table"],
17
12
  language: "en"
18
- }.stringify_keys.merge(config)
13
+ }.merge(config)
19
14
 
20
15
  <<-EOF
21
16
  tinymce.init({
22
- #{configuration_from_options(options)},
17
+ #{configuration_from_options(options)}
18
+ #{configuration_from_options_as_string(options)}
23
19
  selector: 'textarea[data-cms-rich-text]',
24
20
  link_list: CmsFortress.media.othersUrl(),
25
21
 
26
22
  setup: function(ed) {
27
-
28
23
  ed.addButton('image', {
29
24
  title: 'Insert Image',
30
25
  onclick: function() {
@@ -40,19 +35,27 @@ module Cms::Fortress::SprocketHelper
40
35
  return CmsFortress.media.showVideoDialog(ed);
41
36
  }
42
37
  });
43
-
44
38
  }
45
-
46
39
  });
47
40
  EOF
48
41
  end
49
42
 
50
43
  private
51
44
 
45
+ def configuration_from_options_as_string(options)
46
+ config = options.map do |k, v|
47
+ "#{k.to_s.gsub('[plain]', '')}: #{v}," if k.to_s =~ /\[plain\]/
48
+ end
49
+ config.join() if config.present?
50
+ end
51
+
52
52
  def configuration_from_options(options)
53
- options.map do |k, v|
54
- v.is_a?(Array) ? "#{k}: #{v}" : "#{k}: #{boolean_value(v)}"
55
- end.join(',')
53
+ config = options.map do |k, v|
54
+ unless k.to_s =~ /\[plain\]/
55
+ v.is_a?(Array) ? "#{k}: #{v}," : "#{k}: #{boolean_value(v)},"
56
+ end
57
+ end
58
+ config.join()
56
59
  end
57
60
 
58
61
  def boolean_value(v)
@@ -1,10 +1,10 @@
1
1
  module Comfy::Admin::Cms::PagesHelper
2
2
  def page_actions(page)
3
- states = page.aasm.permissible_events
4
- states.select! do |state|
5
- can?(:manage, 'contents.page.'+state.to_s)
3
+ events = page.aasm.events(permitted: true).map(&:name)
4
+ events.select! do |event|
5
+ can?(:manage, 'contents.page.' + event.to_s)
6
6
  end
7
- states
7
+ events
8
8
  end
9
9
 
10
10
  def cached_timeout_for_select
@@ -65,6 +65,6 @@
65
65
  %span.caret
66
66
  %ul.dropdown-menu(role="menu")
67
67
  %li
68
- = link_to t('cms.fortress.logout'), destroy_cms_fortress_user_session_path, :method => 'delete'
68
+ = link_to t('cms.fortress.logout'), destroy_cms_fortress_user_session_path, :method => 'get'
69
69
 
70
70
 
@@ -4,16 +4,16 @@
4
4
  .col-sm-6.col-sm-offset-3
5
5
 
6
6
  = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, role: 'form', class: 'form-reset-password' }) do |f|
7
- %h3 Change your password
7
+ %h3= t('login.change_your_password')
8
8
  = devise_error_messages!
9
9
  = f.hidden_field :reset_password_token
10
10
  .form-group
11
- = f.label :password, "New password"
11
+ = f.label :password, t('login.new_password')
12
12
  = f.password_field :password, autofocus: true, autocomplete: "off", class: 'form-control'
13
13
  .form-group
14
- = f.label :password_confirmation, "Confirm new password"
14
+ = f.label :password_confirmation, t('login.confirm_new_password')
15
15
  = f.password_field :password_confirmation, autocomplete: "off", class: 'form-control'
16
16
 
17
- = f.submit "Change my password"
17
+ = f.submit t('login.change_my_password')
18
18
 
19
19
  = render "devise/shared/links"
@@ -3,12 +3,12 @@
3
3
  .row
4
4
  .col-sm-6.col-sm-offset-3
5
5
  = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, role: 'form', class: 'form-reset-password' }) do |f|
6
- %h3 Forgot your password?
6
+ %h3= t('login.forgot_your_password')
7
7
  = devise_error_messages!
8
8
  .form-group
9
9
  = f.label :email
10
10
  = f.email_field :email, autofocus: true, class: 'form-control'
11
11
 
12
- = f.submit "Send me reset password instructions", class: 'btn btn-default'
12
+ = f.submit t('login.send_me_reset_password_instructions'), class: 'btn btn-default'
13
13
 
14
14
  = render "devise/shared/links"