Commit d700982fa2c6cbb22154d82b4e07bfc0a84889fc

Authored by Victor Costa
1 parent e314d49e

rails3: output html tags

app/helpers/application_helper.rb
@@ -1172,7 +1172,7 @@ module ApplicationHelper @@ -1172,7 +1172,7 @@ module ApplicationHelper
1172 text_area(object_name, method, { :id => text_area_id, :onkeyup => "limited_text_area('#{text_area_id}', #{limit})" }.merge(options)), 1172 text_area(object_name, method, { :id => text_area_id, :onkeyup => "limited_text_area('#{text_area_id}', #{limit})" }.merge(options)),
1173 content_tag(:p, content_tag(:span, limit) + ' ' + _(' characters left'), :id => text_area_id + '_left'), 1173 content_tag(:p, content_tag(:span, limit) + ' ' + _(' characters left'), :id => text_area_id + '_left'),
1174 content_tag(:p, _('Limit of characters reached'), :id => text_area_id + '_limit', :style => 'display: none') 1174 content_tag(:p, _('Limit of characters reached'), :id => text_area_id + '_limit', :style => 'display: none')
1175 - ], :class => 'limited-text-area') 1175 + ].join, :class => 'limited-text-area')
1176 end 1176 end
1177 1177
1178 def expandable_text_area(object_name, method, text_area_id, options = {}) 1178 def expandable_text_area(object_name, method, text_area_id, options = {})
app/views/content_viewer/image_gallery.html.erb
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <% end %> 10 <% end %>
11 <ul> 11 <ul>
12 <% @images.each do |a| %> 12 <% @images.each do |a| %>
13 - <% content_tag('li', :title => a.title, :class => 'image-gallery-item' ) do %> 13 + <%= content_tag('li', :title => a.title, :class => 'image-gallery-item' ) do %>
14 <%= render :partial => partial_for_class(a.class), :object => a %> 14 <%= render :partial => partial_for_class(a.class), :object => a %>
15 <% end %> 15 <% end %>
16 <% end %> 16 <% end %>
app/views/home/index.html.erb
@@ -33,9 +33,9 @@ @@ -33,9 +33,9 @@
33 <div class='sep'></div> 33 <div class='sep'></div>
34 34
35 <% @area_news.each_with_index do |folder, i| %> 35 <% @area_news.each_with_index do |folder, i| %>
36 - <% content_tag(:div, :class => ["news-area", ['even', 'odd'][i%2]].join(' ')) do %>  
37 - <% content_tag(:div, :class => 'news-area-inner-1') do %>  
38 - <% content_tag(:div, :class => 'news-area-inner-2') do %> 36 + <%= content_tag(:div, :class => ["news-area", ['even', 'odd'][i%2]].join(' ')) do %>
  37 + <%= content_tag(:div, :class => 'news-area-inner-1') do %>
  38 + <%= content_tag(:div, :class => 'news-area-inner-2') do %>
39 <h3><%= link_to h(folder.title), folder.url %></h3> 39 <h3><%= link_to h(folder.title), folder.url %></h3>
40 <ul> 40 <ul>
41 <% folder.news(environment.news_amount_by_folder).each do |news| %> 41 <% folder.news(environment.news_amount_by_folder).each do |news| %>
app/views/profile/_profile_comment_form.html.erb
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div id='profile-wall-reply-form-<%= activity.id%>'> 2 <div id='profile-wall-reply-form-<%= activity.id%>'>
3 <p class='profile-wall-reply'> 3 <p class='profile-wall-reply'>
4 <% update_area = tab_action == 'wall' ? 'profile_activities' : 'network-activities' %> 4 <% update_area = tab_action == 'wall' ? 'profile_activities' : 'network-activities' %>
5 - <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_comment_on_activity', :tab_action => tab_action}, :html => { :class => 'profile-wall-reply-form', 'data-update' => update_area } do %> 5 + <%= form_remote_tag :url => {:controller => 'profile', :action => 'leave_comment_on_activity', :tab_action => tab_action}, :html => { :class => 'profile-wall-reply-form', 'data-update' => update_area } do %>
6 <%= expandable_text_area :comment, 6 <%= expandable_text_area :comment,
7 :body, 7 :body,
8 "reply_content_#{activity.id}", 8 "reply_content_#{activity.id}",
app/views/profile/_profile_scrap_reply_form.html.erb
1 <div id='profile-wall-reply-<%= scrap.id%>' style='display:none'> 1 <div id='profile-wall-reply-<%= scrap.id%>' style='display:none'>
2 <div id='profile-wall-reply-form-<%= scrap.id%>' style='display:none'> 2 <div id='profile-wall-reply-form-<%= scrap.id%>' style='display:none'>
3 <p class='profile-wall-reply'> 3 <p class='profile-wall-reply'>
4 - <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap'}, :update => "profile_activities", :html => { :class => 'profile-wall-reply-form'} do %> 4 + <%= form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap'}, :update => "profile_activities", :html => { :class => 'profile-wall-reply-form'} do %>
5 <%= expandable_text_area :scrap, 5 <%= expandable_text_area :scrap,
6 :content, 6 :content,
7 "reply_content_#{scrap.id}", 7 "reply_content_#{scrap.id}",
app/views/profile/_profile_wall.html.erb
1 <h3><%= _("%s's wall") % @profile.name %></h3> 1 <h3><%= _("%s's wall") % @profile.name %></h3>
2 <div id='leave_scrap'> 2 <div id='leave_scrap'>
3 <%= flash[:error] %> 3 <%= flash[:error] %>
4 - <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap', :tab_action => 'wall' }, :update => 'profile_activities', :success => "$('leave_scrap_content').value=''", :complete => "jQuery('#leave_scrap_form').removeClass('loading').find('*').attr('disabled', false)", :loading => "jQuery('#leave_scrap_form').addClass('loading').find('*').attr('disabled', true)", :html => {:id => 'leave_scrap_form' } do %> 4 + <%= form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap', :tab_action => 'wall' }, :update => 'profile_activities', :success => "$('leave_scrap_content').value=''", :complete => "jQuery('#leave_scrap_form').removeClass('loading').find('*').attr('disabled', false)", :loading => "jQuery('#leave_scrap_form').addClass('loading').find('*').attr('disabled', true)", :html => {:id => 'leave_scrap_form' } do %>
5 <%= limited_text_area :scrap, :content, 420, 'leave_scrap_content', :cols => 50, :rows => 2 %> 5 <%= limited_text_area :scrap, :content, 420, 'leave_scrap_content', :cols => 50, :rows => 2 %>
6 <%= submit_button :new, _('Share') %> 6 <%= submit_button :new, _('Share') %>
7 <% end %> 7 <% end %>
app/views/profile_members/_add_admins.html.erb
1 <h2><%= _('Add admins to %s') % profile.name %></h2> 1 <h2><%= _('Add admins to %s') % profile.name %></h2>
2 2
3 -<% form_remote_tag :url => {:action => 'find_users', :profile => profile.identifier, :scope => 'new_admins'}, :update => 'users-list', :loading => '$("users-list").addClassName("loading")', :complete => '$("users-list").removeClassName("loading")' do %> 3 +<%= form_remote_tag :url => {:action => 'find_users', :profile => profile.identifier, :scope => 'new_admins'}, :update => 'users-list', :loading => '$("users-list").addClassName("loading")', :complete => '$("users-list").removeClassName("loading")' do %>
4 <%= text_field_tag('query', '', :autocomplete => 'off') %> 4 <%= text_field_tag('query', '', :autocomplete => 'off') %>
5 <%= submit_tag(_('Search')) %> 5 <%= submit_tag(_('Search')) %>
6 <% end %> 6 <% end %>