Commit 0c959701fa589e4b1ecf74e5c597c682e3c00d33

Authored by Rodrigo Souto
1 parent 6425451c

Moving addthis script to a helper method

app/helpers/layout_helper.rb
@@ -84,5 +84,11 @@ module LayoutHelper @@ -84,5 +84,11 @@ module LayoutHelper
84 theme_path + '/style.css' 84 theme_path + '/style.css'
85 end 85 end
86 86
  87 + def addthis_javascript
  88 + if NOOSFERO_CONF['addthis_enabled']
  89 + '<script src="http://s7.addthis.com/js/152/addthis_widget.js"></script>'
  90 + end
  91 + end
  92 +
87 end 93 end
88 94
app/views/layouts/application-ng.rhtml
@@ -57,8 +57,6 @@ @@ -57,8 +57,6 @@
57 </div><!-- end id="theme-footer" --> 57 </div><!-- end id="theme-footer" -->
58 <%= noosfero_layout_features %> 58 <%= noosfero_layout_features %>
59 <%= theme_javascript_ng %> 59 <%= theme_javascript_ng %>
60 - <% if NOOSFERO_CONF['addthis_enabled'] %>  
61 - <script src="http://s7.addthis.com/js/152/addthis_widget.js"></script>  
62 - <% end %> 60 + <%= addthis_javascript %>
63 </body> 61 </body>
64 </html> 62 </html>