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
@@ -1,11 +0,0 @@
1
- xml.item do
2
- xml.title display_value(item.title)
3
- xml.description display_value(item.rss_description)
4
- xml.pubDate item.valid_from.rfc2822 if item.valid_from
5
- url = cms_url(item)
6
- if RailsConnector::Configuration.enabled?(:google_analytics)
7
- url << '#utm_medium=rss&utm_source=rss&utm_campaign=' << cms_path(item)
8
- end
9
- xml.link url
10
- xml.guid url
11
- end
@@ -1,11 +0,0 @@
1
- xml.instruct! :xml, :version => '1.0'
2
-
3
- xml.rss :version => '2.0' do
4
- xml.channel do
5
- xml.title display_value(@obj.title)
6
- xml.link cms_url(@obj)
7
- xml.description strip_tags(display_value(@obj.rss_description))
8
-
9
- xml << (render(:partial => "item", :collection => table_of_contents(@obj))).to_s
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- <% if hit.obj -%>
2
- <div class='searchHit'>
3
- <h3><a href="<%= cms_path(hit.obj) %>">
4
- <%= display_field hit.obj, :title, :marker => false %>
5
- </a></h3>
6
- <p class = 'hitDetails'>
7
- <span class="hitExtension"><%= display_value hit.obj.file_extension %></span>,
8
- <span class="hitLastChanged"><%= display_value hit.obj.last_changed %></span>
9
- </p>
10
- </div>
11
- <% end -%>
@@ -1,11 +0,0 @@
1
- <% if @hits %>
2
- <div id="seachResults">
3
- <p id="searchSummary">
4
- <%= @hits.total_entries %> <%=t :"rails_connector.views.search.hits" %>
5
- </p>
6
- <div id="searchHits">
7
- <%= render :partial => 'hit', :collection => @hits %>
8
- </div>
9
- </div>
10
- <%= render :partial => 'pagination' %>
11
- <% end %>
@@ -1,4 +0,0 @@
1
- <%= form_tag(search_url, {:method => 'get', :id => 'searchMiniForm'}) do %>
2
- <%= link_to 'Suche', search_path %>
3
- <input type="text" name="q" size="13" value="<%=h @query %>" />
4
- <% end %>
@@ -1,5 +0,0 @@
1
- <% if @hits.total_entries > @hits.per_page %>
2
- <div id="searchPagination">
3
- <%= will_paginate @hits, :previous_label => '<', :next_label => '>' %>
4
- </div>
5
- <% end %>
@@ -1,4 +0,0 @@
1
- <%= form_tag(search_url, {:method => 'get', :id => 'searchForm'}) do %>
2
- <input type="text" name="q" size="30" value="<%=h @query %>" />
3
- <%= submit_tag "OK" %>
4
- <% end %>
@@ -1,12 +0,0 @@
1
- <%= render :partial => 'panel' %>
2
-
3
- <% if flash[:errors] %>
4
- <div id='searchErrors'>
5
- <h2><%= t(:"rails_connector.views.search.search_failed") %></h2>
6
- <p class="errors">
7
- <%= flash[:errors] %>
8
- </p>
9
- </div>
10
- <% end %>
11
-
12
- <%= render :partial => 'hits' %>
@@ -1,16 +0,0 @@
1
- base_url = request.protocol + request.host_with_port
2
- xml.instruct!
3
- xml.urlset('xmlns' => 'http://www.sitemaps.org/schemas/sitemap/0.9') {
4
- for obj in @objects do
5
- prio = obj.root? ? 1.0 : (1.0 - (obj.path.split('/').length - 1) * 0.1)
6
- prio *= (obj.file_extension == 'pdf' ? 1.2 : 0.5) if obj.binary?
7
- if (prio >= 0.1)
8
- prio = 1.0 if prio > 1.0
9
- xml.url {
10
- xml.loc base_url, cms_path(obj)
11
- xml.lastmod(obj.last_changed.blank? ? nil : obj.last_changed.strftime('%Y-%m-%d'))
12
- xml.priority((prio * 100).round / 100.0).to_s
13
- }
14
- end
15
- end
16
- }
@@ -1,11 +0,0 @@
1
- <% if flash[:error] %>
2
- <div class="error">
3
- <p><%= flash[:error] %></p>
4
- <%= error_messages(@user, @inquiry) %>
5
- </div>
6
- <% end %>
7
- <% if flash[:notice] %>
8
- <div class="notice">
9
- <p><%= flash[:notice] %></p>
10
- </div>
11
- <% end %>
@@ -1,6 +0,0 @@
1
- <%= render :partial => 'flash_messages' %>
2
-
3
- <%= form_for @user, :as => :user, :url => { :controller => 'user', :action => "edit" } do |f| -%>
4
- <%= profile_fields_for(f, UserController.editable_attributes_on_edit) %>
5
- <%= f.submit t('rails_connector.views.user.edit_button') %>
6
- <% end -%>
@@ -1,11 +0,0 @@
1
- <%= render :partial => 'flash_messages' %>
2
-
3
- <%= form_for :user, :url => { :controller => 'user', :action => "edit_password" } do |f| -%>
4
- <div class="label"><%= f.label :old_password, t('rails_connector.views.user.old_password') %></div>
5
- <div class="field"><%= f.password_field :old_password %></div>
6
- <div class="label"><%= f.label :new_password, t('rails_connector.views.user.new_password') %></div>
7
- <div class="field"><%= f.password_field :new_password %></div>
8
- <div class="label"><%= f.label :new_password_confirm, t('rails_connector.views.user.new_password_confirm') %></div>
9
- <div class="field"><%= f.password_field :new_password_confirm %></div>
10
- <%= f.submit t('rails_connector.views.user.change_password_button') %>
11
- <% end -%>
@@ -1,7 +0,0 @@
1
- <%= render :partial => 'flash_messages' %>
2
-
3
- <%= form_for :user, :url => { :controller => 'user', :action => "forgot_password" } do |f| -%>
4
- <div class="label"><%= f.label :login, t('rails_connector.views.user.login') %></div>
5
- <div class="field"><%= f.text_field :login %></div>
6
- <%= f.submit t('rails_connector.views.user.forgot_password_button') %>
7
- <% end -%>
@@ -1,15 +0,0 @@
1
- <%= render :partial => 'flash_messages' %>
2
-
3
- <%= form_for :user, :url => { :controller => 'user', :action => "login" } do |f| -%>
4
- <%= hidden_field_tag :return_to, params[:return_to] %>
5
- <div class="label"><%= f.label :login, t('rails_connector.views.user.login') %></div>
6
- <div class="field"><%= f.text_field :login %></div>
7
- <div class="label"><%= f.label :password, t('rails_connector.views.user.password') %></div>
8
- <div class="field"><%= f.password_field :password %></div>
9
- <%= f.submit t('rails_connector.views.user.login_button') %>
10
- <% end -%>
11
-
12
- <ul>
13
- <li class="button_register"><%= link_to t('rails_connector.views.user.new_link'), :action => "new" %></li>
14
- <li class="button_request_password"><%= link_to t('rails_connector.views.user.forgot_password_link'), :action => "forgot_password" %></li>
15
- </ul>
@@ -1,13 +0,0 @@
1
- <%= render :partial => 'flash_messages' %>
2
-
3
- <%= form_for @user, :as => :user, :url => { :controller => 'user', :action => "new" } do |f| -%>
4
- <%= profile_fields_for(f, UserController.editable_attributes_on_register) %>
5
- <% if RailsConnector::Configuration.use_recaptcha_on_user_registration %>
6
- <%= content_tag(:div,
7
- label_tag('', t("rails_connector.views.user.captcha")),
8
- :class => "label"
9
- ) %>
10
- <%= get_captcha(:options => {:lang => I18n.locale, :theme => 'clean'}).html_safe %>
11
- <% end %>
12
- <%= f.submit t('rails_connector.views.user.register_button') %>
13
- <% end -%>
@@ -1,8 +0,0 @@
1
- <%= render :partial => 'flash_messages' %>
2
-
3
- <br />
4
-
5
- <ul>
6
- <li class="button_profile_edit"><%= link_to t('rails_connector.views.user.edit_link'), :action => "edit" %></li>
7
- <li class="button_edit_password"><%= link_to t('rails_connector.views.user.edit_password_link'), :action => "edit_password" %></li>
8
- </ul>
@@ -1 +0,0 @@
1
- <%= render :partial => 'flash_messages' %>
@@ -1,14 +0,0 @@
1
- <%= render :partial => 'flash_messages' %>
2
-
3
- <%= form_for :user, :url => { :controller => 'user', :action => 'set_password' } do |f| -%>
4
- <%= f.hidden_field(:token, :value => params[:token]) %>
5
- <div class="label">
6
- <%= f.label :new_password, t('rails_connector.views.user.new_password') %>
7
- </div>
8
- <div class="field"><%= f.password_field :new_password %></div>
9
- <div class="label">
10
- <%= f.label :new_password_confirm, t('rails_connector.views.user.new_password_confirm') %>
11
- </div>
12
- <div class="field"><%= f.password_field :new_password_confirm %></div>
13
- <%= f.submit t("rails_connector.views.user.set_password_button") %>
14
- <% end -%>
@@ -1,28 +0,0 @@
1
- de:
2
- rails_connector:
3
- controllers:
4
- search:
5
- specify_query: "Bitte geben Sie einen Suchbegriff ein."
6
- try_another_key: "Bitte versuchen Sie es mit anderen Suchbegriffen erneut."
7
- search_disabled: "Wegen Wartungsarbeiten steht die Suche derzeit nicht zur Verfügung. Bitte entschuldigen Sie die Störung."
8
- user:
9
- login_successful: "Sie wurden erfolgreich angemeldet."
10
- login_failed: "Login fehlgeschlagen, bitte überprüfen Sie ihre Eingaben."
11
- registration_successful: "Sie wurden erfolgreich registriert. Sie bekommen in Kürze eine Bestätigung sobald die Registrierung geprüft wurde."
12
- registration_successful_awaiting_confirmation: "Wir haben Ihnen eine E-Mail zur Bestätigung Ihrer Daten geschickt. Bitte klicken Sie auf den Link in der E-Mail, um Ihre Registrierung zu bestätigen."
13
- registration_failed: "Registrierung fehlgeschlagen, bitte überprüfen Sie ihre Eingaben."
14
- edit_successful: "Benutzerdaten wurden erfolgreich aktualisiert."
15
- edit_failed: "Benutzerdaten konnten nicht aktualisiert werden, bitte überprüfen Sie ihre Eingaben."
16
- edit_password_successful: "Passwort wurde erfolgreich aktualisiert."
17
- edit_password_failed: "Passwort konnte nicht aktualisiert werden, bitte überprüfen Sie ihre Eingaben."
18
- reset_password_successful: "Sie haben eine E-Mail mit einem Link zur Änderung Ihres Passwortes erhalten."
19
- request_password_failed: "Es wurde kein Account zu diesem Login gefunden, bitte prüfen Sie ihre Eingabe."
20
- password_cannot_be_empty: "Das Passwort kann nicht leer sein"
21
- password_does_not_match_confirmation: "Das Passwort stimmt nicht mit der Bestätigung überein"
22
- password_set: "Passwort wurde erfolgreich gesetzt."
23
- token_url_invalid: "Um Ihr Passwort setzen zu können, müssen Sie den Link aus der E-Mail benutzen."
24
- set_password_failed: "Fehler beim Setzen des Passwortes. Der Link, den Sie erhalten haben, ist drei Stunden gültig."
25
- crm_error: "Es ist ein Fehler aufgetreten. Bitte versuchen Sie es später nochmal."
26
- email_blank: "E-Mail darf nicht leer sein."
27
- crm_form:
28
- submit_failed: "Absenden fehlgeschlagen, bitte überprüfen Sie ihre Eingaben."
@@ -1,9 +0,0 @@
1
- de:
2
- rails_connector:
3
- helpers:
4
- ratings:
5
- bad: "schlecht"
6
- mediocre: "mäßig"
7
- average: "mittel"
8
- good: "gut"
9
- very_good: "super"
@@ -1,8 +0,0 @@
1
- de:
2
- rails_connector:
3
- models:
4
- comment:
5
- name_missing: Bitte geben Sie Ihren Namen an.
6
- body_missing: Bitte geben Sie Ihren Kommentar ein.
7
- subject_missing: Bitte geben Sie einen Betreff für Ihren Kommentar ein.
8
- email_format_invalid: Bitte geben Sie eine gültige E-Mail-Adresse ein.
@@ -1,28 +0,0 @@
1
- en:
2
- rails_connector:
3
- controllers:
4
- search:
5
- specify_query: Please enter a search term.
6
- try_another_key: Please repeat your search with a different search term.
7
- search_disabled: Search is currently not available due to maintenance. We apologize for this error.
8
- user:
9
- login_successful: "You are logged in successfully."
10
- login_failed: "Login failed, please check your login and password."
11
- registration_successful: "You are registered successfully. You will get a confirmation as soon as your registration has been approved."
12
- registration_successful_awaiting_confirmation: "We have sent you an email, asking to confirm your request. Please click on the link in that email to confirm the registration."
13
- registration_failed: "Registration failed, please check your input."
14
- edit_successful: "Updated user profile successfully."
15
- edit_failed: "Updating failed, please check your input."
16
- edit_password_successful: "Updated password successfully."
17
- edit_password_failed: "Updating password failed, please check your input."
18
- reset_password_successful: "You received an email with a link to change your password."
19
- request_password_failed: "Account not found, please check your login."
20
- password_cannot_be_empty: "Password cannot be empty"
21
- password_does_not_match_confirmation: "Password did not match confirmation"
22
- password_set: "Password was successfully set."
23
- token_url_invalid: "In order to set your password, you must use the link from the e-mail you received."
24
- set_password_failed: "Error setting password. The link you have received is valid for only 3 hours."
25
- crm_error: "An error occured. Please try again later."
26
- email_blank: "E-mail can't be blank."
27
- crm_form:
28
- submit_failed: "Submit failed, please check your input."
@@ -1,9 +0,0 @@
1
- en:
2
- rails_connector:
3
- helpers:
4
- ratings:
5
- bad: "bad"
6
- mediocre: "mediocre"
7
- average: "average"
8
- good: "good"
9
- very_good: "very good"
@@ -1,8 +0,0 @@
1
- en:
2
- rails_connector:
3
- models:
4
- comment:
5
- name_missing: Please enter your name.
6
- body_missing: Please enter your comment.
7
- subject_missing: Please enter the subject of your comment.
8
- email_format_invalid: Please enter a valid E-Mail.
@@ -1,31 +0,0 @@
1
- Rails.application.routes.draw do
2
- if RailsConnector::Configuration.enabled?(:search)
3
- match 'search', :to => 'search#search'
4
- end
5
-
6
- if RailsConnector::Configuration.enabled?(:crm)
7
- match 'login', :to => 'user#login'
8
- match 'logout', :to => 'user#logout'
9
- match 'user/:action', :to => 'user', :as => "user"
10
- end
11
-
12
- if RailsConnector::Configuration.enabled?(:time_machine) && RailsConnector::Configuration.editor_interface_enabled?
13
- match 'time_machine/:action', :to => 'rails_connector/time_machine', :as => "time_machine"
14
- end
15
-
16
- if RailsConnector::Configuration.enabled?(:rss)
17
- match 'rss', :to => 'rss#index', :format => "rss"
18
- end
19
-
20
- if RailsConnector::Configuration.enabled?(:comments)
21
- match 'comments/:action(/:id)', :to => 'comments', :as => "comment"
22
- end
23
-
24
- if RailsConnector::Configuration.enabled?(:ratings)
25
- match 'ratings/:action/:id(/:score)', :to => 'ratings', :as => "ratings"
26
- end
27
-
28
- if RailsConnector::Configuration.enabled?(:seo_sitemap)
29
- match 'sitemap.xml', :to => 'seo_sitemap#show', :format => 'xml'
30
- end
31
- end
@@ -1,20 +0,0 @@
1
- require "rails/generators/active_record"
2
-
3
- module RailsConnector
4
- module Generators
5
- class CommentsGenerator < Rails::Generators::Base
6
- include Rails::Generators::Migration
7
-
8
- source_root File.expand_path('../templates', __FILE__)
9
-
10
- def self.next_migration_number(dirname)
11
- ActiveRecord::Generators::Base.next_migration_number(dirname)
12
- end
13
-
14
- desc "Create a migration to create comments in your application."
15
- def generate_migration
16
- migration_template 'migration.rb', 'db/migrate/create_comments.rb'
17
- end
18
- end
19
- end
20
- end
@@ -1,16 +0,0 @@
1
- class CreateComments < ActiveRecord::Migration
2
- def self.up
3
- create_table :comments do |t|
4
- t.string :obj_id
5
- t.string :name
6
- t.string :email
7
- t.string :subject
8
- t.text :body
9
- t.datetime :created_at
10
- end
11
- end
12
-
13
- def self.down
14
- drop_table :comments
15
- end
16
- end
@@ -1,22 +0,0 @@
1
- # OMC:
2
- #
3
- # require 'infopark_crm_connector'
4
- #
5
- # Infopark::Crm.configure do |config|
6
- # config.url = "http://<crm-domain>:<port>"
7
- # config.login = 'webservice'
8
- # config.api_key = '<password>'
9
- # # config.live_server_groups_callback = lambda {|contact|
10
- # # case contact.account.name
11
- # # when "My Company"
12
- # # %w(internal)
13
- # # else
14
- # # []
15
- # # end
16
- # # }
17
- # end
18
- #
19
- # Re-captcha public/private key pair (used for creating a new user)
20
- # You can get those by signing up at http://recaptcha.net/
21
- # RCC_PUB=""
22
- # RCC_PRIV=""
@@ -1,20 +0,0 @@
1
- require "rails/generators/active_record"
2
-
3
- module RailsConnector
4
- module Generators
5
- class RatingsGenerator < Rails::Generators::Base
6
- include Rails::Generators::Migration
7
-
8
- source_root File.expand_path('../templates', __FILE__)
9
-
10
- def self.next_migration_number(dirname)
11
- ActiveRecord::Generators::Base.next_migration_number(dirname)
12
- end
13
-
14
- desc "Copy files to your application and create a migration to create ratings."
15
- def generate_migration
16
- migration_template 'migration.rb', 'db/migrate/create_ratings.rb'
17
- end
18
- end
19
- end
20
- end
@@ -1,14 +0,0 @@
1
- class CreateRatings < ActiveRecord::Migration
2
- def self.up
3
- create_table :ratings do |t|
4
- t.timestamps
5
- t.column :obj_id, :string
6
- t.column :score, :integer
7
- t.column :count, :integer, :default => 0
8
- end
9
- end
10
-
11
- def self.down
12
- drop_table :ratings
13
- end
14
- end
@@ -1,23 +0,0 @@
1
- module RailsConnector
2
- # This module is included if the <tt>:comments</tt> addon is
3
- # enabled:
4
- # RailsConnector::Configuration.enable(:comments)
5
- module Commentable
6
- # returns all Comments for this Obj.
7
- def comments
8
- Comment.where(:obj_id => id).order("created_at")
9
- end
10
-
11
- # Returns +true+ by default.
12
- # Implement your own conditions by overwriting this method in your {Obj}.
13
- def allow_comments?
14
- true
15
- end
16
-
17
- # Returns +true+ by default.
18
- # Implement your own conditions by overwriting this method in your {Obj}.
19
- def allow_anonymous_comments?
20
- true
21
- end
22
- end
23
- end