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 1172 text_area(object_name, method, { :id => text_area_id, :onkeyup => "limited_text_area('#{text_area_id}', #{limit})" }.merge(options)),
1173 1173 content_tag(:p, content_tag(:span, limit) + ' ' + _(' characters left'), :id => text_area_id + '_left'),
1174 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 1176 end
1177 1177  
1178 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 10 <% end %>
11 11 <ul>
12 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 14 <%= render :partial => partial_for_class(a.class), :object => a %>
15 15 <% end %>
16 16 <% end %>
... ...
app/views/home/index.html.erb
... ... @@ -33,9 +33,9 @@
33 33 <div class='sep'></div>
34 34  
35 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 39 <h3><%= link_to h(folder.title), folder.url %></h3>
40 40 <ul>
41 41 <% folder.news(environment.news_amount_by_folder).each do |news| %>
... ...
app/views/profile/_profile_comment_form.html.erb
... ... @@ -2,7 +2,7 @@
2 2 <div id='profile-wall-reply-form-<%= activity.id%>'>
3 3 <p class='profile-wall-reply'>
4 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 6 <%= expandable_text_area :comment,
7 7 :body,
8 8 "reply_content_#{activity.id}",
... ...
app/views/profile/_profile_scrap_reply_form.html.erb
1 1 <div id='profile-wall-reply-<%= scrap.id%>' style='display:none'>
2 2 <div id='profile-wall-reply-form-<%= scrap.id%>' style='display:none'>
3 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 5 <%= expandable_text_area :scrap,
6 6 :content,
7 7 "reply_content_#{scrap.id}",
... ...
app/views/profile/_profile_wall.html.erb
1 1 <h3><%= _("%s's wall") % @profile.name %></h3>
2 2 <div id='leave_scrap'>
3 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 5 <%= limited_text_area :scrap, :content, 420, 'leave_scrap_content', :cols => 50, :rows => 2 %>
6 6 <%= submit_button :new, _('Share') %>
7 7 <% end %>
... ...
app/views/profile_members/_add_admins.html.erb
1 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 4 <%= text_field_tag('query', '', :autocomplete => 'off') %>
5 5 <%= submit_tag(_('Search')) %>
6 6 <% end %>
... ...