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

Too many changes.

To preserve performance only 100 of 173 files displayed.

app/helpers/application_helper.rb
@@ -233,13 +233,6 @@ module ApplicationHelper @@ -233,13 +233,6 @@ module ApplicationHelper
233 link_to(content_tag('span', text), url, html_options.merge(:class => the_class, :title => text)) 233 link_to(content_tag('span', text), url, html_options.merge(:class => the_class, :title => text))
234 end 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 def render_profile_actions klass 236 def render_profile_actions klass
244 name = klass.to_s.underscore 237 name = klass.to_s.underscore
245 begin 238 begin
app/helpers/buttons_helper.rb
1 module ButtonsHelper 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 def button(type, label, url, html_options = {}) 15 def button(type, label, url, html_options = {})
3 html_options ||= {} 16 html_options ||= {}
4 the_class = 'with-text' 17 the_class = 'with-text'
app/views/account/_login_form.html.erb
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %> 11 <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
12 <% end %> 12 <% end %>
13 13
14 -<% button_bar do %> 14 +<%= button_bar do %>
15 <%= submit_button( 'login', _('Log in') )%> 15 <%= submit_button( 'login', _('Log in') )%>
16 <%= modal_close_button _('Cancel') if request.xhr? %> 16 <%= modal_close_button _('Cancel') if request.xhr? %>
17 <% end %> 17 <% end %>
app/views/account/accept_terms.html.erb
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 <%= hidden_field_tag :answer, params[:answer] %> 20 <%= hidden_field_tag :answer, params[:answer] %>
21 21
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') %> 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 <%= button 'cancel', _('Cancel'), :controller => 'home', :action => 'index' %> 24 <%= button 'cancel', _('Cancel'), :controller => 'home', :action => 'index' %>
25 <%= submit_button 'forward', _('Continue'), {:disabled => true, :class => 'disabled', :id => 'submit-accept-terms'} %> 25 <%= submit_button 'forward', _('Continue'), {:disabled => true, :class => 'disabled', :id => 'submit-accept-terms'} %>
26 <% end %> 26 <% end %>
app/views/account/activation_question.html.erb
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 24
25 <div class='activation-box'> 25 <div class='activation-box'>
26 <h2><%= _('Enterprise activation') + ' - ' + (logged_in? ? _('part 1 of 2') : _('part 1 of 3')) %></h2> 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 <p> <strong><%= _('Pay atention! You have only one chance!') %></strong> </p> 29 <p> <strong><%= _('Pay atention! You have only one chance!') %></strong> </p>
30 30
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 34
35 <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %> 35 <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
36 36
37 - <% button_bar do %> 37 + <%= button_bar do %>
38 <%= button 'cancel', _('Cancel'), :action => 'index' %> 38 <%= button 'cancel', _('Cancel'), :action => 'index' %>
39 <%= submit_button 'forward', _('Continue') %> 39 <%= submit_button 'forward', _('Continue') %>
40 <% end %> 40 <% end %>
app/views/account/forgot_password.html.erb
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %> 9 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %>
10 10
11 <div> 11 <div>
12 - <% button_bar do %> 12 + <%= button_bar do %>
13 <%= submit_button('send', _('Send instructions')) %> 13 <%= submit_button('send', _('Send instructions')) %>
14 <% end %> 14 <% end %>
15 </div> 15 </div>
app/views/account/login.html.erb
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 22
23 <%= safe_join(@plugins.dispatch(:login_extra_contents).collect { |content| instance_exec(&content) }, "") %> 23 <%= safe_join(@plugins.dispatch(:login_extra_contents).collect { |content| instance_exec(&content) }, "") %>
24 24
25 - <% button_bar do %> 25 + <%= button_bar do %>
26 <%= submit_button( 'login', _('Log in') )%> 26 <%= submit_button( 'login', _('Log in') )%>
27 <% if is_popin %> 27 <% if is_popin %>
28 <%= modal_close_button(_('Cancel')) %> 28 <%= modal_close_button(_('Cancel')) %>
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 31
32 <% end %> 32 <% end %>
33 33
34 -<% button_bar do %> 34 +<%= button_bar do %>
35 <% unless @plugins.dispatch(:allow_user_registration).include?(false) %> 35 <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
36 <%= button :add, _("New user"), :controller => 'account', :action => 'signup' %> 36 <%= button :add, _("New user"), :controller => 'account', :action => 'signup' %>
37 <% end %> 37 <% end %>
app/views/account/login_block.html.erb
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 17
18 <%= safe_join(@plugins.dispatch(:login_extra_contents).collect { |content| instance_eval(&content) }, "") %> 18 <%= safe_join(@plugins.dispatch(:login_extra_contents).collect { |content| instance_eval(&content) }, "") %>
19 19
20 - <% button_bar do %> 20 + <%= button_bar do %>
21 <%= submit_button( 'login', _('Log in') )%> 21 <%= submit_button( 'login', _('Log in') )%>
22 <% unless @plugins.dispatch(:allow_user_registration).include?(false) %> 22 <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
23 <%= button(:add, _('New user'), { :controller => 'account', :action => 'signup' }) %> 23 <%= button(:add, _('New user'), { :controller => 'account', :action => 'signup' }) %>
app/views/account/logout_popup.html.erb
1 <h2><%= _('Are you sure you want to get out?') %></h2> 1 <h2><%= _('Are you sure you want to get out?') %></h2>
2 <p> 2 <p>
3 -<% button_bar do %> 3 +<%= button_bar do %>
4 <%= button :ok, _('Yes'), { :controller => 'account', :action => 'logout' } %> 4 <%= button :ok, _('Yes'), { :controller => 'account', :action => 'logout' } %>
5 <%= modal_close_button _('No, I want to stay.') %> 5 <%= modal_close_button _('No, I want to stay.') %>
6 <% end %> 6 <% end %>
app/views/account/new_password.html.erb
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 10
11 <%= labelled_form_field(_('Enter new password'), (f.password_field :password)) %> 11 <%= labelled_form_field(_('Enter new password'), (f.password_field :password)) %>
12 <%= labelled_form_field(_('Confirm the new password'), (f.password_field :password_confirmation)) %> 12 <%= labelled_form_field(_('Confirm the new password'), (f.password_field :password_confirmation)) %>
13 - <% button_bar do %> 13 + <%= button_bar do %>
14 <%= submit_button(:ok, _('Change password')) %> 14 <%= submit_button(:ok, _('Change password')) %>
15 <% end %> 15 <% end %>
16 16
app/views/account/welcome.html.erb
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 3
4 <%= _('%s was successfuly activated. Now you may go to your control panel or to the control panel of your enterprise') % @enterprise.name %> 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 <%= button 'forward', _('Go to my enterprise control panel') % @enterprise.name, :action => 'index', :controller => 'profile_editor', :profile => @enterprise.identifier %> 8 <%= button 'forward', _('Go to my enterprise control panel') % @enterprise.name, :action => 'index', :controller => 'profile_editor', :profile => @enterprise.identifier %>
9 <% end %> 9 <% end %>
10 <% end %> 10 <% end %>
app/views/admin_panel/message_for_disabled_enterprise.html.erb
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 6
7 <%= f.text_area :message_for_disabled_enterprise, :cols => 40, :style => 'width: 90%' %> 7 <%= f.text_area :message_for_disabled_enterprise, :cols => 40, :style => 'width: 90%' %>
8 8
9 - <% button_bar do %> 9 + <%= button_bar do %>
10 <%= submit_button(:save, _('Save')) %> 10 <%= submit_button(:save, _('Save')) %>
11 <%= button(:cancel, _('Cancel'), :action => 'index') %> 11 <%= button(:cancel, _('Cancel'), :action => 'index') %>
12 <% end %> 12 <% end %>
app/views/admin_panel/set_portal_community.html.erb
@@ -4,14 +4,14 @@ @@ -4,14 +4,14 @@
4 <%= form_tag do %> 4 <%= form_tag do %>
5 <%= labelled_form_field(_('Portal identifier'), text_field_tag('portal_community_identifier', @portal_community.identifier, :size => 40) ) %> 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 <%= submit_button 'save', _('Save'), :cancel => { :action => 'index' } %> 8 <%= submit_button 'save', _('Save'), :cancel => { :action => 'index' } %>
9 <% end %> 9 <% end %>
10 <% end %> 10 <% end %>
11 <% else %> 11 <% else %>
12 <%= _('Portal identifier: %s').html_safe % link_to(@portal_community.identifier, @portal_community.url) %> 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 <%if @portal_community.environment.enabled?('use_portal_community') %> 15 <%if @portal_community.environment.enabled?('use_portal_community') %>
16 <%= button 'cancel', _('Disable'), {:action => 'manage_portal_community', :activate => 0} %> 16 <%= button 'cancel', _('Disable'), {:action => 'manage_portal_community', :activate => 0} %>
17 <% else %> 17 <% else %>
app/views/admin_panel/set_portal_folders.html.erb
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 <%= _('The same order in which you arrange the folders here will be used for arranging the boxes in the environment initial page.') %> 37 <%= _('The same order in which you arrange the folders here will be used for arranging the boxes in the environment initial page.') %>
38 </p> 38 </p>
39 39
40 - <% button_bar do %> 40 + <%= button_bar do %>
41 <%= submit_button 'save', _('Save'), :cancel => {:action => 'index'} %> 41 <%= submit_button 'save', _('Save'), :cancel => {:action => 'index'} %>
42 <% end %> 42 <% end %>
43 <% end %> 43 <% end %>
app/views/admin_panel/set_portal_news_amount.html.erb
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <%= labelled_form_field _('Number of portal news'), select(:environment, :portal_news_amount, (0..10).to_a) %> 6 <%= labelled_form_field _('Number of portal news'), select(:environment, :portal_news_amount, (0..10).to_a) %>
7 <%= labelled_form_field _('Number of news by folder'), select(:environment, :news_amount_by_folder, (1..10).to_a) %> 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 <%= submit_button(:save, _('Save')) %> 10 <%= submit_button(:save, _('Save')) %>
11 <%= button(:cancel, _('Cancel'), :action => 'index') %> 11 <%= button(:cancel, _('Cancel'), :action => 'index') %>
12 <% end %> 12 <% end %>
app/views/admin_panel/site_info.html.erb
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 <% tabs << {:title => _('Signup introduction text'), :id => 'signup-intro', 20 <% tabs << {:title => _('Signup introduction text'), :id => 'signup-intro',
21 :content => (render :partial => 'signup_intro', :locals => {:f => f})} %> 21 :content => (render :partial => 'signup_intro', :locals => {:f => f})} %>
22 <%= render_tabs(tabs) %> 22 <%= render_tabs(tabs) %>
23 - <% button_bar do %> 23 + <%= button_bar do %>
24 <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %> 24 <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %>
25 <% end %> 25 <% end %>
26 <% end %> 26 <% end %>
app/views/box_organizer/edit.html.erb
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 </div> 35 </div>
36 <% end %> 36 <% end %>
37 37
38 - <% button_bar do %> 38 + <%= button_bar do %>
39 <%= submit_button(:save, _('Save')) %> 39 <%= submit_button(:save, _('Save')) %>
40 <%= modal_close_button(_('Cancel')) %> 40 <%= modal_close_button(_('Cancel')) %>
41 <% end %> 41 <% end %>
app/views/box_organizer/index.html.erb
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 3
4 <h1><%= _('Editing sideboxes')%></h1> 4 <h1><%= _('Editing sideboxes')%></h1>
5 5
6 -<% button_bar :class=>'design-menu' do %> 6 +<%= button_bar :class=>'design-menu' do %>
7 <%= button(:back, _('Back to control panel'), :controller => (profile.nil? ? 'admin_panel': 'profile_editor')) %> 7 <%= button(:back, _('Back to control panel'), :controller => (profile.nil? ? 'admin_panel': 'profile_editor')) %>
8 <% end %> 8 <% end %>
9 9
app/views/categories/_form.html.erb
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 <%= file_field_or_thumbnail(_('Image:'), @category.image, i) %> 28 <%= file_field_or_thumbnail(_('Image:'), @category.image, i) %>
29 <% end %> 29 <% end %>
30 30
31 - <% button_bar do %> 31 + <%= button_bar do %>
32 <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %> 32 <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
33 <% end%> 33 <% end%>
34 <% end %> 34 <% end %>
app/views/cms/_media_new_folder.html.erb
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <%= labelled_radio_button _('Folder'), :folder_type, 'Folder', false %> 9 <%= labelled_radio_button _('Folder'), :folder_type, 'Folder', false %>
10 10
11 <%= labelled_form_field _('Name:'), text_field_tag(:new_folder, nil, 'data-url' => url_for({:action => 'new', :profile => profile.identifier})) %> 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 <%= submit_button(:newfolder, _('Create')) %> 13 <%= submit_button(:newfolder, _('Create')) %>
14 <% end %> 14 <% end %>
15 <% end %> 15 <% end %>
app/views/cms/_upload_file_form.html.erb
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 12
13 <%= hidden_field_tag('back_to', @back_to) %> 13 <%= hidden_field_tag('back_to', @back_to) %>
14 14
15 -<% button_bar do %> 15 +<%= button_bar do %>
16 <%= button_to_function :add, _('More files'), "add_new_file_fields()" %> 16 <%= button_to_function :add, _('More files'), "add_new_file_fields()" %>
17 <% if @back_to %> 17 <% if @back_to %>
18 <%= submit_button :save, _('Upload'), :cancel => @back_to %> 18 <%= submit_button :save, _('Upload'), :cancel => @back_to %>
app/views/cms/destroy.html.erb
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <% end %> 12 <% end %>
13 </strong> 13 </strong>
14 14
15 - <% button_bar do %> 15 + <%= button_bar do %>
16 <%= submit_button :save, _('Yes, I want.') %> 16 <%= submit_button :save, _('Yes, I want.') %>
17 <%= button :cancel, _("No, I don't want."), @article.url %> 17 <%= button :cancel, _("No, I don't want."), @article.url %>
18 <% end %> 18 <% end %>
app/views/cms/edit.html.erb
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 </div> 21 </div>
22 <% end %> 22 <% end %>
23 23
24 - <% button_bar do %> 24 + <%= button_bar do %>
25 <%= submit_button :save, _('Save') %> 25 <%= submit_button :save, _('Save') %>
26 <%= submit_button :save, _('Save and continue'), :name => "continue" %> 26 <%= submit_button :save, _('Save and continue'), :name => "continue" %>
27 <% end %> 27 <% end %>
@@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
48 <%= options_for_article(@article, @tokenized_children) %> 48 <%= options_for_article(@article, @tokenized_children) %>
49 </div> 49 </div>
50 50
51 - <% button_bar do %> 51 + <%= button_bar do %>
52 <%= submit_button :save, _('Save') %> 52 <%= submit_button :save, _('Save') %>
53 53
54 <% if @back_to %> 54 <% if @back_to %>
app/views/cms/publish.html.erb
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 <%= hidden_field_tag :back_to, @back_to %> 25 <%= hidden_field_tag :back_to, @back_to %>
26 <%= labelled_form_field _('Title'), text_field_tag('name', @article.name) %> 26 <%= labelled_form_field _('Title'), text_field_tag('name', @article.name) %>
27 27
28 - <% button_bar do %> 28 + <%= button_bar do %>
29 <%= submit_button 'spread', _('Spread this') %> 29 <%= submit_button 'spread', _('Spread this') %>
30 <% end %> 30 <% end %>
31 <% end %> 31 <% end %>
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 <% search_action = url_for(:action => 'search_communities_to_publish') %> 41 <% search_action = url_for(:action => 'search_communities_to_publish') %>
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 }) %> 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 <%= labelled_form_field _('Title'), text_field_tag('name', @article.name) %> 43 <%= labelled_form_field _('Title'), text_field_tag('name', @article.name) %>
44 - <% button_bar do %> 44 + <%= button_bar do %>
45 <%= submit_button 'spread', _('Spread this') %> 45 <%= submit_button 'spread', _('Spread this') %>
46 <% end %> 46 <% end %>
47 <% end %> 47 <% end %>
@@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
58 <%= hidden_field_tag :back_to, @back_to %> 58 <%= hidden_field_tag :back_to, @back_to %>
59 <%= labelled_form_field _('Title'), text_field_tag('name', @article.name) %> 59 <%= labelled_form_field _('Title'), text_field_tag('name', @article.name) %>
60 60
61 - <% button_bar do %> 61 + <%= button_bar do %>
62 <%= submit_button 'spread', _('Spread this') %> 62 <%= submit_button 'spread', _('Spread this') %>
63 <% end %> 63 <% end %>
64 <% end %> 64 <% end %>
app/views/cms/publish_on_portal_community.html.erb
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <%= hidden_field_tag :back_to, @back_to %> 5 <%= hidden_field_tag :back_to, @back_to %>
6 <%= labelled_text_field _('Title') + ': ', :name, @article.name, :style => 'width: 100%' %> 6 <%= labelled_text_field _('Title') + ': ', :name, @article.name, :style => 'width: 100%' %>
7 7
8 - <% button_bar do %> 8 + <%= button_bar do %>
9 <%= submit_button 'spread', _('Spread this'), :cancel => @back_to %> 9 <%= submit_button 'spread', _('Spread this'), :cancel => @back_to %>
10 <% end %> 10 <% end %>
11 <% end %> 11 <% end %>
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 <%= _("There is no portal community in this environment.") %> 14 <%= _("There is no portal community in this environment.") %>
15 </div> 15 </div>
16 16
17 - <% button_bar do %> 17 + <%= button_bar do %>
18 <%= button :back, _('Back'), :controller => 'cms' %> 18 <%= button :back, _('Back'), :controller => 'cms' %>
19 <% end %> 19 <% end %>
20 <% end %> 20 <% end %>
app/views/cms/suggest_an_article.html.erb
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 23
24 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) unless logged_in? %> 24 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) unless logged_in? %>
25 25
26 - <% button_bar do %> 26 + <%= button_bar do %>
27 <%= submit_button :save, _('Save') %> 27 <%= submit_button :save, _('Save') %>
28 <%= button :cancel, _('Cancel'), @back_to %> 28 <%= button :cancel, _('Cancel'), @back_to %>
29 <% end %> 29 <% end %>
app/views/cms/view.html.erb
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </div> 14 </div>
15 <% end %> 15 <% end %>
16 16
17 -<% button_bar(:style => 'margin-bottom: 1em;') do %> 17 +<%= button_bar(:style => 'margin-bottom: 1em;') do %>
18 <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %> 18 <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %>
19 19
20 <%= modal_button('new', _('New content'), url_for({:action => 'new', :parent_id => parent_id, :cms => true}).html_safe) %> 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,6 +4,6 @@
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.') %> 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 </p> 5 </p>
6 6
7 -<% button_bar do %> 7 +<%= button_bar do %>
8 <%= modal_close_button _('Close') %> 8 <%= modal_close_button _('Close') %>
9 <% end %> 9 <% end %>
app/views/comment/_comment_form.html.erb
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <div id="recaptcha-container" style="display: none"> 8 <div id="recaptcha-container" style="display: none">
9 <h3><%= _('Please type the two words below') %></h3> 9 <h3><%= _('Please type the two words below') %></h3>
10 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %> 10 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %>
11 - <% button_bar do %> 11 + <%= button_bar do %>
12 <%= button_to_function :add, _('Confirm'), "return false", :id => "confirm-captcha" %> 12 <%= button_to_function :add, _('Confirm'), "return false", :id => "confirm-captcha" %>
13 <%= button_to_function :cancel, _('Cancel'), "noosfero.modal.close()" %> 13 <%= button_to_function :cancel, _('Cancel'), "noosfero.modal.close()" %>
14 <% end %> 14 <% end %>
@@ -87,7 +87,7 @@ function check_captcha(button, confirm_action) { @@ -87,7 +87,7 @@ function check_captcha(button, confirm_action) {
87 87
88 <%= safe_join(@plugins.dispatch(:comment_form_extra_contents, local_assigns.merge(:comment => @comment)).collect { |content| instance_exec(&content) }, "") %> 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 <%= submit_button('add', _('Post comment'), :onclick => "if(check_captcha(this)) { save_comment(this) } else { check_captcha(this, save_comment)};return false;") %> 91 <%= submit_button('add', _('Post comment'), :onclick => "if(check_captcha(this)) { save_comment(this) } else { check_captcha(this, save_comment)};return false;") %>
92 <% if !edition_mode %> 92 <% if !edition_mode %>
93 <%= button :cancel, _('Cancel'), '', :id => 'cancel-comment' %> 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,7 +36,7 @@ function submit_comment_form(button) {
36 <div id="recaptcha-container" style="display: none"> 36 <div id="recaptcha-container" style="display: none">
37 <h3><%= _('Please type the two words below') %></h3> 37 <h3><%= _('Please type the two words below') %></h3>
38 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %> 38 <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %>
39 - <% button_bar do %> 39 + <%= button_bar do %>
40 <%= button_to_function :add, _('Confirm'), "return false", :id => "confirm-captcha" %> 40 <%= button_to_function :add, _('Confirm'), "return false", :id => "confirm-captcha" %>
41 <%= button_to_function :cancel, _('Cancel'), "noosfero.modal.close()" %> 41 <%= button_to_function :cancel, _('Cancel'), "noosfero.modal.close()" %>
42 <% end %> 42 <% end %>
@@ -73,7 +73,7 @@ function submit_comment_form(button) { @@ -73,7 +73,7 @@ function submit_comment_form(button) {
73 <%= hidden_field_tag(:confirm, 'false') %> 73 <%= hidden_field_tag(:confirm, 'false') %>
74 <%= hidden_field_tag(:view, params[:view])%> 74 <%= hidden_field_tag(:view, params[:view])%>
75 75
76 - <% button_bar do %> 76 + <%= button_bar do %>
77 <%= submit_button('add', _('Post comment'), :onclick => "submit_comment_form(this); return false") %> 77 <%= submit_button('add', _('Post comment'), :onclick => "submit_comment_form(this); return false") %>
78 <% if cancel_triggers_hide %> 78 <% if cancel_triggers_hide %>
79 <%= button :cancel, _('Cancel'), '', :id => 'cancel-comment' %> 79 <%= button :cancel, _('Cancel'), '', :id => 'cancel-comment' %>
app/views/content_viewer/_confirm_unfollow.html.erb
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <%= form_tag(@page.view_url.merge({:only_path => true}), {:method => 'post', :class => 'comment_form'}) do %> 5 <%= form_tag(@page.view_url.merge({:only_path => true}), {:method => 'post', :class => 'comment_form'}) do %>
6 <%= hidden_field_tag(:unfollow, 'commit') %> 6 <%= hidden_field_tag(:unfollow, 'commit') %>
7 <%= labelled_form_field(_('Enter your e-Mail'), text_field_tag(:email, nil, {:size => 40})) %> 7 <%= labelled_form_field(_('Enter your e-Mail'), text_field_tag(:email, nil, {:size => 40})) %>
8 - <% button_bar do %> 8 + <%= button_bar do %>
9 <%= submit_button(:ok, _('Cancel notifications for e-mail above') ) %> 9 <%= submit_button(:ok, _('Cancel notifications for e-mail above') ) %>
10 <% end %> 10 <% end %>
11 <% end %> 11 <% end %>
app/views/content_viewer/forum_page.html.erb
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <p><%= @page.terms_of_use %></p> 16 <p><%= @page.terms_of_use %></p>
17 17
18 <%= form_tag @page.url.merge(:terms_accepted => true) do %> 18 <%= form_tag @page.url.merge(:terms_accepted => true) do %>
19 - <% button_bar do %> 19 + <%= button_bar do %>
20 <% if user %> 20 <% if user %>
21 <%= submit_button :save, _("Accept") %> 21 <%= submit_button :save, _("Accept") %>
22 <% else %> 22 <% else %>
app/views/enterprise_registration/basic_information.html.erb
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <%= _('There are no validators to validate the registration of this new enterprise. Contact your administrator for instructions.') %> 8 <%= _('There are no validators to validate the registration of this new enterprise. Contact your administrator for instructions.') %>
9 </div> 9 </div>
10 10
11 - <% button_bar do %> 11 + <%= button_bar do %>
12 <%= button :back, _('Go back'), { :profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile" }%> 12 <%= button :back, _('Go back'), { :profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile" }%>
13 <% end %> 13 <% end %>
14 <% else %> 14 <% else %>
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 36
37 <%= template_options(:enterprises, 'create_enterprise')%> 37 <%= template_options(:enterprises, 'create_enterprise')%>
38 38
39 - <% button_bar do %> 39 + <%= button_bar do %>
40 <%= submit_button('next', _('Next'), :cancel => {:profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile"}) %> 40 <%= submit_button('next', _('Next'), :cancel => {:profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile"}) %>
41 <% end %> 41 <% end %>
42 <% end %> 42 <% end %>
app/views/enterprise_registration/creation.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 4
5 <%= render :partial => 'shared/template_welcome_page', :locals => {:template => @enterprise.template, :header => _("What can I do with a %s?")} %> 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 <%= button :back, _('Back'), {:controller => 'memberships', :action => 'index', :profile => user.identifier} %> 8 <%= button :back, _('Back'), {:controller => 'memberships', :action => 'index', :profile => user.identifier} %>
9 <% end %> 9 <% end %>
10 10
app/views/enterprise_registration/select_validator.html.erb
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 <% end %> 22 <% end %>
23 </table> 23 </table>
24 24
25 - <% button_bar do %> 25 + <%= button_bar do %>
26 <%= submit_button 'save', _('Confirm') %> 26 <%= submit_button 'save', _('Confirm') %>
27 <% end %> 27 <% end %>
28 <% end %> 28 <% end %>
app/views/enterprise_validation/details.html.erb
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
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> 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 <%= form_tag :action => 'approve', :id => @pending.code do %> 17 <%= form_tag :action => 'approve', :id => @pending.code do %>
18 - <% button_bar do %> 18 + <%= button_bar do %>
19 <%= submit_button('approve', _('Approve')) %> 19 <%= submit_button('approve', _('Approve')) %>
20 <% end %> 20 <% end %>
21 <% end %> 21 <% end %>
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <%= form_tag :action => 'reject', :id => @pending.code do %> 27 <%= form_tag :action => 'reject', :id => @pending.code do %>
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'))%> 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 <div> 29 <div>
30 - <% button_bar do %> 30 + <%= button_bar do %>
31 <%= submit_button('reject', _('Reject')) %> 31 <%= submit_button('reject', _('Reject')) %>
32 <% end %> 32 <% end %>
33 </div> 33 </div>
app/views/enterprise_validation/edit_validation_info.html.erb
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <%= labelled_form_for :info do |f| %> 5 <%= labelled_form_for :info do |f| %>
6 <%= f.text_area(:validation_methodology, :cols => 50, :rows => 10) %> 6 <%= f.text_area(:validation_methodology, :cols => 50, :rows => 10) %>
7 <%= f.text_area(:restrictions, :cols => 50, :rows => 7) %> 7 <%= f.text_area(:restrictions, :cols => 50, :rows => 7) %>
8 - <% button_bar do %> 8 + <%= button_bar do %>
9 <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %> 9 <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
10 <% end %> 10 <% end %>
11 <% end %> 11 <% end %>
app/views/enterprise_validation/index.html.erb
1 <h1><%= _('Enterprise validations') %></h1> 1 <h1><%= _('Enterprise validations') %></h1>
2 2
3 -<% button_bar do %> 3 +<%= button_bar do %>
4 <%= button(:edit, _('Edit validation info'), { :action => 'edit_validation_info' }) %> 4 <%= button(:edit, _('Edit validation info'), { :action => 'edit_validation_info' }) %>
5 <%= button(:back, _('Go Back'), { :controller => 'profile_editor' }) %> 5 <%= button(:back, _('Go Back'), { :controller => 'profile_editor' }) %>
6 <% end %> 6 <% end %>
app/views/environment_role_manager/affiliate.html.erb
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <%= form_tag( {:action => 'give_role'}, {:method => :post}) do %> 3 <%= form_tag( {:action => 'give_role'}, {:method => :post}) do %>
4 <%= select_tag 'role', options_for_select(@roles.map{|r|[r.name,r.id]}) %> 4 <%= select_tag 'role', options_for_select(@roles.map{|r|[r.name,r.id]}) %>
5 <%= hidden_field_tag 'person', current_user.person.id %> 5 <%= hidden_field_tag 'person', current_user.person.id %>
6 - <% button_bar do %> 6 + <%= button_bar do %>
7 <%= submit_button('affiliate', _('Affiliate', :cancel => {:action => 'index'}) %> 7 <%= submit_button('affiliate', _('Affiliate', :cancel => {:action => 'index'}) %>
8 <% end %> 8 <% end %>
9 <% end %> 9 <% end %>
app/views/environment_role_manager/change_role.html.erb
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <% end %> 7 <% end %>
8 <%= hidden_field_tag 'person', @admin.id %> 8 <%= hidden_field_tag 'person', @admin.id %>
9 9
10 - <% button_bar do %> 10 + <%= button_bar do %>
11 <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %> 11 <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %>
12 <% end %> 12 <% end %>
13 <% end %> 13 <% end %>
app/views/environment_role_manager/make_admin.html.erb
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <% @roles.each do |r| %> 9 <% @roles.each do |r| %>
10 <%= labelled_form_field(r.name, (check_box_tag "roles[]", r.id)) %> 10 <%= labelled_form_field(r.name, (check_box_tag "roles[]", r.id)) %>
11 <% end %> 11 <% end %>
12 - <% button_bar do %> 12 + <%= button_bar do %>
13 <%= submit_button( 'save', _('Make'), :cancel => {:action => 'index'} ) %> 13 <%= submit_button( 'save', _('Make'), :cancel => {:action => 'index'} ) %>
14 <% end %> 14 <% end %>
15 <% end %> 15 <% end %>
app/views/environment_themes/index.html.erb
@@ -3,6 +3,6 @@ @@ -3,6 +3,6 @@
3 3
4 <br style="clear:both" /> 4 <br style="clear:both" />
5 5
6 -<% button_bar do %> 6 +<%= button_bar do %>
7 <%= button(:back, _('Back'), :controller => 'admin_panel', :action => 'index') %> 7 <%= button(:back, _('Back'), :controller => 'admin_panel', :action => 'index') %>
8 <% end %> 8 <% end %>
app/views/favorite_enterprises/index.html.erb
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 </p> 23 </p>
24 <% end %> 24 <% end %>
25 25
26 -<% button_bar do %> 26 +<%= button_bar do %>
27 <%= button(:back, _('Go back'), :controller => 'profile_editor') %> 27 <%= button(:back, _('Go back'), :controller => 'profile_editor') %>
28 <% end %> 28 <% end %>
29 29
app/views/features/_manage_community_fields.html.erb
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 </script> 55 </script>
56 56
57 <div> 57 <div>
58 - <% button_bar do %> 58 + <%= button_bar do %>
59 <%= submit_button('save', _('Save changes'), :id=>"save_community_fields") %> 59 <%= submit_button('save', _('Save changes'), :id=>"save_community_fields") %>
60 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %> 60 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
61 <% end %> 61 <% end %>
app/views/features/_manage_custom_fields.html.erb
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 </fieldset> 22 </fieldset>
23 </div> 23 </div>
24 24
25 -<% button_bar do %> 25 +<%= button_bar do %>
26 <%= button(:save, _('Save'), 'javascript: void()', :onClick => "submit_custom_field_form('##{format_values_id}', '##{form_id}');") %> 26 <%= button(:save, _('Save'), 'javascript: void()', :onClick => "submit_custom_field_form('##{format_values_id}', '##{form_id}');") %>
27 <% end %> 27 <% end %>
28 28
app/views/features/_manage_enterprise_fields.html.erb
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 </script> 55 </script>
56 56
57 <div> 57 <div>
58 - <% button_bar do %> 58 + <%= button_bar do %>
59 <%= submit_button('save', _('Save changes'), :id=>"save_enterprise_fields") %> 59 <%= submit_button('save', _('Save changes'), :id=>"save_enterprise_fields") %>
60 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %> 60 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
61 <% end %> 61 <% end %>
app/views/features/_manage_person_fields.html.erb
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 </script> 55 </script>
56 56
57 <div> 57 <div>
58 - <% button_bar do %> 58 + <%= button_bar do %>
59 <%= submit_button('save', _('Save changes'), :id=>"save_person_fields") %> 59 <%= submit_button('save', _('Save changes'), :id=>"save_person_fields") %>
60 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %> 60 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
61 <% end %> 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,7 +69,7 @@ Check all the features you want to enable for your environment, uncheck all the
69 <hr/> 69 <hr/>
70 70
71 <div> 71 <div>
72 - <% button_bar do %> 72 + <%= button_bar do %>
73 <%= submit_button('save', _('Save changes')) %> 73 <%= submit_button('save', _('Save changes')) %>
74 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %> 74 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
75 <% end %> 75 <% end %>
app/views/friends/connections.html.erb
1 <h1><%= _("Connections with %s") % @suggestion.suggestion.name %></h1> 1 <h1><%= _("Connections with %s") % @suggestion.suggestion.name %></h1>
2 2
3 -<% button_bar do %> 3 +<%= button_bar do %>
4 <%= button(:back, _('Go to friends list'), :controller => 'friends') %> 4 <%= button(:back, _('Go to friends list'), :controller => 'friends') %>
5 <% end %> 5 <% end %>
6 6
app/views/friends/index.html.erb
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 </p> 12 </p>
13 <% end %> 13 <% end %>
14 14
15 - <% button_bar do %> 15 + <%= button_bar do %>
16 <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %> 16 <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
17 <%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %> 17 <%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %>
18 <% unless @plugins.dispatch(:remove_invite_friends_button).include?(true) %> 18 <% unless @plugins.dispatch(:remove_invite_friends_button).include?(true) %>
app/views/friends/suggest.html.erb
1 <h1><%= _("Friends suggestions for %s") % profile.name %></h1> 1 <h1><%= _("Friends suggestions for %s") % profile.name %></h1>
2 2
3 -<% button_bar do %> 3 +<%= button_bar do %>
4 <%= button(:back, _('Go to friends list'), :controller => 'friends') %> 4 <%= button(:back, _('Go to friends list'), :controller => 'friends') %>
5 <% end %> 5 <% end %>
6 6
app/views/invite/_select_address_book.html.erb
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 <%= labelled_form_field(_("Password") + ":", password_field_tag(:password)) %> 34 <%= labelled_form_field(_("Password") + ":", password_field_tag(:password)) %>
35 </div> 35 </div>
36 36
37 - <% button_bar do %> 37 + <%= button_bar do %>
38 <%= submit_button(:forward, _("Next")) %> 38 <%= submit_button(:forward, _("Next")) %>
39 <% end %> 39 <% end %>
40 <p><%= _("We won't store your password or contact anyone without your permission.") %></p> 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,7 +24,7 @@
24 { :hint_text => _('Type in the person\'s %{search_fields}') % {:search_fields => @search_fields}, 24 { :hint_text => _('Type in the person\'s %{search_fields}') % {:search_fields => @search_fields},
25 :focus => false }) %> 25 :focus => false }) %>
26 26
27 - <% button_bar do %> 27 + <%= button_bar do %>
28 <%= submit_button('save', _('Invite'))%> 28 <%= submit_button('save', _('Invite'))%>
29 <%= button('cancel', _('Cancel'), profile.url)%> 29 <%= button('cancel', _('Cancel'), profile.url)%>
30 <% end %> 30 <% end %>
app/views/invite/select_friends.html.erb
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 32
33 <%= render :partial => 'invite/personalize_invitation_mail', :locals => {:mail_template => @mail_template } %> 33 <%= render :partial => 'invite/personalize_invitation_mail', :locals => {:mail_template => @mail_template } %>
34 34
35 - <% button_bar do %> 35 + <%= button_bar do %>
36 <%= submit_button(:ok, _("Invite!")) %> 36 <%= submit_button(:ok, _("Invite!")) %>
37 <% end %> 37 <% end %>
38 <% end %> 38 <% end %>
app/views/licenses/_form.html.erb
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <%= required labelled_form_field(_('Name'), f.text_field(:name)) %> 5 <%= required labelled_form_field(_('Name'), f.text_field(:name)) %>
6 <%= labelled_form_field(_('License url'), f.text_field(:url)) %> 6 <%= labelled_form_field(_('License url'), f.text_field(:url)) %>
7 7
8 - <% button_bar do %> 8 + <%= button_bar do %>
9 <%= submit_button('save', _('Save'))%> 9 <%= submit_button('save', _('Save'))%>
10 <%= button('cancel', _('Cancel'), {:action => 'index'})%> 10 <%= button('cancel', _('Cancel'), {:action => 'index'})%>
11 <% end %> 11 <% end %>
app/views/licenses/index.html.erb
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <% end %> 16 <% end %>
17 </table> 17 </table>
18 18
19 -<% button_bar do %> 19 +<%= button_bar do %>
20 <%= button(:add, _('Add a new license'), :action => 'create')%> 20 <%= button(:add, _('Add a new license'), :action => 'create')%>
21 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %> 21 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
22 <% end %> 22 <% end %>
app/views/mailconf/index.html.erb
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 6
7 <p><%= _('You already request activation of your mailbox. Please wait until an administrator approves your request.') %></p> 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 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %> 10 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
11 <% end %> 11 <% end %>
12 12
@@ -21,10 +21,10 @@ @@ -21,10 +21,10 @@
21 <h2><%= _('Configuration') %></h2> 21 <h2><%= _('Configuration') %></h2>
22 <ul> 22 <ul>
23 <li> 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 </li> 25 </li>
26 </ul> 26 </ul>
27 - <% button_bar do %> 27 + <%= button_bar do %>
28 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %> 28 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
29 <% end %> 29 <% end %>
30 30
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 <h2><%= _("Enable e-Mail account below:") %></h2> 33 <h2><%= _("Enable e-Mail account below:") %></h2>
34 <ul><%= safe_join(profile.email_addresses.map{|i| content_tag('li', i)}, "\n") %></ul> 34 <ul><%= safe_join(profile.email_addresses.map{|i| content_tag('li', i)}, "\n") %></ul>
35 <blockquote><%= _("You'll be able to access a webmail from your user menu.") %></blockquote> 35 <blockquote><%= _("You'll be able to access a webmail from your user menu.") %></blockquote>
36 - <% button_bar do %> 36 + <%= button_bar do %>
37 <%= button(:ok, _('Enable e-Mail'), { :action => 'enable' }, :method => 'post') %> 37 <%= button(:ok, _('Enable e-Mail'), { :action => 'enable' }, :method => 'post') %>
38 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %> 38 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
39 <% end %> 39 <% end %>
app/views/maps/edit_location.html.erb
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <%= labelled_form_field _('City'), f.text_field(:city) %> 11 <%= labelled_form_field _('City'), f.text_field(:city) %>
12 <%= labelled_form_field _('ZIP code'), text_field(:profile_data, :zip_code) %> 12 <%= labelled_form_field _('ZIP code'), text_field(:profile_data, :zip_code) %>
13 <%= labelled_form_field _('Address (street and number)'), text_field(:profile_data, :address) %> 13 <%= labelled_form_field _('Address (street and number)'), text_field(:profile_data, :address) %>
14 - <% button_bar do %> 14 + <%= button_bar do %>
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)") %> 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 <%= submit_button 'save', _('Save') %> 16 <%= submit_button 'save', _('Save') %>
17 <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %> 17 <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
app/views/memberships/connections.html.erb
1 <h1><%= _("Connections with %s") % @suggestion.suggestion.name %></h1> 1 <h1><%= _("Connections with %s") % @suggestion.suggestion.name %></h1>
2 2
3 -<% button_bar do %> 3 +<%= button_bar do %>
4 <%= button(:back, _('Go to groups list'), :controller => 'memberships') %> 4 <%= button(:back, _('Go to groups list'), :controller => 'memberships') %>
5 <% end %> 5 <% end %>
6 6
app/views/memberships/index.html.erb
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 <h1><%= _('Manage my groups') %></h1> 3 <h1><%= _('Manage my groups') %></h1>
4 4
5 -<% button_bar do %> 5 +<%= button_bar do %>
6 <%= button(:add, _('Create a new community'), :controller => 'memberships', :action => 'new_community') %> 6 <%= button(:add, _('Create a new community'), :controller => 'memberships', :action => 'new_community') %>
7 <%= button :add, _('Register a new enterprise'), :controller => 'enterprise_registration' if environment.enabled?('enterprise_registration') %> 7 <%= button :add, _('Register a new enterprise'), :controller => 'enterprise_registration' if environment.enabled?('enterprise_registration') %>
8 <%= button :back, _('Go back'), :controller => 'profile_editor' %> 8 <%= button :back, _('Go back'), :controller => 'profile_editor' %>
app/views/memberships/new_community.html.erb
@@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
48 48
49 <%= hidden_field_tag('back_to', @back_to) %> 49 <%= hidden_field_tag('back_to', @back_to) %>
50 50
51 - <% button_bar do %> 51 + <%= button_bar do %>
52 <%= submit_button(:save, _('Create')) %> 52 <%= submit_button(:save, _('Create')) %>
53 <%= button(:cancel, _('Cancel'), @back_to ) %> 53 <%= button(:cancel, _('Cancel'), @back_to ) %>
54 <% end %> 54 <% end %>
app/views/memberships/suggest.html.erb
1 <h1><%= _("Communities suggestions for %s") % profile.name %></h1> 1 <h1><%= _("Communities suggestions for %s") % profile.name %></h1>
2 2
3 -<% button_bar do %> 3 +<%= button_bar do %>
4 <%= button(:back, _('Go to groups list'), :controller => 'memberships') %> 4 <%= button(:back, _('Go to groups list'), :controller => 'memberships') %>
5 <% end %> 5 <% end %>
6 6
app/views/memberships/welcome.html.erb
@@ -4,6 +4,6 @@ @@ -4,6 +4,6 @@
4 4
5 <%= render :partial => 'shared/template_welcome_page', :locals => {:template => @community.template, :header => _("What can I do with a %s?")} %> 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 <%= button :back, _('Back'), @back_to %> 8 <%= button :back, _('Back'), @back_to %>
9 <% end %> 9 <% end %>
app/views/organizations/index.html.erb
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 22
23 <%= render :partial => 'results' %> 23 <%= render :partial => 'results' %>
24 24
25 - <% button_bar do %> 25 + <%= button_bar do %>
26 <%= button :back, _('Back'), :controller => 'admin_panel' %> 26 <%= button :back, _('Back'), :controller => 'admin_panel' %>
27 <% end %> 27 <% end %>
28 <% end %> 28 <% end %>
app/views/plugins/index.html.erb
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 </table> 26 </table>
27 27
28 <div> 28 <div>
29 - <% button_bar do %> 29 + <%= button_bar do %>
30 <%= submit_button('save', _('Save changes')) %> 30 <%= submit_button('save', _('Save changes')) %>
31 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %> 31 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
32 <% end %> 32 <% end %>
app/views/profile/_comment.html.erb
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 </div> 45 </div>
46 46
47 <% if logged_in? && (user == profile || user == comment.author || user.has_permission?(:moderate_comments, profile)) %> 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 <%= 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') %> 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 <% end %> 50 <% end %>
51 <% end %> 51 <% end %>
app/views/profile/_private_profile.html.erb
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <div class='private-profile-message'><%= @message %></div> 5 <div class='private-profile-message'><%= @message %></div>
6 <div class='private-profile-description'><%= profile.description %></div> 6 <div class='private-profile-description'><%= profile.description %></div>
7 7
8 -<% button_bar do %> 8 +<%= button_bar do %>
9 <% if @action == :join && logged_in? %> 9 <% if @action == :join && logged_in? %>
10 <%= join_community_button({:logged => true}) %> 10 <%= join_community_button({:logged => true}) %>
11 <% end %> 11 <% end %>
app/views/profile/communities.html.erb
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </div> 14 </div>
15 <% end %> 15 <% end %>
16 16
17 -<% button_bar do %> 17 +<%= button_bar do %>
18 <%= button :back, _('Go back'), { :controller => 'profile' } %> 18 <%= button :back, _('Go back'), { :controller => 'profile' } %>
19 <%= button :add, _('Create a new community'), 19 <%= button :add, _('Create a new community'),
20 :controller => 'memberships', :action => 'new_community' if logged_in? && user == profile %> 20 :controller => 'memberships', :action => 'new_community' if logged_in? && user == profile %>
app/views/profile/enterprises.html.erb
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <% end %> 8 <% end %>
9 </ul> 9 </ul>
10 10
11 -<% button_bar do %> 11 +<%= button_bar do %>
12 <%= button :back, _('Go back'), { :controller => 'profile' } %> 12 <%= button :back, _('Go back'), { :controller => 'profile' } %>
13 <%= button :add, _('Register a new enterprise'), :controller => 'enterprise_registration' if logged_in? && environment.enabled?('enterprise_registration') %> 13 <%= button :add, _('Register a new enterprise'), :controller => 'enterprise_registration' if logged_in? && environment.enabled?('enterprise_registration') %>
14 <% end %> 14 <% end %>
app/views/profile/fans.html.erb
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <% end %> 8 <% end %>
9 </ul> 9 </ul>
10 10
11 -<% button_bar do %> 11 +<%= button_bar do %>
12 <%= button :back, _('Go back'), { :controller => 'profile' }%> 12 <%= button :back, _('Go back'), { :controller => 'profile' }%>
13 <% end %> 13 <% end %>
14 14
app/views/profile/favorite_enterprises.html.erb
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <% end %> 8 <% end %>
9 </ul> 9 </ul>
10 10
11 -<% button_bar do %> 11 +<%= button_bar do %>
12 <%= button :back, _('Go back'), { :controller => 'profile' }%> 12 <%= button :back, _('Go back'), { :controller => 'profile' }%>
13 <% end %> 13 <% end %>
14 14
app/views/profile/friends.html.erb
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </div> 14 </div>
15 <% end %> 15 <% end %>
16 16
17 -<% button_bar do %> 17 +<%= button_bar do %>
18 <%= button :back, _('Go back'), { :controller => 'profile' } %> 18 <%= button :back, _('Go back'), { :controller => 'profile' } %>
19 <% if user == profile %> 19 <% if user == profile %>
20 <%= button :edit, _('Manage my friends'), :controller => 'friends', :action => 'index', :profile => profile.identifier %> 20 <%= button :edit, _('Manage my friends'), :controller => 'friends', :action => 'index', :profile => profile.identifier %>
app/views/profile/members.html.erb
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 </div><!-- end of class="profile-members-tabs-container" --> 36 </div><!-- end of class="profile-members-tabs-container" -->
37 <% end %> 37 <% end %>
38 38
39 -<% button_bar do %> 39 +<%= button_bar do %>
40 <%= button :back, _('Go back'), { :controller => 'profile' } %> 40 <%= button :back, _('Go back'), { :controller => 'profile' } %>
41 <% if profile.community? and user %> 41 <% if profile.community? and user %>
42 <% if user.has_permission?(:invite_members, profile) %> 42 <% if user.has_permission?(:invite_members, profile) %>
app/views/profile_editor/destroy_profile.html.erb
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <p><%= _('Are you sure you want to delete this profile?') %></p> 3 <p><%= _('Are you sure you want to delete this profile?') %></p>
4 <p><%= _('You must be aware that all content of this profile (articles, events, files and pictures) will also be deleted.') %></p> 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 <%= button(:remove, _('Yes, I am sure'), {:action => 'destroy_profile'}, :method => :post) %> 7 <%= button(:remove, _('Yes, I am sure'), {:action => 'destroy_profile'}, :method => :post) %>
8 <%= button(:cancel, _('No, I gave up'), profile.url) %> 8 <%= button(:cancel, _('No, I gave up'), profile.url) %>
9 <% end %> 9 <% end %>
app/views/profile_editor/edit.html.erb
@@ -67,13 +67,13 @@ @@ -67,13 +67,13 @@
67 67
68 <%= select_categories(:profile_data, _('Select the categories of your interest'), 2) %> 68 <%= select_categories(:profile_data, _('Select the categories of your interest'), 2) %>
69 69
70 - <% button_bar do %> 70 + <%= button_bar do %>
71 <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %> 71 <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
72 <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %> 72 <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
73 <% end %> 73 <% end %>
74 74
75 <% if user && user.has_permission?('destroy_profile', profile) %> 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 <% if !environment.enabled?('forbid_destroy_profile') || user.is_admin?(environment) %> 78 <% if !environment.enabled?('forbid_destroy_profile') || user.is_admin?(environment) %>
79 <%= button(:remove, _('Delete profile'), {:action => :destroy_profile}) %> 79 <%= button(:remove, _('Delete profile'), {:action => :destroy_profile}) %>
app/views/profile_editor/header_footer.html.erb
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 <%= text_area_tag(:custom_header, @header, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %> 24 <%= text_area_tag(:custom_header, @header, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %>
25 <h2><%= _('Content for footer') %></h2> 25 <h2><%= _('Content for footer') %></h2>
26 <%= text_area_tag(:custom_footer, @footer, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %> 26 <%= text_area_tag(:custom_footer, @footer, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %>
27 - <% button_bar do %> 27 + <%= button_bar do %>
28 <%= submit_button(:save, _('Save')) %> 28 <%= submit_button(:save, _('Save')) %>
29 <%= button(:cancel, _('Cancel'), :action => 'index') %> 29 <%= button(:cancel, _('Cancel'), :action => 'index') %>
30 <% end %> 30 <% end %>
app/views/profile_editor/welcome_page.html.erb
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <%= _('This page will be displayed to the user after his signup with this template.') %> 13 <%= _('This page will be displayed to the user after his signup with this template.') %>
14 </div> 14 </div>
15 15
16 - <% button_bar do%> 16 + <%= button_bar do%>
17 <%= submit_button('save', _('Save'), :cancel => @back_to) %> 17 <%= submit_button('save', _('Save'), :cancel => @back_to) %>
18 <% end %> 18 <% end %>
19 <% end %> 19 <% end %>
app/views/profile_members/_index_buttons.html.erb
1 -<% button_bar do %> 1 +<%= button_bar do %>
2 <%= button :back, _('Back'), :controller => 'profile_editor' %> 2 <%= button :back, _('Back'), :controller => 'profile_editor' %>
3 <%= button :add, _('Add members'), :action => 'add_members' if profile.enterprise? %> 3 <%= button :add, _('Add members'), :action => 'add_members' if profile.enterprise? %>
4 <% if profile.community? and user.has_permission?(:invite_members, profile) %> 4 <% if profile.community? and user.has_permission?(:invite_members, profile) %>
app/views/profile_members/_manage_roles.html.erb
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <%= hidden_field_tag(:last_admin, true) if from == 'last_admin'%> 5 <%= hidden_field_tag(:last_admin, true) if from == 'last_admin'%>
6 <% end %> 6 <% end %>
7 7
8 - <% button_bar(:style => 'margin-top: 30px;') do %> 8 + <%= button_bar(:style => 'margin-top: 30px;') do %>
9 <%= submit_button('save', _('Save'))%> 9 <%= submit_button('save', _('Save'))%>
10 <%= button('cancel', _('Cancel'), {:controller => 'profile_editor'})%> 10 <%= button('cancel', _('Cancel'), {:controller => 'profile_editor'})%>
11 <% end %> 11 <% end %>
app/views/profile_members/affiliate.html.erb
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <%= form_tag( {:action => 'give_role'}, {:method => :post}) do %> 3 <%= form_tag( {:action => 'give_role'}, {:method => :post}) do %>
4 <%= select_tag 'role', options_for_select(@roles.map{|r|[r.name,r.id]}) %> 4 <%= select_tag 'role', options_for_select(@roles.map{|r|[r.name,r.id]}) %>
5 <%= hidden_field_tag 'person', current_user.person.id %> 5 <%= hidden_field_tag 'person', current_user.person.id %>
6 - <% button_bar do %> 6 + <%= button_bar do %>
7 <%= submit_button('affiliate', _('Affiliate'), :cancel => {:action => 'index'}) %> 7 <%= submit_button('affiliate', _('Affiliate'), :cancel => {:action => 'index'}) %>
8 <% end %> 8 <% end %>
9 <% end %> 9 <% end %>
app/views/profile_members/change_role.html.erb
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 <% end %> 24 <% end %>
25 <%= hidden_field_tag 'person', @member.id %> 25 <%= hidden_field_tag 'person', @member.id %>
26 26
27 - <% button_bar do %> 27 + <%= button_bar do %>
28 <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %> 28 <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %>
29 <% end %> 29 <% end %>
30 <% end %> 30 <% end %>
app/views/profile_roles/_form.html.erb
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 </div> 16 </div>
17 <% end %> 17 <% end %>
18 18
19 - <% button_bar do %> 19 + <%= button_bar do %>
20 <%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %> 20 <%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %>
21 <% end %> 21 <% end %>
22 <% end %> 22 <% end %>
app/views/profile_roles/assign.html.erb
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <%=token_input_field_tag(:person_id, 'search-profile-members', {:action => 'assign_role_by_members'}, 17 <%=token_input_field_tag(:person_id, 'search-profile-members', {:action => 'assign_role_by_members'},
18 {:focus => false, :hint_text => _('Select members to assign the role')}) %> 18 {:focus => false, :hint_text => _('Select members to assign the role')}) %>
19 19
20 - <% button_bar do %> 20 + <%= button_bar do %>
21 <%= submit_button(:forward, _("Confirm")) %> 21 <%= submit_button(:forward, _("Confirm")) %>
22 <% end %> 22 <% end %>
23 </div> 23 </div>
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 <% @roles_list.each do |role| %> 28 <% @roles_list.each do |role| %>
29 <%= labelled_radio_button role.name , :selected_role, role.id , false, :class => "selected_role" %> <br> 29 <%= labelled_radio_button role.name , :selected_role, role.id , false, :class => "selected_role" %> <br>
30 <% end %> 30 <% end %>
31 - <% button_bar do %> 31 + <%= button_bar do %>
32 <%= submit_button('save',_('Confirm'), :cancel => {:action => 'index'} ) %> 32 <%= submit_button('save',_('Confirm'), :cancel => {:action => 'index'} ) %>
33 <% end %> 33 <% end %>
34 </div> 34 </div>
app/views/profile_roles/destroy.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <p><%= _('This role is not being currently used.')%></p> 4 <p><%= _('This role is not being currently used.')%></p>
5 <p><%= _('Are you sure you want to delete this role?') %></p> 5 <p><%= _('Are you sure you want to delete this role?') %></p>
6 6
7 - <% button_bar do %> 7 + <%= button_bar do %>
8 <%= button(:remove, _('Yes, I am sure'), {:action => 'remove', :id => @role.id}, :method => :post) %> 8 <%= button(:remove, _('Yes, I am sure'), {:action => 'remove', :id => @role.id}, :method => :post) %>
9 <%= button(:cancel, _('No, I gave up'), {:action => 'index'}) %> 9 <%= button(:cancel, _('No, I gave up'), {:action => 'index'}) %>
10 <% end %> 10 <% end %>
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <%= check_box_tag("roles[]", role.id, false ,{:id => role.key}) %> 16 <%= check_box_tag("roles[]", role.id, false ,{:id => role.key}) %>
17 <%= content_tag(:label, role.name, { :for => role.key }) %><br/> 17 <%= content_tag(:label, role.name, { :for => role.key }) %><br/>
18 <% end %> 18 <% end %>
19 - <% button_bar do %> 19 + <%= button_bar do %>
20 <%= submit_button('save',_('Delete role'), :cancel => {:action => 'index'} ) %> 20 <%= submit_button('save',_('Delete role'), :cancel => {:action => 'index'} ) %>
21 <% end %> 21 <% end %>
22 <% end %> 22 <% end %>
app/views/profile_roles/index.html.erb
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <% end %> 21 <% end %>
22 </table> 22 </table>
23 23
24 -<% button_bar do %> 24 +<%= button_bar do %>
25 <%= button :add, _('Create a new role'), :action => 'new' %> 25 <%= button :add, _('Create a new role'), :action => 'new' %>
26 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %> 26 <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
27 <% end %> 27 <% end %>
app/views/profile_roles/show.html.erb
@@ -3,11 +3,11 @@ @@ -3,11 +3,11 @@
3 <h3> <%= _('Permissions') %> </h3> 3 <h3> <%= _('Permissions') %> </h3>
4 <ul> 4 <ul>
5 <% @role.permissions.each do |p| %> 5 <% @role.permissions.each do |p| %>
6 - <li> <%= permission_name(p) %> </li> 6 + <li> <%= permission_name(p) %> </li>
7 <% end %> 7 <% end %>
8 </ul> 8 </ul>
9 9
10 -<% button_bar do %> 10 +<%= button_bar do %>
11 <%= button :edit, _('Edit'), :action => 'edit', :id => @role %> 11 <%= button :edit, _('Edit'), :action => 'edit', :id => @role %>
12 <%= button :back, _('Back to roles management'), :action => 'index' %> 12 <%= button :back, _('Back to roles management'), :action => 'index' %>
13 <% end %> 13 <% end %>
app/views/profile_themes/add_css.html.erb
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <%= form_tag do %> 3 <%= form_tag do %>
4 <%= labelled_form_field(_('File name'), text_field_tag('css')) %> 4 <%= labelled_form_field(_('File name'), text_field_tag('css')) %>
5 5
6 - <% button_bar do %> 6 + <%= button_bar do %>
7 <%= submit_button(:add, _('Add')) %> 7 <%= submit_button(:add, _('Add')) %>
8 <%= modal_close_button _('Cancel') %> 8 <%= modal_close_button _('Cancel') %>
9 <% end %> 9 <% end %>
app/views/profile_themes/add_image.html.erb
1 <%= form_tag({:action => 'add_image', :id => @theme.id}, :multipart => true) do %> 1 <%= form_tag({:action => 'add_image', :id => @theme.id}, :multipart => true) do %>
2 <%= labelled_form_field(_('Choose the image file'), file_field_tag(:image)) %> 2 <%= labelled_form_field(_('Choose the image file'), file_field_tag(:image)) %>
3 - <% button_bar do %> 3 + <%= button_bar do %>
4 <%= submit_button(:add, _('Add image')) %> 4 <%= submit_button(:add, _('Add image')) %>
5 <% end %> 5 <% end %>
6 <% end %> 6 <% end %>
app/views/profile_themes/css_editor.html.erb
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <%= form_tag({:action => 'update_css', :id => @theme.id }, :name => 'csscode_form') do %> 3 <%= form_tag({:action => 'update_css', :id => @theme.id }, :name => 'csscode_form') do %>
4 <%= hidden_field_tag('css', @css) %> 4 <%= hidden_field_tag('css', @css) %>
5 <%= text_area_tag('csscode', @code, :id => "codepressWindow", :class => 'codepress css') %> 5 <%= text_area_tag('csscode', @code, :id => "codepressWindow", :class => 'codepress css') %>
6 - <% button_bar do %> 6 + <%= button_bar do %>
7 <%= submit_button(:save, _('Save')) %> 7 <%= submit_button(:save, _('Save')) %>
8 <% end %> 8 <% end %>
9 <% end %> 9 <% end %>
app/views/profile_themes/edit.html.erb
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 <li><%= link_to_remote(css, :url => { :action => 'css_editor', :id => @theme.id, :css => css }, :update => { :success => 'css-code' }) %></li> 15 <li><%= link_to_remote(css, :url => { :action => 'css_editor', :id => @theme.id, :css => css }, :update => { :success => 'css-code' }) %></li>
16 <% end %> 16 <% end %>
17 </ul> 17 </ul>
18 - <% button_bar do %> 18 + <%= button_bar do %>
19 <%= modal_button :add, _('New CSS'), :action => 'add_css', :id => @theme.id %> 19 <%= modal_button :add, _('New CSS'), :action => 'add_css', :id => @theme.id %>
20 <% end %> 20 <% end %>
21 </div> 21 </div>
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <li><%= image_tag("/user_themes/#{@theme.id}/images/#{image}") %></li> 27 <li><%= image_tag("/user_themes/#{@theme.id}/images/#{image}") %></li>
28 <% end %> 28 <% end %>
29 </ul> 29 </ul>
30 - <% button_bar do %> 30 + <%= button_bar do %>
31 <%= modal_button :add, _('Add image'), :action => 'add_image', :id => @theme.id %> 31 <%= modal_button :add, _('Add image'), :action => 'add_image', :id => @theme.id %>
32 <% end %> 32 <% end %>
33 </div> 33 </div>
app/views/profile_themes/index.html.erb
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 40
41 <br style="clear:both" /> 41 <br style="clear:both" />
42 42
43 -<% button_bar do %> 43 +<%= button_bar do %>
44 <% if environment.enabled?('user_themes') %> 44 <% if environment.enabled?('user_themes') %>
45 <%= modal_button :add, _('New theme ...'), :action => 'new' %> 45 <%= modal_button :add, _('New theme ...'), :action => 'new' %>
46 <% end %> 46 <% end %>
app/views/profile_themes/new.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 4
5 <%= labelled_form_field(_('Name of the new theme:'), text_field_tag(:name)) %> 5 <%= labelled_form_field(_('Name of the new theme:'), text_field_tag(:name)) %>
6 6
7 - <% button_bar do %> 7 + <%= button_bar do %>
8 <%= submit_button(:save, _('Create')) %> 8 <%= submit_button(:save, _('Create')) %>
9 <% end %> 9 <% end %>
10 <% end %> 10 <% end %>
app/views/region_validators/_search.html.erb
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <%= item.name %> 5 <%= item.name %>
6 <%= form_tag :action => 'add', :id => @region do %> 6 <%= form_tag :action => 'add', :id => @region do %>
7 <%= hidden_field_tag :validator_id, item.id %> 7 <%= hidden_field_tag :validator_id, item.id %>
8 - <% button_bar do %> 8 + <%= button_bar do %>
9 <%= submit_button('add', _('Add')) %> 9 <%= submit_button('add', _('Add')) %>
10 <% end %> 10 <% end %>
11 <% end %> 11 <% end %>
app/views/region_validators/region.html.erb
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 19
20 <%= form_tag({}, { :method => 'get' }) do %> 20 <%= form_tag({}, { :method => 'get' }) do %>
21 <%= text_field_tag :search, nil, :id => 'search_validator' %> 21 <%= text_field_tag :search, nil, :id => 'search_validator' %>
22 - <% button_bar do %> 22 + <%= button_bar do %>
23 <%= submit_button('search', _('Search')) %> 23 <%= submit_button('search', _('Search')) %>
24 <% end %> 24 <% end %>
25 <% end %> 25 <% end %>
app/views/role/_form.html.erb
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 </div> 16 </div>
17 <% end %> 17 <% end %>
18 18
19 - <% button_bar do %> 19 + <%= button_bar do %>
20 <%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %> 20 <%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %>
21 <% end %> 21 <% end %>
22 <% end %> 22 <% end %>
app/views/role/index.html.erb
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <% end %> 17 <% end %>
18 </table> 18 </table>
19 19
20 -<% button_bar do %> 20 +<%= button_bar do %>
21 <%= button :add, _('Create a new role'), :action => 'new' %> 21 <%= button :add, _('Create a new role'), :action => 'new' %>
22 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %> 22 <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
23 <% end %> 23 <% end %>
app/views/role/show.html.erb
@@ -3,11 +3,11 @@ @@ -3,11 +3,11 @@
3 <h3> <%= _('Permissions') %> </h3> 3 <h3> <%= _('Permissions') %> </h3>
4 <ul> 4 <ul>
5 <% @role.permissions.each do |p| %> 5 <% @role.permissions.each do |p| %>
6 - <li> <%= permission_name(p) %> </li> 6 + <li> <%= permission_name(p) %> </li>
7 <% end %> 7 <% end %>
8 </ul> 8 </ul>
9 9
10 -<% button_bar do %> 10 +<%= button_bar do %>
11 <%= button :edit, _('Edit'), :action => 'edit', :id => @role %> 11 <%= button :edit, _('Edit'), :action => 'edit', :id => @role %>
12 <%= button :back, _('Back to roles management'), :action => 'index' %> 12 <%= button :back, _('Back to roles management'), :action => 'index' %>
13 <% end %> 13 <% end %>
app/views/search/tag.html.erb
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <%= _('Tagged with "%s"').html_safe % content_tag('code', @tag) %> 2 <%= _('Tagged with "%s"').html_safe % content_tag('code', @tag) %>
3 </h2> 3 </h2>
4 4
5 -<% button_bar do %> 5 +<%= button_bar do %>
6 <%= button('back', _('Back to tag cloud'), :action => 'tags') %> 6 <%= button('back', _('Back to tag cloud'), :action => 'tags') %>
7 <% end %> 7 <% end %>
8 8
app/views/shared/_list_groups.html.erb
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <%= raw _('Description: %s') % group.description + '<br/>' if group.community? %> 11 <%= raw _('Description: %s') % group.description + '<br/>' if group.community? %>
12 <%= _('Members: %s') % group.members_count.to_s %> <br/> 12 <%= _('Members: %s') % group.members_count.to_s %> <br/>
13 <%= _('Created at: %s') % show_date(group.created_at) unless group.enterprise? %> <br/> 13 <%= _('Created at: %s') % show_date(group.created_at) unless group.enterprise? %> <br/>
14 - <% button_bar do %> 14 + <%= button_bar do %>
15 <% if user.has_permission?(:edit_profile, group) %> 15 <% if user.has_permission?(:edit_profile, group) %>
16 <%= button 'menu-ctrl-panel', _('Control panel of this group'), group.admin_url %> 16 <%= button 'menu-ctrl-panel', _('Control panel of this group'), group.admin_url %>
17 <% end %> 17 <% end %>
app/views/shared/access_denied.html.erb
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
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> 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 <% end %> 10 <% end %>
11 11
12 - <% button_bar do %> 12 + <%= button_bar do %>
13 <%= button :back, _('Go back'), :back %> 13 <%= button :back, _('Go back'), :back %>
14 <%= button :home, _('Go to the site home page'), :controller => 'home' %> 14 <%= button :home, _('Go to the site home page'), :controller => 'home' %>
15 <% end %> 15 <% end %>