<%= form_tag @page.url.merge(:terms_accepted => true) do %>
- <% button_bar do %>
+ <%= button_bar do %>
<% if user %>
<%= submit_button :save, _("Accept") %>
<% else %>
diff --git a/app/views/enterprise_registration/basic_information.html.erb b/app/views/enterprise_registration/basic_information.html.erb
index e00b036..ff8e897 100644
--- a/app/views/enterprise_registration/basic_information.html.erb
+++ b/app/views/enterprise_registration/basic_information.html.erb
@@ -8,7 +8,7 @@
<%= _('There are no validators to validate the registration of this new enterprise. Contact your administrator for instructions.') %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= button :back, _('Go back'), { :profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile" }%>
<% end %>
<% else %>
@@ -36,7 +36,7 @@
<%= template_options(:enterprises, 'create_enterprise')%>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('next', _('Next'), :cancel => {:profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile"}) %>
<% end %>
<% end %>
diff --git a/app/views/enterprise_registration/creation.html.erb b/app/views/enterprise_registration/creation.html.erb
index 1d191cf..b6d8f7b 100644
--- a/app/views/enterprise_registration/creation.html.erb
+++ b/app/views/enterprise_registration/creation.html.erb
@@ -4,7 +4,7 @@
<%= render :partial => 'shared/template_welcome_page', :locals => {:template => @enterprise.template, :header => _("What can I do with a %s?")} %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button :back, _('Back'), {:controller => 'memberships', :action => 'index', :profile => user.identifier} %>
<% end %>
diff --git a/app/views/enterprise_registration/select_validator.html.erb b/app/views/enterprise_registration/select_validator.html.erb
index bfbb448..f82a0c9 100644
--- a/app/views/enterprise_registration/select_validator.html.erb
+++ b/app/views/enterprise_registration/select_validator.html.erb
@@ -22,7 +22,7 @@
<% end %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button 'save', _('Confirm') %>
<% end %>
<% end %>
diff --git a/app/views/enterprise_validation/details.html.erb b/app/views/enterprise_validation/details.html.erb
index 803fb18..4a1cd17 100644
--- a/app/views/enterprise_validation/details.html.erb
+++ b/app/views/enterprise_validation/details.html.erb
@@ -15,7 +15,7 @@
<%= _('If this enterprise passes the criteria to be considered an solidarity enconomy enterprise, you can approve it by click the button below.') %>
<%= form_tag :action => 'approve', :id => @pending.code do %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('approve', _('Approve')) %>
<% end %>
<% end %>
@@ -27,7 +27,7 @@
<%= form_tag :action => 'reject', :id => @pending.code do %>
<%= labelled_form_field(_('Please provide an explanation for the rejection. This explanation will be sent to the requestor (required).'), text_area_tag('reject_explanation'))%>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('reject', _('Reject')) %>
<% end %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button(:edit, _('Edit validation info'), { :action => 'edit_validation_info' }) %>
<%= button(:back, _('Go Back'), { :controller => 'profile_editor' }) %>
<% end %>
diff --git a/app/views/environment_role_manager/affiliate.html.erb b/app/views/environment_role_manager/affiliate.html.erb
index 42fcd2a..ceb3ba3 100644
--- a/app/views/environment_role_manager/affiliate.html.erb
+++ b/app/views/environment_role_manager/affiliate.html.erb
@@ -3,7 +3,7 @@
<%= form_tag( {:action => 'give_role'}, {:method => :post}) do %>
<%= select_tag 'role', options_for_select(@roles.map{|r|[r.name,r.id]}) %>
<%= hidden_field_tag 'person', current_user.person.id %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('affiliate', _('Affiliate', :cancel => {:action => 'index'}) %>
<% end %>
<% end %>
diff --git a/app/views/environment_role_manager/change_role.html.erb b/app/views/environment_role_manager/change_role.html.erb
index a6c78c3..efbc88c 100644
--- a/app/views/environment_role_manager/change_role.html.erb
+++ b/app/views/environment_role_manager/change_role.html.erb
@@ -7,7 +7,7 @@
<% end %>
<%= hidden_field_tag 'person', @admin.id %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %>
<% end %>
<% end %>
diff --git a/app/views/environment_role_manager/make_admin.html.erb b/app/views/environment_role_manager/make_admin.html.erb
index c76b2cb..e87ecbd 100644
--- a/app/views/environment_role_manager/make_admin.html.erb
+++ b/app/views/environment_role_manager/make_admin.html.erb
@@ -9,7 +9,7 @@
<% @roles.each do |r| %>
<%= labelled_form_field(r.name, (check_box_tag "roles[]", r.id)) %>
<% end %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button( 'save', _('Make'), :cancel => {:action => 'index'} ) %>
<% end %>
<% end %>
diff --git a/app/views/environment_themes/index.html.erb b/app/views/environment_themes/index.html.erb
index 4d0a6e0..a7181d4 100644
--- a/app/views/environment_themes/index.html.erb
+++ b/app/views/environment_themes/index.html.erb
@@ -3,6 +3,6 @@
-<% button_bar do %>
+<%= button_bar do %>
<%= button(:back, _('Back'), :controller => 'admin_panel', :action => 'index') %>
<% end %>
diff --git a/app/views/favorite_enterprises/index.html.erb b/app/views/favorite_enterprises/index.html.erb
index 378dc47..5d9f11c 100644
--- a/app/views/favorite_enterprises/index.html.erb
+++ b/app/views/favorite_enterprises/index.html.erb
@@ -23,7 +23,7 @@
<% end %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button(:back, _('Go back'), :controller => 'profile_editor') %>
<% end %>
diff --git a/app/views/features/_manage_community_fields.html.erb b/app/views/features/_manage_community_fields.html.erb
index cd34387..833130e 100644
--- a/app/views/features/_manage_community_fields.html.erb
+++ b/app/views/features/_manage_community_fields.html.erb
@@ -55,7 +55,7 @@
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('save', _('Save changes'), :id=>"save_community_fields") %>
<%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
<% end %>
diff --git a/app/views/features/_manage_custom_fields.html.erb b/app/views/features/_manage_custom_fields.html.erb
index d035bda..4a8924a 100644
--- a/app/views/features/_manage_custom_fields.html.erb
+++ b/app/views/features/_manage_custom_fields.html.erb
@@ -22,7 +22,7 @@
-<% button_bar do %>
+<%= button_bar do %>
<%= button(:save, _('Save'), 'javascript: void()', :onClick => "submit_custom_field_form('##{format_values_id}', '##{form_id}');") %>
<% end %>
diff --git a/app/views/features/_manage_enterprise_fields.html.erb b/app/views/features/_manage_enterprise_fields.html.erb
index 53d086e..1502b57 100644
--- a/app/views/features/_manage_enterprise_fields.html.erb
+++ b/app/views/features/_manage_enterprise_fields.html.erb
@@ -55,7 +55,7 @@
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('save', _('Save changes'), :id=>"save_enterprise_fields") %>
<%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
<% end %>
diff --git a/app/views/features/_manage_person_fields.html.erb b/app/views/features/_manage_person_fields.html.erb
index 18a9e84..64e1071 100644
--- a/app/views/features/_manage_person_fields.html.erb
+++ b/app/views/features/_manage_person_fields.html.erb
@@ -55,7 +55,7 @@
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('save', _('Save changes'), :id=>"save_person_fields") %>
<%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
<% end %>
diff --git a/app/views/features/index.html.erb b/app/views/features/index.html.erb
index 8581e23..536004e 100644
--- a/app/views/features/index.html.erb
+++ b/app/views/features/index.html.erb
@@ -69,7 +69,7 @@ Check all the features you want to enable for your environment, uncheck all the
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('save', _('Save changes')) %>
<%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
<% end %>
diff --git a/app/views/friends/connections.html.erb b/app/views/friends/connections.html.erb
index faa6c5a..7f8e917 100644
--- a/app/views/friends/connections.html.erb
+++ b/app/views/friends/connections.html.erb
@@ -1,6 +1,6 @@
<%= _("Connections with %s") % @suggestion.suggestion.name %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button(:back, _('Go to friends list'), :controller => 'friends') %>
<% end %>
diff --git a/app/views/friends/index.html.erb b/app/views/friends/index.html.erb
index acd63a8..4af93c1 100644
--- a/app/views/friends/index.html.erb
+++ b/app/views/friends/index.html.erb
@@ -12,7 +12,7 @@
<% end %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
<%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %>
<% unless @plugins.dispatch(:remove_invite_friends_button).include?(true) %>
diff --git a/app/views/friends/suggest.html.erb b/app/views/friends/suggest.html.erb
index b663f68..ab08b9c 100644
--- a/app/views/friends/suggest.html.erb
+++ b/app/views/friends/suggest.html.erb
@@ -1,6 +1,6 @@
<%= _("Friends suggestions for %s") % profile.name %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button(:back, _('Go to friends list'), :controller => 'friends') %>
<% end %>
diff --git a/app/views/invite/_select_address_book.html.erb b/app/views/invite/_select_address_book.html.erb
index 285cc64..4715c11 100644
--- a/app/views/invite/_select_address_book.html.erb
+++ b/app/views/invite/_select_address_book.html.erb
@@ -34,7 +34,7 @@
<%= labelled_form_field(_("Password") + ":", password_field_tag(:password)) %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button(:forward, _("Next")) %>
<% end %>
<%= _("We won't store your password or contact anyone without your permission.") %>
diff --git a/app/views/invite/invite_friends.html.erb b/app/views/invite/invite_friends.html.erb
index 2b3f5d7..75d354e 100644
--- a/app/views/invite/invite_friends.html.erb
+++ b/app/views/invite/invite_friends.html.erb
@@ -24,7 +24,7 @@
{ :hint_text => _('Type in the person\'s %{search_fields}') % {:search_fields => @search_fields},
:focus => false }) %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('save', _('Invite'))%>
<%= button('cancel', _('Cancel'), profile.url)%>
<% end %>
diff --git a/app/views/invite/select_friends.html.erb b/app/views/invite/select_friends.html.erb
index 1a3f838..7b641d9 100644
--- a/app/views/invite/select_friends.html.erb
+++ b/app/views/invite/select_friends.html.erb
@@ -32,7 +32,7 @@
<%= render :partial => 'invite/personalize_invitation_mail', :locals => {:mail_template => @mail_template } %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button(:ok, _("Invite!")) %>
<% end %>
<% end %>
diff --git a/app/views/licenses/_form.html.erb b/app/views/licenses/_form.html.erb
index ea5c5e5..0073f48 100644
--- a/app/views/licenses/_form.html.erb
+++ b/app/views/licenses/_form.html.erb
@@ -5,7 +5,7 @@
<%= required labelled_form_field(_('Name'), f.text_field(:name)) %>
<%= labelled_form_field(_('License url'), f.text_field(:url)) %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('save', _('Save'))%>
<%= button('cancel', _('Cancel'), {:action => 'index'})%>
<% end %>
diff --git a/app/views/licenses/index.html.erb b/app/views/licenses/index.html.erb
index 7a8d4ac..c481919 100644
--- a/app/views/licenses/index.html.erb
+++ b/app/views/licenses/index.html.erb
@@ -16,7 +16,7 @@
<% end %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button(:add, _('Add a new license'), :action => 'create')%>
<%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
<% end %>
diff --git a/app/views/mailconf/index.html.erb b/app/views/mailconf/index.html.erb
index 136c56d..dea060b 100644
--- a/app/views/mailconf/index.html.erb
+++ b/app/views/mailconf/index.html.erb
@@ -6,7 +6,7 @@
<%= _('You already request activation of your mailbox. Please wait until an administrator approves your request.') %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
<% end %>
@@ -21,10 +21,10 @@
<%= _('Configuration') %>
- <%= link_to _('Mail configuration for POP and IMAP'), 'http://www.ynternet.org/move/infos-technique-pour-utiliser-multypass-pop3-smtp-imap-ftp-quotas...' %>
+ <%= link_to _('Mail configuration for POP and IMAP'), 'http://www.ynternet.org/move/infos-technique-pour-utiliser-multypass-pop3-smtp-imap-ftp-quotas...' %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
<% end %>
@@ -33,7 +33,7 @@
<% end %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= modal_button :add, _('Add image'), :action => 'add_image', :id => @theme.id %>
<% end %>
diff --git a/app/views/profile_themes/index.html.erb b/app/views/profile_themes/index.html.erb
index 71ec863..ac8cc6b 100644
--- a/app/views/profile_themes/index.html.erb
+++ b/app/views/profile_themes/index.html.erb
@@ -40,7 +40,7 @@
-<% button_bar do %>
+<%= button_bar do %>
<% if environment.enabled?('user_themes') %>
<%= modal_button :add, _('New theme ...'), :action => 'new' %>
<% end %>
diff --git a/app/views/profile_themes/new.html.erb b/app/views/profile_themes/new.html.erb
index 440a06a..31c6218 100644
--- a/app/views/profile_themes/new.html.erb
+++ b/app/views/profile_themes/new.html.erb
@@ -4,7 +4,7 @@
<%= labelled_form_field(_('Name of the new theme:'), text_field_tag(:name)) %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button(:save, _('Create')) %>
<% end %>
<% end %>
diff --git a/app/views/region_validators/_search.html.erb b/app/views/region_validators/_search.html.erb
index d10ce23..0d90a76 100644
--- a/app/views/region_validators/_search.html.erb
+++ b/app/views/region_validators/_search.html.erb
@@ -5,7 +5,7 @@
<%= item.name %>
<%= form_tag :action => 'add', :id => @region do %>
<%= hidden_field_tag :validator_id, item.id %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('add', _('Add')) %>
<% end %>
<% end %>
diff --git a/app/views/region_validators/region.html.erb b/app/views/region_validators/region.html.erb
index 6fc6e78..71e087a 100644
--- a/app/views/region_validators/region.html.erb
+++ b/app/views/region_validators/region.html.erb
@@ -19,7 +19,7 @@
<%= form_tag({}, { :method => 'get' }) do %>
<%= text_field_tag :search, nil, :id => 'search_validator' %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('search', _('Search')) %>
<% end %>
<% end %>
diff --git a/app/views/role/_form.html.erb b/app/views/role/_form.html.erb
index 02b90ee..8640191 100644
--- a/app/views/role/_form.html.erb
+++ b/app/views/role/_form.html.erb
@@ -16,7 +16,7 @@
<% end %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %>
<% end %>
<% end %>
diff --git a/app/views/role/index.html.erb b/app/views/role/index.html.erb
index ee77070..99bfa0b 100644
--- a/app/views/role/index.html.erb
+++ b/app/views/role/index.html.erb
@@ -17,7 +17,7 @@
<% end %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button :add, _('Create a new role'), :action => 'new' %>
<%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
<% end %>
diff --git a/app/views/role/show.html.erb b/app/views/role/show.html.erb
index 97da59e..e78ea96 100644
--- a/app/views/role/show.html.erb
+++ b/app/views/role/show.html.erb
@@ -3,11 +3,11 @@
<%= _('Permissions') %>
<% @role.permissions.each do |p| %>
-
<%= permission_name(p) %>
+
<%= permission_name(p) %>
<% end %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button :edit, _('Edit'), :action => 'edit', :id => @role %>
<%= button :back, _('Back to roles management'), :action => 'index' %>
<% end %>
diff --git a/app/views/search/tag.html.erb b/app/views/search/tag.html.erb
index a73397e..795a0c8 100644
--- a/app/views/search/tag.html.erb
+++ b/app/views/search/tag.html.erb
@@ -2,7 +2,7 @@
<%= _('Tagged with "%s"').html_safe % content_tag('code', @tag) %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button('back', _('Back to tag cloud'), :action => 'tags') %>
<% end %>
diff --git a/app/views/shared/_list_groups.html.erb b/app/views/shared/_list_groups.html.erb
index 04177ec..2f260eb 100644
--- a/app/views/shared/_list_groups.html.erb
+++ b/app/views/shared/_list_groups.html.erb
@@ -11,7 +11,7 @@
<%= raw _('Description: %s') % group.description + ' ' if group.community? %>
<%= _('Members: %s') % group.members_count.to_s %>
<%= _('Created at: %s') % show_date(group.created_at) unless group.enterprise? %>
- <% button_bar do %>
+ <%= button_bar do %>
<% if user.has_permission?(:edit_profile, group) %>
<%= button 'menu-ctrl-panel', _('Control panel of this group'), group.admin_url %>
<% end %>
diff --git a/app/views/shared/access_denied.html.erb b/app/views/shared/access_denied.html.erb
index 0d3a084..c68021e 100644
--- a/app/views/shared/access_denied.html.erb
+++ b/app/views/shared/access_denied.html.erb
@@ -9,7 +9,7 @@
<%= _("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.") %>
<% end %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= button :back, _('Go back'), :back %>
<%= button :home, _('Go to the site home page'), :controller => 'home' %>
<% end %>
diff --git a/app/views/shared/not_found.html.erb b/app/views/shared/not_found.html.erb
index 6edbe37..9c58798 100644
--- a/app/views/shared/not_found.html.erb
+++ b/app/views/shared/not_found.html.erb
@@ -4,7 +4,7 @@
<%= _('You may have clicked an expired link or mistyped the address.') %>
<%= _('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.') %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= button :back, _('Go back'), :back %>
<%= button :home, _('Go to the home page'), '/' %>
<% end %>
diff --git a/app/views/shared/theme_test_panel.html.erb b/app/views/shared/theme_test_panel.html.erb
index ce51487..c120373 100644
--- a/app/views/shared/theme_test_panel.html.erb
+++ b/app/views/shared/theme_test_panel.html.erb
@@ -5,7 +5,7 @@
<%= _('You can move this window away to have a better visualization of specific parts of screen.') %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= button(:ok, _('Finished testing'), :controller => 'profile_themes', :profile => theme_owner, :action => 'stop_test', :id => current_theme) %>
<%= button(:edit, _('Edit theme'), :controller => 'profile_themes', :profile => theme_owner, :action => 'edit', :id => current_theme) %>
<% end %>
diff --git a/app/views/spam/_task.html.erb b/app/views/spam/_task.html.erb
index fc2ae35..57cabe2 100644
--- a/app/views/spam/_task.html.erb
+++ b/app/views/spam/_task.html.erb
@@ -7,7 +7,7 @@
<%= yield %> <%# ??? %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= 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}"]) %>
<%= yield :extra_buttons %>
<%= 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]) %>
diff --git a/app/views/spam/index.html.erb b/app/views/spam/index.html.erb
index 36af68e..0d7a74e 100644
--- a/app/views/spam/index.html.erb
+++ b/app/views/spam/index.html.erb
@@ -6,7 +6,7 @@
<%= _('There are no spams to review.') if no_tabs %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button :back, _('Back to control panel'), :controller => :profile_editor %>
<% end %>
@@ -20,7 +20,7 @@
<%= render_tabs(tabs) %>
<% unless no_tabs %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= button :back, _('Back to control panel'), :controller => :profile_editor %>
<% end %>
<% end %>
diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb
index 2a30675..9fda5b3 100644
--- a/app/views/tasks/index.html.erb
+++ b/app/views/tasks/index.html.erb
@@ -41,7 +41,7 @@
<% else %>
<%= form_tag tasks_url(:action => 'close') do%>
- <% button_bar(:class => 'task-actions') do %>
+ <%= button_bar(:class => 'task-actions') do %>
<%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
<%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
<%= submit_button :save, _("Apply!") %>
@@ -71,7 +71,7 @@
<%= pagination_links(@tasks)%>
- <% button_bar(:class => 'task-actions') do %>
+ <%= button_bar(:class => 'task-actions') do %>
<%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
<%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
<%= submit_button :save, _("Apply!") %>
diff --git a/app/views/tasks/list_requested.html.erb b/app/views/tasks/list_requested.html.erb
index 2a1a48b..956c989 100644
--- a/app/views/tasks/list_requested.html.erb
+++ b/app/views/tasks/list_requested.html.erb
@@ -13,6 +13,6 @@
<% end %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button :back, _('Back'), :action => 'index' %>
<% end %>
diff --git a/app/views/tasks/new.html.erb b/app/views/tasks/new.html.erb
index c540fc6..6770c0e 100644
--- a/app/views/tasks/new.html.erb
+++ b/app/views/tasks/new.html.erb
@@ -11,7 +11,7 @@
<%= f.text_field :title, :style => 'width:80%;' %>
<%= f.text_area :message, :style => 'height:200px; width:80%;' %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button(:ok, _('Send'), :cancel => {:action => 'index'}) %>
<% end %>
<% end %>
diff --git a/app/views/tasks/processed.html.erb b/app/views/tasks/processed.html.erb
index d331f68..d48900c 100644
--- a/app/views/tasks/processed.html.erb
+++ b/app/views/tasks/processed.html.erb
@@ -48,7 +48,7 @@
<% end %>
-<% button_bar do %>
+<%= button_bar do %>
<%= button(:back, _('Back'), :action => 'index') %>
<% end %>
diff --git a/app/views/tasks/ticket_details.html.erb b/app/views/tasks/ticket_details.html.erb
index 9376731..b384368 100644
--- a/app/views/tasks/ticket_details.html.erb
+++ b/app/views/tasks/ticket_details.html.erb
@@ -14,6 +14,6 @@
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button(:ok, _("Invite my friends!")) %>
<% end %>
<% end %>
diff --git a/plugins/responsive/views/manage_products/_edit_name.html.erb b/plugins/responsive/views/manage_products/_edit_name.html.erb
index 5df6d64..7c53690 100644
--- a/plugins/responsive/views/manage_products/_edit_name.html.erb
+++ b/plugins/responsive/views/manage_products/_edit_name.html.erb
@@ -12,7 +12,7 @@
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button :save, _('Save') %>
<%= cancel_edit_product_link(@product, 'name') %>
<% end %>
diff --git a/plugins/send_email/views/send_email_plugin_admin/index.html.erb b/plugins/send_email/views/send_email_plugin_admin/index.html.erb
index 44b61b5..9e1d19b 100644
--- a/plugins/send_email/views/send_email_plugin_admin/index.html.erb
+++ b/plugins/send_email/views/send_email_plugin_admin/index.html.erb
@@ -3,7 +3,7 @@
<%= form_for :environment, :url => {:action => 'index'}, :html => {:method => 'post'} do |f| %>
<%= labelled_form_field(_("E-Mail addresses you want to allow to send"), f.text_area(:send_email_plugin_allow_to, :rows => 8)) %>
<%= _('(list of email addresses separated by comma)') %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button 'save', c_('Save'), :cancel => {:controller => 'plugins'} %>
<% end %>
<% end %>
diff --git a/plugins/site_tour/views/site_tour_plugin_admin/index.html.erb b/plugins/site_tour/views/site_tour_plugin_admin/index.html.erb
index bba26a5..ae542cf 100644
--- a/plugins/site_tour/views/site_tour_plugin_admin/index.html.erb
+++ b/plugins/site_tour/views/site_tour_plugin_admin/index.html.erb
@@ -5,7 +5,7 @@
<%= labelled_form_field _('Tooltips (CSV format: language, group name, selector, description)'), f.text_area(:actions_csv, :style => 'width: 100%', :class => 'actions-csv') %>
<%= 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) %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
<% end %>
diff --git a/plugins/sniffer/views/sniffer_plugin_myprofile/edit.html.erb b/plugins/sniffer/views/sniffer_plugin_myprofile/edit.html.erb
index b3c68bb..4b95766 100644
--- a/plugins/sniffer/views/sniffer_plugin_myprofile/edit.html.erb
+++ b/plugins/sniffer/views/sniffer_plugin_myprofile/edit.html.erb
@@ -16,7 +16,7 @@
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button(:save, _('Save')) %>
<%= button :back, _('Back to control panel'), controller: 'profile_editor' %>
<% end %>
diff --git a/plugins/social_share_privacy/test/unit/social_share_privacy_test.rb b/plugins/social_share_privacy/test/unit/social_share_privacy_test.rb
index 55393b2..f73d9af 100644
--- a/plugins/social_share_privacy/test/unit/social_share_privacy_test.rb
+++ b/plugins/social_share_privacy/test/unit/social_share_privacy_test.rb
@@ -1,6 +1,6 @@
require 'test_helper'
-class SocialSharePrivacyPluginTest < ActiveSupport::TestCase
+class SocialSharePrivacyPluginTest < ActionView::TestCase
include NoosferoTestHelper
diff --git a/plugins/social_share_privacy/views/social_share_privacy_plugin_admin/index.html.erb b/plugins/social_share_privacy/views/social_share_privacy_plugin_admin/index.html.erb
index a8174e5..7ce388a 100644
--- a/plugins/social_share_privacy/views/social_share_privacy_plugin_admin/index.html.erb
+++ b/plugins/social_share_privacy/views/social_share_privacy_plugin_admin/index.html.erb
@@ -38,7 +38,7 @@
<%= _('The same order in which you arrange the social networks here will be used for arranging the share buttons.') %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button 'save', _('Save'), :cancel => {:controller => 'plugins', :action => 'index'} %>
<% end %>
<% end %>
diff --git a/plugins/spaminator/views/spaminator_plugin_admin/index.html.erb b/plugins/spaminator/views/spaminator_plugin_admin/index.html.erb
index bef6c7c..b1c75a3 100644
--- a/plugins/spaminator/views/spaminator_plugin_admin/index.html.erb
+++ b/plugins/spaminator/views/spaminator_plugin_admin/index.html.erb
@@ -30,7 +30,7 @@
<%= button(:cancel, _('Withhold'), {:action => 'withhold'}, :title => _('Cancel next scheduled scans')) if @settings.deployed %>
<% end %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
<% end %>
diff --git a/plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb b/plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb
index 481770e..8012800 100644
--- a/plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb
+++ b/plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb
@@ -29,6 +29,6 @@
-<% button_bar do %>
+<%= button_bar do %>
<%= button(:back, c_('Back'), :action => 'index') %>
<% end %>
diff --git a/plugins/sub_organizations/views/sub_organizations_plugin_myprofile/index.html.erb b/plugins/sub_organizations/views/sub_organizations_plugin_myprofile/index.html.erb
index ce47e61..f7440b7 100644
--- a/plugins/sub_organizations/views/sub_organizations_plugin_myprofile/index.html.erb
+++ b/plugins/sub_organizations/views/sub_organizations_plugin_myprofile/index.html.erb
@@ -10,7 +10,7 @@
<% end %>
<%= form_tag do %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= button(:add, _('Create a new sub-community'), :controller => 'memberships', :action => 'new_community', :profile => user.identifier, :sub_organizations_plugin_parent_to_be => profile.id) %>
<%= button :add, _('Register a new sub-enterprise'), :controller => 'enterprise_registration', :sub_organizations_plugin_parent_to_be => profile.id if environment.enabled?('enterprise_registration') %>
<% end %>
@@ -21,7 +21,7 @@
:hint_text => _('Type in a search term for a group'),
:pre_populate => @tokenized_children}) %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('save', c_('Save'))%>
<%= button('cancel', c_('Cancel'), {:controller => 'profile_editor'})%>
<% end %>
diff --git a/plugins/sub_organizations/views/sub_organizations_plugin_profile/_full_related_organizations.html.erb b/plugins/sub_organizations/views/sub_organizations_plugin_profile/_full_related_organizations.html.erb
index 3be6651..d9476bf 100644
--- a/plugins/sub_organizations/views/sub_organizations_plugin_profile/_full_related_organizations.html.erb
+++ b/plugins/sub_organizations/views/sub_organizations_plugin_profile/_full_related_organizations.html.erb
@@ -51,7 +51,7 @@
<%= pagination_links(organizations, {:param_name => 'npage', :page_links => true}) %>
- <% button_bar(:class => "related-organizations-button-bar") do %>
+ <%= button_bar(:class => "related-organizations-button-bar") do %>
<%= button :back, c_('Go back'), { :controller => 'profile' } %>
<%= 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}") %>
diff --git a/plugins/sub_organizations/views/sub_organizations_plugin_profile/_related_organizations.html.erb b/plugins/sub_organizations/views/sub_organizations_plugin_profile/_related_organizations.html.erb
index cd0728f..d11db93 100644
--- a/plugins/sub_organizations/views/sub_organizations_plugin_profile/_related_organizations.html.erb
+++ b/plugins/sub_organizations/views/sub_organizations_plugin_profile/_related_organizations.html.erb
@@ -9,7 +9,7 @@
<% if organizations.length == 0 %>
<%= _("There are no sub-%s yet.") % organization_type.pluralize %>
<% end %>
- <% button_bar(:class => "related-organizations-button-bar") do %>
+ <%= button_bar(:class => "related-organizations-button-bar") do %>
<%= button :back, c_('Go back'), { :controller => 'profile' } %>
<%= 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}") %>
diff --git a/plugins/suppliers/views/suppliers_plugin/manage_products/_distribution_tab.html.slim b/plugins/suppliers/views/suppliers_plugin/manage_products/_distribution_tab.html.slim
index bcc3037..94fbdd5 100644
--- a/plugins/suppliers/views/suppliers_plugin/manage_products/_distribution_tab.html.slim
+++ b/plugins/suppliers/views/suppliers_plugin/manage_products/_distribution_tab.html.slim
@@ -10,5 +10,5 @@
= check_box_tag "consumers[#{consumer.id}]", '1', distributed_consumers.include?(consumer.profile)
= label_tag "consumers[#{consumer.id}]", consumer.name
- - button_bar do
+ = button_bar do
= submit_button :save, _('Save')
diff --git a/plugins/tolerance_time/views/tolerance_time_plugin_myprofile/index.html.erb b/plugins/tolerance_time/views/tolerance_time_plugin_myprofile/index.html.erb
index 139d4a2..1efd033 100644
--- a/plugins/tolerance_time/views/tolerance_time_plugin_myprofile/index.html.erb
+++ b/plugins/tolerance_time/views/tolerance_time_plugin_myprofile/index.html.erb
@@ -11,13 +11,13 @@
f.text_field(:content_tolerance, :size => 2, :style => 'font-size: 14px; text-align: right') +
select_tag(:content_tolerance_unit, options_for_select(time_units, @content_default_unit) )) %>
<% end %>
- <%= labelled_form_field(_('Comment edition tolerance time'),
- f.text_field(:comment_tolerance, :size => 2, :style => 'font-size: 14px; text-align: right') +
+ <%= labelled_form_field(_('Comment edition tolerance time'),
+ f.text_field(:comment_tolerance, :size => 2, :style => 'font-size: 14px; text-align: right') +
select_tag(:comment_tolerance_unit, options_for_select(time_units, @comment_default_unit) )) %>
<%= content_tag( 'small', _('Empty means unlimited and zero means right away.') ) %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button('save', c_('Save'))%>
<%= button('back', c_('Back'), {:controller => 'profile_editor'})%>
<% end %>
diff --git a/plugins/vote/views/vote_plugin_admin/index.html.erb b/plugins/vote/views/vote_plugin_admin/index.html.erb
index f18617f..53387ac 100644
--- a/plugins/vote/views/vote_plugin_admin/index.html.erb
+++ b/plugins/vote/views/vote_plugin_admin/index.html.erb
@@ -13,7 +13,7 @@
<%= labelled_form_field _('Limit of voters to display:'), f.text_field(:voters_limit, :size => 3) %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
<% end %>
diff --git a/plugins/work_assignment/views/work_assignment_plugin_myprofile/edit_visibility.html.erb b/plugins/work_assignment/views/work_assignment_plugin_myprofile/edit_visibility.html.erb
index 9986aff..03cfbb0 100644
--- a/plugins/work_assignment/views/work_assignment_plugin_myprofile/edit_visibility.html.erb
+++ b/plugins/work_assignment/views/work_assignment_plugin_myprofile/edit_visibility.html.erb
@@ -12,7 +12,7 @@
<%= visibility_options(@article, @tokenized_children) %>
- <% button_bar do %>
+ <%= button_bar do %>
<%= submit_button :save, _('Save') %>
<%= button :cancel, _('Cancel'), @back_to %>
<% end %>
diff --git a/test/support/noosfero_test_helper.rb b/test/support/noosfero_test_helper.rb
index d3c58d9..ad43b86 100644
--- a/test/support/noosfero_test_helper.rb
+++ b/test/support/noosfero_test_helper.rb
@@ -1,13 +1,8 @@
+##
+# DEPRECATED ActionView::TestCase already provide all needed
+#
module NoosferoTestHelper
- def link_to(content, url, options = {})
- "#{content}"
- end
-
- def content_tag(tag, content, options = {})
- tag_attr = options.blank? ? '' : ' ' + options.collect{ |o| "#{o[0]}=\"#{o[1]}\"" }.join(' ')
- "<#{tag}#{tag_attr}>#{content}#{tag}>"
- end
def submit_tag(content, options = {})
content
@@ -17,11 +12,6 @@ module NoosferoTestHelper
''
end
- def tag(tag, args = {})
- attrs = args.map{|k,v| "#{k}='#{v}'"}.join(' ')
- "<#{tag} #{attrs} />"
- end
-
def options_from_collection_for_select(collection, value_method, content_method)
""
end
diff --git a/test/unit/application_helper_test.rb b/test/unit/application_helper_test.rb
index 7e10dac..34f2e3f 100644
--- a/test/unit/application_helper_test.rb
+++ b/test/unit/application_helper_test.rb
@@ -682,29 +682,6 @@ class ApplicationHelperTest < ActionView::TestCase
assert_nil default_folder_for_image_upload(profile)
end
- should 'envelop a html with button-bar div' do
- result = button_bar { 'foo' }
- assert_equal '
foo'+
- '
', result
- end
-
- should 'add more classes to button-bar envelope' do
- result = button_bar :class=>'test' do
- 'foo'
- end
- assert_equal '
foo'+
- '
', result
- end
-
- should 'add more attributes to button-bar envelope' do
- result = button_bar :id=>'bt1' do
- 'foo'
- end
- assert_tag_in_string result, :tag =>'div', :attributes => {:class => 'button-bar', :id => 'bt1'}
- assert_tag_in_string result, :tag =>'b', :content => 'foo', :parent => {:tag => 'div', :attributes => {:id => 'bt1'}}
- assert_tag_in_string result, :tag =>'br', :parent => {:tag => 'div', :attributes => {:id => 'bt1'}}
- end
-
should 'not filter html if source does not have macros' do
class Plugin1 < Noosfero::Plugin
end
@@ -871,7 +848,7 @@ class ApplicationHelperTest < ActionView::TestCase
html = fullscreen_buttons("#article")
assert html.include?("")
assert html.include?("class=\"button with-text icon-fullscreen\"")
- assert html.include?("onClick=\"toggle_fullwidth('#article')\"")
+ assert html.include?("onClick=\"toggle_fullwidth('#article')\"")
end
should "return the related class string" do
diff --git a/test/unit/buttons_helper_test.rb b/test/unit/buttons_helper_test.rb
index 0a40939..a2a8da3 100644
--- a/test/unit/buttons_helper_test.rb
+++ b/test/unit/buttons_helper_test.rb
@@ -1,11 +1,35 @@
-# encoding: UTF-8
require_relative "../test_helper"
class ButtonsHelperTest < ActionView::TestCase
+
include ButtonsHelper
should 'append with-text class and keep existing classes' do
expects(:button_without_text).with('type', 'label', 'url', { :class => 'with-text class1'})
button('type', 'label', 'url', { :class => 'class1' })
end
-end
\ No newline at end of file
+
+ should 'envelop a html with button-bar div' do
+ result = button_bar { content_tag :b, 'foo' }
+ assert_equal '
foo'+
+ '
', result
+ end
+
+ should 'add more classes to button-bar envelope' do
+ result = button_bar :class=>'test' do
+ content_tag :b, 'foo'
+ end
+ assert_equal '
foo'+
+ '
', result
+ end
+
+ should 'add more attributes to button-bar envelope' do
+ result = button_bar :id=>'bt1' do
+ content_tag :b, 'foo'
+ end
+ assert_tag_in_string result, :tag =>'div', :attributes => {:class => ' button-bar', :id => 'bt1'}
+ assert_tag_in_string result, :tag =>'b', :content => 'foo', :parent => {:tag => 'div', :attributes => {:id => 'bt1'}}
+ assert_tag_in_string result, :tag =>'br', :parent => {:tag => 'div', :attributes => {:id => 'bt1'}}
+ end
+
+end
diff --git a/test/unit/comment_helper_test.rb b/test/unit/comment_helper_test.rb
index 2fb747d..d7257e0 100644
--- a/test/unit/comment_helper_test.rb
+++ b/test/unit/comment_helper_test.rb
@@ -1,10 +1,10 @@
require_relative "../test_helper"
-class CommentHelperTest < ActiveSupport::TestCase
+class CommentHelperTest < ActionView::TestCase
include CommentHelper
- include ActionView::Helpers::TagHelper
- include NoosferoTestHelper
+
+ helper ApplicationHelper
def setup
@user = create_user('usertest').person
@@ -12,6 +12,7 @@ class CommentHelperTest < ActiveSupport::TestCase
self.stubs(:logged_in?).returns(true)
self.stubs(:report_abuse).returns('link')
self.stubs(:expirable_comment_link).returns('link')
+ self.stubs(:url_for)
@plugins = mock
@plugins.stubs(:dispatch).returns([])
end
@@ -140,9 +141,5 @@ class CommentHelperTest < ActiveSupport::TestCase
assert_match /plugin_action/, Nokogiri::HTML.fragment(html).css('.comments-action-bar').to_html
end
- def link_to_function(content, url, options = {})
- link_to(content, url, options)
- end
-
end
diff --git a/test/unit/content_viewer_helper_test.rb b/test/unit/content_viewer_helper_test.rb
index ea69f33..0ca89c9 100644
--- a/test/unit/content_viewer_helper_test.rb
+++ b/test/unit/content_viewer_helper_test.rb
@@ -3,6 +3,8 @@ require_relative "../test_helper"
class ContentViewerHelperTest < ActionView::TestCase
include ActionView::Helpers::TagHelper
+ include ActionView::Helpers::TextHelper
+
include ContentViewerHelper
include DatesHelper
include ApplicationHelper
@@ -148,11 +150,4 @@ class ContentViewerHelperTest < ActionView::TestCase
assert_match /February 1, 2007/, result
end
- protected
- include NoosferoTestHelper
- include ActionView::Helpers::TextHelper
- def url_for(args = {})
- ['http:/', args[:host], args[:profile], args[:page]].join('/')
- end
-
end
diff --git a/test/unit/events_helper_test.rb b/test/unit/events_helper_test.rb
index e88eb4b..98e8f13 100644
--- a/test/unit/events_helper_test.rb
+++ b/test/unit/events_helper_test.rb
@@ -1,6 +1,6 @@
require_relative "../test_helper"
-class EventsHelperTest < ActiveSupport::TestCase
+class EventsHelperTest < ActionView::TestCase
include EventsHelper
diff --git a/test/unit/forum_helper_test.rb b/test/unit/forum_helper_test.rb
index 0fe0e95..dd8b680 100644
--- a/test/unit/forum_helper_test.rb
+++ b/test/unit/forum_helper_test.rb
@@ -1,6 +1,6 @@
require_relative "../test_helper"
-class ForumHelperTest < ActiveSupport::TestCase
+class ForumHelperTest < ActionView::TestCase
include BlogHelper
include ForumHelper
@@ -58,7 +58,7 @@ class ForumHelperTest < ActiveSupport::TestCase
assert_match result, out
assert_match 'a2', out
- assert_match(/#{result} by a2<\/a>/, last_topic_update(some_post))
+ assert_match(/#{result} by a2<\/a>/, last_topic_update(some_post))
end
should "return last comment author's name from unauthenticated user" do
--
libgit2 0.21.2