infopark_rails_connector 6.9.1.3.22208381 → 6.9.2.1.125136549

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. data/README +2 -14
  2. data/app/assets/javascripts/infopark_rails_connector.js.erb +0 -3
  3. data/app/assets/stylesheets/infopark_rails_connector.css.erb +0 -4
  4. data/app/controllers/rails_connector/default_cms_controller.rb +0 -1
  5. data/app/helpers/rails_connector/default_cms_helper.rb +0 -6
  6. data/app/helpers/rails_connector/layout_helper.rb +2 -7
  7. data/app/views/cms/index.html.erb +0 -2
  8. data/app/views/errors/410_gone.html.erb +2 -2
  9. data/config/ca-bundle.crt +1 -1
  10. data/config/cms_routes.rb +2 -1
  11. data/config/locales/de.rails_connector.views.yml +0 -78
  12. data/config/locales/en.rails_connector.views.yml +0 -78
  13. data/lib/generators/rails_connector/install/install_generator.rb +0 -1
  14. data/lib/generators/rails_connector/install/templates/initializers/rails_connector.rb +0 -27
  15. data/lib/rails_connector/cms_accessible.rb +0 -4
  16. data/lib/rails_connector/configuration.rb +9 -72
  17. data/lib/rails_connector/engine.rb +0 -18
  18. metadata +3 -181
  19. data/app/assets/images/ratings/star.gif +0 -0
  20. data/app/assets/images/time_machine/calendar-menuarrow.gif +0 -0
  21. data/app/assets/images/time_machine/calendar_bg.png +0 -0
  22. data/app/assets/images/time_machine/icon.png +0 -0
  23. data/app/assets/images/time_machine/slider_bg.png +0 -0
  24. data/app/assets/images/time_machine/slider_handle.png +0 -0
  25. data/app/assets/images/time_machine/timemachine_bg.png +0 -0
  26. data/app/assets/javascripts/comments.js +0 -29
  27. data/app/assets/javascripts/initializer.js +0 -9
  28. data/app/assets/javascripts/ratings.js +0 -26
  29. data/app/assets/javascripts/time_machine.js +0 -8
  30. data/app/assets/javascripts/time_machine/calendar-setup.js +0 -200
  31. data/app/assets/javascripts/time_machine/calendar.js +0 -1806
  32. data/app/assets/javascripts/time_machine/lang/calendar-de.js +0 -127
  33. data/app/assets/javascripts/time_machine/lang/calendar-en.js +0 -127
  34. data/app/assets/javascripts/time_machine/lang/calendar-es.js +0 -129
  35. data/app/assets/javascripts/time_machine/lang/calendar-fr.js +0 -125
  36. data/app/assets/javascripts/time_machine/lang/calendar-it.js +0 -124
  37. data/app/assets/javascripts/time_machine/slider.js +0 -278
  38. data/app/assets/stylesheets/ratings.css +0 -97
  39. data/app/assets/stylesheets/time_machine.css +0 -6
  40. data/app/assets/stylesheets/time_machine/time_machine.css +0 -292
  41. data/app/controllers/comments_controller.rb +0 -6
  42. data/app/controllers/crm_form_controller.rb +0 -6
  43. data/app/controllers/rails_connector/default_comments_controller.rb +0 -70
  44. data/app/controllers/rails_connector/default_crm_form_controller.rb +0 -167
  45. data/app/controllers/rails_connector/default_ratings_controller.rb +0 -84
  46. data/app/controllers/rails_connector/default_rss_controller.rb +0 -30
  47. data/app/controllers/rails_connector/default_search_controller.rb +0 -60
  48. data/app/controllers/rails_connector/default_user_controller.rb +0 -269
  49. data/app/controllers/rails_connector/time_machine_controller.rb +0 -48
  50. data/app/controllers/ratings_controller.rb +0 -6
  51. data/app/controllers/rss_controller.rb +0 -6
  52. data/app/controllers/search_controller.rb +0 -6
  53. data/app/controllers/seo_sitemap_controller.rb +0 -12
  54. data/app/controllers/user_controller.rb +0 -6
  55. data/app/helpers/crm_form_helper.rb +0 -6
  56. data/app/helpers/rails_connector/default_crm_form_helper.rb +0 -58
  57. data/app/helpers/rails_connector/default_ratings_helper.rb +0 -38
  58. data/app/helpers/rails_connector/default_user_helper.rb +0 -90
  59. data/app/helpers/rails_connector/error_messages_helper.rb +0 -23
  60. data/app/helpers/rails_connector/link_helper.rb +0 -93
  61. data/app/helpers/rails_connector/mandatory_label_helper.rb +0 -10
  62. data/app/helpers/rails_connector/menu_helper.rb +0 -73
  63. data/app/helpers/rails_connector/micronav_helper.rb +0 -109
  64. data/app/helpers/rails_connector/seo_helper.rb +0 -44
  65. data/app/helpers/rails_connector/time_machine_helper.rb +0 -26
  66. data/app/helpers/rails_connector/tracking_helper.rb +0 -32
  67. data/app/helpers/ratings_helper.rb +0 -4
  68. data/app/helpers/user_helper.rb +0 -6
  69. data/app/mailers/confirmation_mailer.rb +0 -15
  70. data/app/models/crm_form.rb +0 -2
  71. data/app/models/rails_connector/default_comment.rb +0 -30
  72. data/app/models/rails_connector/default_rating.rb +0 -22
  73. data/app/views/cms/_comments.html.erb +0 -44
  74. data/app/views/cms/_rating.html.erb +0 -31
  75. data/app/views/comments/_comment.html.erb +0 -28
  76. data/app/views/confirmation_mailer/register_confirmation.erb +0 -5
  77. data/app/views/confirmation_mailer/reset_password.erb +0 -5
  78. data/app/views/crm_form/_flash_messages.html.erb +0 -11
  79. data/app/views/crm_form/_form.html.erb +0 -17
  80. data/app/views/crm_form/confirmation.html.erb +0 -3
  81. data/app/views/crm_form/index.html.erb +0 -5
  82. data/app/views/crm_form/not_logged_in.html.erb +0 -1
  83. data/app/views/layouts/rails_connector/time_machine.html.erb +0 -12
  84. data/app/views/rails_connector/time_machine/index.html.erb +0 -88
  85. data/app/views/rss/_item.rss.builder +0 -11
  86. data/app/views/rss/index.rss.builder +0 -11
  87. data/app/views/search/_hit.html.erb +0 -11
  88. data/app/views/search/_hits.html.erb +0 -11
  89. data/app/views/search/_mini_panel.html.erb +0 -4
  90. data/app/views/search/_pagination.html.erb +0 -5
  91. data/app/views/search/_panel.html.erb +0 -4
  92. data/app/views/search/search.html.erb +0 -12
  93. data/app/views/seo_sitemap/show.xml.builder +0 -16
  94. data/app/views/user/_flash_messages.html.erb +0 -11
  95. data/app/views/user/edit.html.erb +0 -6
  96. data/app/views/user/edit_password.html.erb +0 -11
  97. data/app/views/user/forgot_password.html.erb +0 -7
  98. data/app/views/user/login.html.erb +0 -15
  99. data/app/views/user/new.html.erb +0 -13
  100. data/app/views/user/profile.html.erb +0 -8
  101. data/app/views/user/register_pending.html.erb +0 -1
  102. data/app/views/user/set_password.html.erb +0 -14
  103. data/config/locales/de.rails_connector.controllers.yml +0 -28
  104. data/config/locales/de.rails_connector.helpers.yml +0 -9
  105. data/config/locales/de.rails_connector.models.yml +0 -8
  106. data/config/locales/en.rails_connector.controllers.yml +0 -28
  107. data/config/locales/en.rails_connector.helpers.yml +0 -9
  108. data/config/locales/en.rails_connector.models.yml +0 -8
  109. data/config/routes.rb +0 -31
  110. data/lib/generators/rails_connector/comments/comments_generator.rb +0 -20
  111. data/lib/generators/rails_connector/comments/templates/migration.rb +0 -16
  112. data/lib/generators/rails_connector/install/templates/initializers/crm_connector.rb +0 -22
  113. data/lib/generators/rails_connector/ratings/ratings_generator.rb +0 -20
  114. data/lib/generators/rails_connector/ratings/templates/migration.rb +0 -14
  115. data/lib/rails_connector/commentable.rb +0 -23
  116. data/lib/rails_connector/configuration/google_analytics.rb +0 -29
  117. data/lib/rails_connector/configuration/rss.rb +0 -46
  118. data/lib/rails_connector/crm.rb +0 -282
  119. data/lib/rails_connector/googlebot_checker.rb +0 -46
  120. data/lib/rails_connector/liquid_support.rb +0 -25
  121. data/lib/rails_connector/liquid_support/field_value_drop.rb +0 -22
  122. data/lib/rails_connector/liquid_support/general_helper_tag.rb +0 -44
  123. data/lib/rails_connector/liquid_support/link_drop.rb +0 -22
  124. data/lib/rails_connector/liquid_support/liquid_template_handler.rb +0 -162
  125. data/lib/rails_connector/liquid_support/named_object_drop.rb +0 -14
  126. data/lib/rails_connector/liquid_support/obj_drop.rb +0 -43
  127. data/lib/rails_connector/liquid_support/obj_filters.rb +0 -77
  128. data/lib/rails_connector/rateable.rb +0 -57
  129. data/lib/rails_connector/seo.rb +0 -52
  130. data/lib/rails_connector/ses.rb +0 -81
  131. data/lib/rails_connector/syndicateable.rb +0 -11
  132. data/lib/search_request.rb +0 -2
data/README CHANGED
@@ -2,22 +2,14 @@
2
2
 
3
3
  Infopark Rails Connector integrates Infopark’s CMS into your Rails application.
4
4
 
5
- It connects either to Infopark Cloud Express CMS via {https://rubygems.org/gems/infopark_cloud_connector infopark_cloud_connector} or to Infopark CMS Fiona via {https://rubygems.org/gems/infopark_fiona_connector infopark_fiona_connector}. It also enables you to integrate various ready-to-run features.
5
+ It connects either to Infopark Cloud Express CMS via {https://rubygems.org/gems/infopark_cloud_connector infopark_cloud_connector} or to Infopark CMS Fiona via {https://rubygems.org/gems/infopark_fiona_connector infopark_fiona_connector}.
6
6
 
7
7
  For more information about Infopark Rails Connector, please visit {http://kb.infopark.de/ Infopark’s Knowledge Base}.
8
8
 
9
- == Configuration
10
- Here is how the available addons can be enabled in the <tt>rails_connector.rb</tt> initializer file of your application:
11
-
12
- RailsConnector::Configuration.enable(
13
- :time_machine
14
- )
15
-
16
9
  == Layout Helpers
17
10
  Some of these functions require HTML or Javascript code to be included in the application layout.
18
- For example, Google Analytics only tracks pageviews if their JavaScript snippet is included at the bottom of the HTML body.
19
11
 
20
- The Rails Connector provides two helpers for managing this kind of layout code, switching on or off parts depending on whether features are enabled or not:
12
+ The Rails Connector provides two helpers for managing this kind of layout code:
21
13
 
22
14
  rails_connector_header_tags
23
15
 
@@ -33,7 +25,3 @@ Infopark Rails Connector comes with three generators to help you get up and runn
33
25
  > rails generate rails_connector:install
34
26
 
35
27
  Adds to your application the Time Machine assets, a +rails_connector.rb+ initializer and rake tasks specific to the gem.
36
-
37
- == Seo Sitemap
38
-
39
- The default implementation of the SEO sitemap will reference all the files from your CMS in the generated <tt>sitemap.xml</tt>. For a large number of files, this can slow down your server. Please refer to {RailsConnector::SEO::ClassMethods#find_all_for_sitemap} for advice on optimization.
@@ -1,3 +0,0 @@
1
- <% require_asset "comments" if comments = RailsConnector::Configuration.enabled?(:comments) %>
2
- <% require_asset "ratings" if ratings = RailsConnector::Configuration.enabled?(:ratings) %>
3
- <% require_asset "initializer" if comments || ratings %>
@@ -1,4 +0,0 @@
1
- /*
2
- *= require_self
3
- */
4
- <% require_asset "ratings" if RailsConnector::Configuration.enabled?(:ratings) %>
@@ -7,7 +7,6 @@ module RailsConnector
7
7
  # @api public
8
8
  class DefaultCmsController < ApplicationController
9
9
  include CmsAccessible
10
- before_filter :set_preview_time
11
10
  before_filter :load_object
12
11
  before_filter :ensure_object_is_active
13
12
  before_filter :ensure_object_is_permitted
@@ -13,14 +13,8 @@ module RailsConnector
13
13
  include DisplayHelper
14
14
  include MarkerHelper
15
15
  include CmsAssetHelper
16
- include SeoHelper
17
- include RailsConnector::MenuHelper
18
- include RailsConnector::MicronavHelper
19
- include RailsConnector::TimeMachineHelper
20
- include RailsConnector::LinkHelper
21
16
  include RailsConnector::CmsAssetHelper
22
17
  include RailsConnector::TableOfContentsHelper
23
- include RatingsHelper
24
18
  include RailsConnector::EditingHelper
25
19
  include RailsConnector::LayoutHelper
26
20
  include RailsConnector::CmsTagHelper
@@ -4,29 +4,24 @@ module RailsConnector
4
4
  # and the end of the html body.
5
5
  # @api public
6
6
  module LayoutHelper
7
- include TrackingHelper
8
7
 
9
- # Renders all tags needed in the html head for the enabled features.
8
+ # Renders all tags needed in the html head.
10
9
  # @api public
11
10
  def rails_connector_header_tags
12
11
  html = "".html_safe
13
12
  html += tag('meta', :name => 'generator',
14
13
  :content => "Rails Connector for Infopark CMS Fiona by Infopark AG (www.infopark.de)")
15
- if Configuration.enabled?(:rss)
16
- html += auto_discovery_link_tag(:rss, rss_url, :title => 'RSS Feed')
17
- end
18
14
  html += include_edit_marker_support
19
15
  html += include_editing_stylesheet
20
16
  html
21
17
  end
22
18
 
23
- # Renders all tags needed at the end of the body tag for the enabled features.
19
+ # Renders all tags needed at the end of the body tag.
24
20
  # @api public
25
21
  def rails_connector_after_content_tags
26
22
  html = "".html_safe
27
23
  html += render_marker_code
28
24
  html += include_editing_javascript
29
- html += google_analytics if Configuration.enabled?(:google_analytics)
30
25
  html
31
26
  end
32
27
  end
@@ -1,3 +1 @@
1
1
  <%= render :partial => 'index' %>
2
- <%= render :partial => 'rating' %>
3
- <%= render :partial => 'comments' %>
@@ -1,7 +1,7 @@
1
1
  <h1><%= t(:'rails_connector.lib.cms_accessible.not_released') %></h1>
2
2
 
3
- <% if @valid_until and @valid_until < Obj.preview_time %>
3
+ <% if @valid_until && @valid_until < Time.now %>
4
4
  <%= raw t(:"rails_connector.views.errors.gone.not_released_anymore", :valid_until => "<strong>#{l @valid_until}</strong>") %>
5
- <% elsif @valid_from and Obj.preview_time < @valid_from %>
5
+ <% elsif @valid_from && Time.now < @valid_from %>
6
6
  <%= raw t(:"rails_connector.views.errors.gone.not_yet_released", :valid_from => "<strong>#{l @valid_from}</strong>") %>
7
7
  <% end %>
@@ -1,7 +1,7 @@
1
1
  ##
2
2
  ## /Network/Servers/xs2.infopark/Users/develop/dcc/tmp/Rails_Connector_95/repos/rails_connector/config/ca-bundle.crt -- Bundle of CA Root Certificates
3
3
  ##
4
- ## Converted at: Fri Apr 26 15:26:29 2013 UTC
4
+ ## Converted at: Mon Jul 22 15:48:13 2013 UTC
5
5
  ##
6
6
  ## This is a bundle of X.509 certificates of public Certificate Authorities
7
7
  ## (CA). These were automatically extracted from Mozilla's root certificates
@@ -9,5 +9,6 @@ Rails.application.routes.draw do
9
9
  :as => "toggle_markers"
10
10
  match '/*permalink',
11
11
  :to => 'rails_connector/cms_dispatch#index',
12
- :as => "cms_permalink"
12
+ :as => 'cms_permalink',
13
+ :format => false
13
14
  end
@@ -1,6 +1,4 @@
1
1
  de:
2
- will_paginate:
3
- page_gap: …
4
2
  rails_connector:
5
3
  views:
6
4
  errors:
@@ -9,79 +7,3 @@ de:
9
7
  gone:
10
8
  not_released_anymore: "Die Datei war nur bis zum %{valid_until} veröffentlicht."
11
9
  not_yet_released: "Die Datei wird erst am %{valid_from} veröffentlicht."
12
- search:
13
- search_failed: "Ihre Suchanfrage konnte leider nicht ausgeführt werden"
14
- hits: "Treffer"
15
- cms:
16
- comments:
17
- title: Leserkommentare
18
- add_comment: Kommentar hinzufügen
19
- name: "Name:"
20
- email: "E-Mail:"
21
- subject: "Betreff:"
22
- body: "Kommentar:"
23
- submit: senden
24
- no_comments: Keine Kommentare vorhanden
25
- wrote_on: schrieb am
26
- are_you_sure: "Diesen Kommentar wirklich löschen?"
27
- login_required: "Bitte melden Sie sich an, um einen Kommentar zu hinterlassen."
28
- rating:
29
- rate_here: "Bewerten Sie hier!"
30
- thanks: "Danke für Ihre Bewertung."
31
- title: "Bewertung"
32
- login_required: "Bitte melden Sie sich an, um eine Bewertung abzugeben."
33
- reset: "Bewertung zurücksetzen"
34
- are_you_sure: "Bewertung dieser Seite wirklich zurücksetzen?"
35
- user:
36
- contact:
37
- email: E-Mail
38
- fax: Fax
39
- first_name: Vorname
40
- gender: Geschlecht
41
- job_title: Tätigkeit
42
- language: Sprache
43
- last_name: Nachname
44
- letter_address: Anschrift
45
- login: Benutzername
46
- mobile_phone: Mobiltelefon
47
- phone: Telefonnummer
48
- want_email: Kontakt via E-Mail
49
- want_phonecall: Kontakt via Telefon
50
- want_snailmail: Kontakt via Post
51
- street_address: Straße und Hausnummer
52
- postalcode: Postleitzahl
53
- locality: Ort
54
- languages:
55
- de: deutsch
56
- en: englisch
57
- gender_male: männlich
58
- gender_female: weiblich
59
- login: Benutzername
60
- password: Passwort
61
- old_password: altes Passwort
62
- new_password: neues Passwort
63
- new_password_confirm: neues Passwort bestätigen
64
- captcha: Bitte geben Sie die 2 Wörter ein
65
- register_button: Registrieren
66
- login_button: Einloggen
67
- edit_button: Speichern
68
- change_password_button: Passwort ändern
69
- set_password_button: Passwort setzen
70
- forgot_password_button: Passwort zurücksetzen
71
- forgot_password_subject: Ihre Anfrage zur Änderung Ihres Passwortes
72
- forgot_password_heading: Sie haben ein neues Password angefordert.
73
- register_password_confirmation_mail_subject: Bitte bestätigen Sie Ihre Registrierung
74
- register_heading: Vielen Dank für Ihre Anmeldung.
75
- confirm_request: 'Bitte bestätigen Sie Ihre Anfrage unter %{url} und setzen dort ein Passwort.'
76
- no_request: 'Falls Sie keine Anfrage gestellt haben, können Sie diese Nachricht ignorieren.'
77
- new_link: Registrieren
78
- edit_link: Profil bearbeiten
79
- edit_password_link: Passwort bearbeiten
80
- forgot_password_link: Passwort vergessen?
81
- crm_form:
82
- submit: Absenden
83
- confirmation: 'Vielen Dank für Ihre Nachricht, wir werden uns in Kürze bei Ihnen melden!'
84
- reference_further_questions: 'Ihre Anfrage wird bei uns unter der Kennung %{case_id} geführt. Bitte geben Sie diese bei Rückfragen mit an.'
85
- title: Betreff
86
- must_be_logged_in: 'Sie müssen angemeldet sein, um Zugriff auf diese Seite zu erhalten.'
87
- logged_in_as: 'Sie sind angemeldet als %{user}'
@@ -1,6 +1,4 @@
1
1
  en:
2
- will_paginate:
3
- page_gap: …
4
2
  rails_connector:
5
3
  views:
6
4
  errors:
@@ -9,79 +7,3 @@ en:
9
7
  gone:
10
8
  not_released_anymore: "The file was released only until %{valid_until}"
11
9
  not_yet_released: "The file will be released on %{valid_from}"
12
- search:
13
- search_failed: Unfortunately your search request could not be completed
14
- hits: hits
15
- cms:
16
- comments:
17
- title: Comments
18
- add_comment: Add a comment
19
- name: "Name:"
20
- email: "E-mail:"
21
- subject: "Subject:"
22
- body: "Comment:"
23
- submit: send
24
- no_comments: There are no comments yet
25
- wrote_on: wrote on
26
- are_you_sure: "Are you sure you want to delete this comment?"
27
- login_required: Please login to leave a comment.
28
- rating:
29
- rate_here: "Please rate here."
30
- thanks: "Thank you for rating."
31
- title: "Rating"
32
- login_required: Please login to rate this content.
33
- reset: "Reset rating"
34
- are_you_sure: "Are you sure you want to reset this rating?"
35
- user:
36
- contact:
37
- email: Email
38
- fax: Fax
39
- first_name: First name
40
- gender: Gender
41
- job_title: Job title
42
- language: Language
43
- last_name: Last name
44
- letter_address: Letter address
45
- login: User name
46
- mobile_phone: Mobile phone
47
- phone: Phone number
48
- want_email: Contact via email
49
- want_phonecall: Contact via phone
50
- want_snailmail: Contact via mail
51
- street_address: Street
52
- postalcode: Postal code
53
- locality: City
54
- languages:
55
- de: German
56
- en: English
57
- gender_male: Male
58
- gender_female: Female
59
- login: User name
60
- password: Password
61
- old_password: Old password
62
- new_password: New password
63
- new_password_confirm: Confirm new password
64
- captcha: Please type the two words
65
- register_button: register
66
- login_button: Login
67
- edit_button: Save
68
- change_password_button: Change password
69
- set_password_button: Set password
70
- forgot_password_button: Reset password
71
- forgot_password_subject: Your request for changing your password
72
- forgot_password_heading: You requested a new password.
73
- register_password_confirmation_mail_subject: Please confirm your registration
74
- register_heading: Thank you for signing up.
75
- confirm_request: 'Please confirm your request by visiting %{url} and setting a password.'
76
- no_request: 'If you did not request a new password, you can ignore this message.'
77
- new_link: register
78
- edit_link: edit personal data
79
- edit_password_link: edit password
80
- forgot_password_link: forgot password?
81
- crm_form:
82
- submit: Submit
83
- confirmation: 'Thank you for contacting us, we will get back to you shortly'
84
- reference_further_questions: 'If you have questions regarding this case, please refer to case %{case_id}.'
85
- title: Subject
86
- must_be_logged_in: 'You must be logged in to access this page.'
87
- logged_in_as: 'You are logged in as %{user}'
@@ -11,7 +11,6 @@ module RailsConnector
11
11
 
12
12
  def install_configuration
13
13
  copy_file "initializers/rails_connector.rb", "config/initializers/rails_connector.rb"
14
- copy_file 'initializers/crm_connector.rb', 'config/initializers/crm_connector.rb'
15
14
  template 'app/models/obj.rb.erb', 'app/models/obj.rb'
16
15
  copy_file "local/configuration.rb", "config/local/configuration.rb"
17
16
  end
@@ -1,29 +1,2 @@
1
1
  # Name of the CMS Fiona Instance to access
2
2
  RailsConnector::Configuration.instance_name = 'default'
3
-
4
- # Enable Rails Connector Addons.
5
- # Please refer to the Infopark Knowledge Base for more information on addons.
6
- RailsConnector::Configuration.enable(
7
- # :comments,
8
- # :google_analytics,
9
- # :crm,
10
- # :ratings,
11
- # :rss,
12
- :search,
13
- # :seo_sitemap,
14
- :time_machine
15
- )
16
-
17
- # Search should be configured in config/rails_connector.yml
18
-
19
- # RSS-Feed:
20
- #
21
- # Specify which Object should be used for the RSS feed's parent folder
22
- # RailsConnector::Configuration::Rss.root = lambda { NamedLink.get_object('news') }
23
-
24
- # Google Analytics:
25
- #
26
- # RailsConnector::Configuration::GoogleAnalytics.domains(
27
- # '<your.domain.com>' => '<your-ga-code-1>',
28
- # '<your.domain.de>' => '<your-ga-code-2>'
29
- # )
@@ -5,10 +5,6 @@ module RailsConnector
5
5
 
6
6
  protected
7
7
 
8
- def set_preview_time
9
- Obj.preview_time = session[:preview_time]
10
- end
11
-
12
8
  # Filter method to load a CMS object.
13
9
  #
14
10
  # To require the loading for all actions, use this in your controllers:
@@ -4,7 +4,6 @@ require "rails_connector/blob"
4
4
 
5
5
  module RailsConnector
6
6
 
7
- # {RailsConnector::Configuration} is used to en/disable and initialize addons.
8
7
  # @api public
9
8
  class Configuration
10
9
  # @api public
@@ -19,12 +18,7 @@ module RailsConnector
19
18
  # @api public
20
19
  DEFAULT_CA_FILE = File.expand_path('../../../config/ca-bundle.crt', __FILE__)
21
20
 
22
- @features = {}
23
-
24
21
  class << self
25
- # Automatically generate editmarkers when rendering liquid templates in editor mode.
26
- # @api public
27
- attr_accessor :auto_liquid_editmarkers
28
22
 
29
23
  # there are three available modes for the rails connector:
30
24
  # <tt>live</tt> (show released contents only),
@@ -37,11 +31,6 @@ module RailsConnector
37
31
  # default options for {SearchRequest}
38
32
  attr_writer :search_options
39
33
 
40
- # Include ReCaptcha tags in user registration form and validate the captcha
41
- # when creating a new user registration (default: true).
42
- # @api public
43
- attr_accessor :use_recaptcha_on_user_registration
44
-
45
34
  # define a non-default blob cache dir.
46
35
  # +fiona connector+ only. has no effect when used with the +cloud connector+.
47
36
  # @api public
@@ -130,38 +119,6 @@ module RailsConnector
130
119
  mode == :preview || mode == :editor
131
120
  end
132
121
 
133
- def register_features(*features)
134
- features.each do |f|
135
- @features.merge!(f.to_sym => false)
136
- end
137
- end
138
- alias :register_feature :register_features
139
-
140
- def registered_features
141
- @features.keys
142
- end
143
-
144
- # Rails Connector Addons can be enabled as follows (in <tt>config/rails_connector.rb</tt>):
145
- #
146
- # RailsConnector::Configuration.enable(
147
- # :time_machine
148
- # )
149
- #
150
- # @api public
151
- def enable(*features)
152
- features.each do |f|
153
- assert_feature_is_known(f)
154
- @features[f.to_sym] = true
155
- end
156
- initialize_addon_mixins
157
- end
158
-
159
- # Returns true if +feature+ is enabled, else false.
160
- def enabled?(feature)
161
- assert_feature_is_known(feature)
162
- @features[feature.to_sym] == true
163
- end
164
-
165
122
  # Configures your CMS instance name.
166
123
  #
167
124
  # Example call as to be used in <tt>rails_connector.rb</tt>:
@@ -172,9 +129,8 @@ module RailsConnector
172
129
  end
173
130
 
174
131
  def after_initialize
132
+ enable_ses
175
133
  enable_authentication
176
- # Hier muss explizit der Namespace verwendet werden, da diese Methode von Rails
177
- # während der Initialisierung aufgerufen wird.
178
134
  ::RailsConnector::BasicObj.configure_for_content(
179
135
  ::RailsConnector::Configuration.use_edited_content? ? :edited : :released
180
136
  )
@@ -185,7 +141,7 @@ module RailsConnector
185
141
  after_initialize
186
142
  NamedLink.reset_cache
187
143
  BasicObj.reset_type_cache
188
- initialize_addon_mixins
144
+ ::ApplicationController.__send__(:helper, :cms)
189
145
  end
190
146
  end
191
147
 
@@ -221,18 +177,6 @@ module RailsConnector
221
177
  ' config.action_dispatch.x_sendfile_header = "X-Sendfile"'
222
178
  end
223
179
 
224
- def initialize_addon_mixins
225
- ::ApplicationController.__send__(:helper, :cms)
226
- if enabled?(:search)
227
- require "rails_connector/ses"
228
- RailsConnector::SES.enable
229
- end
230
- RailsConnector::Crm.enable if enabled?(:crm)
231
- RailsConnector::BasicObj.__send__(:include, RailsConnector::Syndicateable) if enabled?(:rss)
232
- RailsConnector::BasicObj.__send__(:include, RailsConnector::Commentable) if enabled?(:comments)
233
- RailsConnector::BasicObj.__send__(:include, RailsConnector::Rateable) if enabled?(:ratings)
234
- end
235
-
236
180
  def local_config_file
237
181
  @local_config_file ||= read_local_config_file
238
182
  end
@@ -280,29 +224,22 @@ module RailsConnector
280
224
  config
281
225
  end
282
226
 
283
- def assert_feature_is_known(f)
284
- raise ArgumentError, "unknown feature: #{f.inspect}" unless @features.keys.include?(f.to_sym)
227
+ def enable_authentication
228
+ ::ApplicationController.__send__(:include, RailsConnector::Authenticable)
285
229
  end
286
230
 
287
- def enable_authentication
288
- # Wenn das OMC-Features an ist, dann braucht man keine Standardimplementierung
289
- # für die Authentifizierung.
290
- unless enabled?(:crm)
291
- ::ApplicationController.__send__(:include, RailsConnector::Authenticable)
231
+ def enable_ses
232
+ if RailsConnector.platform_fiona?
233
+ require 'rails_connector/ses'
234
+
235
+ RailsConnector::SES.enable
292
236
  end
293
237
  end
294
238
  end
295
239
 
296
240
  # defaults
297
- self.auto_liquid_editmarkers = true
298
- self.use_recaptcha_on_user_registration = true
299
241
  self.ca_file = DEFAULT_CA_FILE
300
242
  self.editing_auth{ |env| false }
301
-
302
- register_features(
303
- :search, :time_machine, :rss, :comments, :ratings,
304
- :crm, :seo_sitemap, :google_analytics
305
- )
306
243
  end
307
244
 
308
245
  class ConfigurationError < StandardError