ecm_news2 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55156b8ab312c5b1073d803a41291663dc6e1758
|
4
|
+
data.tar.gz: 5c8bd5cbc671ecc02517b93791509fc6c85a8886
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9789618fe8818ef30ae21fe7e7615ca31cb3041c357195891a2f03dff7900369881bb6c72bc64f60141840a7f82fb6870696b819a508272afb0d6f3e601fe85d
|
7
|
+
data.tar.gz: 20158d07159968299aaaf49e7e4c5f3c81421f7e89d929663698e1f3eeb688cce0b4265ebdfb24feffb7bf046b762e9f9b418d3cd9753fb8755200e8cec97184
|
@@ -1,11 +1,14 @@
|
|
1
1
|
module Ecm::NewsHelper
|
2
2
|
def render_news(count = Ecm::News::Configuration.render_news_default_count)
|
3
3
|
items = Ecm::News::Item.published.where(:locale => I18n.locale.to_s).order("published_at DESC").limit(count)
|
4
|
+
|
4
5
|
return I18n.t('ecm.news.item.messages.empty') if items.empty?
|
5
|
-
|
6
|
+
|
7
|
+
output = Ecm::News::Configuration.prevent_textile_rendering_in_html ? '<notextile>' : ''
|
6
8
|
output << render(:partial => 'ecm/news/items/item_for_render_news', :collection => items, :as => :item)
|
7
9
|
output << render(:partial => 'ecm/news/render_news_footer')
|
8
|
-
|
10
|
+
output << '</notextile>' if Ecm::News::Configuration.prevent_textile_rendering_in_html
|
11
|
+
output.html_safe
|
9
12
|
end
|
10
13
|
end
|
11
14
|
|
data/lib/ecm/news/version.rb
CHANGED
@@ -41,5 +41,11 @@ Ecm::News.configure do |config|
|
|
41
41
|
# Default: config.base_controller = 'ApplicationController'
|
42
42
|
#
|
43
43
|
config.base_controller = 'ApplicationController'
|
44
|
+
|
45
|
+
# Adds <notextile> tags around the to fix html output.
|
46
|
+
#
|
47
|
+
# Default: config.prevent_textile_rendering_in_html = true
|
48
|
+
#
|
49
|
+
config.prevent_textile_rendering_in_html = true
|
44
50
|
end
|
45
51
|
|