Commit 776ca7bc6b78384b59c4b49214e9579849ac67ff

Authored by Braulio Bhavamitra
1 parent 54bc457e

html_safe: Always return button_bar value to template

Showing 173 changed files with 242 additions and 259 deletions   Show diff stats
app/helpers/application_helper.rb
... ... @@ -233,13 +233,6 @@ module ApplicationHelper
233 233 link_to(content_tag('span', text), url, html_options.merge(:class => the_class, :title => text))
234 234 end
235 235  
236   - def button_bar(options = {}, &block)
237   - options[:class].nil? ?
238   - options[:class]='button-bar' :
239   - options[:class]+=' button-bar'
240   - concat(content_tag('div', capture(&block).to_s + tag('br', :style => 'clear: left;'), options))
241   - end
242   -
243 236 def render_profile_actions klass
244 237 name = klass.to_s.underscore
245 238 begin
... ...
app/helpers/buttons_helper.rb
1 1 module ButtonsHelper
  2 +
  3 + def button_bar(options = {}, &block)
  4 + options[:class] ||= ''
  5 + options[:class] << ' button-bar'
  6 +
  7 + content_tag :div, options do
  8 + [
  9 + capture(&block).to_s,
  10 + tag(:br, style: 'clear: left;'),
  11 + ].safe_join
  12 + end
  13 + end
  14 +
2 15 def button(type, label, url, html_options = {})
3 16 html_options ||= {}
4 17 the_class = 'with-text'
... ...
app/views/account/_login_form.html.erb
... ... @@ -11,7 +11,7 @@
11 11 <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
12 12 <% end %>
13 13  
14   -<% button_bar do %>
  14 +<%= button_bar do %>
15 15 <%= submit_button( 'login', _('Log in') )%>
16 16 <%= modal_close_button _('Cancel') if request.xhr? %>
17 17 <% end %>
... ...
app/views/account/accept_terms.html.erb
... ... @@ -20,7 +20,7 @@
20 20 <%= hidden_field_tag :answer, params[:answer] %>
21 21  
22 22 <%= labelled_check_box(environment.terms_of_use_acceptance_text.blank? ? _('I read the terms of use and accepted them') : environment.terms_of_use_acceptance_text, :terms_accepted, '1', false, :id => 'accept-terms') %>
23   - <% button_bar do %>
  23 + <%= button_bar do %>
24 24 <%= button 'cancel', _('Cancel'), :controller => 'home', :action => 'index' %>
25 25 <%= submit_button 'forward', _('Continue'), {:disabled => true, :class => 'disabled', :id => 'submit-accept-terms'} %>
26 26 <% end %>
... ...
app/views/account/activation_question.html.erb
... ... @@ -24,7 +24,7 @@
24 24  
25 25 <div class='activation-box'>
26 26 <h2><%= _('Enterprise activation') + ' - ' + (logged_in? ? _('part 1 of 2') : _('part 1 of 3')) %></h2>
27   - <%= form_tag( {:action => 'accept_terms'}, {:method => 'get', :onsubmit => (@question == :foundation_year ? 'return check_valid_year(this)' : 'return check_valid_cnpj(this)')}) do %>
  27 + <%= form_tag( {:action => 'accept_terms'}, {:method => 'get', :onsubmit => (@question == :foundation_year ? 'return check_valid_year(this)' : 'return check_valid_cnpj(this)')}) do %>
28 28  
29 29 <p> <strong><%= _('Pay atention! You have only one chance!') %></strong> </p>
30 30  
... ... @@ -34,7 +34,7 @@
34 34  
35 35 <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
36 36  
37   - <% button_bar do %>
  37 + <%= button_bar do %>
38 38 <%= button 'cancel', _('Cancel'), :action => 'index' %>
39 39 <%= submit_button 'forward', _('Continue') %>
40 40 <% end %>
... ...
app/views/account/forgot_password.html.erb
... ... @@ -9,7 +9,7 @@
9 9 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %>
10 10  
11 11 <div>
12   - <% button_bar do %>
  12 + <%= button_bar do %>
13 13 <%= submit_button('send', _('Send instructions')) %>
14 14 <% end %>
15 15 </div>
... ...
app/views/account/login.html.erb
... ... @@ -22,7 +22,7 @@
22 22  
23 23 <%= safe_join(@plugins.dispatch(:login_extra_contents).collect { |content| instance_exec(&content) }, "") %>
24 24  
25   - <% button_bar do %>
  25 + <%= button_bar do %>
26 26 <%= submit_button( 'login', _('Log in') )%>
27 27 <% if is_popin %>
28 28 <%= modal_close_button(_('Cancel')) %>
... ... @@ -31,7 +31,7 @@
31 31  
32 32 <% end %>
33 33  
34   -<% button_bar do %>
  34 +<%= button_bar do %>
35 35 <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
36 36 <%= button :add, _("New user"), :controller => 'account', :action => 'signup' %>
37 37 <% end %>
... ...
app/views/account/login_block.html.erb
... ... @@ -17,7 +17,7 @@
17 17  
18 18 <%= safe_join(@plugins.dispatch(:login_extra_contents).collect { |content| instance_eval(&content) }, "") %>
19 19  
20   - <% button_bar do %>
  20 + <%= button_bar do %>
21 21 <%= submit_button( 'login', _('Log in') )%>
22 22 <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
23 23 <%= button(:add, _('New user'), { :controller => 'account', :action => 'signup' }) %>
... ...
app/views/account/logout_popup.html.erb
1 1 <h2><%= _('Are you sure you want to get out?') %></h2>
2 2 <p>
3   -<% button_bar do %>
  3 +<%= button_bar do %>
4 4 <%= button :ok, _('Yes'), { :controller => 'account', :action => 'logout' } %>
5 5 <%= modal_close_button _('No, I want to stay.') %>
6 6 <% end %>
... ...
app/views/account/new_password.html.erb
... ... @@ -10,7 +10,7 @@
10 10  
11 11 <%= labelled_form_field(_('Enter new password'), (f.password_field :password)) %>
12 12 <%= labelled_form_field(_('Confirm the new password'), (f.password_field :password_confirmation)) %>
13   - <% button_bar do %>
  13 + <%= button_bar do %>
14 14 <%= submit_button(:ok, _('Change password')) %>
15 15 <% end %>
16 16  
... ...
app/views/account/welcome.html.erb
... ... @@ -3,8 +3,8 @@
3 3  
4 4 <%= _('%s was successfuly activated. Now you may go to your control panel or to the control panel of your enterprise') % @enterprise.name %>
5 5  
6   - <% button_bar do %>
7   - <%= button 'forward', _('Go to my control panel'), :action => 'index', :controller => 'profile_editor', :profile => current_user.person.identifier %>
  6 + <%= button_bar do %>
  7 + <%= button 'forward', _('Go to my control panel'), :action => 'index', :controller => 'profile_editor', :profile => current_user.person.identifier %>
8 8 <%= button 'forward', _('Go to my enterprise control panel') % @enterprise.name, :action => 'index', :controller => 'profile_editor', :profile => @enterprise.identifier %>
9 9 <% end %>
10 10 <% end %>
... ...
app/views/admin_panel/message_for_disabled_enterprise.html.erb
... ... @@ -6,7 +6,7 @@
6 6  
7 7 <%= f.text_area :message_for_disabled_enterprise, :cols => 40, :style => 'width: 90%' %>
8 8  
9   - <% button_bar do %>
  9 + <%= button_bar do %>
10 10 <%= submit_button(:save, _('Save')) %>
11 11 <%= button(:cancel, _('Cancel'), :action => 'index') %>
12 12 <% end %>
... ...
app/views/admin_panel/set_portal_community.html.erb
... ... @@ -4,14 +4,14 @@
4 4 <%= form_tag do %>
5 5 <%= labelled_form_field(_('Portal identifier'), text_field_tag('portal_community_identifier', @portal_community.identifier, :size => 40) ) %>
6 6  
7   - <% button_bar do %>
  7 + <%= button_bar do %>
8 8 <%= submit_button 'save', _('Save'), :cancel => { :action => 'index' } %>
9 9 <% end %>
10 10 <% end %>
11 11 <% else %>
12 12 <%= _('Portal identifier: %s').html_safe % link_to(@portal_community.identifier, @portal_community.url) %>
13 13  
14   - <% button_bar do %>
  14 + <%= button_bar do %>
15 15 <%if @portal_community.environment.enabled?('use_portal_community') %>
16 16 <%= button 'cancel', _('Disable'), {:action => 'manage_portal_community', :activate => 0} %>
17 17 <% else %>
... ...
app/views/admin_panel/set_portal_folders.html.erb
... ... @@ -37,7 +37,7 @@
37 37 <%= _('The same order in which you arrange the folders here will be used for arranging the boxes in the environment initial page.') %>
38 38 </p>
39 39  
40   - <% button_bar do %>
  40 + <%= button_bar do %>
41 41 <%= submit_button 'save', _('Save'), :cancel => {:action => 'index'} %>
42 42 <% end %>
43 43 <% end %>
... ...
app/views/admin_panel/set_portal_news_amount.html.erb
... ... @@ -6,7 +6,7 @@
6 6 <%= labelled_form_field _('Number of portal news'), select(:environment, :portal_news_amount, (0..10).to_a) %>
7 7 <%= labelled_form_field _('Number of news by folder'), select(:environment, :news_amount_by_folder, (1..10).to_a) %>
8 8  
9   - <% button_bar do %>
  9 + <%= button_bar do %>
10 10 <%= submit_button(:save, _('Save')) %>
11 11 <%= button(:cancel, _('Cancel'), :action => 'index') %>
12 12 <% end %>
... ...
app/views/admin_panel/site_info.html.erb
... ... @@ -20,7 +20,7 @@
20 20 <% tabs << {:title => _('Signup introduction text'), :id => 'signup-intro',
21 21 :content => (render :partial => 'signup_intro', :locals => {:f => f})} %>
22 22 <%= render_tabs(tabs) %>
23   - <% button_bar do %>
  23 + <%= button_bar do %>
24 24 <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %>
25 25 <% end %>
26 26 <% end %>
... ...
app/views/box_organizer/edit.html.erb
... ... @@ -35,7 +35,7 @@
35 35 </div>
36 36 <% end %>
37 37  
38   - <% button_bar do %>
  38 + <%= button_bar do %>
39 39 <%= submit_button(:save, _('Save')) %>
40 40 <%= modal_close_button(_('Cancel')) %>
41 41 <% end %>
... ...
app/views/box_organizer/index.html.erb
... ... @@ -3,7 +3,7 @@
3 3  
4 4 <h1><%= _('Editing sideboxes')%></h1>
5 5  
6   -<% button_bar :class=>'design-menu' do %>
  6 +<%= button_bar :class=>'design-menu' do %>
7 7 <%= button(:back, _('Back to control panel'), :controller => (profile.nil? ? 'admin_panel': 'profile_editor')) %>
8 8 <% end %>
9 9  
... ...
app/views/categories/_form.html.erb
... ... @@ -28,7 +28,7 @@
28 28 <%= file_field_or_thumbnail(_('Image:'), @category.image, i) %>
29 29 <% end %>
30 30  
31   - <% button_bar do %>
  31 + <%= button_bar do %>
32 32 <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
33 33 <% end%>
34 34 <% end %>
... ...
app/views/cms/_media_new_folder.html.erb
... ... @@ -9,7 +9,7 @@
9 9 <%= labelled_radio_button _('Folder'), :folder_type, 'Folder', false %>
10 10  
11 11 <%= labelled_form_field _('Name:'), text_field_tag(:new_folder, nil, 'data-url' => url_for({:action => 'new', :profile => profile.identifier})) %>
12   - <% button_bar do %>
  12 + <%= button_bar do %>
13 13 <%= submit_button(:newfolder, _('Create')) %>
14 14 <% end %>
15 15 <% end %>
... ...
app/views/cms/_upload_file_form.html.erb
... ... @@ -12,7 +12,7 @@
12 12  
13 13 <%= hidden_field_tag('back_to', @back_to) %>
14 14  
15   -<% button_bar do %>
  15 +<%= button_bar do %>
16 16 <%= button_to_function :add, _('More files'), "add_new_file_fields()" %>
17 17 <% if @back_to %>
18 18 <%= submit_button :save, _('Upload'), :cancel => @back_to %>
... ...
app/views/cms/destroy.html.erb
... ... @@ -12,7 +12,7 @@
12 12 <% end %>
13 13 </strong>
14 14  
15   - <% button_bar do %>
  15 + <%= button_bar do %>
16 16 <%= submit_button :save, _('Yes, I want.') %>
17 17 <%= button :cancel, _("No, I don't want."), @article.url %>
18 18 <% end %>
... ...
app/views/cms/edit.html.erb
... ... @@ -21,7 +21,7 @@
21 21 </div>
22 22 <% end %>
23 23  
24   - <% button_bar do %>
  24 + <%= button_bar do %>
25 25 <%= submit_button :save, _('Save') %>
26 26 <%= submit_button :save, _('Save and continue'), :name => "continue" %>
27 27 <% end %>
... ... @@ -48,7 +48,7 @@
48 48 <%= options_for_article(@article, @tokenized_children) %>
49 49 </div>
50 50  
51   - <% button_bar do %>
  51 + <%= button_bar do %>
52 52 <%= submit_button :save, _('Save') %>
53 53  
54 54 <% if @back_to %>
... ...
app/views/cms/publish.html.erb
... ... @@ -25,7 +25,7 @@
25 25 <%= hidden_field_tag :back_to, @back_to %>
26 26 <%= labelled_form_field _('Title'), text_field_tag('name', @article.name) %>
27 27  
28   - <% button_bar do %>
  28 + <%= button_bar do %>
29 29 <%= submit_button 'spread', _('Spread this') %>
30 30 <% end %>
31 31 <% end %>
... ... @@ -41,7 +41,7 @@
41 41 <% search_action = url_for(:action => 'search_communities_to_publish') %>
42 42 <%= token_input_field_tag(:q, 'search-communities-to-publish', search_action, { :hint_text => _('Type in a search for your community'), :zindex => 10000, :focus => false }) %>
43 43 <%= labelled_form_field _('Title'), text_field_tag('name', @article.name) %>
44   - <% button_bar do %>
  44 + <%= button_bar do %>
45 45 <%= submit_button 'spread', _('Spread this') %>
46 46 <% end %>
47 47 <% end %>
... ... @@ -58,7 +58,7 @@
58 58 <%= hidden_field_tag :back_to, @back_to %>
59 59 <%= labelled_form_field _('Title'), text_field_tag('name', @article.name) %>
60 60  
61   - <% button_bar do %>
  61 + <%= button_bar do %>
62 62 <%= submit_button 'spread', _('Spread this') %>
63 63 <% end %>
64 64 <% end %>
... ...
app/views/cms/publish_on_portal_community.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <%= hidden_field_tag :back_to, @back_to %>
6 6 <%= labelled_text_field _('Title') + ': ', :name, @article.name, :style => 'width: 100%' %>
7 7  
8   - <% button_bar do %>
  8 + <%= button_bar do %>
9 9 <%= submit_button 'spread', _('Spread this'), :cancel => @back_to %>
10 10 <% end %>
11 11 <% end %>
... ... @@ -14,7 +14,7 @@
14 14 <%= _("There is no portal community in this environment.") %>
15 15 </div>
16 16  
17   - <% button_bar do %>
  17 + <%= button_bar do %>
18 18 <%= button :back, _('Back'), :controller => 'cms' %>
19 19 <% end %>
20 20 <% end %>
... ...
app/views/cms/suggest_an_article.html.erb
... ... @@ -23,7 +23,7 @@
23 23  
24 24 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) unless logged_in? %>
25 25  
26   - <% button_bar do %>
  26 + <%= button_bar do %>
27 27 <%= submit_button :save, _('Save') %>
28 28 <%= button :cancel, _('Cancel'), @back_to %>
29 29 <% end %>
... ...
app/views/cms/view.html.erb
... ... @@ -14,7 +14,7 @@
14 14 </div>
15 15 <% end %>
16 16  
17   -<% button_bar(:style => 'margin-bottom: 1em;') do %>
  17 +<%= button_bar(:style => 'margin-bottom: 1em;') do %>
18 18 <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %>
19 19  
20 20 <%= modal_button('new', _('New content'), url_for({:action => 'new', :parent_id => parent_id, :cms => true}).html_safe) %>
... ...
app/views/cms/why_categorize.html.erb
... ... @@ -4,6 +4,6 @@
4 4 <%= _('By categorizing your content, you increase the possibility that other people access it. When they are looking for, say, articles about Bahia and you categorize your article in "Regions/Bahia", then there is a good change that your article is going to be found.') %>
5 5 </p>
6 6  
7   -<% button_bar do %>
  7 +<%= button_bar do %>
8 8 <%= modal_close_button _('Close') %>
9 9 <% end %>
... ...
app/views/comment/_comment_form.html.erb
... ... @@ -8,7 +8,7 @@
8 8 <div id="recaptcha-container" style="display: none">
9 9 <h3><%= _('Please type the two words below') %></h3>
10 10 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %>
11   - <% button_bar do %>
  11 + <%= button_bar do %>
12 12 <%= button_to_function :add, _('Confirm'), "return false", :id => "confirm-captcha" %>
13 13 <%= button_to_function :cancel, _('Cancel'), "noosfero.modal.close()" %>
14 14 <% end %>
... ... @@ -87,7 +87,7 @@ function check_captcha(button, confirm_action) {
87 87  
88 88 <%= safe_join(@plugins.dispatch(:comment_form_extra_contents, local_assigns.merge(:comment => @comment)).collect { |content| instance_exec(&content) }, "") %>
89 89  
90   - <% button_bar do %>
  90 + <%= button_bar do %>
91 91 <%= submit_button('add', _('Post comment'), :onclick => "if(check_captcha(this)) { save_comment(this) } else { check_captcha(this, save_comment)};return false;") %>
92 92 <% if !edition_mode %>
93 93 <%= button :cancel, _('Cancel'), '', :id => 'cancel-comment' %>
... ...
app/views/content_viewer/_comment_form.html.erb
... ... @@ -36,7 +36,7 @@ function submit_comment_form(button) {
36 36 <div id="recaptcha-container" style="display: none">
37 37 <h3><%= _('Please type the two words below') %></h3>
38 38 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %>
39   - <% button_bar do %>
  39 + <%= button_bar do %>
40 40 <%= button_to_function :add, _('Confirm'), "return false", :id => "confirm-captcha" %>
41 41 <%= button_to_function :cancel, _('Cancel'), "noosfero.modal.close()" %>
42 42 <% end %>
... ... @@ -73,7 +73,7 @@ function submit_comment_form(button) {
73 73 <%= hidden_field_tag(:confirm, 'false') %>
74 74 <%= hidden_field_tag(:view, params[:view])%>
75 75  
76   - <% button_bar do %>
  76 + <%= button_bar do %>
77 77 <%= submit_button('add', _('Post comment'), :onclick => "submit_comment_form(this); return false") %>
78 78 <% if cancel_triggers_hide %>
79 79 <%= button :cancel, _('Cancel'), '', :id => 'cancel-comment' %>
... ...
app/views/content_viewer/_confirm_unfollow.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <%= form_tag(@page.view_url.merge({:only_path => true}), {:method => 'post', :class => 'comment_form'}) do %>
6 6 <%= hidden_field_tag(:unfollow, 'commit') %>
7 7 <%= labelled_form_field(_('Enter your e-Mail'), text_field_tag(:email, nil, {:size => 40})) %>
8   - <% button_bar do %>
  8 + <%= button_bar do %>
9 9 <%= submit_button(:ok, _('Cancel notifications for e-mail above') ) %>
10 10 <% end %>
11 11 <% end %>
... ...
app/views/content_viewer/forum_page.html.erb
... ... @@ -16,7 +16,7 @@
16 16 <p><%= @page.terms_of_use %></p>
17 17  
18 18 <%= form_tag @page.url.merge(:terms_accepted => true) do %>
19   - <% button_bar do %>
  19 + <%= button_bar do %>
20 20 <% if user %>
21 21 <%= submit_button :save, _("Accept") %>
22 22 <% else %>
... ...
app/views/enterprise_registration/basic_information.html.erb
... ... @@ -8,7 +8,7 @@
8 8 <%= _('There are no validators to validate the registration of this new enterprise. Contact your administrator for instructions.') %>
9 9 </div>
10 10  
11   - <% button_bar do %>
  11 + <%= button_bar do %>
12 12 <%= button :back, _('Go back'), { :profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile" }%>
13 13 <% end %>
14 14 <% else %>
... ... @@ -36,7 +36,7 @@
36 36  
37 37 <%= template_options(:enterprises, 'create_enterprise')%>
38 38  
39   - <% button_bar do %>
  39 + <%= button_bar do %>
40 40 <%= submit_button('next', _('Next'), :cancel => {:profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile"}) %>
41 41 <% end %>
42 42 <% end %>
... ...
app/views/enterprise_registration/creation.html.erb
... ... @@ -4,7 +4,7 @@
4 4  
5 5 <%= render :partial => 'shared/template_welcome_page', :locals => {:template => @enterprise.template, :header => _("What can I do with a %s?")} %>
6 6  
7   -<% button_bar do %>
  7 +<%= button_bar do %>
8 8 <%= button :back, _('Back'), {:controller => 'memberships', :action => 'index', :profile => user.identifier} %>
9 9 <% end %>
10 10  
... ...
app/views/enterprise_registration/select_validator.html.erb
... ... @@ -22,7 +22,7 @@
22 22 <% end %>
23 23 </table>
24 24  
25   - <% button_bar do %>
  25 + <%= button_bar do %>
26 26 <%= submit_button 'save', _('Confirm') %>
27 27 <% end %>
28 28 <% end %>
... ...
app/views/enterprise_validation/details.html.erb
... ... @@ -15,7 +15,7 @@
15 15 <p><%= _('If this enterprise passes the criteria to be considered an solidarity enconomy enterprise, you can approve it by click the button below.') %></p>
16 16  
17 17 <%= form_tag :action => 'approve', :id => @pending.code do %>
18   - <% button_bar do %>
  18 + <%= button_bar do %>
19 19 <%= submit_button('approve', _('Approve')) %>
20 20 <% end %>
21 21 <% end %>
... ... @@ -27,7 +27,7 @@
27 27 <%= form_tag :action => 'reject', :id => @pending.code do %>
28 28 <%= labelled_form_field(_('Please provide an explanation for the rejection. This explanation will be sent to the requestor (required).'), text_area_tag('reject_explanation'))%>
29 29 <div>
30   - <% button_bar do %>
  30 + <%= button_bar do %>
31 31 <%= submit_button('reject', _('Reject')) %>
32 32 <% end %>
33 33 </div>
... ...
app/views/enterprise_validation/edit_validation_info.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <%= labelled_form_for :info do |f| %>
6 6 <%= f.text_area(:validation_methodology, :cols => 50, :rows => 10) %>
7 7 <%= f.text_area(:restrictions, :cols => 50, :rows => 7) %>
8   - <% button_bar do %>
  8 + <%= button_bar do %>
9 9 <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
10 10 <% end %>
11 11 <% end %>
... ...
app/views/enterprise_validation/index.html.erb
1 1 <h1><%= _('Enterprise validations') %></h1>
2 2  
3   -<% button_bar do %>
  3 +<%= button_bar do %>
4 4 <%= button(:edit, _('Edit validation info'), { :action => 'edit_validation_info' }) %>
5 5 <%= button(:back, _('Go Back'), { :controller => 'profile_editor' }) %>
6 6 <% end %>
... ...
app/views/environment_role_manager/affiliate.html.erb
... ... @@ -3,7 +3,7 @@
3 3 <%= form_tag( {:action => 'give_role'}, {:method => :post}) do %>
4 4 <%= select_tag 'role', options_for_select(@roles.map{|r|[r.name,r.id]}) %>
5 5 <%= hidden_field_tag 'person', current_user.person.id %>
6   - <% button_bar do %>
  6 + <%= button_bar do %>
7 7 <%= submit_button('affiliate', _('Affiliate', :cancel => {:action => 'index'}) %>
8 8 <% end %>
9 9 <% end %>
... ...
app/views/environment_role_manager/change_role.html.erb
... ... @@ -7,7 +7,7 @@
7 7 <% end %>
8 8 <%= hidden_field_tag 'person', @admin.id %>
9 9  
10   - <% button_bar do %>
  10 + <%= button_bar do %>
11 11 <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %>
12 12 <% end %>
13 13 <% end %>
... ...
app/views/environment_role_manager/make_admin.html.erb
... ... @@ -9,7 +9,7 @@
9 9 <% @roles.each do |r| %>
10 10 <%= labelled_form_field(r.name, (check_box_tag "roles[]", r.id)) %>
11 11 <% end %>
12   - <% button_bar do %>
  12 + <%= button_bar do %>
13 13 <%= submit_button( 'save', _('Make'), :cancel => {:action => 'index'} ) %>
14 14 <% end %>
15 15 <% end %>
... ...
app/views/environment_themes/index.html.erb
... ... @@ -3,6 +3,6 @@
3 3  
4 4 <br style="clear:both" />
5 5  
6   -<% button_bar do %>
  6 +<%= button_bar do %>
7 7 <%= button(:back, _('Back'), :controller => 'admin_panel', :action => 'index') %>
8 8 <% end %>
... ...
app/views/favorite_enterprises/index.html.erb
... ... @@ -23,7 +23,7 @@
23 23 </p>
24 24 <% end %>
25 25  
26   -<% button_bar do %>
  26 +<%= button_bar do %>
27 27 <%= button(:back, _('Go back'), :controller => 'profile_editor') %>
28 28 <% end %>
29 29  
... ...
app/views/features/_manage_community_fields.html.erb
... ... @@ -55,7 +55,7 @@
55 55 </script>
56 56  
57 57 <div>
58   - <% button_bar do %>
  58 + <%= button_bar do %>
59 59 <%= submit_button('save', _('Save changes'), :id=>"save_community_fields") %>
60 60 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
61 61 <% end %>
... ...
app/views/features/_manage_custom_fields.html.erb
... ... @@ -22,7 +22,7 @@
22 22 </fieldset>
23 23 </div>
24 24  
25   -<% button_bar do %>
  25 +<%= button_bar do %>
26 26 <%= button(:save, _('Save'), 'javascript: void()', :onClick => "submit_custom_field_form('##{format_values_id}', '##{form_id}');") %>
27 27 <% end %>
28 28  
... ...
app/views/features/_manage_enterprise_fields.html.erb
... ... @@ -55,7 +55,7 @@
55 55 </script>
56 56  
57 57 <div>
58   - <% button_bar do %>
  58 + <%= button_bar do %>
59 59 <%= submit_button('save', _('Save changes'), :id=>"save_enterprise_fields") %>
60 60 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
61 61 <% end %>
... ...
app/views/features/_manage_person_fields.html.erb
... ... @@ -55,7 +55,7 @@
55 55 </script>
56 56  
57 57 <div>
58   - <% button_bar do %>
  58 + <%= button_bar do %>
59 59 <%= submit_button('save', _('Save changes'), :id=>"save_person_fields") %>
60 60 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
61 61 <% end %>
... ...
app/views/features/index.html.erb
... ... @@ -69,7 +69,7 @@ Check all the features you want to enable for your environment, uncheck all the
69 69 <hr/>
70 70  
71 71 <div>
72   - <% button_bar do %>
  72 + <%= button_bar do %>
73 73 <%= submit_button('save', _('Save changes')) %>
74 74 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
75 75 <% end %>
... ...
app/views/friends/connections.html.erb
1 1 <h1><%= _("Connections with %s") % @suggestion.suggestion.name %></h1>
2 2  
3   -<% button_bar do %>
  3 +<%= button_bar do %>
4 4 <%= button(:back, _('Go to friends list'), :controller => 'friends') %>
5 5 <% end %>
6 6  
... ...
app/views/friends/index.html.erb
... ... @@ -12,7 +12,7 @@
12 12 </p>
13 13 <% end %>
14 14  
15   - <% button_bar do %>
  15 + <%= button_bar do %>
16 16 <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
17 17 <%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %>
18 18 <% unless @plugins.dispatch(:remove_invite_friends_button).include?(true) %>
... ...
app/views/friends/suggest.html.erb
1 1 <h1><%= _("Friends suggestions for %s") % profile.name %></h1>
2 2  
3   -<% button_bar do %>
  3 +<%= button_bar do %>
4 4 <%= button(:back, _('Go to friends list'), :controller => 'friends') %>
5 5 <% end %>
6 6  
... ...
app/views/invite/_select_address_book.html.erb
... ... @@ -34,7 +34,7 @@
34 34 <%= labelled_form_field(_("Password") + ":", password_field_tag(:password)) %>
35 35 </div>
36 36  
37   - <% button_bar do %>
  37 + <%= button_bar do %>
38 38 <%= submit_button(:forward, _("Next")) %>
39 39 <% end %>
40 40 <p><%= _("We won't store your password or contact anyone without your permission.") %></p>
... ...
app/views/invite/invite_friends.html.erb
... ... @@ -24,7 +24,7 @@
24 24 { :hint_text => _('Type in the person\'s %{search_fields}') % {:search_fields => @search_fields},
25 25 :focus => false }) %>
26 26  
27   - <% button_bar do %>
  27 + <%= button_bar do %>
28 28 <%= submit_button('save', _('Invite'))%>
29 29 <%= button('cancel', _('Cancel'), profile.url)%>
30 30 <% end %>
... ...
app/views/invite/select_friends.html.erb
... ... @@ -32,7 +32,7 @@
32 32  
33 33 <%= render :partial => 'invite/personalize_invitation_mail', :locals => {:mail_template => @mail_template } %>
34 34  
35   - <% button_bar do %>
  35 + <%= button_bar do %>
36 36 <%= submit_button(:ok, _("Invite!")) %>
37 37 <% end %>
38 38 <% end %>
... ...
app/views/licenses/_form.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <%= required labelled_form_field(_('Name'), f.text_field(:name)) %>
6 6 <%= labelled_form_field(_('License url'), f.text_field(:url)) %>
7 7  
8   - <% button_bar do %>
  8 + <%= button_bar do %>
9 9 <%= submit_button('save', _('Save'))%>
10 10 <%= button('cancel', _('Cancel'), {:action => 'index'})%>
11 11 <% end %>
... ...
app/views/licenses/index.html.erb
... ... @@ -16,7 +16,7 @@
16 16 <% end %>
17 17 </table>
18 18  
19   -<% button_bar do %>
  19 +<%= button_bar do %>
20 20 <%= button(:add, _('Add a new license'), :action => 'create')%>
21 21 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
22 22 <% end %>
... ...
app/views/mailconf/index.html.erb
... ... @@ -6,7 +6,7 @@
6 6  
7 7 <p><%= _('You already request activation of your mailbox. Please wait until an administrator approves your request.') %></p>
8 8  
9   - <% button_bar do %>
  9 + <%= button_bar do %>
10 10 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
11 11 <% end %>
12 12  
... ... @@ -21,10 +21,10 @@
21 21 <h2><%= _('Configuration') %></h2>
22 22 <ul>
23 23 <li>
24   - <%= link_to _('Mail configuration for POP and IMAP'), 'http://www.ynternet.org/move/infos-technique-pour-utiliser-multypass-pop3-smtp-imap-ftp-quotas...' %>
  24 + <%= link_to _('Mail configuration for POP and IMAP'), 'http://www.ynternet.org/move/infos-technique-pour-utiliser-multypass-pop3-smtp-imap-ftp-quotas...' %>
25 25 </li>
26 26 </ul>
27   - <% button_bar do %>
  27 + <%= button_bar do %>
28 28 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
29 29 <% end %>
30 30  
... ... @@ -33,7 +33,7 @@
33 33 <h2><%= _("Enable e-Mail account below:") %></h2>
34 34 <ul><%= safe_join(profile.email_addresses.map{|i| content_tag('li', i)}, "\n") %></ul>
35 35 <blockquote><%= _("You'll be able to access a webmail from your user menu.") %></blockquote>
36   - <% button_bar do %>
  36 + <%= button_bar do %>
37 37 <%= button(:ok, _('Enable e-Mail'), { :action => 'enable' }, :method => 'post') %>
38 38 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
39 39 <% end %>
... ...
app/views/maps/edit_location.html.erb
... ... @@ -11,7 +11,7 @@
11 11 <%= labelled_form_field _('City'), f.text_field(:city) %>
12 12 <%= labelled_form_field _('ZIP code'), text_field(:profile_data, :zip_code) %>
13 13 <%= labelled_form_field _('Address (street and number)'), text_field(:profile_data, :address) %>
14   - <% button_bar do %>
  14 + <%= button_bar do %>
15 15 <%= button_to_function :search, _('Locate in the map'), "addressToPoint()", :title => _("Locate the address informed above in the map below (note that you'll probably need to adjust the marker to get a precise position)") %>
16 16 <%= submit_button 'save', _('Save') %>
17 17 <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
... ...
app/views/memberships/connections.html.erb
1 1 <h1><%= _("Connections with %s") % @suggestion.suggestion.name %></h1>
2 2  
3   -<% button_bar do %>
  3 +<%= button_bar do %>
4 4 <%= button(:back, _('Go to groups list'), :controller => 'memberships') %>
5 5 <% end %>
6 6  
... ...
app/views/memberships/index.html.erb
... ... @@ -2,7 +2,7 @@
2 2  
3 3 <h1><%= _('Manage my groups') %></h1>
4 4  
5   -<% button_bar do %>
  5 +<%= button_bar do %>
6 6 <%= button(:add, _('Create a new community'), :controller => 'memberships', :action => 'new_community') %>
7 7 <%= button :add, _('Register a new enterprise'), :controller => 'enterprise_registration' if environment.enabled?('enterprise_registration') %>
8 8 <%= button :back, _('Go back'), :controller => 'profile_editor' %>
... ...
app/views/memberships/new_community.html.erb
... ... @@ -48,7 +48,7 @@
48 48  
49 49 <%= hidden_field_tag('back_to', @back_to) %>
50 50  
51   - <% button_bar do %>
  51 + <%= button_bar do %>
52 52 <%= submit_button(:save, _('Create')) %>
53 53 <%= button(:cancel, _('Cancel'), @back_to ) %>
54 54 <% end %>
... ...
app/views/memberships/suggest.html.erb
1 1 <h1><%= _("Communities suggestions for %s") % profile.name %></h1>
2 2  
3   -<% button_bar do %>
  3 +<%= button_bar do %>
4 4 <%= button(:back, _('Go to groups list'), :controller => 'memberships') %>
5 5 <% end %>
6 6  
... ...
app/views/memberships/welcome.html.erb
... ... @@ -4,6 +4,6 @@
4 4  
5 5 <%= render :partial => 'shared/template_welcome_page', :locals => {:template => @community.template, :header => _("What can I do with a %s?")} %>
6 6  
7   -<% button_bar do %>
  7 +<%= button_bar do %>
8 8 <%= button :back, _('Back'), @back_to %>
9 9 <% end %>
... ...
app/views/organizations/index.html.erb
... ... @@ -22,7 +22,7 @@
22 22  
23 23 <%= render :partial => 'results' %>
24 24  
25   - <% button_bar do %>
  25 + <%= button_bar do %>
26 26 <%= button :back, _('Back'), :controller => 'admin_panel' %>
27 27 <% end %>
28 28 <% end %>
... ...
app/views/plugins/index.html.erb
... ... @@ -26,7 +26,7 @@
26 26 </table>
27 27  
28 28 <div>
29   - <% button_bar do %>
  29 + <%= button_bar do %>
30 30 <%= submit_button('save', _('Save changes')) %>
31 31 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
32 32 <% end %>
... ...
app/views/profile/_comment.html.erb
... ... @@ -45,7 +45,7 @@
45 45 </div>
46 46  
47 47 <% if logged_in? && (user == profile || user == comment.author || user.has_permission?(:moderate_comments, profile)) %>
48   - <% button_bar(:style => 'float: right; margin-top: 0px;') do %>
  48 + <%= button_bar(:style => 'float: right; margin-top: 0px;') do %>
49 49 <%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".article-comment", url_for(:profile => params[:profile], :action => :remove_comment, :comment_id => comment.id, :view => params[:view]), _('Are you sure you want to remove this comment and all its replies?')], :class => 'button icon-button icon-delete') %>
50 50 <% end %>
51 51 <% end %>
... ...
app/views/profile/_private_profile.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <div class='private-profile-message'><%= @message %></div>
6 6 <div class='private-profile-description'><%= profile.description %></div>
7 7  
8   -<% button_bar do %>
  8 +<%= button_bar do %>
9 9 <% if @action == :join && logged_in? %>
10 10 <%= join_community_button({:logged => true}) %>
11 11 <% end %>
... ...
app/views/profile/communities.html.erb
... ... @@ -14,7 +14,7 @@
14 14 </div>
15 15 <% end %>
16 16  
17   -<% button_bar do %>
  17 +<%= button_bar do %>
18 18 <%= button :back, _('Go back'), { :controller => 'profile' } %>
19 19 <%= button :add, _('Create a new community'),
20 20 :controller => 'memberships', :action => 'new_community' if logged_in? && user == profile %>
... ...
app/views/profile/enterprises.html.erb
... ... @@ -8,7 +8,7 @@
8 8 <% end %>
9 9 </ul>
10 10  
11   -<% button_bar do %>
  11 +<%= button_bar do %>
12 12 <%= button :back, _('Go back'), { :controller => 'profile' } %>
13 13 <%= button :add, _('Register a new enterprise'), :controller => 'enterprise_registration' if logged_in? && environment.enabled?('enterprise_registration') %>
14 14 <% end %>
... ...
app/views/profile/fans.html.erb
... ... @@ -8,7 +8,7 @@
8 8 <% end %>
9 9 </ul>
10 10  
11   -<% button_bar do %>
  11 +<%= button_bar do %>
12 12 <%= button :back, _('Go back'), { :controller => 'profile' }%>
13 13 <% end %>
14 14  
... ...
app/views/profile/favorite_enterprises.html.erb
... ... @@ -8,7 +8,7 @@
8 8 <% end %>
9 9 </ul>
10 10  
11   -<% button_bar do %>
  11 +<%= button_bar do %>
12 12 <%= button :back, _('Go back'), { :controller => 'profile' }%>
13 13 <% end %>
14 14  
... ...
app/views/profile/friends.html.erb
... ... @@ -14,7 +14,7 @@
14 14 </div>
15 15 <% end %>
16 16  
17   -<% button_bar do %>
  17 +<%= button_bar do %>
18 18 <%= button :back, _('Go back'), { :controller => 'profile' } %>
19 19 <% if user == profile %>
20 20 <%= button :edit, _('Manage my friends'), :controller => 'friends', :action => 'index', :profile => profile.identifier %>
... ...
app/views/profile/members.html.erb
... ... @@ -36,7 +36,7 @@
36 36 </div><!-- end of class="profile-members-tabs-container" -->
37 37 <% end %>
38 38  
39   -<% button_bar do %>
  39 +<%= button_bar do %>
40 40 <%= button :back, _('Go back'), { :controller => 'profile' } %>
41 41 <% if profile.community? and user %>
42 42 <% if user.has_permission?(:invite_members, profile) %>
... ...
app/views/profile_editor/destroy_profile.html.erb
... ... @@ -3,7 +3,7 @@
3 3 <p><%= _('Are you sure you want to delete this profile?') %></p>
4 4 <p><%= _('You must be aware that all content of this profile (articles, events, files and pictures) will also be deleted.') %></p>
5 5  
6   -<% button_bar do %>
  6 +<%= button_bar do %>
7 7 <%= button(:remove, _('Yes, I am sure'), {:action => 'destroy_profile'}, :method => :post) %>
8 8 <%= button(:cancel, _('No, I gave up'), profile.url) %>
9 9 <% end %>
... ...
app/views/profile_editor/edit.html.erb
... ... @@ -67,13 +67,13 @@
67 67  
68 68 <%= select_categories(:profile_data, _('Select the categories of your interest'), 2) %>
69 69  
70   - <% button_bar do %>
  70 + <%= button_bar do %>
71 71 <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
72 72 <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
73 73 <% end %>
74 74  
75 75 <% if user && user.has_permission?('destroy_profile', profile) %>
76   - <% button_bar(:id => 'delete-profile') do %>
  76 + <%= button_bar(:id => 'delete-profile') do %>
77 77  
78 78 <% if !environment.enabled?('forbid_destroy_profile') || user.is_admin?(environment) %>
79 79 <%= button(:remove, _('Delete profile'), {:action => :destroy_profile}) %>
... ...
app/views/profile_editor/header_footer.html.erb
... ... @@ -24,7 +24,7 @@
24 24 <%= text_area_tag(:custom_header, @header, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %>
25 25 <h2><%= _('Content for footer') %></h2>
26 26 <%= text_area_tag(:custom_footer, @footer, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %>
27   - <% button_bar do %>
  27 + <%= button_bar do %>
28 28 <%= submit_button(:save, _('Save')) %>
29 29 <%= button(:cancel, _('Cancel'), :action => 'index') %>
30 30 <% end %>
... ...
app/views/profile_editor/welcome_page.html.erb
... ... @@ -13,7 +13,7 @@
13 13 <%= _('This page will be displayed to the user after his signup with this template.') %>
14 14 </div>
15 15  
16   - <% button_bar do%>
  16 + <%= button_bar do%>
17 17 <%= submit_button('save', _('Save'), :cancel => @back_to) %>
18 18 <% end %>
19 19 <% end %>
... ...
app/views/profile_members/_index_buttons.html.erb
1   -<% button_bar do %>
  1 +<%= button_bar do %>
2 2 <%= button :back, _('Back'), :controller => 'profile_editor' %>
3 3 <%= button :add, _('Add members'), :action => 'add_members' if profile.enterprise? %>
4 4 <% if profile.community? and user.has_permission?(:invite_members, profile) %>
... ...
app/views/profile_members/_manage_roles.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <%= hidden_field_tag(:last_admin, true) if from == 'last_admin'%>
6 6 <% end %>
7 7  
8   - <% button_bar(:style => 'margin-top: 30px;') do %>
  8 + <%= button_bar(:style => 'margin-top: 30px;') do %>
9 9 <%= submit_button('save', _('Save'))%>
10 10 <%= button('cancel', _('Cancel'), {:controller => 'profile_editor'})%>
11 11 <% end %>
... ...
app/views/profile_members/affiliate.html.erb
... ... @@ -3,7 +3,7 @@
3 3 <%= form_tag( {:action => 'give_role'}, {:method => :post}) do %>
4 4 <%= select_tag 'role', options_for_select(@roles.map{|r|[r.name,r.id]}) %>
5 5 <%= hidden_field_tag 'person', current_user.person.id %>
6   - <% button_bar do %>
  6 + <%= button_bar do %>
7 7 <%= submit_button('affiliate', _('Affiliate'), :cancel => {:action => 'index'}) %>
8 8 <% end %>
9 9 <% end %>
... ...
app/views/profile_members/change_role.html.erb
... ... @@ -24,7 +24,7 @@
24 24 <% end %>
25 25 <%= hidden_field_tag 'person', @member.id %>
26 26  
27   - <% button_bar do %>
  27 + <%= button_bar do %>
28 28 <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %>
29 29 <% end %>
30 30 <% end %>
... ...
app/views/profile_roles/_form.html.erb
... ... @@ -16,7 +16,7 @@
16 16 </div>
17 17 <% end %>
18 18  
19   - <% button_bar do %>
  19 + <%= button_bar do %>
20 20 <%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %>
21 21 <% end %>
22 22 <% end %>
... ...
app/views/profile_roles/assign.html.erb
... ... @@ -17,7 +17,7 @@
17 17 <%=token_input_field_tag(:person_id, 'search-profile-members', {:action => 'assign_role_by_members'},
18 18 {:focus => false, :hint_text => _('Select members to assign the role')}) %>
19 19  
20   - <% button_bar do %>
  20 + <%= button_bar do %>
21 21 <%= submit_button(:forward, _("Confirm")) %>
22 22 <% end %>
23 23 </div>
... ... @@ -28,7 +28,7 @@
28 28 <% @roles_list.each do |role| %>
29 29 <%= labelled_radio_button role.name , :selected_role, role.id , false, :class => "selected_role" %> <br>
30 30 <% end %>
31   - <% button_bar do %>
  31 + <%= button_bar do %>
32 32 <%= submit_button('save',_('Confirm'), :cancel => {:action => 'index'} ) %>
33 33 <% end %>
34 34 </div>
... ...
app/views/profile_roles/destroy.html.erb
... ... @@ -4,7 +4,7 @@
4 4 <p><%= _('This role is not being currently used.')%></p>
5 5 <p><%= _('Are you sure you want to delete this role?') %></p>
6 6  
7   - <% button_bar do %>
  7 + <%= button_bar do %>
8 8 <%= button(:remove, _('Yes, I am sure'), {:action => 'remove', :id => @role.id}, :method => :post) %>
9 9 <%= button(:cancel, _('No, I gave up'), {:action => 'index'}) %>
10 10 <% end %>
... ... @@ -16,7 +16,7 @@
16 16 <%= check_box_tag("roles[]", role.id, false ,{:id => role.key}) %>
17 17 <%= content_tag(:label, role.name, { :for => role.key }) %><br/>
18 18 <% end %>
19   - <% button_bar do %>
  19 + <%= button_bar do %>
20 20 <%= submit_button('save',_('Delete role'), :cancel => {:action => 'index'} ) %>
21 21 <% end %>
22 22 <% end %>
... ...
app/views/profile_roles/index.html.erb
... ... @@ -21,7 +21,7 @@
21 21 <% end %>
22 22 </table>
23 23  
24   -<% button_bar do %>
  24 +<%= button_bar do %>
25 25 <%= button :add, _('Create a new role'), :action => 'new' %>
26 26 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
27 27 <% end %>
... ...
app/views/profile_roles/show.html.erb
... ... @@ -3,11 +3,11 @@
3 3 <h3> <%= _('Permissions') %> </h3>
4 4 <ul>
5 5 <% @role.permissions.each do |p| %>
6   - <li> <%= permission_name(p) %> </li>
  6 + <li> <%= permission_name(p) %> </li>
7 7 <% end %>
8 8 </ul>
9 9  
10   -<% button_bar do %>
  10 +<%= button_bar do %>
11 11 <%= button :edit, _('Edit'), :action => 'edit', :id => @role %>
12 12 <%= button :back, _('Back to roles management'), :action => 'index' %>
13 13 <% end %>
... ...
app/views/profile_themes/add_css.html.erb
... ... @@ -3,7 +3,7 @@
3 3 <%= form_tag do %>
4 4 <%= labelled_form_field(_('File name'), text_field_tag('css')) %>
5 5  
6   - <% button_bar do %>
  6 + <%= button_bar do %>
7 7 <%= submit_button(:add, _('Add')) %>
8 8 <%= modal_close_button _('Cancel') %>
9 9 <% end %>
... ...
app/views/profile_themes/add_image.html.erb
1 1 <%= form_tag({:action => 'add_image', :id => @theme.id}, :multipart => true) do %>
2 2 <%= labelled_form_field(_('Choose the image file'), file_field_tag(:image)) %>
3   - <% button_bar do %>
  3 + <%= button_bar do %>
4 4 <%= submit_button(:add, _('Add image')) %>
5 5 <% end %>
6 6 <% end %>
... ...
app/views/profile_themes/css_editor.html.erb
... ... @@ -3,7 +3,7 @@
3 3 <%= form_tag({:action => 'update_css', :id => @theme.id }, :name => 'csscode_form') do %>
4 4 <%= hidden_field_tag('css', @css) %>
5 5 <%= text_area_tag('csscode', @code, :id => "codepressWindow", :class => 'codepress css') %>
6   - <% button_bar do %>
  6 + <%= button_bar do %>
7 7 <%= submit_button(:save, _('Save')) %>
8 8 <% end %>
9 9 <% end %>
... ...
app/views/profile_themes/edit.html.erb
... ... @@ -15,7 +15,7 @@
15 15 <li><%= link_to_remote(css, :url => { :action => 'css_editor', :id => @theme.id, :css => css }, :update => { :success => 'css-code' }) %></li>
16 16 <% end %>
17 17 </ul>
18   - <% button_bar do %>
  18 + <%= button_bar do %>
19 19 <%= modal_button :add, _('New CSS'), :action => 'add_css', :id => @theme.id %>
20 20 <% end %>
21 21 </div>
... ... @@ -27,7 +27,7 @@
27 27 <li><%= image_tag("/user_themes/#{@theme.id}/images/#{image}") %></li>
28 28 <% end %>
29 29 </ul>
30   - <% button_bar do %>
  30 + <%= button_bar do %>
31 31 <%= modal_button :add, _('Add image'), :action => 'add_image', :id => @theme.id %>
32 32 <% end %>
33 33 </div>
... ...
app/views/profile_themes/index.html.erb
... ... @@ -40,7 +40,7 @@
40 40  
41 41 <br style="clear:both" />
42 42  
43   -<% button_bar do %>
  43 +<%= button_bar do %>
44 44 <% if environment.enabled?('user_themes') %>
45 45 <%= modal_button :add, _('New theme ...'), :action => 'new' %>
46 46 <% end %>
... ...
app/views/profile_themes/new.html.erb
... ... @@ -4,7 +4,7 @@
4 4  
5 5 <%= labelled_form_field(_('Name of the new theme:'), text_field_tag(:name)) %>
6 6  
7   - <% button_bar do %>
  7 + <%= button_bar do %>
8 8 <%= submit_button(:save, _('Create')) %>
9 9 <% end %>
10 10 <% end %>
... ...
app/views/region_validators/_search.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <%= item.name %>
6 6 <%= form_tag :action => 'add', :id => @region do %>
7 7 <%= hidden_field_tag :validator_id, item.id %>
8   - <% button_bar do %>
  8 + <%= button_bar do %>
9 9 <%= submit_button('add', _('Add')) %>
10 10 <% end %>
11 11 <% end %>
... ...
app/views/region_validators/region.html.erb
... ... @@ -19,7 +19,7 @@
19 19  
20 20 <%= form_tag({}, { :method => 'get' }) do %>
21 21 <%= text_field_tag :search, nil, :id => 'search_validator' %>
22   - <% button_bar do %>
  22 + <%= button_bar do %>
23 23 <%= submit_button('search', _('Search')) %>
24 24 <% end %>
25 25 <% end %>
... ...
app/views/role/_form.html.erb
... ... @@ -16,7 +16,7 @@
16 16 </div>
17 17 <% end %>
18 18  
19   - <% button_bar do %>
  19 + <%= button_bar do %>
20 20 <%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %>
21 21 <% end %>
22 22 <% end %>
... ...
app/views/role/index.html.erb
... ... @@ -17,7 +17,7 @@
17 17 <% end %>
18 18 </table>
19 19  
20   -<% button_bar do %>
  20 +<%= button_bar do %>
21 21 <%= button :add, _('Create a new role'), :action => 'new' %>
22 22 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
23 23 <% end %>
... ...
app/views/role/show.html.erb
... ... @@ -3,11 +3,11 @@
3 3 <h3> <%= _('Permissions') %> </h3>
4 4 <ul>
5 5 <% @role.permissions.each do |p| %>
6   - <li> <%= permission_name(p) %> </li>
  6 + <li> <%= permission_name(p) %> </li>
7 7 <% end %>
8 8 </ul>
9 9  
10   -<% button_bar do %>
  10 +<%= button_bar do %>
11 11 <%= button :edit, _('Edit'), :action => 'edit', :id => @role %>
12 12 <%= button :back, _('Back to roles management'), :action => 'index' %>
13 13 <% end %>
... ...
app/views/search/tag.html.erb
... ... @@ -2,7 +2,7 @@
2 2 <%= _('Tagged with "%s"').html_safe % content_tag('code', @tag) %>
3 3 </h2>
4 4  
5   -<% button_bar do %>
  5 +<%= button_bar do %>
6 6 <%= button('back', _('Back to tag cloud'), :action => 'tags') %>
7 7 <% end %>
8 8  
... ...
app/views/shared/_list_groups.html.erb
... ... @@ -11,7 +11,7 @@
11 11 <%= raw _('Description: %s') % group.description + '<br/>' if group.community? %>
12 12 <%= _('Members: %s') % group.members_count.to_s %> <br/>
13 13 <%= _('Created at: %s') % show_date(group.created_at) unless group.enterprise? %> <br/>
14   - <% button_bar do %>
  14 + <%= button_bar do %>
15 15 <% if user.has_permission?(:edit_profile, group) %>
16 16 <%= button 'menu-ctrl-panel', _('Control panel of this group'), group.admin_url %>
17 17 <% end %>
... ...
app/views/shared/access_denied.html.erb
... ... @@ -9,7 +9,7 @@
9 9 <p><%= _("If you are supposed to have access to this area, you'll probably want to talk to the people responsible and ask them to give you access.") %></p>
10 10 <% end %>
11 11  
12   - <% button_bar do %>
  12 + <%= button_bar do %>
13 13 <%= button :back, _('Go back'), :back %>
14 14 <%= button :home, _('Go to the site home page'), :controller => 'home' %>
15 15 <% end %>
... ...
app/views/shared/not_found.html.erb
... ... @@ -4,7 +4,7 @@
4 4 <%= _('You may have clicked an expired link or mistyped the address.') %>
5 5 <%= _('If you clicked a link that was in another site, or was given to you by someone else, it would be nice if you tell them that their link is not valid anymore.') %>
6 6 </p>
7   - <% button_bar do %>
  7 + <%= button_bar do %>
8 8 <%= button :back, _('Go back'), :back %>
9 9 <%= button :home, _('Go to the home page'), '/' %>
10 10 <% end %>
... ...
app/views/shared/theme_test_panel.html.erb
... ... @@ -5,7 +5,7 @@
5 5  
6 6 <p><small><em><%= _('You can move this window away to have a better visualization of specific parts of screen.') %></em></small></p>
7 7  
8   - <% button_bar do %>
  8 + <%= button_bar do %>
9 9 <%= button(:ok, _('Finished testing'), :controller => 'profile_themes', :profile => theme_owner, :action => 'stop_test', :id => current_theme) %>
10 10 <%= button(:edit, _('Edit theme'), :controller => 'profile_themes', :profile => theme_owner, :action => 'edit', :id => current_theme) %>
11 11 <% end %>
... ...
app/views/spam/_task.html.erb
... ... @@ -7,7 +7,7 @@
7 7  
8 8 <%= yield %> <%# ??? %>
9 9  
10   - <% button_bar do %>
  10 + <%= button_bar do %>
11 11 <%= button_to_function('new', _('Mark as NOT SPAM'), 'removeTaskBox(this, %s, "%s", "")' % [url_for(:mark_task_as_ham => task.id).to_json, "task-#{task.id}"]) %>
12 12 <%= yield :extra_buttons %>
13 13 <%= button_to_function('delete', _('Remove'), 'removeTaskBox(this, %s, "%s", %s)' % [url_for(:profile => params[:profile], :remove_task => task.id).to_json, "task-#{task.id}", _('Are you sure you want to remove this article suggestion?').to_json]) %>
... ...
app/views/spam/index.html.erb
... ... @@ -6,7 +6,7 @@
6 6  
7 7 <%= _('There are no spams to review.') if no_tabs %>
8 8  
9   -<% button_bar do %>
  9 +<%= button_bar do %>
10 10 <%= button :back, _('Back to control panel'), :controller => :profile_editor %>
11 11 <% end %>
12 12  
... ... @@ -20,7 +20,7 @@
20 20 <%= render_tabs(tabs) %>
21 21  
22 22 <% unless no_tabs %>
23   - <% button_bar do %>
  23 + <%= button_bar do %>
24 24 <%= button :back, _('Back to control panel'), :controller => :profile_editor %>
25 25 <% end %>
26 26 <% end %>
... ...
app/views/tasks/index.html.erb
... ... @@ -41,7 +41,7 @@
41 41 </p>
42 42 <% else %>
43 43 <%= form_tag tasks_url(:action => 'close') do%>
44   - <% button_bar(:class => 'task-actions') do %>
  44 + <%= button_bar(:class => 'task-actions') do %>
45 45 <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
46 46 <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
47 47 <%= submit_button :save, _("Apply!") %>
... ... @@ -71,7 +71,7 @@
71 71  
72 72 <%= pagination_links(@tasks)%>
73 73  
74   - <% button_bar(:class => 'task-actions') do %>
  74 + <%= button_bar(:class => 'task-actions') do %>
75 75 <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
76 76 <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
77 77 <%= submit_button :save, _("Apply!") %>
... ...
app/views/tasks/list_requested.html.erb
... ... @@ -13,6 +13,6 @@
13 13 <% end %>
14 14 </ul>
15 15  
16   -<% button_bar do %>
  16 +<%= button_bar do %>
17 17 <%= button :back, _('Back'), :action => 'index' %>
18 18 <% end %>
... ...
app/views/tasks/new.html.erb
... ... @@ -11,7 +11,7 @@
11 11 <%= f.text_field :title, :style => 'width:80%;' %>
12 12 <%= f.text_area :message, :style => 'height:200px; width:80%;' %>
13 13  
14   - <% button_bar do %>
  14 + <%= button_bar do %>
15 15 <%= submit_button(:ok, _('Send'), :cancel => {:action => 'index'}) %>
16 16 <% end %>
17 17 <% end %>
... ...
app/views/tasks/processed.html.erb
... ... @@ -48,7 +48,7 @@
48 48 <% end %>
49 49 </p>
50 50  
51   -<% button_bar do %>
  51 +<%= button_bar do %>
52 52 <%= button(:back, _('Back'), :action => 'index') %>
53 53 <% end %>
54 54  
... ...
app/views/tasks/ticket_details.html.erb
... ... @@ -14,6 +14,6 @@
14 14 <p><%= _('Closing statement: %s') % @ticket.closing_statment %></p>
15 15 <% end %>
16 16  
17   -<% button_bar do %>
  17 +<%= button_bar do %>
18 18 <%= button :back, _('Back'), :action => 'index' %>
19 19 <% end %>
... ...
app/views/templates/_create_template_form.html.erb
... ... @@ -11,7 +11,7 @@
11 11 <%= form_tag do %>
12 12 <%= labelled_text_field(_('Name')+': ', :name)%>
13 13  
14   - <% button_bar do %>
  14 + <%= button_bar do %>
15 15 <%= submit_button('save', _('Save'))%>
16 16 <%= button('cancel', _('Cancel'), {:action => 'index'})%>
17 17 <% end %>
... ...
app/views/templates/index.html.erb
... ... @@ -40,6 +40,6 @@
40 40 </div>
41 41 <% end %>
42 42  
43   -<% button_bar do %>
  43 +<%= button_bar do %>
44 44 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
45 45 <% end %>
... ...
app/views/trusted_sites/edit.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <%= text_field_tag :site, @site %>
6 6 <%= hidden_field_tag :orig_site, @site %>
7 7  
8   - <% button_bar do %>
  8 + <%= button_bar do %>
9 9 <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'} ) %>
10 10 <% end %>
11 11 <% end %>
... ...
app/views/trusted_sites/index.html.erb
... ... @@ -22,7 +22,7 @@
22 22 <% end %>
23 23 </table>
24 24  
25   -<% button_bar do %>
  25 +<%= button_bar do %>
26 26 <%= button :add, _('Add a trusted site'), :action => 'new' %>
27 27 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
28 28 <% end %>
... ...
app/views/trusted_sites/new.html.erb
... ... @@ -4,7 +4,7 @@
4 4  
5 5 <%= text_field_tag :site, @site %>
6 6  
7   - <% button_bar do %>
  7 + <%= button_bar do %>
8 8 <%= submit_button('save', _('Add trusted site'), :cancel => {:action => 'index'} ) %>
9 9 <% end %>
10 10 <% end %>
... ...
app/views/users/_index_buttons.html.erb
1   -<% button_bar do %>
  1 +<%= button_bar do %>
2 2 <%= button :'text-plain', _('User list as [CSV]'), :action => 'download.csv' %>
3 3 <%= button :'text-html', _('User list as [XML]'), :action => 'download.xml' %>
4 4 <%= button :send, _('Send e-mail to users'), :action => 'send_mail' %>
... ...
plugins/admin_notifications/views/shared/_form.html.erb
... ... @@ -31,7 +31,7 @@
31 31 <%= labelled_check_box(_("Display popup until user close the notification"), 'notifications[display_popup]', '1', @notification.display_popup?) %>
32 32 </div>
33 33  
34   - <% button_bar do %>
  34 + <%= button_bar do %>
35 35 <%= submit_button 'save', _('Save'), :cancel => { :action => 'index' } %>
36 36 <% end %>
37 37  
... ...
plugins/anti_spam/views/anti_spam_plugin_admin/index.html.erb
... ... @@ -6,7 +6,7 @@
6 6  
7 7 <%= labelled_form_field _('API key'), f.text_field(:api_key, :size => 40) %>
8 8  
9   - <% button_bar do %>
  9 + <%= button_bar do %>
10 10 <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
11 11 <% end %>
12 12  
... ...
plugins/classify_members/views/classify_members_plugin_admin/index.html.erb
... ... @@ -15,7 +15,7 @@
15 15 <%=_('salvador-ba: Soteropolitano')%>
16 16 </fieldset>
17 17  
18   - <% button_bar do %>
  18 + <%= button_bar do %>
19 19 <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
20 20 <% end %>
21 21  
... ...
plugins/comment_classification/views/comment_classification_plugin_labels/_form.html.erb
... ... @@ -7,7 +7,7 @@
7 7 <%= labelled_form_field(_('Color'), f.select(:color, @colors.map{|s|[s.capitalize,s]})) %>
8 8 <%= labelled_form_field(f.check_box(:enabled) + _('Enable this label?'),'') %>
9 9  
10   - <% button_bar do %>
  10 + <%= button_bar do %>
11 11 <%= submit_button('save', c_('Save'), :cancel => {:action => 'index'} ) %>
12 12 <% end %>
13 13 <% end %>
... ...
plugins/comment_classification/views/comment_classification_plugin_labels/index.html.erb
... ... @@ -25,7 +25,7 @@
25 25 </table>
26 26 <% end %>
27 27  
28   - <% button_bar do %>
  28 + <%= button_bar do %>
29 29 <%= button(:add, _('Add a new label'), :action => 'create')%>
30 30 <%= button :back, c_('Back to admin panel'), :controller => 'admin_panel' %>
31 31 <% end %>
... ...
plugins/comment_classification/views/comment_classification_plugin_myprofile/_status_form.html.erb
... ... @@ -6,7 +6,7 @@
6 6 <%= labelled_form_field(_('Status'), f.select(:status_id, @statuses.map{|s|[s.name,s.id]})) %>
7 7 <%= labelled_form_field(_('Reason:'), f.text_area(:reason, :rows => 5)) %>
8 8  
9   - <% button_bar do %>
  9 + <%= button_bar do %>
10 10 <%= submit_button('save', c_('Save') ) %>
11 11 <% end %>
12 12 <% end %>
... ...
plugins/comment_classification/views/comment_classification_plugin_status/_form.html.erb
... ... @@ -7,7 +7,7 @@
7 7 <%= labelled_form_field(f.check_box(:enabled) + _('Enable this status?'),'') %>
8 8 <%#= labelled_form_field(f.check_box(:enable_reason) + _('This status allows reason?'),'') %>
9 9  
10   - <% button_bar do %>
  10 + <%= button_bar do %>
11 11 <%= submit_button('save', c_('Save'), :cancel => {:action => 'index'} ) %>
12 12 <% end %>
13 13 <% end %>
... ...
plugins/comment_classification/views/comment_classification_plugin_status/index.html.erb
... ... @@ -25,7 +25,7 @@
25 25 </table>
26 26 <% end %>
27 27  
28   - <% button_bar do %>
  28 + <%= button_bar do %>
29 29 <%= button(:add, _('Add a new status'), :action => 'create')%>
30 30 <%= button :back, c_('Back to admin panel'), :controller => 'admin_panel' %>
31 31 <% end %>
... ...
plugins/comment_paragraph/views/comment_paragraph_plugin_admin/index.html.erb
... ... @@ -17,7 +17,7 @@
17 17 </div>
18 18 </div>
19 19  
20   - <% button_bar do %>
  20 + <%= button_bar do %>
21 21 <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
22 22 <% end %>
23 23  
... ...
plugins/community_track/views/community_track_plugin_public/select_community.html.erb
... ... @@ -12,7 +12,7 @@
12 12 </div>
13 13 <% end %>
14 14  
15   -<% button_bar do %>
  15 +<%= button_bar do %>
16 16 <%= button(:add, c_('Create a new community'), :controller => 'memberships', :action => 'new_community', :profile => user.identifier, :back_to => @back_to) %>
17 17 <% end %>
18 18  
... ...
plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb
... ... @@ -55,7 +55,7 @@
55 55 <%= button(:add, _('Add a new select field'), '#', :onclick => "customFormsPlugin.addFields(this, 'fields', #{CGI::escapeHTML(html_for_field(f, :fields, CustomFormsPlugin::SelectField).to_json)}); return false")%>
56 56 </div>
57 57  
58   -<% button_bar do %>
  58 +<%= button_bar do %>
59 59 <%= submit_button :save, c_('Save'), :cancel => {:action => 'index'}%>
60 60 <% end %>
61 61  
... ...
plugins/custom_forms/views/custom_forms_plugin_myprofile/pending.html.erb
... ... @@ -22,6 +22,6 @@
22 22 </table>
23 23 <% end %>
24 24  
25   -<% button_bar do %>
  25 +<%= button_bar do %>
26 26 <%= button :back, _('Back to forms'), :action => 'index' %>
27 27 <% end %>
... ...
plugins/custom_forms/views/custom_forms_plugin_myprofile/show_submission.html.erb
... ... @@ -44,7 +44,7 @@
44 44 <% end %>
45 45 </table>
46 46  
47   -<% button_bar do %>
  47 +<%= button_bar do %>
48 48 <%= button :back, _('Back to submissions'), :action => 'submissions', :id => @form.id %>
49 49 <% end %>
50 50  
... ...
plugins/custom_forms/views/custom_forms_plugin_myprofile/submissions.html.erb
... ... @@ -27,7 +27,7 @@
27 27 </table>
28 28 <% end %>
29 29  
30   -<% button_bar do %>
  30 +<%= button_bar do %>
31 31 <%= button :back, _('Back to forms'), :action => 'index' %>
32 32 <% end %>
33 33  
... ...
plugins/custom_forms/views/custom_forms_plugin_profile/show.html.erb
... ... @@ -22,7 +22,7 @@
22 22  
23 23 <%= render :partial => 'shared/form_submission', :locals => {:f => f} %>
24 24  
25   - <% button_bar do %>
  25 + <%= button_bar do %>
26 26 <% if @form.expired? %>
27 27 <%= submit_button :save, c_('Save'), :disabled => '', :class => 'disabled', :cancel => {:controller => :profile, :profile => profile.identifier} %>
28 28 <% else %>
... ...
plugins/ldap/views/ldap_plugin_admin/index.html.erb
... ... @@ -73,7 +73,7 @@
73 73 </table>
74 74  
75 75 <div>
76   - <% button_bar do %>
  76 + <%= button_bar do %>
77 77 <%= submit_button('save', c_('Save changes')) %>
78 78 <%= button :back, _('Back to plugins administration panel'), :controller => 'plugins' %>
79 79 <% end %>
... ...
plugins/mark_comment_as_read/test/unit/mark_comment_as_read_test.rb
1 1 require 'test_helper'
2 2  
3   -class MarkCommentAsReadPluginTest < ActiveSupport::TestCase
4   -
5   - include ActionView::Helpers::TagHelper
6   - include NoosferoTestHelper
  3 +class MarkCommentAsReadPluginTest < ActionView::TestCase
7 4  
8 5 def setup
9 6 @plugin = MarkCommentAsReadPlugin.new
... ...
plugins/newsletter/views/newsletter_plugin/unsubscribe.html.erb
... ... @@ -6,6 +6,6 @@
6 6  
7 7 <%= _('Send an email to %s requesting your unsubscription or click on the button below.') % link_to(environment.contact_email, "mailto:#{environment.contact_email}?subject=#{_('Cancel newsletter subscription')}") %>
8 8  
9   -<% button_bar do %>
  9 +<%= button_bar do %>
10 10 <%= button :ok, _('Confirm unsubscription'), {:action => 'confirm_unsubscription'}, :method => 'post' %>
11 11 <% end %>
... ...
plugins/newsletter/views/newsletter_plugin_admin/index.html.erb
... ... @@ -85,7 +85,7 @@
85 85 :id => 'newsletter-footer-field'
86 86 ))
87 87 %>
88   - <% button_bar do %>
  88 + <%= button_bar do %>
89 89 <%= submit_button :save, _('Save') %>
90 90 <%= submit_button :save, _('Save and visualize'), :name => "visualize", :cancel => {:controller => 'plugins'} %>
91 91 <% end %>
... ...
plugins/oauth_client/views/oauth_client_plugin_admin/edit.html.erb
... ... @@ -33,7 +33,7 @@
33 33 <% end %>
34 34 </div>
35 35  
36   - <% button_bar do %>
  36 + <%= button_bar do %>
37 37 <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %>
38 38 <% end %>
39 39 <% end %>
... ...
plugins/organization_ratings/views/organization_ratings_plugin_admin/index.html.erb
... ... @@ -45,7 +45,7 @@
45 45 </tr>
46 46 </table>
47 47 <div>
48   - <% button_bar do %>
  48 + <%= button_bar do %>
49 49 <%= submit_button('save', c_('Save changes')) %>
50 50 <%= button :back, _('Back'), :controller => 'plugins' %>
51 51 <% end %>
... ...
plugins/organization_ratings/views/shared/_rating_button.html.erb
1   -<% button_bar do %>
  1 +<%= button_bar do %>
2 2 <% if logged_in? %>
3 3 <%= button(:new,_("Rate %s ") % _(profile.class.name),
4 4 {:controller => "organization_ratings_plugin_profile",
... ...
plugins/piwik/views/piwik_plugin_admin/index.html.erb
... ... @@ -8,7 +8,7 @@
8 8  
9 9 <%= labelled_form_field _('Piwik site id'), f.text_field(:piwik_site_id) %>
10 10  
11   - <% button_bar do %>
  11 + <%= button_bar do %>
12 12 <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
13 13 <% end %>
14 14  
... ...
plugins/products/test/unit/products_plugin/enterprise_homepage_helper_test.rb
1 1 require_relative '../../test_helper'
2 2  
3   -class EnterpriseHomepageHelperTest < ActiveSupport::TestCase
  3 +class EnterpriseHomepageHelperTest < ActionView::TestCase
4 4  
5 5 include ProductsPlugin::EnterpriseHomepageHelper
6 6  
... ... @@ -57,7 +57,4 @@ class EnterpriseHomepageHelperTest &lt; ActiveSupport::TestCase
57 57 assert_no_match /100.34/, result
58 58 end
59 59  
60   - protected
61   - include NoosferoTestHelper
62   -
63 60 end
... ...
plugins/products/views/products_plugin/page/_display_input.html.erb
1 1 <div class='input-informations input-form-closed'>
2 2 <div class='input-name'> <%= input.name %> <%= input_icon(input) %> </div>
3 3 <div class='input-details'>
4   - <% button_bar do %>
  4 + <%= button_bar do %>
5 5 <% if input.has_price_details? %>
6 6 <%= edit_button(:edit, _('Edit'), {:action => 'edit_input', :id => input}, :class => 'edit-input', :id => "edit-input-#{input.id}") %>
7 7 <% end %>
... ...
plugins/products/views/products_plugin/page/_edit_description.html.erb
... ... @@ -6,7 +6,7 @@
6 6 html: {id: 'product-description-form', method: 'post'}) do |f| %>
7 7  
8 8 <%= labelled_form_field(_('Description:'), f.text_area(:description, rows: 15, style: 'width: 90%;', class: 'mceEditor')) %>
9   - <% button_bar do %>
  9 + <%= button_bar do %>
10 10 <%= submit_button :save, _('Save') %>
11 11 <%= cancel_edit_product_link(@product, 'description') %>
12 12 <% end %>
... ...
plugins/products/views/products_plugin/page/_edit_info.html.erb
... ... @@ -54,7 +54,7 @@
54 54  
55 55 <%= hidden_field_tag 'info-bar-update-url', @product.price_composition_bar_display_url, class: 'bar-update-url' %>
56 56  
57   - <% button_bar do %>
  57 + <%= button_bar do %>
58 58 <%= submit_button :save, _('Save') %>
59 59 <%= cancel_edit_product_link(@product, 'info') %>
60 60 <% end %>
... ...
plugins/products/views/products_plugin/page/_edit_name.html.erb
... ... @@ -6,7 +6,7 @@
6 6 <%= f.text_field(:name, value: @product.name, class: 'name_edition') %>
7 7 <%= select_unit(@product) %>
8 8  
9   - <% button_bar do %>
  9 + <%= button_bar do %>
10 10 <%= submit_button :save, _('Save') %>
11 11 <%= cancel_edit_product_link(@product, 'name') %>
12 12 <% end %>
... ...
plugins/products/views/products_plugin/page/_form.html.erb
... ... @@ -11,7 +11,7 @@
11 11 <%= file_field_or_thumbnail(_('Image:'), @product.image, i) %>
12 12 <% end %>
13 13  
14   - <% button_bar do %>
  14 + <%= button_bar do %>
15 15 <%= submit_button('save', (mode == 'new' ? _('Create product') : _('Save changes')), :cancel => {:action => 'index'} ) %>
16 16 <% end %>
17 17 <% end %>
... ...
plugins/products/views/products_plugin/page/_manage_product_details.html.erb
... ... @@ -21,7 +21,7 @@
21 21 <%= hidden_field(:product, :inputs_cost) %>
22 22 <%= hidden_field(:product, :price) %>
23 23  
24   - <% button_bar do %>
  24 + <%= button_bar do %>
25 25 <%= submit_button :save, _('Save'), :disabled => '', :class => 'disabled' %>
26 26 <%= button :cancel, _('Cancel'), '#', class: 'cancel-price-details', data: {confirm: _('If you leave, you will lose all unsaved information. Are you sure you want to quit?')} %>
27 27 <%= button(:add, _('New cost'), '#', :id => 'add-new-cost') %>
... ...
plugins/products/views/products_plugin/page/index.html.erb
... ... @@ -24,7 +24,7 @@
24 24  
25 25 <%= pagination_links @products %>
26 26  
27   -<% button_bar do %>
  27 +<%= button_bar do %>
28 28 <%= button :add, _('New product or service'), :action => 'new' if @profile.create_product? %>
29 29 <%= button :back, _('Back'), { :controller => 'profile_editor', :profile => @profile.identifier, :action => 'index' } %>
30 30 <% end %>
... ...
plugins/products/views/products_plugin/page/show.html.erb
... ... @@ -68,7 +68,7 @@
68 68  
69 69 </div>
70 70  
71   -<% button_bar do %>
  71 +<%= button_bar do %>
72 72 <%= button :back, _('Back to the product listing'), controller: 'products_plugin/catalog', action: 'index' %>
73 73 <%= button :delete, _('Remove product or service'), {action: 'destroy', id: @product}, class: 'requires-permission-manage_products', style: 'display:none;' %>
74 74 <% end %>
... ...
plugins/push_notification/views/push_notification_plugin_admin/index.html.erb
... ... @@ -7,7 +7,7 @@
7 7 <h3><%= t('push_notification_plugin.lib.plugin.enabled_notifications')%></h3>
8 8 <%= render partial: "notification_events_form", locals:{f: f, settings: @settings} %>
9 9  
10   - <% button_bar do %>
  10 + <%= button_bar do %>
11 11 <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins'}) %>
12 12 <% end %>
13 13  
... ...
plugins/push_notification/views/push_notification_plugin_myprofile/index.html.erb
... ... @@ -18,7 +18,7 @@
18 18 <%= form_for(:settings, :url => {:controller => "push_notification_plugin_myprofile", :action => "update_settings"}) do |f| %>
19 19 <h1><%= t('push_notification_plugin.lib.plugin.enabled_notifications') %></h1>
20 20 <%= render partial: "notification_events_form", locals: {f: f, settings: @settings} %>
21   - <% button_bar do %>
  21 + <%= button_bar do %>
22 22 <%= submit_button(:save, _('Save')) %>
23 23 <%= button(:back, _('Back to control panel'), :controller => (profile.nil? ? 'admin_panel': 'profile_editor')) %>
24 24 <% end %>
... ...
plugins/require_auth_to_comment/views/require_auth_to_comment_plugin_admin/index.html.erb
... ... @@ -13,7 +13,7 @@
13 13 </strong>
14 14 </div>
15 15  
16   - <% button_bar do %>
  16 + <%= button_bar do %>
17 17 <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
18 18 <% end %>
19 19  
... ...
plugins/responsive/views/invite/select_friends.html.erb
... ... @@ -39,7 +39,7 @@
39 39 <%= labelled_form_field(_('Invitation text:'), text_area_tag(:mail_template, @mail_template, :cols => 72, :rows => 8)) %>
40 40 </div>
41 41  
42   - <% button_bar do %>
  42 + <%= button_bar do %>
43 43 <%= submit_button(:ok, _("Invite my friends!")) %>
44 44 <% end %>
45 45 <% end %>
... ...
plugins/responsive/views/manage_products/_edit_name.html.erb
... ... @@ -12,7 +12,7 @@
12 12 </div>
13 13 </div>
14 14  
15   - <% button_bar do %>
  15 + <%= button_bar do %>
16 16 <%= submit_button :save, _('Save') %>
17 17 <%= cancel_edit_product_link(@product, 'name') %>
18 18 <% end %>
... ...
plugins/send_email/views/send_email_plugin_admin/index.html.erb
... ... @@ -3,7 +3,7 @@
3 3 <%= form_for :environment, :url => {:action => 'index'}, :html => {:method => 'post'} do |f| %>
4 4 <%= labelled_form_field(_("E-Mail addresses you want to allow to send"), f.text_area(:send_email_plugin_allow_to, :rows => 8)) %>
5 5 <small><%= _('(list of email addresses separated by comma)') %></small>
6   - <% button_bar do %>
  6 + <%= button_bar do %>
7 7 <%= submit_button 'save', c_('Save'), :cancel => {:controller => 'plugins'} %>
8 8 <% end %>
9 9 <% end %>
... ...
plugins/site_tour/views/site_tour_plugin_admin/index.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <%= labelled_form_field _('Tooltips (CSV format: language, group name, selector, description)'), f.text_area(:actions_csv, :style => 'width: 100%', :class => 'actions-csv') %>
6 6 <%= labelled_form_field _('Group Triggers (CSV format: group name, selector, event (e.g. mouseenter, click))'), f.text_area(:group_triggers_csv, :style => 'width: 100%', :class => 'groups-csv', :rows => 7) %>
7 7  
8   - <% button_bar do %>
  8 + <%= button_bar do %>
9 9 <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
10 10 <% end %>
11 11  
... ...
plugins/sniffer/views/sniffer_plugin_myprofile/edit.html.erb
... ... @@ -16,7 +16,7 @@
16 16  
17 17 </div>
18 18  
19   - <% button_bar do %>
  19 + <%= button_bar do %>
20 20 <%= submit_button(:save, _('Save')) %>
21 21 <%= button :back, _('Back to control panel'), controller: 'profile_editor' %>
22 22 <% end %>
... ...
plugins/social_share_privacy/test/unit/social_share_privacy_test.rb
1 1 require 'test_helper'
2 2  
3   -class SocialSharePrivacyPluginTest < ActiveSupport::TestCase
  3 +class SocialSharePrivacyPluginTest < ActionView::TestCase
4 4  
5 5 include NoosferoTestHelper
6 6  
... ...
plugins/social_share_privacy/views/social_share_privacy_plugin_admin/index.html.erb
... ... @@ -38,7 +38,7 @@
38 38 <%= _('The same order in which you arrange the social networks here will be used for arranging the share buttons.') %>
39 39 </p>
40 40  
41   - <% button_bar do %>
  41 + <%= button_bar do %>
42 42 <%= submit_button 'save', _('Save'), :cancel => {:controller => 'plugins', :action => 'index'} %>
43 43 <% end %>
44 44 <% end %>
... ...
plugins/spaminator/views/spaminator_plugin_admin/index.html.erb
... ... @@ -30,7 +30,7 @@
30 30 <%= button(:cancel, _('Withhold'), {:action => 'withhold'}, :title => _('Cancel next scheduled scans')) if @settings.deployed %>
31 31 <% end %>
32 32  
33   - <% button_bar do %>
  33 + <%= button_bar do %>
34 34 <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
35 35 <% end %>
36 36 </div>
... ...
plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb
... ... @@ -29,6 +29,6 @@
29 29  
30 30 <br style='clear: both'/>
31 31  
32   -<% button_bar do %>
  32 +<%= button_bar do %>
33 33 <%= button(:back, c_('Back'), :action => 'index') %>
34 34 <% end %>
... ...
plugins/sub_organizations/views/sub_organizations_plugin_myprofile/index.html.erb
... ... @@ -10,7 +10,7 @@
10 10 <% end %>
11 11  
12 12 <%= form_tag do %>
13   - <% button_bar do %>
  13 + <%= button_bar do %>
14 14 <%= button(:add, _('Create a new sub-community'), :controller => 'memberships', :action => 'new_community', :profile => user.identifier, :sub_organizations_plugin_parent_to_be => profile.id) %>
15 15 <%= button :add, _('Register a new sub-enterprise'), :controller => 'enterprise_registration', :sub_organizations_plugin_parent_to_be => profile.id if environment.enabled?('enterprise_registration') %>
16 16 <% end %>
... ... @@ -21,7 +21,7 @@
21 21 :hint_text => _('Type in a search term for a group'),
22 22 :pre_populate => @tokenized_children}) %>
23 23  
24   - <% button_bar do %>
  24 + <%= button_bar do %>
25 25 <%= submit_button('save', c_('Save'))%>
26 26 <%= button('cancel', c_('Cancel'), {:controller => 'profile_editor'})%>
27 27 <% end %>
... ...
plugins/sub_organizations/views/sub_organizations_plugin_profile/_full_related_organizations.html.erb
... ... @@ -51,7 +51,7 @@
51 51 <%= pagination_links(organizations, {:param_name => 'npage', :page_links => true}) %>
52 52 </div>
53 53  
54   - <% button_bar(:class => "related-organizations-button-bar") do %>
  54 + <%= button_bar(:class => "related-organizations-button-bar") do %>
55 55 <%= button :back, c_('Go back'), { :controller => 'profile' } %>
56 56 <%= button :add, _("Add a new %s") % organization_type, :controller => 'sub_organizations_plugin_myprofile', :action => 'index' if logged_in? && user.has_permission?(:edit_profile, profile) && !environment.enabled?("disable_asset_#{organization_type.pluralize}") %>
57 57  
... ...
plugins/sub_organizations/views/sub_organizations_plugin_profile/_related_organizations.html.erb
... ... @@ -9,7 +9,7 @@
9 9 <% if organizations.length == 0 %>
10 10 <li><%= _("There are no sub-%s yet.") % organization_type.pluralize %></li>
11 11 <% end %>
12   - <% button_bar(:class => "related-organizations-button-bar") do %>
  12 + <%= button_bar(:class => "related-organizations-button-bar") do %>
13 13 <%= button :back, c_('Go back'), { :controller => 'profile' } %>
14 14 <%= button :add, _("Add a new %s") % organization_type, :controller => 'sub_organizations_plugin_myprofile', :action => 'index' if logged_in? && user.has_permission?(:edit_profile, profile) && !environment.enabled?("disable_asset_#{organization_type.pluralize}") %>
15 15  
... ...
plugins/suppliers/views/suppliers_plugin/manage_products/_distribution_tab.html.slim
... ... @@ -10,5 +10,5 @@
10 10 = check_box_tag "consumers[#{consumer.id}]", '1', distributed_consumers.include?(consumer.profile)
11 11 = label_tag "consumers[#{consumer.id}]", consumer.name
12 12  
13   - - button_bar do
  13 + = button_bar do
14 14 = submit_button :save, _('Save')
... ...
plugins/tolerance_time/views/tolerance_time_plugin_myprofile/index.html.erb
... ... @@ -11,13 +11,13 @@
11 11 f.text_field(:content_tolerance, :size => 2, :style => 'font-size: 14px; text-align: right') +
12 12 select_tag(:content_tolerance_unit, options_for_select(time_units, @content_default_unit) )) %>
13 13 <% end %>
14   - <%= labelled_form_field(_('Comment edition tolerance time'),
15   - f.text_field(:comment_tolerance, :size => 2, :style => 'font-size: 14px; text-align: right') +
  14 + <%= labelled_form_field(_('Comment edition tolerance time'),
  15 + f.text_field(:comment_tolerance, :size => 2, :style => 'font-size: 14px; text-align: right') +
16 16 select_tag(:comment_tolerance_unit, options_for_select(time_units, @comment_default_unit) )) %>
17 17  
18 18 <%= content_tag( 'small', _('Empty means unlimited and zero means right away.') ) %>
19 19  
20   - <% button_bar do %>
  20 + <%= button_bar do %>
21 21 <%= submit_button('save', c_('Save'))%>
22 22 <%= button('back', c_('Back'), {:controller => 'profile_editor'})%>
23 23 <% end %>
... ...
plugins/vote/views/vote_plugin_admin/index.html.erb
... ... @@ -13,7 +13,7 @@
13 13 <%= labelled_form_field _('Limit of voters to display:'), f.text_field(:voters_limit, :size => 3) %>
14 14 </strong>
15 15  
16   - <% button_bar do %>
  16 + <%= button_bar do %>
17 17 <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
18 18 <% end %>
19 19  
... ...
plugins/work_assignment/views/work_assignment_plugin_myprofile/edit_visibility.html.erb
... ... @@ -12,7 +12,7 @@
12 12 <%= visibility_options(@article, @tokenized_children) %>
13 13 </div>
14 14  
15   - <% button_bar do %>
  15 + <%= button_bar do %>
16 16 <%= submit_button :save, _('Save') %>
17 17 <%= button :cancel, _('Cancel'), @back_to %>
18 18 <% end %>
... ...
test/support/noosfero_test_helper.rb
  1 +##
  2 +# DEPRECATED ActionView::TestCase already provide all needed
  3 +#
1 4 module NoosferoTestHelper
2 5  
3   - def link_to(content, url, options = {})
4   - "<a href='#{url.inspect}'>#{content}</a>"
5   - end
6   -
7   - def content_tag(tag, content, options = {})
8   - tag_attr = options.blank? ? '' : ' ' + options.collect{ |o| "#{o[0]}=\"#{o[1]}\"" }.join(' ')
9   - "<#{tag}#{tag_attr}>#{content}</#{tag}>"
10   - end
11 6  
12 7 def submit_tag(content, options = {})
13 8 content
... ... @@ -17,11 +12,6 @@ module NoosferoTestHelper
17 12 ''
18 13 end
19 14  
20   - def tag(tag, args = {})
21   - attrs = args.map{|k,v| "#{k}='#{v}'"}.join(' ')
22   - "<#{tag} #{attrs} />"
23   - end
24   -
25 15 def options_from_collection_for_select(collection, value_method, content_method)
26 16 "<option value='fake value'>fake content</option>"
27 17 end
... ...
test/unit/application_helper_test.rb
... ... @@ -682,29 +682,6 @@ class ApplicationHelperTest &lt; ActionView::TestCase
682 682 assert_nil default_folder_for_image_upload(profile)
683 683 end
684 684  
685   - should 'envelop a html with button-bar div' do
686   - result = button_bar { '<b>foo</b>' }
687   - assert_equal '<div class="button-bar"><b>foo</b>'+
688   - '<br style=\'clear: left;\' /></div>', result
689   - end
690   -
691   - should 'add more classes to button-bar envelope' do
692   - result = button_bar :class=>'test' do
693   - '<b>foo</b>'
694   - end
695   - assert_equal '<div class="test button-bar"><b>foo</b>'+
696   - '<br style=\'clear: left;\' /></div>', result
697   - end
698   -
699   - should 'add more attributes to button-bar envelope' do
700   - result = button_bar :id=>'bt1' do
701   - '<b>foo</b>'
702   - end
703   - assert_tag_in_string result, :tag =>'div', :attributes => {:class => 'button-bar', :id => 'bt1'}
704   - assert_tag_in_string result, :tag =>'b', :content => 'foo', :parent => {:tag => 'div', :attributes => {:id => 'bt1'}}
705   - assert_tag_in_string result, :tag =>'br', :parent => {:tag => 'div', :attributes => {:id => 'bt1'}}
706   - end
707   -
708 685 should 'not filter html if source does not have macros' do
709 686 class Plugin1 < Noosfero::Plugin
710 687 end
... ... @@ -871,7 +848,7 @@ class ApplicationHelperTest &lt; ActionView::TestCase
871 848 html = fullscreen_buttons("#article")
872 849 assert html.include?("<script>fullscreenPageLoad('#article')</script>")
873 850 assert html.include?("class=\"button with-text icon-fullscreen\"")
874   - assert html.include?("onClick=\"toggle_fullwidth('#article')\"")
  851 + assert html.include?("onClick=\"toggle_fullwidth(&#39;#article&#39;)\"")
875 852 end
876 853  
877 854 should "return the related class string" do
... ...
test/unit/buttons_helper_test.rb
1   -# encoding: UTF-8
2 1 require_relative "../test_helper"
3 2  
4 3 class ButtonsHelperTest < ActionView::TestCase
  4 +
5 5 include ButtonsHelper
6 6  
7 7 should 'append with-text class and keep existing classes' do
8 8 expects(:button_without_text).with('type', 'label', 'url', { :class => 'with-text class1'})
9 9 button('type', 'label', 'url', { :class => 'class1' })
10 10 end
11   -end
12 11 \ No newline at end of file
  12 +
  13 + should 'envelop a html with button-bar div' do
  14 + result = button_bar { content_tag :b, 'foo' }
  15 + assert_equal '<div class=" button-bar"><b>foo</b>'+
  16 + '<br style="clear: left;" /></div>', result
  17 + end
  18 +
  19 + should 'add more classes to button-bar envelope' do
  20 + result = button_bar :class=>'test' do
  21 + content_tag :b, 'foo'
  22 + end
  23 + assert_equal '<div class="test button-bar"><b>foo</b>'+
  24 + '<br style="clear: left;" /></div>', result
  25 + end
  26 +
  27 + should 'add more attributes to button-bar envelope' do
  28 + result = button_bar :id=>'bt1' do
  29 + content_tag :b, 'foo'
  30 + end
  31 + assert_tag_in_string result, :tag =>'div', :attributes => {:class => ' button-bar', :id => 'bt1'}
  32 + assert_tag_in_string result, :tag =>'b', :content => 'foo', :parent => {:tag => 'div', :attributes => {:id => 'bt1'}}
  33 + assert_tag_in_string result, :tag =>'br', :parent => {:tag => 'div', :attributes => {:id => 'bt1'}}
  34 + end
  35 +
  36 +end
... ...
test/unit/comment_helper_test.rb
1 1 require_relative "../test_helper"
2 2  
3   -class CommentHelperTest < ActiveSupport::TestCase
  3 +class CommentHelperTest < ActionView::TestCase
4 4  
5 5 include CommentHelper
6   - include ActionView::Helpers::TagHelper
7   - include NoosferoTestHelper
  6 +
  7 + helper ApplicationHelper
8 8  
9 9 def setup
10 10 @user = create_user('usertest').person
... ... @@ -12,6 +12,7 @@ class CommentHelperTest &lt; ActiveSupport::TestCase
12 12 self.stubs(:logged_in?).returns(true)
13 13 self.stubs(:report_abuse).returns('<a href="#">link</a>')
14 14 self.stubs(:expirable_comment_link).returns('<a href="#">link</a>')
  15 + self.stubs(:url_for)
15 16 @plugins = mock
16 17 @plugins.stubs(:dispatch).returns([])
17 18 end
... ... @@ -140,9 +141,5 @@ class CommentHelperTest &lt; ActiveSupport::TestCase
140 141 assert_match /plugin_action/, Nokogiri::HTML.fragment(html).css('.comments-action-bar').to_html
141 142 end
142 143  
143   - def link_to_function(content, url, options = {})
144   - link_to(content, url, options)
145   - end
146   -
147 144 end
148 145  
... ...
test/unit/content_viewer_helper_test.rb
... ... @@ -3,6 +3,8 @@ require_relative &quot;../test_helper&quot;
3 3 class ContentViewerHelperTest < ActionView::TestCase
4 4  
5 5 include ActionView::Helpers::TagHelper
  6 + include ActionView::Helpers::TextHelper
  7 +
6 8 include ContentViewerHelper
7 9 include DatesHelper
8 10 include ApplicationHelper
... ... @@ -148,11 +150,4 @@ class ContentViewerHelperTest &lt; ActionView::TestCase
148 150 assert_match /February 1, 2007/, result
149 151 end
150 152  
151   - protected
152   - include NoosferoTestHelper
153   - include ActionView::Helpers::TextHelper
154   - def url_for(args = {})
155   - ['http:/', args[:host], args[:profile], args[:page]].join('/')
156   - end
157   -
158 153 end
... ...
test/unit/events_helper_test.rb
1 1 require_relative "../test_helper"
2 2  
3   -class EventsHelperTest < ActiveSupport::TestCase
  3 +class EventsHelperTest < ActionView::TestCase
4 4  
5 5 include EventsHelper
6 6  
... ...
test/unit/forum_helper_test.rb
1 1 require_relative "../test_helper"
2 2  
3   -class ForumHelperTest < ActiveSupport::TestCase
  3 +class ForumHelperTest < ActionView::TestCase
4 4  
5 5 include BlogHelper
6 6 include ForumHelper
... ... @@ -58,7 +58,7 @@ class ForumHelperTest &lt; ActiveSupport::TestCase
58 58 assert_match result, out
59 59 assert_match 'a2', out
60 60  
61   - assert_match(/#{result} by <a href='[^']+'>a2<\/a>/, last_topic_update(some_post))
  61 + assert_match(/#{result} by <a href="[^"]+">a2<\/a>/, last_topic_update(some_post))
62 62 end
63 63  
64 64 should "return last comment author's name from unauthenticated user" do
... ...