diff --git a/app/views/account/_email_status.html.erb b/app/views/account/_email_status.html.erb
new file mode 100644
index 0000000..b7f1f24
--- /dev/null
+++ b/app/views/account/_email_status.html.erb
@@ -0,0 +1,7 @@
+
diff --git a/app/views/account/_email_status.rhtml b/app/views/account/_email_status.rhtml
deleted file mode 100644
index b7f1f24..0000000
--- a/app/views/account/_email_status.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/app/views/account/_identifier_status.html.erb b/app/views/account/_identifier_status.html.erb
new file mode 100644
index 0000000..863651d
--- /dev/null
+++ b/app/views/account/_identifier_status.html.erb
@@ -0,0 +1,7 @@
+
diff --git a/app/views/account/_identifier_status.rhtml b/app/views/account/_identifier_status.rhtml
deleted file mode 100644
index 863651d..0000000
--- a/app/views/account/_identifier_status.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/app/views/account/_login_form.html.erb b/app/views/account/_login_form.html.erb
new file mode 100644
index 0000000..cd111f4
--- /dev/null
+++ b/app/views/account/_login_form.html.erb
@@ -0,0 +1,22 @@
+<% labelled_form_for :user, @user,
+ :url => { :controller => 'account', :action => (params[:enterprise_code] ? 'activate_enterprise' : 'login') } do |f| %>
+
+<%= f.text_field :login,
+ :id => ( lightbox? ? 'lightbox_' : '' ) + 'user_login',
+ :onchange => 'this.value = convToValidLogin( this.value )' %>
+
+<%= f.password_field :password,
+ :id => ( lightbox? ? 'lightbox_' : '' ) + 'user_password' %>
+
+<% if params[:enterprise_code] %>
+ <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
+ <%= hidden_field_tag :answer, params[:answer] %>
+ <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
+<% end %>
+
+<% button_bar do %>
+ <%= submit_button( 'login', _('Log in') )%>
+ <%= lightbox_close_button(_('Cancel')) if lightbox? %>
+<% end %>
+
+<% end %>
diff --git a/app/views/account/_login_form.rhtml b/app/views/account/_login_form.rhtml
deleted file mode 100644
index cd111f4..0000000
--- a/app/views/account/_login_form.rhtml
+++ /dev/null
@@ -1,22 +0,0 @@
-<% labelled_form_for :user, @user,
- :url => { :controller => 'account', :action => (params[:enterprise_code] ? 'activate_enterprise' : 'login') } do |f| %>
-
-<%= f.text_field :login,
- :id => ( lightbox? ? 'lightbox_' : '' ) + 'user_login',
- :onchange => 'this.value = convToValidLogin( this.value )' %>
-
-<%= f.password_field :password,
- :id => ( lightbox? ? 'lightbox_' : '' ) + 'user_password' %>
-
-<% if params[:enterprise_code] %>
- <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
- <%= hidden_field_tag :answer, params[:answer] %>
- <%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
-<% end %>
-
-<% button_bar do %>
- <%= submit_button( 'login', _('Log in') )%>
- <%= lightbox_close_button(_('Cancel')) if lightbox? %>
-<% end %>
-
-<% end %>
diff --git a/app/views/account/_signup_form.html.erb b/app/views/account/_signup_form.html.erb
new file mode 100644
index 0000000..560be5b
--- /dev/null
+++ b/app/views/account/_signup_form.html.erb
@@ -0,0 +1,163 @@
+<% @profile_data = @person %>
+
+<%= error_messages_for :user, :person, :header_message => _('The account could not be created') %>
+
+<% labelled_form_for :user, @user, :html => { :multipart => true, :id => 'signup-form' } do |f| %>
+
+<%= hidden_field_tag :invitation_code, @invitation_code %>
+
+
+
+
+
+
+ <%= submit_button('save', _('Create my account')) %>
+
+
+<% end -%>
+
+
diff --git a/app/views/account/_signup_form.rhtml b/app/views/account/_signup_form.rhtml
deleted file mode 100644
index 560be5b..0000000
--- a/app/views/account/_signup_form.rhtml
+++ /dev/null
@@ -1,163 +0,0 @@
-<% @profile_data = @person %>
-
-<%= error_messages_for :user, :person, :header_message => _('The account could not be created') %>
-
-<% labelled_form_for :user, @user, :html => { :multipart => true, :id => 'signup-form' } do |f| %>
-
-<%= hidden_field_tag :invitation_code, @invitation_code %>
-
-
-
-
-
-
- <%= submit_button('save', _('Create my account')) %>
-
-
-<% end -%>
-
-
diff --git a/app/views/account/accept_terms.html.erb b/app/views/account/accept_terms.html.erb
new file mode 100644
index 0000000..7aa7b9b
--- /dev/null
+++ b/app/views/account/accept_terms.html.erb
@@ -0,0 +1,28 @@
+
+
+
<%= __('Enterprise activation') + ' - ' + (logged_in? ? _('part 2 of 2') : _(' part 2 of 3')) %>
+
+
<%= @terms_of_enterprise_use %>
+
+ <% form_tag :action => 'activate_enterprise' do %>
+ <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
+ <%= hidden_field_tag :answer, params[:answer] %>
+
+ <%= 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, :onclick => 'toggle_submit_button("submit-accept-terms", this.checked)') %>
+ <% button_bar do %>
+ <%= button 'cancel', _('Cancel'), :controller => 'home', :action => 'index' %>
+ <%= submit_button 'forward', _('Continue'), {:disabled => true, :class => 'disabled', :id => 'submit-accept-terms'} %>
+ <% end %>
+ <% end %>
+
diff --git a/app/views/account/accept_terms.rhtml b/app/views/account/accept_terms.rhtml
deleted file mode 100644
index 7aa7b9b..0000000
--- a/app/views/account/accept_terms.rhtml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
<%= __('Enterprise activation') + ' - ' + (logged_in? ? _('part 2 of 2') : _(' part 2 of 3')) %>
-
-
<%= @terms_of_enterprise_use %>
-
- <% form_tag :action => 'activate_enterprise' do %>
- <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
- <%= hidden_field_tag :answer, params[:answer] %>
-
- <%= 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, :onclick => 'toggle_submit_button("submit-accept-terms", this.checked)') %>
- <% button_bar do %>
- <%= button 'cancel', _('Cancel'), :controller => 'home', :action => 'index' %>
- <%= submit_button 'forward', _('Continue'), {:disabled => true, :class => 'disabled', :id => 'submit-accept-terms'} %>
- <% end %>
- <% end %>
-
diff --git a/app/views/account/activate_enterprise.html.erb b/app/views/account/activate_enterprise.html.erb
new file mode 100644
index 0000000..5debce6
--- /dev/null
+++ b/app/views/account/activate_enterprise.html.erb
@@ -0,0 +1,28 @@
+
+
<%= __('Enterprise activation - part 3 of 3') %>
+
+<%= error_messages_for :user %>
+
+
<%= __('Now for you manage your enterprise you have to associate an individual account to the enterprise.') %>
+
<%= _('Do you have a personal user account in the system?') %>
+
+
+ <%= button_to_function 'login', _('Yes'), "$('enterprise-activation-create-user-form').hide(); $('enterprise-activation-login-form').show()" %>
+ <%= button_to_function 'add', _('No'), "$('enterprise-activation-login-form').hide(); $('enterprise-activation-create-user-form').show()" %>
+
+
+
+
+
+
+
+
diff --git a/app/views/account/activate_enterprise.rhtml b/app/views/account/activate_enterprise.rhtml
deleted file mode 100644
index 5debce6..0000000
--- a/app/views/account/activate_enterprise.rhtml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
<%= __('Enterprise activation - part 3 of 3') %>
-
-<%= error_messages_for :user %>
-
-
<%= __('Now for you manage your enterprise you have to associate an individual account to the enterprise.') %>
-
<%= _('Do you have a personal user account in the system?') %>
-
-
- <%= button_to_function 'login', _('Yes'), "$('enterprise-activation-create-user-form').hide(); $('enterprise-activation-login-form').show()" %>
- <%= button_to_function 'add', _('No'), "$('enterprise-activation-login-form').hide(); $('enterprise-activation-create-user-form').show()" %>
-
-
-
-
-
-
-
-
diff --git a/app/views/account/activation_question.html.erb b/app/views/account/activation_question.html.erb
new file mode 100644
index 0000000..170b9cf
--- /dev/null
+++ b/app/views/account/activation_question.html.erb
@@ -0,0 +1,42 @@
+
+
+
+
<%= __('Enterprise activation') + ' - ' + (logged_in? ? _('part 1 of 2') : _('part 1 of 3')) %>
+ <% form_tag( {:action => 'accept_terms'}, {:method => 'get', :onsubmit => (@question == :foundation_year ? 'return check_valid_year(this)' : 'return check_valid_cnpj(this)')}) do %>
+
+
<%= _('Pay atention! You have only one chance!') %>
+
+
<%= __("This is a question to know if you really are part of this enterprise. Pay atention because you have only one chance to answer right and activate your enterprise. If you answer wrong you will not be able to activate the enterprise automaticaly and must get in touch with the admins of %s by email or phone.") % environment.name %>
+
+ <%= ApplicationHelper::NoosferoFormBuilder::output_field(@question == :foundation_year ? (__("What year your enterprise was founded? It must have 4 digits, eg 1990. %s") % environment.tip_message_enterprise_activation_question) : __('What is the CNPJ of your enterprise?'), text_field_tag(:answer, nil, :id => 'enterprise-activation-answer')) %>
+
+ <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
+
+ <% button_bar do %>
+ <%= button 'cancel', _('Cancel'), :action => 'index' %>
+ <%= submit_button 'forward', _('Continue') %>
+ <% end %>
+ <% end %>
+
diff --git a/app/views/account/activation_question.rhtml b/app/views/account/activation_question.rhtml
deleted file mode 100644
index 170b9cf..0000000
--- a/app/views/account/activation_question.rhtml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
<%= __('Enterprise activation') + ' - ' + (logged_in? ? _('part 1 of 2') : _('part 1 of 3')) %>
- <% form_tag( {:action => 'accept_terms'}, {:method => 'get', :onsubmit => (@question == :foundation_year ? 'return check_valid_year(this)' : 'return check_valid_cnpj(this)')}) do %>
-
-
<%= _('Pay atention! You have only one chance!') %>
-
-
<%= __("This is a question to know if you really are part of this enterprise. Pay atention because you have only one chance to answer right and activate your enterprise. If you answer wrong you will not be able to activate the enterprise automaticaly and must get in touch with the admins of %s by email or phone.") % environment.name %>
-
- <%= ApplicationHelper::NoosferoFormBuilder::output_field(@question == :foundation_year ? (__("What year your enterprise was founded? It must have 4 digits, eg 1990. %s") % environment.tip_message_enterprise_activation_question) : __('What is the CNPJ of your enterprise?'), text_field_tag(:answer, nil, :id => 'enterprise-activation-answer')) %>
-
- <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
-
- <% button_bar do %>
- <%= button 'cancel', _('Cancel'), :action => 'index' %>
- <%= submit_button 'forward', _('Continue') %>
- <% end %>
- <% end %>
-
diff --git a/app/views/account/already_activated.html.erb b/app/views/account/already_activated.html.erb
new file mode 100644
index 0000000..6da29b1
--- /dev/null
+++ b/app/views/account/already_activated.html.erb
@@ -0,0 +1 @@
+<%= __('This enterprise is already active') %>
diff --git a/app/views/account/already_activated.rhtml b/app/views/account/already_activated.rhtml
deleted file mode 100644
index 6da29b1..0000000
--- a/app/views/account/already_activated.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= __('This enterprise is already active') %>
diff --git a/app/views/account/blocked.html.erb b/app/views/account/blocked.html.erb
new file mode 100644
index 0000000..279843c
--- /dev/null
+++ b/app/views/account/blocked.html.erb
@@ -0,0 +1,17 @@
+
+
<%= __('This enterprise can\'t be activated by the system') %>
+
<%= __('Unfortunately this enterprise can\'t be activated via the system.') %>
+
+<% if @enterprise.blocked? %>
+ <%= _('There was a failed atempt of activation and the automated activation was disabled for your security.') %>
+<% else %>
+ <%= __('We don\'t have enough information about your enterprise to identify you.') %>
+<% end %>
+
+
+<% if @environment.activation_blocked_text.blank? %>
+ <%= __('Your enterprise has been blocked') %>
+<% else %>
+ <%= @environment.activation_blocked_text %>
+<% end %>
+
diff --git a/app/views/account/blocked.rhtml b/app/views/account/blocked.rhtml
deleted file mode 100644
index 279843c..0000000
--- a/app/views/account/blocked.rhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
<%= __('This enterprise can\'t be activated by the system') %>
-
<%= __('Unfortunately this enterprise can\'t be activated via the system.') %>
-
-<% if @enterprise.blocked? %>
- <%= _('There was a failed atempt of activation and the automated activation was disabled for your security.') %>
-<% else %>
- <%= __('We don\'t have enough information about your enterprise to identify you.') %>
-<% end %>
-
-
-<% if @environment.activation_blocked_text.blank? %>
- <%= __('Your enterprise has been blocked') %>
-<% else %>
- <%= @environment.activation_blocked_text %>
-<% end %>
-
diff --git a/app/views/account/change_password.html.erb b/app/views/account/change_password.html.erb
new file mode 100644
index 0000000..9993cae
--- /dev/null
+++ b/app/views/account/change_password.html.erb
@@ -0,0 +1,17 @@
+<%= _('Change password') %>
+
+<% form_tag do %>
+
+<%= _('Current password') %>
+<%= password_field_tag :current_password %>
+
+<%= _('New password') %>
+<%= password_field_tag :new_password %>
+
+<%= _('Confirm your new Password') %>
+<%= password_field_tag :new_password_confirmation %>
+
+<%= submit_button :ok, _('Change password') %>
+
+<% end %>
+
diff --git a/app/views/account/change_password.rhtml b/app/views/account/change_password.rhtml
deleted file mode 100644
index 9993cae..0000000
--- a/app/views/account/change_password.rhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-<%= _('Change password') %>
-
-<% form_tag do %>
-
-<%= _('Current password') %>
-<%= password_field_tag :current_password %>
-
-<%= _('New password') %>
-<%= password_field_tag :new_password %>
-
-<%= _('Confirm your new Password') %>
-<%= password_field_tag :new_password_confirmation %>
-
-<%= submit_button :ok, _('Change password') %>
-
-<% end %>
-
diff --git a/app/views/account/forgot_password.html.erb b/app/views/account/forgot_password.html.erb
new file mode 100644
index 0000000..537c9f4
--- /dev/null
+++ b/app/views/account/forgot_password.html.erb
@@ -0,0 +1,22 @@
+<%= _('Forgot your password?') %>
+
+<%= error_messages_for :change_password, :header_message => _('Instructions to password recovery could not be sent'), :message => nil %>
+
+<% labelled_form_for :change_password, @change_password, :url => { :action => 'forgot_password' } do |f| %>
+
+ <%= f.text_field :login,
+ :onchange => 'this.value = convToValidLogin( this.value )' %>
+
+ <%= f.text_field :email %>
+
+ <%= f.hidden_field :environment_id, :value => environment.id %>
+
+
+ <% button_bar do %>
+ <%= submit_button('send', _('Send instructions')) %>
+ <% end %>
+
+<%= content_tag(:small,_('After clicking the button above, you will receive an email with a link to a page where you will be able to create a new password.')) %>
+
+<% end %>
+
diff --git a/app/views/account/forgot_password.rhtml b/app/views/account/forgot_password.rhtml
deleted file mode 100644
index 537c9f4..0000000
--- a/app/views/account/forgot_password.rhtml
+++ /dev/null
@@ -1,22 +0,0 @@
-<%= _('Forgot your password?') %>
-
-<%= error_messages_for :change_password, :header_message => _('Instructions to password recovery could not be sent'), :message => nil %>
-
-<% labelled_form_for :change_password, @change_password, :url => { :action => 'forgot_password' } do |f| %>
-
- <%= f.text_field :login,
- :onchange => 'this.value = convToValidLogin( this.value )' %>
-
- <%= f.text_field :email %>
-
- <%= f.hidden_field :environment_id, :value => environment.id %>
-
-
- <% button_bar do %>
- <%= submit_button('send', _('Send instructions')) %>
- <% end %>
-
-<%= content_tag(:small,_('After clicking the button above, you will receive an email with a link to a page where you will be able to create a new password.')) %>
-
-<% end %>
-
diff --git a/app/views/account/index.html.erb b/app/views/account/index.html.erb
new file mode 100644
index 0000000..e8ed9d2
--- /dev/null
+++ b/app/views/account/index.html.erb
@@ -0,0 +1,26 @@
+<%= _('Account options') %>
+
+
+<%= link_to _('Change password.'), :action => 'change_password' %>
+<%= _('It is a good idea to change your password from times to times.') %>
+
+
+
+<%= link_to _('Edit Personal details.'), :controller => 'profile_editor', :profile => user.identifier, :action => 'index' %>
+<%= _('You can change your personal details.') %>
+
+
+
+<%= link_to_homepage(_('My home page.')) %>
+<%= _('See your homepage.') %>
+
+
+
+<%= link_to(_('Manage content.'), :controller => 'cms', :profile => user.identifier, :action => 'index') %>
+<%= _('Manage your content.') %>
+
+
+
+<%= link_to _('Logout.'), :action => 'logout' %>
+<%= _('It is always a good idea to make a logout when you finish using the environment.')%>
+
diff --git a/app/views/account/index.rhtml b/app/views/account/index.rhtml
deleted file mode 100644
index e8ed9d2..0000000
--- a/app/views/account/index.rhtml
+++ /dev/null
@@ -1,26 +0,0 @@
-<%= _('Account options') %>
-
-
-<%= link_to _('Change password.'), :action => 'change_password' %>
-<%= _('It is a good idea to change your password from times to times.') %>
-
-
-
-<%= link_to _('Edit Personal details.'), :controller => 'profile_editor', :profile => user.identifier, :action => 'index' %>
-<%= _('You can change your personal details.') %>
-
-
-
-<%= link_to_homepage(_('My home page.')) %>
-<%= _('See your homepage.') %>
-
-
-
-<%= link_to(_('Manage content.'), :controller => 'cms', :profile => user.identifier, :action => 'index') %>
-<%= _('Manage your content.') %>
-
-
-
-<%= link_to _('Logout.'), :action => 'logout' %>
-<%= _('It is always a good idea to make a logout when you finish using the environment.')%>
-
diff --git a/app/views/account/index_anonymous.html.erb b/app/views/account/index_anonymous.html.erb
new file mode 100644
index 0000000..a2b2601
--- /dev/null
+++ b/app/views/account/index_anonymous.html.erb
@@ -0,0 +1,12 @@
+<%= _('Identify yourself') %>
+
+
+<%= lightbox_link_to _('Login.'), { :controller => 'account', :action => 'login_popup' } %>
+
+<%= _('You need to login to be able to use all the features in this environment.') %>
+
+
+
+<%= link_to _('Sign up.'), :action => 'signup' %>
+<%= _('If you are not an user already, you can register now to become a member of this environment.') %>
+
diff --git a/app/views/account/index_anonymous.rhtml b/app/views/account/index_anonymous.rhtml
deleted file mode 100644
index a2b2601..0000000
--- a/app/views/account/index_anonymous.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<%= _('Identify yourself') %>
-
-
-<%= lightbox_link_to _('Login.'), { :controller => 'account', :action => 'login_popup' } %>
-
-<%= _('You need to login to be able to use all the features in this environment.') %>
-
-
-
-<%= link_to _('Sign up.'), :action => 'signup' %>
-<%= _('If you are not an user already, you can register now to become a member of this environment.') %>
-
diff --git a/app/views/account/invalid_change_password_code.html.erb b/app/views/account/invalid_change_password_code.html.erb
new file mode 100644
index 0000000..b0f8cd4
--- /dev/null
+++ b/app/views/account/invalid_change_password_code.html.erb
@@ -0,0 +1,5 @@
+<%= _("Invalid change password code") %>
+
+
+<%= _('The code you are using for password change is not valid. Please try to request password change using the "I forgot my password" functionality.') % url_for(:action => 'forgot_password') %>
+
diff --git a/app/views/account/invalid_change_password_code.rhtml b/app/views/account/invalid_change_password_code.rhtml
deleted file mode 100644
index b0f8cd4..0000000
--- a/app/views/account/invalid_change_password_code.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= _("Invalid change password code") %>
-
-
-<%= _('The code you are using for password change is not valid. Please try to request password change using the "I forgot my password" functionality.') % url_for(:action => 'forgot_password') %>
-
diff --git a/app/views/account/invalid_enterprise_code.html.erb b/app/views/account/invalid_enterprise_code.html.erb
new file mode 100644
index 0000000..d0006b4
--- /dev/null
+++ b/app/views/account/invalid_enterprise_code.html.erb
@@ -0,0 +1,5 @@
+<%= __("Invalid enterprise code") %>
+
+
+<%= __('The code you are using for validate your enterprise is not valid. Please check if you are typing it correctly.') %>
+
diff --git a/app/views/account/invalid_enterprise_code.rhtml b/app/views/account/invalid_enterprise_code.rhtml
deleted file mode 100644
index d0006b4..0000000
--- a/app/views/account/invalid_enterprise_code.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= __("Invalid enterprise code") %>
-
-
-<%= __('The code you are using for validate your enterprise is not valid. Please check if you are typing it correctly.') %>
-
diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb
new file mode 100644
index 0000000..5ab7e8c
--- /dev/null
+++ b/app/views/account/login.html.erb
@@ -0,0 +1,38 @@
+
+
+
<%= _('Login') %>
+
+<% @user ||= User.new %>
+<% is_thickbox ||= false %>
+
+<%= @message %>
+
+<% labelled_form_for :user, @user, :url => login_url do |f| %>
+
+ <%= f.text_field :login, :id => 'main_user_login', :onchange => 'this.value = convToValidLogin( this.value )', :value => params[:userlogin] %>
+
+ <%= f.password_field :password %>
+
+ <%= @plugins.dispatch(:login_extra_contents).collect { |content| instance_eval(&content) }.join("") %>
+
+ <% button_bar do %>
+ <%= submit_button( 'login', _('Log in') )%>
+ <% if is_thickbox %>
+ <%= thickbox_close_button(_('Cancel')) %>
+ <% end %>
+ <% end %>
+
+<% end %>
+
+<% button_bar do %>
+ <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
+ <%= button :add, _("New user"), :controller => 'account', :action => 'signup' %>
+ <% end %>
+
+ <% unless @plugins.dispatch(:allow_password_recovery).include?(false) %>
+ <%= button :help, _("I forgot my password!"), :controller => 'account', :action => 'forgot_password' %>
+ <% end %>
+<% end %>
+
+
+
diff --git a/app/views/account/login.rhtml b/app/views/account/login.rhtml
deleted file mode 100644
index 5ab7e8c..0000000
--- a/app/views/account/login.rhtml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
<%= _('Login') %>
-
-<% @user ||= User.new %>
-<% is_thickbox ||= false %>
-
-<%= @message %>
-
-<% labelled_form_for :user, @user, :url => login_url do |f| %>
-
- <%= f.text_field :login, :id => 'main_user_login', :onchange => 'this.value = convToValidLogin( this.value )', :value => params[:userlogin] %>
-
- <%= f.password_field :password %>
-
- <%= @plugins.dispatch(:login_extra_contents).collect { |content| instance_eval(&content) }.join("") %>
-
- <% button_bar do %>
- <%= submit_button( 'login', _('Log in') )%>
- <% if is_thickbox %>
- <%= thickbox_close_button(_('Cancel')) %>
- <% end %>
- <% end %>
-
-<% end %>
-
-<% button_bar do %>
- <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
- <%= button :add, _("New user"), :controller => 'account', :action => 'signup' %>
- <% end %>
-
- <% unless @plugins.dispatch(:allow_password_recovery).include?(false) %>
- <%= button :help, _("I forgot my password!"), :controller => 'account', :action => 'forgot_password' %>
- <% end %>
-<% end %>
-
-
-
diff --git a/app/views/account/login_block.html.erb b/app/views/account/login_block.html.erb
new file mode 100644
index 0000000..aea20a1
--- /dev/null
+++ b/app/views/account/login_block.html.erb
@@ -0,0 +1,44 @@
+
+ <% unless logged_in? %>
+
+
<%= _('Login') %>
+
+
+
+<%
+ @user ||= User.new
+%>
+
+ <% labelled_form_for :user, @user, :url => login_url do |f| %>
+
+ <%= f.text_field :login, :onchange => 'this.value = convToValidLogin( this.value )' %>
+
+ <%= f.password_field :password %>
+
+ <%= @plugins.dispatch(:login_extra_contents).collect { |content| instance_eval(&content) }.join("") %>
+
+ <% button_bar do %>
+ <%= submit_button( 'login', _('Log in') )%>
+ <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
+ <%= link_to content_tag( 'span', _('New user') ),
+ { :controller => 'account', :action => 'signup' },
+ :class => 'button with-text icon-add' %>
+ <% end %>
+ <% end %>
+
+ <% end %>
+
+ <% unless @plugins.dispatch(:allow_password_recovery).include?(false) %>
+
+ <%= link_to _("I forgot my password!"), :controller => 'account', :action => 'forgot_password' %>
+
+ <% end %>
+
+
+
+ <% else %>
+
<%= user.identifier %>
+ <% end %>
+
+
+
diff --git a/app/views/account/login_block.rhtml b/app/views/account/login_block.rhtml
deleted file mode 100644
index aea20a1..0000000
--- a/app/views/account/login_block.rhtml
+++ /dev/null
@@ -1,44 +0,0 @@
-
- <% unless logged_in? %>
-
-
<%= _('Login') %>
-
-
-
-<%
- @user ||= User.new
-%>
-
- <% labelled_form_for :user, @user, :url => login_url do |f| %>
-
- <%= f.text_field :login, :onchange => 'this.value = convToValidLogin( this.value )' %>
-
- <%= f.password_field :password %>
-
- <%= @plugins.dispatch(:login_extra_contents).collect { |content| instance_eval(&content) }.join("") %>
-
- <% button_bar do %>
- <%= submit_button( 'login', _('Log in') )%>
- <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
- <%= link_to content_tag( 'span', _('New user') ),
- { :controller => 'account', :action => 'signup' },
- :class => 'button with-text icon-add' %>
- <% end %>
- <% end %>
-
- <% end %>
-
- <% unless @plugins.dispatch(:allow_password_recovery).include?(false) %>
-
- <%= link_to _("I forgot my password!"), :controller => 'account', :action => 'forgot_password' %>
-
- <% end %>
-
-
-
- <% else %>
-
<%= user.identifier %>
- <% end %>
-
-
-
diff --git a/app/views/account/logout_popup.html.erb b/app/views/account/logout_popup.html.erb
new file mode 100644
index 0000000..ee2c1ef
--- /dev/null
+++ b/app/views/account/logout_popup.html.erb
@@ -0,0 +1,7 @@
+<%= _('Are you sure you want to get out?') %>
+
+<% button_bar do %>
+ <%= button :ok, _('Yes'), { :controller => 'account', :action => 'logout' } %>
+ <%= lightbox_close_button _('No, I want to stay.') %>
+<% end %>
+
diff --git a/app/views/account/logout_popup.rhtml b/app/views/account/logout_popup.rhtml
deleted file mode 100644
index ee2c1ef..0000000
--- a/app/views/account/logout_popup.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= _('Are you sure you want to get out?') %>
-
-<% button_bar do %>
- <%= button :ok, _('Yes'), { :controller => 'account', :action => 'logout' } %>
- <%= lightbox_close_button _('No, I want to stay.') %>
-<% end %>
-
diff --git a/app/views/account/new_password.html.erb b/app/views/account/new_password.html.erb
new file mode 100644
index 0000000..bf75be8
--- /dev/null
+++ b/app/views/account/new_password.html.erb
@@ -0,0 +1,17 @@
+<%= _('Enter new password') %>
+
+
+<%= _("Hello, %s! Please enter your new password in the form below.") % @change_password.requestor.name %>
+
+
+<%= error_messages_for :change_password %>
+
+<% form_for(:change_password) do |f| %>
+
+ <%= labelled_form_field(_('Enter new password'), (f.password_field :password)) %>
+ <%= labelled_form_field(_('Confirm the new password'), (f.password_field :password_confirmation)) %>
+ <% button_bar do %>
+ <%= submit_button(:ok, _('Change password')) %>
+ <% end %>
+
+<% end %>
diff --git a/app/views/account/new_password.rhtml b/app/views/account/new_password.rhtml
deleted file mode 100644
index bf75be8..0000000
--- a/app/views/account/new_password.rhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-<%= _('Enter new password') %>
-
-
-<%= _("Hello, %s! Please enter your new password in the form below.") % @change_password.requestor.name %>
-
-
-<%= error_messages_for :change_password %>
-
-<% form_for(:change_password) do |f| %>
-
- <%= labelled_form_field(_('Enter new password'), (f.password_field :password)) %>
- <%= labelled_form_field(_('Confirm the new password'), (f.password_field :password_confirmation)) %>
- <% button_bar do %>
- <%= submit_button(:ok, _('Change password')) %>
- <% end %>
-
-<% end %>
diff --git a/app/views/account/new_password_ok.html.erb b/app/views/account/new_password_ok.html.erb
new file mode 100644
index 0000000..2bed21a
--- /dev/null
+++ b/app/views/account/new_password_ok.html.erb
@@ -0,0 +1,9 @@
+<%= _('Password changed sucessfully') %>
+
+
+<%= _('%s, your new password was successfully installed.') % @change_password.requestor.identifier %>
+
+
+
+<%= _("You can login now.") % url_for(:action => 'login') %>
+
diff --git a/app/views/account/new_password_ok.rhtml b/app/views/account/new_password_ok.rhtml
deleted file mode 100644
index 2bed21a..0000000
--- a/app/views/account/new_password_ok.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= _('Password changed sucessfully') %>
-
-
-<%= _('%s, your new password was successfully installed.') % @change_password.requestor.identifier %>
-
-
-
-<%= _("You can login now.") % url_for(:action => 'login') %>
-
diff --git a/app/views/account/password_recovery_sent.html.erb b/app/views/account/password_recovery_sent.html.erb
new file mode 100644
index 0000000..d7543b1
--- /dev/null
+++ b/app/views/account/password_recovery_sent.html.erb
@@ -0,0 +1,5 @@
+<%= _('Password recovery') %>
+
+
+<%= _('An e-mail was just sent to your e-mail address, with instructions for changing your password. You should receive it in a few minutes.') %>
+
diff --git a/app/views/account/password_recovery_sent.rhtml b/app/views/account/password_recovery_sent.rhtml
deleted file mode 100644
index d7543b1..0000000
--- a/app/views/account/password_recovery_sent.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= _('Password recovery') %>
-
-
-<%= _('An e-mail was just sent to your e-mail address, with instructions for changing your password. You should receive it in a few minutes.') %>
-
diff --git a/app/views/account/signup.html.erb b/app/views/account/signup.html.erb
new file mode 100644
index 0000000..f0bc7fe
--- /dev/null
+++ b/app/views/account/signup.html.erb
@@ -0,0 +1,18 @@
+<% if @register_pending %>
+
+
<%= _("Welcome to %s!") % environment.name %>
+
<%= _("Thanks for signing up, we're thrilled to have you on our social network!") %>
+
<%= _("Firstly, some tips for getting started:") %>
+
<%= _("Confirm your account!") %>
+
<%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %>
+
<%= _("You won't appear as %s until your account is confirmed.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %>
+
<%= _("What to do next?") %>
+
<%= _("%s. Upload an avatar and let your friends find you easily :)") % link_to(_('Customize your profile'), {:controller => 'doc', :section => 'user', :topic => 'editing-person-info'}, :target => '_blank') %>
+
<%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %>
+
<%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %>
+
<%= _("Start exploring and have fun!") %>
+
+<% else %>
+ <%= _('Sign up for %s!') % environment.name %>
+ <%= render :partial => 'signup_form' %>
+<% end %>
diff --git a/app/views/account/signup.rhtml b/app/views/account/signup.rhtml
deleted file mode 100644
index f0bc7fe..0000000
--- a/app/views/account/signup.rhtml
+++ /dev/null
@@ -1,18 +0,0 @@
-<% if @register_pending %>
-
-
<%= _("Welcome to %s!") % environment.name %>
-
<%= _("Thanks for signing up, we're thrilled to have you on our social network!") %>
-
<%= _("Firstly, some tips for getting started:") %>
-
<%= _("Confirm your account!") %>
-
<%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %>
-
<%= _("You won't appear as %s until your account is confirmed.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %>
-
<%= _("What to do next?") %>
-
<%= _("%s. Upload an avatar and let your friends find you easily :)") % link_to(_('Customize your profile'), {:controller => 'doc', :section => 'user', :topic => 'editing-person-info'}, :target => '_blank') %>
-
<%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %>
-
<%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %>
-
<%= _("Start exploring and have fun!") %>
-
-<% else %>
- <%= _('Sign up for %s!') % environment.name %>
- <%= render :partial => 'signup_form' %>
-<% end %>
diff --git a/app/views/account/welcome.html.erb b/app/views/account/welcome.html.erb
new file mode 100644
index 0000000..3469b3d
--- /dev/null
+++ b/app/views/account/welcome.html.erb
@@ -0,0 +1,10 @@
+<% if @enterprise && logged_in? %>
+ <%= _('Welcome to %s') % environment.name %>
+
+ <%= __('%s was successfuly activated. Now you may go to your control panel or to the control panel of your enterprise') % @enterprise.name %>
+
+ <% button_bar do %>
+ <%= button 'forward', _('Go to my control panel'), :action => 'index', :controller => 'profile_editor', :profile => current_user.person.identifier %>
+ <%= button 'forward', __('Go to my enterprise control panel') % @enterprise.name, :action => 'index', :controller => 'profile_editor', :profile => @enterprise.identifier %>
+ <% end %>
+<% end %>
diff --git a/app/views/account/welcome.rhtml b/app/views/account/welcome.rhtml
deleted file mode 100644
index 3469b3d..0000000
--- a/app/views/account/welcome.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<% if @enterprise && logged_in? %>
- <%= _('Welcome to %s') % environment.name %>
-
- <%= __('%s was successfuly activated. Now you may go to your control panel or to the control panel of your enterprise') % @enterprise.name %>
-
- <% button_bar do %>
- <%= button 'forward', _('Go to my control panel'), :action => 'index', :controller => 'profile_editor', :profile => current_user.person.identifier %>
- <%= button 'forward', __('Go to my enterprise control panel') % @enterprise.name, :action => 'index', :controller => 'profile_editor', :profile => @enterprise.identifier %>
- <% end %>
-<% end %>
diff --git a/app/views/admin_panel/_signup_welcome_text.html.erb b/app/views/admin_panel/_signup_welcome_text.html.erb
new file mode 100644
index 0000000..a81fa09
--- /dev/null
+++ b/app/views/admin_panel/_signup_welcome_text.html.erb
@@ -0,0 +1,7 @@
+
+ <%= _('This text will be sent to new users if the feature "Send welcome e-mail to new users" is enabled on environment.') %>
+ <%= _('Including %s on body, it will be replaced by the real name of the e-mail recipient.') % content_tag('code', '{user_name}') %>
+
+
+<%= labelled_form_field(_('Subject'), text_field(:environment, :signup_welcome_text_subject, :style => 'width:100%')) %>
+<%= labelled_form_field(_('Body'), text_area(:environment, :signup_welcome_text_body, :cols => 40, :style => 'width: 100%', :class => 'mceEditor')) %>
diff --git a/app/views/admin_panel/_signup_welcome_text.rhtml b/app/views/admin_panel/_signup_welcome_text.rhtml
deleted file mode 100644
index a81fa09..0000000
--- a/app/views/admin_panel/_signup_welcome_text.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-
- <%= _('This text will be sent to new users if the feature "Send welcome e-mail to new users" is enabled on environment.') %>
- <%= _('Including %s on body, it will be replaced by the real name of the e-mail recipient.') % content_tag('code', '{user_name}') %>
-
-
-<%= labelled_form_field(_('Subject'), text_field(:environment, :signup_welcome_text_subject, :style => 'width:100%')) %>
-<%= labelled_form_field(_('Body'), text_area(:environment, :signup_welcome_text_body, :cols => 40, :style => 'width: 100%', :class => 'mceEditor')) %>
diff --git a/app/views/admin_panel/_site_info.html.erb b/app/views/admin_panel/_site_info.html.erb
new file mode 100644
index 0000000..e2cf95a
--- /dev/null
+++ b/app/views/admin_panel/_site_info.html.erb
@@ -0,0 +1,18 @@
+<%= required labelled_form_field(_('Site name'), text_field(:environment, :name)) %>
+<%= labelled_form_field(_('Contact email'), text_field(:environment, :contact_email)) %>
+<% themes_options = Theme.system_themes.map {|theme| [theme.name, theme.id] }.sort %>
+<%= labelled_form_field(_('Theme'), select(:environment, :theme, options_for_select(themes_options, environment.theme))) %>
+<%= required f.text_field(:reports_lower_bound, :size => 3) %>
+<%= labelled_form_field(_('Default language'), select(:environment, :default_language, environment.locales.invert, { :selected => environment.default_locale, :include_blank => true })) %>
+<%= label_tag :languages, _('Available languages') %>
+
+
+<%
+ fields = Noosfero.locales.map do |value, name|
+ labelled_check_box(name, "environment[languages][#{value}]", true, environment.available_locales.include?(value))
+ end
+%>
+<%= balanced_table(fields)%>
+
+
+<%= labelled_form_field _('Homepage content'), text_area(:environment, :description, :cols => 40, :style => 'width: 90%', :class => 'mceEditor') %>
diff --git a/app/views/admin_panel/_site_info.rhtml b/app/views/admin_panel/_site_info.rhtml
deleted file mode 100644
index e2cf95a..0000000
--- a/app/views/admin_panel/_site_info.rhtml
+++ /dev/null
@@ -1,18 +0,0 @@
-<%= required labelled_form_field(_('Site name'), text_field(:environment, :name)) %>
-<%= labelled_form_field(_('Contact email'), text_field(:environment, :contact_email)) %>
-<% themes_options = Theme.system_themes.map {|theme| [theme.name, theme.id] }.sort %>
-<%= labelled_form_field(_('Theme'), select(:environment, :theme, options_for_select(themes_options, environment.theme))) %>
-<%= required f.text_field(:reports_lower_bound, :size => 3) %>
-<%= labelled_form_field(_('Default language'), select(:environment, :default_language, environment.locales.invert, { :selected => environment.default_locale, :include_blank => true })) %>
-<%= label_tag :languages, _('Available languages') %>
-
-
-<%
- fields = Noosfero.locales.map do |value, name|
- labelled_check_box(name, "environment[languages][#{value}]", true, environment.available_locales.include?(value))
- end
-%>
-<%= balanced_table(fields)%>
-
-
-<%= labelled_form_field _('Homepage content'), text_area(:environment, :description, :cols => 40, :style => 'width: 90%', :class => 'mceEditor') %>
diff --git a/app/views/admin_panel/_terms_of_use.html.erb b/app/views/admin_panel/_terms_of_use.html.erb
new file mode 100644
index 0000000..79e3a3b
--- /dev/null
+++ b/app/views/admin_panel/_terms_of_use.html.erb
@@ -0,0 +1 @@
+<%= f.text_area :terms_of_use, :cols => 40, :style => 'width: 90%', :class => 'mceEditor' %>
diff --git a/app/views/admin_panel/_terms_of_use.rhtml b/app/views/admin_panel/_terms_of_use.rhtml
deleted file mode 100644
index 79e3a3b..0000000
--- a/app/views/admin_panel/_terms_of_use.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= f.text_area :terms_of_use, :cols => 40, :style => 'width: 90%', :class => 'mceEditor' %>
diff --git a/app/views/admin_panel/index.html.erb b/app/views/admin_panel/index.html.erb
new file mode 100644
index 0000000..cac3be8
--- /dev/null
+++ b/app/views/admin_panel/index.html.erb
@@ -0,0 +1,42 @@
+<%= _('Administrator Panel') %>
+
+<%= _('System settings') %>
+
+
+ <%= link_to _('Environment settings'), :action => 'site_info' %>
+ <%= link_to _('Features'), :controller => 'features' %>
+ <%= link_to _('Plugins'), :controller => 'plugins' %>
+ <%= link_to _('Sideboxes'), :controller => 'environment_design'%>
+ <%= link_to _('Homepage'), :action => 'set_portal_community' %>
+ <%= link_to _('Licenses'), :controller =>'licenses' %>
+
+
+<%= _('Profiles') %>
+
+
+ <%= link_to _('User roles'), :controller => 'role' %>
+ <%= link_to _('Users'), :controller => 'users' %>
+ <%= link_to _('Profile templates'), :controller => 'templates' %>
+ <%= link_to _('Fields'), :controller => 'features', :action => 'manage_fields' %>
+
+
+
+<%
+ plugin_links = @plugins.dispatch(:admin_panel_links)
+%>
+<% unless plugin_links.empty? %>
+ <%= _('Plugins') %>
+
+ <% plugin_links.each do |link| %>
+ <%= link_to link[:title], link[:url] %>
+ <% end %>
+
+<% end %>
+
+<%= _('Enterprise-related settings') %>
+
+
+ <%= link_to __('Message for disabled enterprises'), :action => 'message_for_disabled_enterprise' %>
+ <%= link_to _('Validators by region'), :controller => 'region_validators' %>
+ <%= link_to _('Categories'), :controller => 'categories'%>
+
diff --git a/app/views/admin_panel/index.rhtml b/app/views/admin_panel/index.rhtml
deleted file mode 100644
index cac3be8..0000000
--- a/app/views/admin_panel/index.rhtml
+++ /dev/null
@@ -1,42 +0,0 @@
-<%= _('Administrator Panel') %>
-
-<%= _('System settings') %>
-
-
- <%= link_to _('Environment settings'), :action => 'site_info' %>
- <%= link_to _('Features'), :controller => 'features' %>
- <%= link_to _('Plugins'), :controller => 'plugins' %>
- <%= link_to _('Sideboxes'), :controller => 'environment_design'%>
- <%= link_to _('Homepage'), :action => 'set_portal_community' %>
- <%= link_to _('Licenses'), :controller =>'licenses' %>
-
-
-<%= _('Profiles') %>
-
-
- <%= link_to _('User roles'), :controller => 'role' %>
- <%= link_to _('Users'), :controller => 'users' %>
- <%= link_to _('Profile templates'), :controller => 'templates' %>
- <%= link_to _('Fields'), :controller => 'features', :action => 'manage_fields' %>
-
-
-
-<%
- plugin_links = @plugins.dispatch(:admin_panel_links)
-%>
-<% unless plugin_links.empty? %>
- <%= _('Plugins') %>
-
- <% plugin_links.each do |link| %>
- <%= link_to link[:title], link[:url] %>
- <% end %>
-
-<% end %>
-
-<%= _('Enterprise-related settings') %>
-
-
- <%= link_to __('Message for disabled enterprises'), :action => 'message_for_disabled_enterprise' %>
- <%= link_to _('Validators by region'), :controller => 'region_validators' %>
- <%= link_to _('Categories'), :controller => 'categories'%>
-
diff --git a/app/views/admin_panel/message_for_disabled_enterprise.html.erb b/app/views/admin_panel/message_for_disabled_enterprise.html.erb
new file mode 100644
index 0000000..03fdc96
--- /dev/null
+++ b/app/views/admin_panel/message_for_disabled_enterprise.html.erb
@@ -0,0 +1,14 @@
+<%= _('Site info') %>
+
+<%= render :file => 'shared/tiny_mce' %>
+
+<% labelled_form_for :environment, @environment, :url => {:action => 'site_info'} do |f| %>
+
+ <%= f.text_area :message_for_disabled_enterprise, :cols => 40, :style => 'width: 90%' %>
+
+ <% button_bar do %>
+ <%= submit_button(:save, _('Save')) %>
+ <%= button(:cancel, _('Cancel'), :action => 'index') %>
+ <% end %>
+
+<% end %>
diff --git a/app/views/admin_panel/message_for_disabled_enterprise.rhtml b/app/views/admin_panel/message_for_disabled_enterprise.rhtml
deleted file mode 100644
index 03fdc96..0000000
--- a/app/views/admin_panel/message_for_disabled_enterprise.rhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<%= _('Site info') %>
-
-<%= render :file => 'shared/tiny_mce' %>
-
-<% labelled_form_for :environment, @environment, :url => {:action => 'site_info'} do |f| %>
-
- <%= f.text_area :message_for_disabled_enterprise, :cols => 40, :style => 'width: 90%' %>
-
- <% button_bar do %>
- <%= submit_button(:save, _('Save')) %>
- <%= button(:cancel, _('Cancel'), :action => 'index') %>
- <% end %>
-
-<% end %>
diff --git a/app/views/admin_panel/set_portal_community.html.erb b/app/views/admin_panel/set_portal_community.html.erb
new file mode 100644
index 0000000..476f4ea
--- /dev/null
+++ b/app/views/admin_panel/set_portal_community.html.erb
@@ -0,0 +1,24 @@
+ <%= _('Set Environment Portal') %>
+
+<% if @portal_community.new_record? %>
+ <% form_tag do %>
+ <%= labelled_form_field(_('Portal identifier'), text_field_tag('portal_community_identifier', @portal_community.identifier, :size => 40) ) %>
+
+ <% button_bar do %>
+ <%= submit_button 'save', _('Save'), :cancel => { :action => 'index' } %>
+ <% end %>
+ <% end %>
+<% else %>
+ <%= _('Portal identifier: %s') % link_to(@portal_community.identifier, @portal_community.url) %>
+
+ <% button_bar do %>
+ <%if @portal_community.environment.enabled?('use_portal_community') %>
+ <%= button 'cancel', _('Disable'), {:action => 'manage_portal_community', :activate => 0} %>
+ <% else %>
+ <%= button 'ok', _('Enable'), {:action => 'manage_portal_community', :activate => 1} %>
+ <% end %>
+ <%= button 'folder', _('Select Portal Folders'), {:action => 'set_portal_folders'} %>
+ <%= button 'edit', _('Define Amount by Folder'), {:action => 'set_portal_news_amount'} %>
+ <%= button 'delete', _('Remove'), { :action => 'unset_portal_community'} %>
+ <% end %>
+<% end %>
diff --git a/app/views/admin_panel/set_portal_community.rhtml b/app/views/admin_panel/set_portal_community.rhtml
deleted file mode 100644
index 476f4ea..0000000
--- a/app/views/admin_panel/set_portal_community.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
- <%= _('Set Environment Portal') %>
-
-<% if @portal_community.new_record? %>
- <% form_tag do %>
- <%= labelled_form_field(_('Portal identifier'), text_field_tag('portal_community_identifier', @portal_community.identifier, :size => 40) ) %>
-
- <% button_bar do %>
- <%= submit_button 'save', _('Save'), :cancel => { :action => 'index' } %>
- <% end %>
- <% end %>
-<% else %>
- <%= _('Portal identifier: %s') % link_to(@portal_community.identifier, @portal_community.url) %>
-
- <% button_bar do %>
- <%if @portal_community.environment.enabled?('use_portal_community') %>
- <%= button 'cancel', _('Disable'), {:action => 'manage_portal_community', :activate => 0} %>
- <% else %>
- <%= button 'ok', _('Enable'), {:action => 'manage_portal_community', :activate => 1} %>
- <% end %>
- <%= button 'folder', _('Select Portal Folders'), {:action => 'set_portal_folders'} %>
- <%= button 'edit', _('Define Amount by Folder'), {:action => 'set_portal_news_amount'} %>
- <%= button 'delete', _('Remove'), { :action => 'unset_portal_community'} %>
- <% end %>
-<% end %>
diff --git a/app/views/admin_panel/set_portal_folders.html.erb b/app/views/admin_panel/set_portal_folders.html.erb
new file mode 100644
index 0000000..2b4692c
--- /dev/null
+++ b/app/views/admin_panel/set_portal_folders.html.erb
@@ -0,0 +1,43 @@
+<%= _('Select folders') %>
+
+<%= _('Select the folders that will hold the news of the initial page of the environment') %>
+
+
+
+
+ <%= labelled_form_field(_('Available folders'), select_tag( 'folders[]', options_from_collection_for_select(@available_portal_folders, :id, :name, nil), {:id => 'portal-folders-list', :multiple => true, :size => 6 }) ) %>
+
+
+
+ <%= button :down, _('Add'), '#', { :id => 'add' } %>
+ <%= button :up, _('Remove'), '#', { :id => 'remove' } %>
+
+
+<% form_tag do %>
+
+ <%= labelled_form_field(_('Portal folders'), select_tag( 'folders[]', options_from_collection_for_select(@selected, :id, :name, nil), {:id => 'selected-folders', :multiple => true, :size => 6 })) %>
+
+
+
+ <%= _('The same order in which you arrange the folders here will be used for arranging the boxes in the environment initial page.') %>
+
+
+ <% button_bar do %>
+ <%= submit_button 'save', _('Save'), :cancel => {:action => 'index'} %>
+ <% end %>
+<% end %>
diff --git a/app/views/admin_panel/set_portal_folders.rhtml b/app/views/admin_panel/set_portal_folders.rhtml
deleted file mode 100644
index 2b4692c..0000000
--- a/app/views/admin_panel/set_portal_folders.rhtml
+++ /dev/null
@@ -1,43 +0,0 @@
-<%= _('Select folders') %>
-
-<%= _('Select the folders that will hold the news of the initial page of the environment') %>
-
-
-
-
- <%= labelled_form_field(_('Available folders'), select_tag( 'folders[]', options_from_collection_for_select(@available_portal_folders, :id, :name, nil), {:id => 'portal-folders-list', :multiple => true, :size => 6 }) ) %>
-
-
-
- <%= button :down, _('Add'), '#', { :id => 'add' } %>
- <%= button :up, _('Remove'), '#', { :id => 'remove' } %>
-
-
-<% form_tag do %>
-
- <%= labelled_form_field(_('Portal folders'), select_tag( 'folders[]', options_from_collection_for_select(@selected, :id, :name, nil), {:id => 'selected-folders', :multiple => true, :size => 6 })) %>
-
-
-
- <%= _('The same order in which you arrange the folders here will be used for arranging the boxes in the environment initial page.') %>
-
-
- <% button_bar do %>
- <%= submit_button 'save', _('Save'), :cancel => {:action => 'index'} %>
- <% end %>
-<% end %>
diff --git a/app/views/admin_panel/set_portal_news_amount.html.erb b/app/views/admin_panel/set_portal_news_amount.html.erb
new file mode 100644
index 0000000..9781d92
--- /dev/null
+++ b/app/views/admin_panel/set_portal_news_amount.html.erb
@@ -0,0 +1,12 @@
+<%= _('News amount by folder') %>
+
+<% labelled_form_for :environment, @environment do |f| %>
+
+ <%= labelled_form_field _('Number of news'), select(:environment, :news_amount_by_folder, (1..10).to_a) %>
+
+ <% button_bar do %>
+ <%= submit_button(:save, _('Save')) %>
+ <%= button(:cancel, _('Cancel'), :action => 'index') %>
+ <% end %>
+
+<% end %>
diff --git a/app/views/admin_panel/set_portal_news_amount.rhtml b/app/views/admin_panel/set_portal_news_amount.rhtml
deleted file mode 100644
index 9781d92..0000000
--- a/app/views/admin_panel/set_portal_news_amount.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<%= _('News amount by folder') %>
-
-<% labelled_form_for :environment, @environment do |f| %>
-
- <%= labelled_form_field _('Number of news'), select(:environment, :news_amount_by_folder, (1..10).to_a) %>
-
- <% button_bar do %>
- <%= submit_button(:save, _('Save')) %>
- <%= button(:cancel, _('Cancel'), :action => 'index') %>
- <% end %>
-
-<% end %>
diff --git a/app/views/admin_panel/site_info.html.erb b/app/views/admin_panel/site_info.html.erb
new file mode 100644
index 0000000..b8df356
--- /dev/null
+++ b/app/views/admin_panel/site_info.html.erb
@@ -0,0 +1,19 @@
+<%= _('Environment settings') %>
+
+<%= error_messages_for :environment %>
+
+<%= render :file => 'shared/tiny_mce' %>
+
+<% labelled_form_for :environment, @environment, :url => {:host => @environment.default_hostname, :port => request.port} do |f| %>
+ <% tabs = [] %>
+ <% tabs << {:title => _('Site info'), :id => 'site-info',
+ :content => (render :partial => 'site_info', :locals => {:f => f})} %>
+ <% tabs << {:title => _('Terms of use'), :id => 'terms-of-use',
+ :content => (render :partial => 'terms_of_use', :locals => {:f => f})} %>
+ <% tabs << {:title => _('Signup welcome text'), :id => 'signup-welcome-text',
+ :content => (render :partial => 'signup_welcome_text', :locals => {:f => f})} %>
+ <%= render_tabs(tabs) %>
+ <% button_bar do %>
+ <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %>
+ <% end %>
+<% end %>
diff --git a/app/views/admin_panel/site_info.rhtml b/app/views/admin_panel/site_info.rhtml
deleted file mode 100644
index b8df356..0000000
--- a/app/views/admin_panel/site_info.rhtml
+++ /dev/null
@@ -1,19 +0,0 @@
-<%= _('Environment settings') %>
-
-<%= error_messages_for :environment %>
-
-<%= render :file => 'shared/tiny_mce' %>
-
-<% labelled_form_for :environment, @environment, :url => {:host => @environment.default_hostname, :port => request.port} do |f| %>
- <% tabs = [] %>
- <% tabs << {:title => _('Site info'), :id => 'site-info',
- :content => (render :partial => 'site_info', :locals => {:f => f})} %>
- <% tabs << {:title => _('Terms of use'), :id => 'terms-of-use',
- :content => (render :partial => 'terms_of_use', :locals => {:f => f})} %>
- <% tabs << {:title => _('Signup welcome text'), :id => 'signup-welcome-text',
- :content => (render :partial => 'signup_welcome_text', :locals => {:f => f})} %>
- <%= render_tabs(tabs) %>
- <% button_bar do %>
- <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %>
- <% end %>
-<% end %>
diff --git a/app/views/blocks/categories.html.erb b/app/views/blocks/categories.html.erb
new file mode 100644
index 0000000..e4c7e34
--- /dev/null
+++ b/app/views/blocks/categories.html.erb
@@ -0,0 +1,3 @@
+<%= block_title(block.title) %>
+
+<%= display_category_menu block, block.selected_categories %>
diff --git a/app/views/blocks/categories.rhtml b/app/views/blocks/categories.rhtml
deleted file mode 100644
index e4c7e34..0000000
--- a/app/views/blocks/categories.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= block_title(block.title) %>
-
-<%= display_category_menu block, block.selected_categories %>
diff --git a/app/views/blocks/disabled_enterprise_message.html.erb b/app/views/blocks/disabled_enterprise_message.html.erb
new file mode 100644
index 0000000..208fe0c
--- /dev/null
+++ b/app/views/blocks/disabled_enterprise_message.html.erb
@@ -0,0 +1,8 @@
+
+ <%= message %>
+ <% if profile.blocked? && user && user.is_admin?(profile.environment) %>
+
+ <%= button :lock, _('Unblock'), {:controller => 'profile', :action => 'unblock'} %>
+
+ <% end %>
+
diff --git a/app/views/blocks/disabled_enterprise_message.rhtml b/app/views/blocks/disabled_enterprise_message.rhtml
deleted file mode 100644
index 208fe0c..0000000
--- a/app/views/blocks/disabled_enterprise_message.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-
- <%= message %>
- <% if profile.blocked? && user && user.is_admin?(profile.environment) %>
-
- <%= button :lock, _('Unblock'), {:controller => 'profile', :action => 'unblock'} %>
-
- <% end %>
-
diff --git a/app/views/blocks/featured_products.html.erb b/app/views/blocks/featured_products.html.erb
new file mode 100644
index 0000000..1a246a2
--- /dev/null
+++ b/app/views/blocks/featured_products.html.erb
@@ -0,0 +1,55 @@
+<%= block_title(block.title) %>
+<% unless block.products.blank? %>
+ <%= link_to content_tag(:span, _('Previous')), '#', :class => 'featured-product-prev featured-product-arrow' %>
+
+
+ <% block.products.in_groups_of(block.groups_of).each do |group| %>
+
+
+
+ <% group.reject{ |x| x.nil? }.each_with_index do |p, i| %>
+
+ <%= link_to content_tag(:img, nil, :src => p.image.public_filename(:thumb), :alt => p.name, :class => ('reflect' if block.reflect)), product_path(p), :class => 'featured-product-image' %>
+
+
+
<%= p.name %>
+
<%= float_to_currency(p.price) %>
+
<%= truncate(p.description, 50, '...') %>
+
<%= link_to _('See More'), product_path(p), :class => 'featured-product-link' %>
+
+
+
+ <% end %>
+
+
+
+ <% end %>
+
+
+ <%= link_to content_tag(:span, _('Next')), '#', :class => 'featured-product-next featured-product-arrow' %>
+
+
+<% else %>
+ <%= _('Please, edit this block and choose some products') %>
+<% end %>
diff --git a/app/views/blocks/featured_products.rhtml b/app/views/blocks/featured_products.rhtml
deleted file mode 100644
index 1a246a2..0000000
--- a/app/views/blocks/featured_products.rhtml
+++ /dev/null
@@ -1,55 +0,0 @@
-<%= block_title(block.title) %>
-<% unless block.products.blank? %>
- <%= link_to content_tag(:span, _('Previous')), '#', :class => 'featured-product-prev featured-product-arrow' %>
-
-
- <% block.products.in_groups_of(block.groups_of).each do |group| %>
-
-
-
- <% group.reject{ |x| x.nil? }.each_with_index do |p, i| %>
-
- <%= link_to content_tag(:img, nil, :src => p.image.public_filename(:thumb), :alt => p.name, :class => ('reflect' if block.reflect)), product_path(p), :class => 'featured-product-image' %>
-
-
-
<%= p.name %>
-
<%= float_to_currency(p.price) %>
-
<%= truncate(p.description, 50, '...') %>
-
<%= link_to _('See More'), product_path(p), :class => 'featured-product-link' %>
-
-
-
- <% end %>
-
-
-
- <% end %>
-
-
- <%= link_to content_tag(:span, _('Next')), '#', :class => 'featured-product-next featured-product-arrow' %>
-
-
-<% else %>
- <%= _('Please, edit this block and choose some products') %>
-<% end %>
diff --git a/app/views/blocks/highlights.html.erb b/app/views/blocks/highlights.html.erb
new file mode 100644
index 0000000..678f453
--- /dev/null
+++ b/app/views/blocks/highlights.html.erb
@@ -0,0 +1,55 @@
+<%= block_title(block.title) %>
+<% if !block.featured_images.empty? %>
+
+
+ <% if block.navigation %>
+
+ <% end %>
+
+
+
+<% else %>
+ <%= _('Please, edit this block and choose some images') %>
+<% end %>
diff --git a/app/views/blocks/highlights.rhtml b/app/views/blocks/highlights.rhtml
deleted file mode 100644
index 678f453..0000000
--- a/app/views/blocks/highlights.rhtml
+++ /dev/null
@@ -1,55 +0,0 @@
-<%= block_title(block.title) %>
-<% if !block.featured_images.empty? %>
-
-
- <% if block.navigation %>
-
- <% end %>
-
-
-
-<% else %>
- <%= _('Please, edit this block and choose some images') %>
-<% end %>
diff --git a/app/views/blocks/login_block.html.erb b/app/views/blocks/login_block.html.erb
new file mode 100644
index 0000000..c1a3bb9
--- /dev/null
+++ b/app/views/blocks/login_block.html.erb
@@ -0,0 +1,13 @@
+
+
<%= _('Logged in as %s') % '{login}' %>
+
+ <%= _('User since {year}/{month}') %>
+ <%= link_to _('Homepage'), '/{login}' %>
+
+
+ <%= link_to content_tag('span', _('Logout')), { :controller => 'account', :action => 'logout' }, :class => 'button with-text icon-menu-logout' %>
+
+
+
+ <%= render :file => 'account/login_block' %>
+
diff --git a/app/views/blocks/login_block.rhtml b/app/views/blocks/login_block.rhtml
deleted file mode 100644
index c1a3bb9..0000000
--- a/app/views/blocks/login_block.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
<%= _('Logged in as %s') % '{login}' %>
-
- <%= _('User since {year}/{month}') %>
- <%= link_to _('Homepage'), '/{login}' %>
-
-
- <%= link_to content_tag('span', _('Logout')), { :controller => 'account', :action => 'logout' }, :class => 'button with-text icon-menu-logout' %>
-
-
-
- <%= render :file => 'account/login_block' %>
-
diff --git a/app/views/blocks/my_network.html.erb b/app/views/blocks/my_network.html.erb
new file mode 100644
index 0000000..14d39a3
--- /dev/null
+++ b/app/views/blocks/my_network.html.erb
@@ -0,0 +1,15 @@
+<%= block_title(title) %>
+
+<%= render :file => 'blocks/my_network/' + owner.class.name.underscore, :locals => { :owner => owner } %>
+
+
+ <%= link_to(__('Homepage'), owner.url, :class => 'url') %>
+ <%= link_to(_('View profile'), owner.public_profile_url) %>
+ <% if !user.nil? and owner.organization? and user.has_permission?('edit_profile', profile) %>
+ <%= link_to _('Control panel'), :controller => 'profile_editor', :profile => profile.identifier %>
+ <% end %>
+
+
+
+ <%= render :file => 'blocks/profile_info_actions/' + owner.class.name.underscore %>
+
diff --git a/app/views/blocks/my_network.rhtml b/app/views/blocks/my_network.rhtml
deleted file mode 100644
index 14d39a3..0000000
--- a/app/views/blocks/my_network.rhtml
+++ /dev/null
@@ -1,15 +0,0 @@
-<%= block_title(title) %>
-
-<%= render :file => 'blocks/my_network/' + owner.class.name.underscore, :locals => { :owner => owner } %>
-
-
- <%= link_to(__('Homepage'), owner.url, :class => 'url') %>
- <%= link_to(_('View profile'), owner.public_profile_url) %>
- <% if !user.nil? and owner.organization? and user.has_permission?('edit_profile', profile) %>
- <%= link_to _('Control panel'), :controller => 'profile_editor', :profile => profile.identifier %>
- <% end %>
-
-
-
- <%= render :file => 'blocks/profile_info_actions/' + owner.class.name.underscore %>
-
diff --git a/app/views/blocks/my_network/community.html.erb b/app/views/blocks/my_network/community.html.erb
new file mode 100644
index 0000000..15cc306
--- /dev/null
+++ b/app/views/blocks/my_network/community.html.erb
@@ -0,0 +1,9 @@
+
+ <%= link_to(n_( 'One article published', '%s articles published', owner.articles.count) %
+ content_tag('b', owner.articles.count), owner.public_profile_url.merge(:action => 'sitemap') ) %>
+ <% members = owner.members.size %>
+ <%= link_to(n_( 'One member', '%s members', members) %
+ content_tag('b', members), owner.public_profile_url.merge(:action => 'members') ) %>
+ <%= link_to(n_('One tag', '%s tags', owner.article_tags.size) %
+ content_tag('b', owner.article_tags.size), owner.public_profile_url.merge(:action => 'tags')) %>
+
diff --git a/app/views/blocks/my_network/community.rhtml b/app/views/blocks/my_network/community.rhtml
deleted file mode 100644
index 15cc306..0000000
--- a/app/views/blocks/my_network/community.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- <%= link_to(n_( 'One article published', '%s articles published', owner.articles.count) %
- content_tag('b', owner.articles.count), owner.public_profile_url.merge(:action => 'sitemap') ) %>
- <% members = owner.members.size %>
- <%= link_to(n_( 'One member', '%s members', members) %
- content_tag('b', members), owner.public_profile_url.merge(:action => 'members') ) %>
- <%= link_to(n_('One tag', '%s tags', owner.article_tags.size) %
- content_tag('b', owner.article_tags.size), owner.public_profile_url.merge(:action => 'tags')) %>
-
diff --git a/app/views/blocks/my_network/enterprise.html.erb b/app/views/blocks/my_network/enterprise.html.erb
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/views/blocks/my_network/enterprise.html.erb
diff --git a/app/views/blocks/my_network/enterprise.rhtml b/app/views/blocks/my_network/enterprise.rhtml
deleted file mode 100644
index e69de29..0000000
--- a/app/views/blocks/my_network/enterprise.rhtml
+++ /dev/null
diff --git a/app/views/blocks/my_network/organization.html.erb b/app/views/blocks/my_network/organization.html.erb
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/views/blocks/my_network/organization.html.erb
diff --git a/app/views/blocks/my_network/organization.rhtml b/app/views/blocks/my_network/organization.rhtml
deleted file mode 100644
index e69de29..0000000
--- a/app/views/blocks/my_network/organization.rhtml
+++ /dev/null
diff --git a/app/views/blocks/my_network/person.html.erb b/app/views/blocks/my_network/person.html.erb
new file mode 100644
index 0000000..2aa9f85
--- /dev/null
+++ b/app/views/blocks/my_network/person.html.erb
@@ -0,0 +1,10 @@
+
+ <%= link_to(n_( 'One article published', '%s articles published', owner.articles.count) %
+ content_tag('b', owner.articles.count), owner.public_profile_url.merge(:action => 'sitemap') ) %>
+ <%= link_to(n__('One friend', '%s friends', owner.friends.count) %
+ content_tag('b', owner.friends.count), owner.public_profile_url.merge(:action => 'friends')) %>
+ <%= link_to(n__('One community', '%{num} communities', owner.communities.visible.size) %
+ {:num => content_tag('b', owner.communities.visible.size)}, owner.public_profile_url.merge(:action => 'communities')) %>
+ <%= link_to(n_('One tag', '%s tags', owner.article_tags.size) %
+ content_tag('b', owner.article_tags.size), owner.public_profile_url.merge(:action => 'tags')) %>
+
diff --git a/app/views/blocks/my_network/person.rhtml b/app/views/blocks/my_network/person.rhtml
deleted file mode 100644
index 2aa9f85..0000000
--- a/app/views/blocks/my_network/person.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-
- <%= link_to(n_( 'One article published', '%s articles published', owner.articles.count) %
- content_tag('b', owner.articles.count), owner.public_profile_url.merge(:action => 'sitemap') ) %>
- <%= link_to(n__('One friend', '%s friends', owner.friends.count) %
- content_tag('b', owner.friends.count), owner.public_profile_url.merge(:action => 'friends')) %>
- <%= link_to(n__('One community', '%{num} communities', owner.communities.visible.size) %
- {:num => content_tag('b', owner.communities.visible.size)}, owner.public_profile_url.merge(:action => 'communities')) %>
- <%= link_to(n_('One tag', '%s tags', owner.article_tags.size) %
- content_tag('b', owner.article_tags.size), owner.public_profile_url.merge(:action => 'tags')) %>
-
diff --git a/app/views/blocks/profile_image.html.erb b/app/views/blocks/profile_image.html.erb
new file mode 100644
index 0000000..5c5194d
--- /dev/null
+++ b/app/views/blocks/profile_image.html.erb
@@ -0,0 +1,24 @@
+
+
+
<%= block.title %>
+
+
+
+
+ <%= link_to profile_image(block.owner, :big) +"\n", profile.url %>
+
+
+
+
+<% if show_name %>
+
<%= h block.owner.short_name %>
+<% end %>
+
+
+
+
+
+
+
diff --git a/app/views/blocks/profile_image.rhtml b/app/views/blocks/profile_image.rhtml
deleted file mode 100644
index 5c5194d..0000000
--- a/app/views/blocks/profile_image.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
<%= block.title %>
-
-
-
-
- <%= link_to profile_image(block.owner, :big) +"\n", profile.url %>
-
-
-
-
-<% if show_name %>
-
<%= h block.owner.short_name %>
-<% end %>
-
-
-
-
-
-
-
diff --git a/app/views/blocks/profile_info.html.erb b/app/views/blocks/profile_info.html.erb
new file mode 100644
index 0000000..012ffc8
--- /dev/null
+++ b/app/views/blocks/profile_info.html.erb
@@ -0,0 +1,45 @@
+
+
+
<%= h block.owner.short_name %>
+
+
+
+
+ <%=
+ profile_image(block.owner, :thumb) +"\n"+
+ profile_sex_icon( profile ) +
+ profile_cat_icons( profile )
+ %>
+
+
+
+
+
+ <%= link_to __('Homepage'), block.owner.url, :class => 'url' %>
+ <%= link_to _('View profile'), block.owner.public_profile_url %>
+ <% if block.owner.enterprise? && !block.owner.environment.enabled?('disable_products_for_enterprises') %>
+ <%= link_to(_('Products/Services'), :controller => 'catalog', :profile => block.owner.identifier) %>
+ <% end %>
+
+ <% if profile.person? %>
+ <%= _('Since %{year}/%{month}') % { :year => block.owner.created_at.year, :month => block.owner.created_at.month } %>
+ <% end %>
+
+
+<% if profile.respond_to? :city %>
+
+<%=
+ [ [ profile.city, 'locality' ],
+ [ profile.state, 'region' ],
+ [ profile.country_name, 'country-name' ]
+ ].map{ |s,c| s =~ /^\s*$/ ? nil : content_tag( 'span', s, :class => c ) }.compact.join ' - '
+%>
+
+<% end %>
+
+
+
+
+
diff --git a/app/views/blocks/profile_info.rhtml b/app/views/blocks/profile_info.rhtml
deleted file mode 100644
index 012ffc8..0000000
--- a/app/views/blocks/profile_info.rhtml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
<%= h block.owner.short_name %>
-
-
-
-
- <%=
- profile_image(block.owner, :thumb) +"\n"+
- profile_sex_icon( profile ) +
- profile_cat_icons( profile )
- %>
-
-
-
-
-
- <%= link_to __('Homepage'), block.owner.url, :class => 'url' %>
- <%= link_to _('View profile'), block.owner.public_profile_url %>
- <% if block.owner.enterprise? && !block.owner.environment.enabled?('disable_products_for_enterprises') %>
- <%= link_to(_('Products/Services'), :controller => 'catalog', :profile => block.owner.identifier) %>
- <% end %>
-
- <% if profile.person? %>
- <%= _('Since %{year}/%{month}') % { :year => block.owner.created_at.year, :month => block.owner.created_at.month } %>
- <% end %>
-
-
-<% if profile.respond_to? :city %>
-
-<%=
- [ [ profile.city, 'locality' ],
- [ profile.state, 'region' ],
- [ profile.country_name, 'country-name' ]
- ].map{ |s,c| s =~ /^\s*$/ ? nil : content_tag( 'span', s, :class => c ) }.compact.join ' - '
-%>
-
-<% end %>
-
-
-
-
-
diff --git a/app/views/blocks/profile_info_actions/community.html.erb b/app/views/blocks/profile_info_actions/community.html.erb
new file mode 100644
index 0000000..96cb8f7
--- /dev/null
+++ b/app/views/blocks/profile_info_actions/community.html.erb
@@ -0,0 +1,49 @@
+
+ <% if logged_in? %>
+ <% if profile.members.include?(user) %>
+
+ <%= button(:delete, content_tag('span', __('Leave community')), profile.leave_url,
+ :class => 'leave-community',
+ :title => _("Leave community"),
+ :style => 'position: relative;') %>
+ <%= button(:add, content_tag('span', __('Join')), profile.join_url,
+ :class => 'join-community',
+ :title => _("Join community"),
+ :style => 'position: relative; display: none;') %>
+
+ <% else %>
+ <% unless profile.already_request_membership?(user) %>
+
+ <%= button(:delete, content_tag('span', __('Leave community')), profile.leave_url,
+ :class => 'leave-community',
+ :title => _("Leave community"),
+ :style => 'position: relative; display: none;') %>
+ <%= button(:add, content_tag('span', __('Join')), profile.join_url,
+ :class => 'join-community',
+ :title => _("Join community"),
+ :style => 'position: relative;') %>
+
+ <% end %>
+ <% end %>
+
+ <% if profile.enable_contact? %>
+
+ <%= link_to content_tag('span', _('Send an e-mail')),
+ { :profile => profile.identifier,
+ :controller => 'contact',
+ :action => 'new' },
+ {:class => 'button with-text icon-menu-mail', :title => _('Send an e-mail to the administrators')} %>
+
+ <% end %>
+
+ <%= report_abuse(profile, :button) %>
+
+ <%= render_environment_features(:profile_actions) %>
+ <% else %>
+
+ <%= link_to content_tag('span', _('Join')), profile.join_not_logged_url,
+ :class => 'button with-text icon-add',
+ :title => _('Join this community') %>
+
+ <% end %>
+
diff --git a/app/views/blocks/profile_info_actions/community.rhtml b/app/views/blocks/profile_info_actions/community.rhtml
deleted file mode 100644
index 96cb8f7..0000000
--- a/app/views/blocks/profile_info_actions/community.rhtml
+++ /dev/null
@@ -1,49 +0,0 @@
-
- <% if logged_in? %>
- <% if profile.members.include?(user) %>
-
- <%= button(:delete, content_tag('span', __('Leave community')), profile.leave_url,
- :class => 'leave-community',
- :title => _("Leave community"),
- :style => 'position: relative;') %>
- <%= button(:add, content_tag('span', __('Join')), profile.join_url,
- :class => 'join-community',
- :title => _("Join community"),
- :style => 'position: relative; display: none;') %>
-
- <% else %>
- <% unless profile.already_request_membership?(user) %>
-
- <%= button(:delete, content_tag('span', __('Leave community')), profile.leave_url,
- :class => 'leave-community',
- :title => _("Leave community"),
- :style => 'position: relative; display: none;') %>
- <%= button(:add, content_tag('span', __('Join')), profile.join_url,
- :class => 'join-community',
- :title => _("Join community"),
- :style => 'position: relative;') %>
-
- <% end %>
- <% end %>
-
- <% if profile.enable_contact? %>
-
- <%= link_to content_tag('span', _('Send an e-mail')),
- { :profile => profile.identifier,
- :controller => 'contact',
- :action => 'new' },
- {:class => 'button with-text icon-menu-mail', :title => _('Send an e-mail to the administrators')} %>
-
- <% end %>
-
- <%= report_abuse(profile, :button) %>
-
- <%= render_environment_features(:profile_actions) %>
- <% else %>
-
- <%= link_to content_tag('span', _('Join')), profile.join_not_logged_url,
- :class => 'button with-text icon-add',
- :title => _('Join this community') %>
-
- <% end %>
-
diff --git a/app/views/blocks/profile_info_actions/enterprise.html.erb b/app/views/blocks/profile_info_actions/enterprise.html.erb
new file mode 100644
index 0000000..134a67e
--- /dev/null
+++ b/app/views/blocks/profile_info_actions/enterprise.html.erb
@@ -0,0 +1,12 @@
+
+ <%if logged_in? %>
+ <%if !user.favorite_enterprises.include?(profile) %>
+ <%= link_to content_tag('span', _('Add as favorite')), { :profile => user.identifier, :controller => 'favorite_enterprises', :action => 'add', :id => profile.id }, :class => 'button with-text icon-add', :title => __('Add enterprise as favorite') %>
+ <% end %>
+ <% end %>
+ <% if profile.enable_contact? %>
+ <%= link_to content_tag('span', _('Send an e-mail')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, {:id => 'enterprise-contact-button', :class => 'button with-text icon-menu-mail'} %>
+ <% end %>
+
+ <%= report_abuse(profile, :button) %>
+
diff --git a/app/views/blocks/profile_info_actions/enterprise.rhtml b/app/views/blocks/profile_info_actions/enterprise.rhtml
deleted file mode 100644
index 134a67e..0000000
--- a/app/views/blocks/profile_info_actions/enterprise.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-
- <%if logged_in? %>
- <%if !user.favorite_enterprises.include?(profile) %>
- <%= link_to content_tag('span', _('Add as favorite')), { :profile => user.identifier, :controller => 'favorite_enterprises', :action => 'add', :id => profile.id }, :class => 'button with-text icon-add', :title => __('Add enterprise as favorite') %>
- <% end %>
- <% end %>
- <% if profile.enable_contact? %>
- <%= link_to content_tag('span', _('Send an e-mail')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, {:id => 'enterprise-contact-button', :class => 'button with-text icon-menu-mail'} %>
- <% end %>
-
- <%= report_abuse(profile, :button) %>
-
diff --git a/app/views/blocks/profile_info_actions/organization.html.erb b/app/views/blocks/profile_info_actions/organization.html.erb
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/views/blocks/profile_info_actions/organization.html.erb
diff --git a/app/views/blocks/profile_info_actions/organization.rhtml b/app/views/blocks/profile_info_actions/organization.rhtml
deleted file mode 100644
index e69de29..0000000
--- a/app/views/blocks/profile_info_actions/organization.rhtml
+++ /dev/null
diff --git a/app/views/blocks/profile_info_actions/person.html.erb b/app/views/blocks/profile_info_actions/person.html.erb
new file mode 100644
index 0000000..5b430c1
--- /dev/null
+++ b/app/views/blocks/profile_info_actions/person.html.erb
@@ -0,0 +1,16 @@
+
+ <%if logged_in? && (user != profile) %>
+
+ <% if !user.already_request_friendship?(profile) and !user.is_a_friend?(profile) %>
+
+ <%= button(:add, content_tag('span', __('Add friend')), profile.add_url, :class => 'add-friend', :title => _("Add friend"), :style => 'position: relative;') %>
+
+ <% end %>
+
+ <% if user.is_a_friend?(profile) && profile.enable_contact? %>
+ <%= link_to content_tag('span', _('Send an e-mail')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, :class => 'button with-text icon-menu-mail' %>
+ <% end %>
+
+ <%= report_abuse(profile, :button) %>
+ <% end %>
+
diff --git a/app/views/blocks/profile_info_actions/person.rhtml b/app/views/blocks/profile_info_actions/person.rhtml
deleted file mode 100644
index 5b430c1..0000000
--- a/app/views/blocks/profile_info_actions/person.rhtml
+++ /dev/null
@@ -1,16 +0,0 @@
-
- <%if logged_in? && (user != profile) %>
-
- <% if !user.already_request_friendship?(profile) and !user.is_a_friend?(profile) %>
-
- <%= button(:add, content_tag('span', __('Add friend')), profile.add_url, :class => 'add-friend', :title => _("Add friend"), :style => 'position: relative;') %>
-
- <% end %>
-
- <% if user.is_a_friend?(profile) && profile.enable_contact? %>
- <%= link_to content_tag('span', _('Send an e-mail')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, :class => 'button with-text icon-menu-mail' %>
- <% end %>
-
- <%= report_abuse(profile, :button) %>
- <% end %>
-
diff --git a/app/views/blocks/profile_search.html.erb b/app/views/blocks/profile_search.html.erb
new file mode 100644
index 0000000..d597920
--- /dev/null
+++ b/app/views/blocks/profile_search.html.erb
@@ -0,0 +1,3 @@
+<%= block_title(title) %>
+
+<%= render :partial => 'shared/profile_search_form' %>
diff --git a/app/views/blocks/profile_search.rhtml b/app/views/blocks/profile_search.rhtml
deleted file mode 100644
index d597920..0000000
--- a/app/views/blocks/profile_search.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= block_title(title) %>
-
-<%= render :partial => 'shared/profile_search_form' %>
diff --git a/app/views/blocks/slideshow.html.erb b/app/views/blocks/slideshow.html.erb
new file mode 100644
index 0000000..a06396a
--- /dev/null
+++ b/app/views/blocks/slideshow.html.erb
@@ -0,0 +1,49 @@
+<%= block_title(block.title) %>
+<% if images %>
+ <% description = images.any? { |img| !img.abstract.blank? } %>
+ '>
+
+ <% if block.navigation %>
+
+ <%= link_to _('Previous'), '#', :class => 'icon-media-prev' %>
+ <% if block.interval > 0 %>
+ <%= link_to ' ', '#', :class => 'icon-media-pause', :onclick => "togglePlayback('#block-#{block.id} .slideshow-container', this); return false;" %>
+ <% end %>
+ <%= link_to _('Next'), '#', :class => 'icon-media-next' %>
+
+ <% end %>
+
+
+<% else %>
+ <%= _('Please, edit this block and select an image gallery.') %>
+<% end %>
+
diff --git a/app/views/blocks/slideshow.rhtml b/app/views/blocks/slideshow.rhtml
deleted file mode 100644
index a06396a..0000000
--- a/app/views/blocks/slideshow.rhtml
+++ /dev/null
@@ -1,49 +0,0 @@
-<%= block_title(block.title) %>
-<% if images %>
- <% description = images.any? { |img| !img.abstract.blank? } %>
- '>
-
- <% if block.navigation %>
-
- <%= link_to _('Previous'), '#', :class => 'icon-media-prev' %>
- <% if block.interval > 0 %>
- <%= link_to ' ', '#', :class => 'icon-media-pause', :onclick => "togglePlayback('#block-#{block.id} .slideshow-container', this); return false;" %>
- <% end %>
- <%= link_to _('Next'), '#', :class => 'icon-media-next' %>
-
- <% end %>
-
-
-<% else %>
- <%= _('Please, edit this block and select an image gallery.') %>
-<% end %>
-
diff --git a/app/views/box_organizer/_article_block.html.erb b/app/views/box_organizer/_article_block.html.erb
new file mode 100644
index 0000000..5de82d8
--- /dev/null
+++ b/app/views/box_organizer/_article_block.html.erb
@@ -0,0 +1,10 @@
+
+<% if @block.box.owner.kind_of?(Environment) and @block.box.owner.portal_community.nil? %>
+
+<% else %>
+ <% articles = @block.available_articles.select {|article| !article.folder? } %>
+ <%= select_tag('block[article_id]', options_for_select_with_title(articles.map {|item| [item.path, item.id]}, @block.article ? @block.article.id : nil)) %>
+<% end %>
+
diff --git a/app/views/box_organizer/_article_block.rhtml b/app/views/box_organizer/_article_block.rhtml
deleted file mode 100644
index 5de82d8..0000000
--- a/app/views/box_organizer/_article_block.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-<% if @block.box.owner.kind_of?(Environment) and @block.box.owner.portal_community.nil? %>
-
-<% else %>
- <% articles = @block.available_articles.select {|article| !article.folder? } %>
- <%= select_tag('block[article_id]', options_for_select_with_title(articles.map {|item| [item.path, item.id]}, @block.article ? @block.article.id : nil)) %>
-<% end %>
-
diff --git a/app/views/box_organizer/_block.html.erb b/app/views/box_organizer/_block.html.erb
new file mode 100644
index 0000000..c341a40
--- /dev/null
+++ b/app/views/box_organizer/_block.html.erb
@@ -0,0 +1 @@
+
diff --git a/app/views/box_organizer/_block.rhtml b/app/views/box_organizer/_block.rhtml
deleted file mode 100644
index c341a40..0000000
--- a/app/views/box_organizer/_block.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/app/views/box_organizer/_block_types.html.erb b/app/views/box_organizer/_block_types.html.erb
new file mode 100644
index 0000000..4b1c354
--- /dev/null
+++ b/app/views/box_organizer/_block_types.html.erb
@@ -0,0 +1,10 @@
+<% block_types.in_groups_of(2) do |block1, block2| %>
+
+ <%= labelled_radio_button(block1.description, :type, block1.name) %>
+
+ <% if block2 %>
+
+ <%= labelled_radio_button(block2.description, :type, block2.name) %>
+
+ <% end %>
+<% end %>
diff --git a/app/views/box_organizer/_block_types.rhtml b/app/views/box_organizer/_block_types.rhtml
deleted file mode 100644
index 4b1c354..0000000
--- a/app/views/box_organizer/_block_types.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<% block_types.in_groups_of(2) do |block1, block2| %>
-
- <%= labelled_radio_button(block1.description, :type, block1.name) %>
-
- <% if block2 %>
-
- <%= labelled_radio_button(block2.description, :type, block2.name) %>
-
- <% end %>
-<% end %>
diff --git a/app/views/box_organizer/_blog_archives_block.html.erb b/app/views/box_organizer/_blog_archives_block.html.erb
new file mode 100644
index 0000000..95308b6
--- /dev/null
+++ b/app/views/box_organizer/_blog_archives_block.html.erb
@@ -0,0 +1,4 @@
+<% blogs = @block.box.owner.blogs %>
+<% if blogs.count > 1 %>
+ <%= labelled_form_field _('Choose a blog:'), select('block', 'blog_id', blogs.map {|item| [ item.path, item.id ]}, :selected => @block.blog.id) %>
+<% end %>
diff --git a/app/views/box_organizer/_blog_archives_block.rhtml b/app/views/box_organizer/_blog_archives_block.rhtml
deleted file mode 100644
index 95308b6..0000000
--- a/app/views/box_organizer/_blog_archives_block.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<% blogs = @block.box.owner.blogs %>
-<% if blogs.count > 1 %>
- <%= labelled_form_field _('Choose a blog:'), select('block', 'blog_id', blogs.map {|item| [ item.path, item.id ]}, :selected => @block.blog.id) %>
-<% end %>
diff --git a/app/views/box_organizer/_categories_block.html.erb b/app/views/box_organizer/_categories_block.html.erb
new file mode 100644
index 0000000..37bc49b
--- /dev/null
+++ b/app/views/box_organizer/_categories_block.html.erb
@@ -0,0 +1,5 @@
+<%= _('Category types') %>
+
+<% @block.available_category_types.each do |type_label, type_value| %>
+ <%= labelled_check_box(type_label, 'block[category_types][]', type_value.to_s, @block.category_types.include?(type_value.to_s)) %>
+<% end %>
diff --git a/app/views/box_organizer/_categories_block.rhtml b/app/views/box_organizer/_categories_block.rhtml
deleted file mode 100644
index 37bc49b..0000000
--- a/app/views/box_organizer/_categories_block.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= _('Category types') %>
-
-<% @block.available_category_types.each do |type_label, type_value| %>
- <%= labelled_check_box(type_label, 'block[category_types][]', type_value.to_s, @block.category_types.include?(type_value.to_s)) %>
-<% end %>
diff --git a/app/views/box_organizer/_featured_products_block.html.erb b/app/views/box_organizer/_featured_products_block.html.erb
new file mode 100644
index 0000000..123c1e1
--- /dev/null
+++ b/app/views/box_organizer/_featured_products_block.html.erb
@@ -0,0 +1,8 @@
+<%= _('Featured Products') %>
+
+
<%= label_tag _('Choose some products') %>
+
<%= select_tag 'block[product_ids][]', options_for_select(@block.products_for_selection.map{|p| [p.name, p.id.to_s]}, @block.product_ids), :multiple => true %>
+
<%= labelled_form_field check_box(:block, :reflect) + _('Reflect products'), '' %>
+
<%= labelled_form_field(_('Transition speed (in seconds)'), select('block', 'speed', (1..10).to_a.collect{|i| [i, i*1000] })) %>
+
<%= labelled_form_field(_('In groups of'), select('block', 'groups_of', (1..10).to_a)) %>
+
diff --git a/app/views/box_organizer/_featured_products_block.rhtml b/app/views/box_organizer/_featured_products_block.rhtml
deleted file mode 100644
index 123c1e1..0000000
--- a/app/views/box_organizer/_featured_products_block.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-<%= _('Featured Products') %>
-
-
<%= label_tag _('Choose some products') %>
-
<%= select_tag 'block[product_ids][]', options_for_select(@block.products_for_selection.map{|p| [p.name, p.id.to_s]}, @block.product_ids), :multiple => true %>
-
<%= labelled_form_field check_box(:block, :reflect) + _('Reflect products'), '' %>
-
<%= labelled_form_field(_('Transition speed (in seconds)'), select('block', 'speed', (1..10).to_a.collect{|i| [i, i*1000] })) %>
-
<%= labelled_form_field(_('In groups of'), select('block', 'groups_of', (1..10).to_a)) %>
-
diff --git a/app/views/box_organizer/_feed_reader_block.html.erb b/app/views/box_organizer/_feed_reader_block.html.erb
new file mode 100644
index 0000000..726d51f
--- /dev/null
+++ b/app/views/box_organizer/_feed_reader_block.html.erb
@@ -0,0 +1,4 @@
+
+ <%= labelled_form_field _('Address'), text_field(:block, :address, :size => 40) %>
+ <%= labelled_form_field _('Limit of posts to display'), select(:block, :limit, [5, 10, 20, 50]) %>
+
diff --git a/app/views/box_organizer/_feed_reader_block.rhtml b/app/views/box_organizer/_feed_reader_block.rhtml
deleted file mode 100644
index 726d51f..0000000
--- a/app/views/box_organizer/_feed_reader_block.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-
- <%= labelled_form_field _('Address'), text_field(:block, :address, :size => 40) %>
- <%= labelled_form_field _('Limit of posts to display'), select(:block, :limit, [5, 10, 20, 50]) %>
-
diff --git a/app/views/box_organizer/_highlights_block.html.erb b/app/views/box_organizer/_highlights_block.html.erb
new file mode 100644
index 0000000..90be8b3
--- /dev/null
+++ b/app/views/box_organizer/_highlights_block.html.erb
@@ -0,0 +1,32 @@
+<%= _('Highlights') %>
+
+
+ <%= _('Image') %> <%= _('Address') %> <%= _('Position') %> <%= _('Title') %>
+ <% for image in @block.images do %>
+
+
+ <%= select_tag 'block[images][][image_id]', content_tag(:option) + option_groups_from_collection_for_select(@block.folder_choices, :images, :name, :id, :name, image[:image_id].to_i), :style => "width: 100px" %>
+
+ <%= text_field_tag 'block[images][][address]', image[:address], :class => 'highlight-address', :size => 10 %>
+ <%= text_field_tag 'block[images][][position]', image[:position], :class => 'highlight-position', :size => 3 %>
+ <%= text_field_tag 'block[images][][title]', image[:title], :class => 'highlight-title', :size => 10 %>
+
+ <% end %>
+
+
+
+<%= link_to_function(_('New highlight'), nil, :class => 'button icon-add with-text') do |page|
+ page.insert_html :bottom, 'highlights', content_tag('tr',
+ content_tag('td', select_tag('block[images][][image_id]', content_tag(:option) + option_groups_from_collection_for_select(@block.folder_choices, :images, :name, :id, :name), :style => "width: 100px")) +
+ content_tag('td', text_field_tag('block[images][][address]', nil, :class => 'highlight-address', :size => 10)) +
+ content_tag('td', text_field_tag('block[images][][position]', nil, :class => 'highlight-position', :size => 3)) +
+ content_tag('td', text_field_tag('block[images][][title]', nil, :class => 'highlight-position', :size => 10))
+ ) +
+ javascript_tag("$('edit-link-list-block').scrollTop = $('edit-link-list-block').scrollHeight")
+end %>
+
+<%= labelled_form_field _('Image transition:'), select('block', 'interval', [[_('No automatic transition'), 0]] + [1, 2, 3, 4, 5, 10, 20, 30, 60].map {|item| [n_('Every 1 second', 'Every %d seconds', item) % item, item]}) %>
+
+<%= labelled_form_field check_box(:block, :shuffle) + _('Show images in random order'), '' %>
+
+<%= labelled_form_field check_box(:block, :navigation) + _('Display navigation buttons'), '' %>
diff --git a/app/views/box_organizer/_highlights_block.rhtml b/app/views/box_organizer/_highlights_block.rhtml
deleted file mode 100644
index 90be8b3..0000000
--- a/app/views/box_organizer/_highlights_block.rhtml
+++ /dev/null
@@ -1,32 +0,0 @@
-<%= _('Highlights') %>
-
-
- <%= _('Image') %> <%= _('Address') %> <%= _('Position') %> <%= _('Title') %>
- <% for image in @block.images do %>
-
-
- <%= select_tag 'block[images][][image_id]', content_tag(:option) + option_groups_from_collection_for_select(@block.folder_choices, :images, :name, :id, :name, image[:image_id].to_i), :style => "width: 100px" %>
-
- <%= text_field_tag 'block[images][][address]', image[:address], :class => 'highlight-address', :size => 10 %>
- <%= text_field_tag 'block[images][][position]', image[:position], :class => 'highlight-position', :size => 3 %>
- <%= text_field_tag 'block[images][][title]', image[:title], :class => 'highlight-title', :size => 10 %>
-
- <% end %>
-
-
-
-<%= link_to_function(_('New highlight'), nil, :class => 'button icon-add with-text') do |page|
- page.insert_html :bottom, 'highlights', content_tag('tr',
- content_tag('td', select_tag('block[images][][image_id]', content_tag(:option) + option_groups_from_collection_for_select(@block.folder_choices, :images, :name, :id, :name), :style => "width: 100px")) +
- content_tag('td', text_field_tag('block[images][][address]', nil, :class => 'highlight-address', :size => 10)) +
- content_tag('td', text_field_tag('block[images][][position]', nil, :class => 'highlight-position', :size => 3)) +
- content_tag('td', text_field_tag('block[images][][title]', nil, :class => 'highlight-position', :size => 10))
- ) +
- javascript_tag("$('edit-link-list-block').scrollTop = $('edit-link-list-block').scrollHeight")
-end %>
-
-<%= labelled_form_field _('Image transition:'), select('block', 'interval', [[_('No automatic transition'), 0]] + [1, 2, 3, 4, 5, 10, 20, 30, 60].map {|item| [n_('Every 1 second', 'Every %d seconds', item) % item, item]}) %>
-
-<%= labelled_form_field check_box(:block, :shuffle) + _('Show images in random order'), '' %>
-
-<%= labelled_form_field check_box(:block, :navigation) + _('Display navigation buttons'), '' %>
diff --git a/app/views/box_organizer/_icon_selector.html.erb b/app/views/box_organizer/_icon_selector.html.erb
new file mode 100644
index 0000000..cd6080a
--- /dev/null
+++ b/app/views/box_organizer/_icon_selector.html.erb
@@ -0,0 +1,7 @@
+
+ <%= hidden_field_tag 'block[links][][icon]', icon %>
+
+
+ <%= @block.icons_options %>
+
+
diff --git a/app/views/box_organizer/_icon_selector.rhtml b/app/views/box_organizer/_icon_selector.rhtml
deleted file mode 100644
index cd6080a..0000000
--- a/app/views/box_organizer/_icon_selector.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-
- <%= hidden_field_tag 'block[links][][icon]', icon %>
-
-
- <%= @block.icons_options %>
-
-
diff --git a/app/views/box_organizer/_link_list_block.html.erb b/app/views/box_organizer/_link_list_block.html.erb
new file mode 100644
index 0000000..2ca7ed9
--- /dev/null
+++ b/app/views/box_organizer/_link_list_block.html.erb
@@ -0,0 +1,24 @@
+<%= _('Links') %>
+
+
+ <%= _('Icon') %> <%= _('Name') %> <%= _('Address') %>
+ <% for link in @block.links do %>
+
+
+ <%= icon_selector(link['icon']) %>
+
+ <%= text_field_tag 'block[links][][name]', link[:name], :class => 'link-name', :maxlength => 20 %>
+ <%= text_field_tag 'block[links][][address]', link[:address], :class => 'link-address' %>
+
+ <% end %>
+
+
+
+<%= link_to_function(_('New link'), nil, :class => 'button icon-add with-text') do |page|
+ page.insert_html :bottom, 'links', content_tag('tr',
+ content_tag('td', icon_selector('ok')) +
+ content_tag('td', text_field_tag('block[links][][name]', '', :maxlength => 20)) +
+ content_tag('td', text_field_tag('block[links][][address]', nil, :class => 'cel-address'))
+ ) +
+ javascript_tag("$('edit-link-list-block').scrollTop = $('edit-link-list-block').scrollHeight")
+end %>
diff --git a/app/views/box_organizer/_link_list_block.rhtml b/app/views/box_organizer/_link_list_block.rhtml
deleted file mode 100644
index 2ca7ed9..0000000
--- a/app/views/box_organizer/_link_list_block.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-<%= _('Links') %>
-
-
- <%= _('Icon') %> <%= _('Name') %> <%= _('Address') %>
- <% for link in @block.links do %>
-
-
- <%= icon_selector(link['icon']) %>
-
- <%= text_field_tag 'block[links][][name]', link[:name], :class => 'link-name', :maxlength => 20 %>
- <%= text_field_tag 'block[links][][address]', link[:address], :class => 'link-address' %>
-
- <% end %>
-
-
-
-<%= link_to_function(_('New link'), nil, :class => 'button icon-add with-text') do |page|
- page.insert_html :bottom, 'links', content_tag('tr',
- content_tag('td', icon_selector('ok')) +
- content_tag('td', text_field_tag('block[links][][name]', '', :maxlength => 20)) +
- content_tag('td', text_field_tag('block[links][][address]', nil, :class => 'cel-address'))
- ) +
- javascript_tag("$('edit-link-list-block').scrollTop = $('edit-link-list-block').scrollHeight")
-end %>
diff --git a/app/views/box_organizer/_location_block.html.erb b/app/views/box_organizer/_location_block.html.erb
new file mode 100644
index 0000000..6f6e405
--- /dev/null
+++ b/app/views/box_organizer/_location_block.html.erb
@@ -0,0 +1,10 @@
+
+ <%= labelled_form_field _('Zoom Level:'), select(:block, :zoom, [[_('World'), 0],
+ 1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,
+ [_('Street'), 19]]) %>
+ <%= labelled_form_field _('Map Type:'), select(:block, :map_type, [[_('Road Map') , 'roadmap' ],
+ [_('Mobile') , 'mobile' ],
+ [_('Satellite'), 'satellite'],
+ [_('Terrain') , 'terrain' ],
+ [_('Hybrid') , 'hybrid' ]]) %>
+
diff --git a/app/views/box_organizer/_location_block.rhtml b/app/views/box_organizer/_location_block.rhtml
deleted file mode 100644
index 6f6e405..0000000
--- a/app/views/box_organizer/_location_block.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-
- <%= labelled_form_field _('Zoom Level:'), select(:block, :zoom, [[_('World'), 0],
- 1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,
- [_('Street'), 19]]) %>
- <%= labelled_form_field _('Map Type:'), select(:block, :map_type, [[_('Road Map') , 'roadmap' ],
- [_('Mobile') , 'mobile' ],
- [_('Satellite'), 'satellite'],
- [_('Terrain') , 'terrain' ],
- [_('Hybrid') , 'hybrid' ]]) %>
-
diff --git a/app/views/box_organizer/_products_block.html.erb b/app/views/box_organizer/_products_block.html.erb
new file mode 100644
index 0000000..dfaedd3
--- /dev/null
+++ b/app/views/box_organizer/_products_block.html.erb
@@ -0,0 +1,13 @@
+
+
+
+
+<%= _('Select the products that must be shown.') %>
+
+
+
+<% for product in @block.owner.products %>
+ <%= check_box_tag("block[product_ids][]", product.id, (!@block.product_ids.blank? && @block.product_ids.include?(product.id)), :id => "block_product_ids_#{product.id}" ) %>
+ <%= product.name %>
+
+<% end %>
diff --git a/app/views/box_organizer/_products_block.rhtml b/app/views/box_organizer/_products_block.rhtml
deleted file mode 100644
index dfaedd3..0000000
--- a/app/views/box_organizer/_products_block.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-<%= _('Select the products that must be shown.') %>
-
-
-
-<% for product in @block.owner.products %>
- <%= check_box_tag("block[product_ids][]", product.id, (!@block.product_ids.blank? && @block.product_ids.include?(product.id)), :id => "block_product_ids_#{product.id}" ) %>
- <%= product.name %>
-
-<% end %>
diff --git a/app/views/box_organizer/_profile_image_block.html.erb b/app/views/box_organizer/_profile_image_block.html.erb
new file mode 100644
index 0000000..0fedfd7
--- /dev/null
+++ b/app/views/box_organizer/_profile_image_block.html.erb
@@ -0,0 +1,2 @@
+<%= check_box(:block, :show_name) %>
+<%= _('Show name on block')%>
diff --git a/app/views/box_organizer/_profile_image_block.rhtml b/app/views/box_organizer/_profile_image_block.rhtml
deleted file mode 100644
index 0fedfd7..0000000
--- a/app/views/box_organizer/_profile_image_block.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= check_box(:block, :show_name) %>
-<%= _('Show name on block')%>
diff --git a/app/views/box_organizer/_profile_list_block.html.erb b/app/views/box_organizer/_profile_list_block.html.erb
new file mode 100644
index 0000000..21c1511
--- /dev/null
+++ b/app/views/box_organizer/_profile_list_block.html.erb
@@ -0,0 +1,6 @@
+
+ <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %>
+ <%= check_box(:block, :prioritize_profiles_with_image) %>
+ <%= _('Prioritize profiles with image') %>
+
+
diff --git a/app/views/box_organizer/_profile_list_block.rhtml b/app/views/box_organizer/_profile_list_block.rhtml
deleted file mode 100644
index 21c1511..0000000
--- a/app/views/box_organizer/_profile_list_block.rhtml
+++ /dev/null
@@ -1,6 +0,0 @@
-
- <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %>
- <%= check_box(:block, :prioritize_profiles_with_image) %>
- <%= _('Prioritize profiles with image') %>
-
-
diff --git a/app/views/box_organizer/_raw_html_block.html.erb b/app/views/box_organizer/_raw_html_block.html.erb
new file mode 100644
index 0000000..f40443c
--- /dev/null
+++ b/app/views/box_organizer/_raw_html_block.html.erb
@@ -0,0 +1 @@
+<%= labelled_form_field(_('HTML code'), text_area(:block, :html, :style => 'width: 90%', :rows => 15)) %>
diff --git a/app/views/box_organizer/_raw_html_block.rhtml b/app/views/box_organizer/_raw_html_block.rhtml
deleted file mode 100644
index f40443c..0000000
--- a/app/views/box_organizer/_raw_html_block.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= labelled_form_field(_('HTML code'), text_area(:block, :html, :style => 'width: 90%', :rows => 15)) %>
diff --git a/app/views/box_organizer/_recent_documents_block.html.erb b/app/views/box_organizer/_recent_documents_block.html.erb
new file mode 100644
index 0000000..db6ff72
--- /dev/null
+++ b/app/views/box_organizer/_recent_documents_block.html.erb
@@ -0,0 +1,3 @@
+
+ <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %>
+
diff --git a/app/views/box_organizer/_recent_documents_block.rhtml b/app/views/box_organizer/_recent_documents_block.rhtml
deleted file mode 100644
index db6ff72..0000000
--- a/app/views/box_organizer/_recent_documents_block.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %>
-
diff --git a/app/views/box_organizer/_slideshow_block.html.erb b/app/views/box_organizer/_slideshow_block.html.erb
new file mode 100644
index 0000000..fb007f7
--- /dev/null
+++ b/app/views/box_organizer/_slideshow_block.html.erb
@@ -0,0 +1,11 @@
+<%= labelled_form_field _('Choose a gallery'), select('block', 'gallery_id', @block.folder_choices.map { |item|
+ [ _('%{gallery} (%{count} images)') % {:gallery => item.path, :count => item.images.reject{|image| image.folder?}.count}, item.id ]
+}) %>
+
+<%= labelled_form_field(_('Image size'), select('block', 'image_size', [[_('Thumbnail'), 'thumb'],[_('Slideshow size'), 'slideshow']])) %>
+
+<%= labelled_form_field _('Image transition:'), select('block', 'interval', [[_('No automatic transition'), 0]] + [1, 2, 3, 4, 5, 10, 20, 30, 60].map {|item| [n_('Every 1 second', 'Every %d seconds', item) % item, item]}) %>
+
+<%= labelled_form_field check_box(:block, :shuffle) + _('Show images in random order'), '' %>
+
+<%= labelled_form_field check_box(:block, :navigation) + _('Display navigation buttons'), '' %>
diff --git a/app/views/box_organizer/_slideshow_block.rhtml b/app/views/box_organizer/_slideshow_block.rhtml
deleted file mode 100644
index fb007f7..0000000
--- a/app/views/box_organizer/_slideshow_block.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= labelled_form_field _('Choose a gallery'), select('block', 'gallery_id', @block.folder_choices.map { |item|
- [ _('%{gallery} (%{count} images)') % {:gallery => item.path, :count => item.images.reject{|image| image.folder?}.count}, item.id ]
-}) %>
-
-<%= labelled_form_field(_('Image size'), select('block', 'image_size', [[_('Thumbnail'), 'thumb'],[_('Slideshow size'), 'slideshow']])) %>
-
-<%= labelled_form_field _('Image transition:'), select('block', 'interval', [[_('No automatic transition'), 0]] + [1, 2, 3, 4, 5, 10, 20, 30, 60].map {|item| [n_('Every 1 second', 'Every %d seconds', item) % item, item]}) %>
-
-<%= labelled_form_field check_box(:block, :shuffle) + _('Show images in random order'), '' %>
-
-<%= labelled_form_field check_box(:block, :navigation) + _('Display navigation buttons'), '' %>
diff --git a/app/views/box_organizer/_tags_block.html.erb b/app/views/box_organizer/_tags_block.html.erb
new file mode 100644
index 0000000..4d49a3e
--- /dev/null
+++ b/app/views/box_organizer/_tags_block.html.erb
@@ -0,0 +1,3 @@
+
+ <%= labelled_form_field _('Limit of tags to display:'), text_field(:block, :limit, :size => 3) %>
+
diff --git a/app/views/box_organizer/_tags_block.rhtml b/app/views/box_organizer/_tags_block.rhtml
deleted file mode 100644
index 4d49a3e..0000000
--- a/app/views/box_organizer/_tags_block.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- <%= labelled_form_field _('Limit of tags to display:'), text_field(:block, :limit, :size => 3) %>
-
diff --git a/app/views/box_organizer/add_block.html.erb b/app/views/box_organizer/add_block.html.erb
new file mode 100644
index 0000000..dbb2391
--- /dev/null
+++ b/app/views/box_organizer/add_block.html.erb
@@ -0,0 +1,43 @@
+
+ <% form_tag do %>
+
+
<%= _('In what area do you want to put your new block?') %>
+
+ <% @boxes.each do |box| %>
+ <%= labelled_radio_button(_("Area %d") % box.position, :box_id, box.id, box.central?, { :class => 'box-position', 'data-position' => box.position }) %>
+ <% end %>
+
+
+
+
<%= _('Select the type of block you want to add to your page.') %>
+
+
+ <%= render :partial => 'block_types', :locals => { :block_types => @center_block_types } %>
+
+
+
+ <%= render :partial => 'block_types', :locals => { :block_types => @side_block_types } %>
+
+
+
+
+ <% button_bar do %>
+ <%= submit_button(:add, _("Add")) %>
+ <%= colorbox_close_button(_('Close')) %>
+ <% end %>
+
+ <% end %>
+
diff --git a/app/views/box_organizer/add_block.rhtml b/app/views/box_organizer/add_block.rhtml
deleted file mode 100644
index dbb2391..0000000
--- a/app/views/box_organizer/add_block.rhtml
+++ /dev/null
@@ -1,43 +0,0 @@
-
- <% form_tag do %>
-
-
<%= _('In what area do you want to put your new block?') %>
-
- <% @boxes.each do |box| %>
- <%= labelled_radio_button(_("Area %d") % box.position, :box_id, box.id, box.central?, { :class => 'box-position', 'data-position' => box.position }) %>
- <% end %>
-
-
-
-
<%= _('Select the type of block you want to add to your page.') %>
-
-
- <%= render :partial => 'block_types', :locals => { :block_types => @center_block_types } %>
-
-
-
- <%= render :partial => 'block_types', :locals => { :block_types => @side_block_types } %>
-
-
-
-
- <% button_bar do %>
- <%= submit_button(:add, _("Add")) %>
- <%= colorbox_close_button(_('Close')) %>
- <% end %>
-
- <% end %>
-
diff --git a/app/views/box_organizer/edit.html.erb b/app/views/box_organizer/edit.html.erb
new file mode 100644
index 0000000..61cf156
--- /dev/null
+++ b/app/views/box_organizer/edit.html.erb
@@ -0,0 +1,33 @@
+
+
<%= _('Editing block') %>
+
+ <% form_tag(:action => 'save', :id => @block.id) do %>
+
+ <%= labelled_form_field(_('Custom title for this block: '), text_field(:block, :title, :maxlength => 20)) %>
+
+ <%= render :partial => partial_for_class(@block.class) %>
+
+ <%= labelled_form_field _('Display this block:'), '' %>
+
+ <%= radio_button(:block, :display, 'always') %>
+ <%= label_tag('block_display_always', _('In all pages')) %>
+
+ <%= radio_button(:block, :display, 'home_page_only') %>
+ <%= label_tag('block_display_home_page_only', _('Only in the homepage')) %>
+
+ <%= radio_button(:block, :display, 'except_home_page') %>
+ <%= label_tag('block_display_except_home_page', _('In all pages, except in the homepage')) %>
+
+ <%= radio_button(:block, :display, 'never') %>
+ <%= label_tag('block_display_never', _("Don't display")) %>
+
+
+ <%= labelled_form_field(_('Show for:'), select(:block, :language, [ [ _('all languages'), 'all']] + environment.locales.map {|key, value| [value, key]} )) %>
+
+ <% button_bar do %>
+ <%= submit_button(:save, _('Save')) %>
+ <%= colorbox_close_button(_('Cancel')) %>
+ <% end %>
+
+ <% end %>
+
diff --git a/app/views/box_organizer/edit.rhtml b/app/views/box_organizer/edit.rhtml
deleted file mode 100644
index 61cf156..0000000
--- a/app/views/box_organizer/edit.rhtml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
<%= _('Editing block') %>
-
- <% form_tag(:action => 'save', :id => @block.id) do %>
-
- <%= labelled_form_field(_('Custom title for this block: '), text_field(:block, :title, :maxlength => 20)) %>
-
- <%= render :partial => partial_for_class(@block.class) %>
-
- <%= labelled_form_field _('Display this block:'), '' %>
-
- <%= radio_button(:block, :display, 'always') %>
- <%= label_tag('block_display_always', _('In all pages')) %>
-
- <%= radio_button(:block, :display, 'home_page_only') %>
- <%= label_tag('block_display_home_page_only', _('Only in the homepage')) %>
-
- <%= radio_button(:block, :display, 'except_home_page') %>
- <%= label_tag('block_display_except_home_page', _('In all pages, except in the homepage')) %>
-
- <%= radio_button(:block, :display, 'never') %>
- <%= label_tag('block_display_never', _("Don't display")) %>
-
-
- <%= labelled_form_field(_('Show for:'), select(:block, :language, [ [ _('all languages'), 'all']] + environment.locales.map {|key, value| [value, key]} )) %>
-
- <% button_bar do %>
- <%= submit_button(:save, _('Save')) %>
- <%= colorbox_close_button(_('Cancel')) %>
- <% end %>
-
- <% end %>
-
diff --git a/app/views/box_organizer/index.html.erb b/app/views/box_organizer/index.html.erb
new file mode 100644
index 0000000..9a53b74
--- /dev/null
+++ b/app/views/box_organizer/index.html.erb
@@ -0,0 +1,6 @@
+<%= _('Editing sideboxes')%>
+
+<% button_bar do %>
+ <%= colorbox_button('add', _('Add a block'), { :action => 'add_block' }) %>
+ <%= button(:back, _('Back to control panel'), :controller => (profile.nil? ? 'admin_panel': 'profile_editor')) %>
+<% end %>
diff --git a/app/views/box_organizer/index.rhtml b/app/views/box_organizer/index.rhtml
deleted file mode 100644
index 9a53b74..0000000
--- a/app/views/box_organizer/index.rhtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<%= _('Editing sideboxes')%>
-
-<% button_bar do %>
- <%= colorbox_button('add', _('Add a block'), { :action => 'add_block' }) %>
- <%= button(:back, _('Back to control panel'), :controller => (profile.nil? ? 'admin_panel': 'profile_editor')) %>
-<% end %>
diff --git a/app/views/catalog/index.html.erb b/app/views/catalog/index.html.erb
new file mode 100644
index 0000000..3ebdba0
--- /dev/null
+++ b/app/views/catalog/index.html.erb
@@ -0,0 +1,113 @@
+<% extra_content = [] %>
+<% extra_content_list = [] %>
+
+
+ <%= _('Products/Services') %>
+
+ <% @products.each do |product| %>
+ <% extra_content = @plugins.dispatch(:catalog_item_extras, product).collect { |content| instance_eval(&content) } %>
+ <% extra_content_list = @plugins.dispatch(:catalog_list_item_extras, product).collect { |content| instance_eval(&content) } %>
+
+ ">
+
+
+ <% if product.image %>
+
+ <%= link_to_product product, :class => 'product-big', :style => "background-image: url(#{product.default_image(:big)})" %>
+ <%= link_to content_tag(:span, _('Zoom in')), product.default_image(:big).gsub('_big',''), :class => 'zoomify-image' %>
+
+ <% else %>
+ <%= _('No image') %>
+ <% end %>
+
+
+
+ <%= link_to_product product %>
+
+
+ <% unless product.discount.blank? or product.discount == 0 %>
+
+ <%= _('from ') + price_span(product.price) %>
+ <%= _('by ') %>
+
+ <% end %>
+ <% unless product.price.blank? or product.price == 0 %>
+
+ <%= price_span product.price_with_discount, :class => "product-price #{'with-discount' unless product.discount}" %>
+ <%= _(' / ') + (product.unit ? product.unit.singular : _('unit')) %>
+
+ <% end %>
+
+
+
+ <% if product.description %>
+
+ <%= _('description') %>
+
+
+
<%= txt2html(product.description || '') %>
+
+
+ <% end %>
+
+ <% if product.price_described? %>
+
+ <%= _('price composition') %>
+
+
+
+ <% product.inputs.relevant_to_price.each do |i| %>
+
+ <% end %>
+ <% product.price_details.each do |i| %>
+
+ <% end %>
+
+
+
+ <% end %>
+
+ <% if product.inputs.count > 0 %>
+
+ <%= _('inputs and raw materials') %>
+
+
+
+ <% product.inputs.each do |i| %>
+
+ <%= _('%{amount_used} %{unit} of') % {:amount_used => i.amount_used, :unit => i.unit.singular} + ' ' if i.has_all_price_details? %>
+ <%= i.product_category.name %>
+
+ <% end %>
+
+
+
+ <% end %>
+
+ <% unless product.qualifiers.blank? %>
+
+ <%= _('qualifiers') if product.product_qualifiers.count > 0 %>
+ <%= render :partial => 'shared/product/qualifiers', :locals => {:product => product} %>
+ <% end %>
+
+ <% extra_content_list.map do |content| %>
+
+ <% end %>
+
+ <%= _('product unavailable') unless product.available %>
+
+
+ <% end %>
+
+
+<%= pagination_links @products, :params => {:controller => :catalog, :action => :index, :profile => profile.identifier} %>
+
+<%= add_zoom_to_images %>
+
+
diff --git a/app/views/catalog/index.rhtml b/app/views/catalog/index.rhtml
deleted file mode 100644
index 3ebdba0..0000000
--- a/app/views/catalog/index.rhtml
+++ /dev/null
@@ -1,113 +0,0 @@
-<% extra_content = [] %>
-<% extra_content_list = [] %>
-
-
- <%= _('Products/Services') %>
-
- <% @products.each do |product| %>
- <% extra_content = @plugins.dispatch(:catalog_item_extras, product).collect { |content| instance_eval(&content) } %>
- <% extra_content_list = @plugins.dispatch(:catalog_list_item_extras, product).collect { |content| instance_eval(&content) } %>
-
- ">
-
-
- <% if product.image %>
-
- <%= link_to_product product, :class => 'product-big', :style => "background-image: url(#{product.default_image(:big)})" %>
- <%= link_to content_tag(:span, _('Zoom in')), product.default_image(:big).gsub('_big',''), :class => 'zoomify-image' %>
-
- <% else %>
- <%= _('No image') %>
- <% end %>
-
-
-
- <%= link_to_product product %>
-
-
- <% unless product.discount.blank? or product.discount == 0 %>
-
- <%= _('from ') + price_span(product.price) %>
- <%= _('by ') %>
-
- <% end %>
- <% unless product.price.blank? or product.price == 0 %>
-
- <%= price_span product.price_with_discount, :class => "product-price #{'with-discount' unless product.discount}" %>
- <%= _(' / ') + (product.unit ? product.unit.singular : _('unit')) %>
-
- <% end %>
-
-
-
- <% if product.description %>
-
- <%= _('description') %>
-
-
-
<%= txt2html(product.description || '') %>
-
-
- <% end %>
-
- <% if product.price_described? %>
-
- <%= _('price composition') %>
-
-
-
- <% product.inputs.relevant_to_price.each do |i| %>
-
- <% end %>
- <% product.price_details.each do |i| %>
-
- <% end %>
-
-
-
- <% end %>
-
- <% if product.inputs.count > 0 %>
-
- <%= _('inputs and raw materials') %>
-
-
-
- <% product.inputs.each do |i| %>
-
- <%= _('%{amount_used} %{unit} of') % {:amount_used => i.amount_used, :unit => i.unit.singular} + ' ' if i.has_all_price_details? %>
- <%= i.product_category.name %>
-
- <% end %>
-
-
-
- <% end %>
-
- <% unless product.qualifiers.blank? %>
-
- <%= _('qualifiers') if product.product_qualifiers.count > 0 %>
- <%= render :partial => 'shared/product/qualifiers', :locals => {:product => product} %>
- <% end %>
-
- <% extra_content_list.map do |content| %>
-
- <% end %>
-
- <%= _('product unavailable') unless product.available %>
-
-
- <% end %>
-
-
-<%= pagination_links @products, :params => {:controller => :catalog, :action => :index, :profile => profile.identifier} %>
-
-<%= add_zoom_to_images %>
-
-
diff --git a/app/views/categories/_category.html.erb b/app/views/categories/_category.html.erb
new file mode 100644
index 0000000..946e08b
--- /dev/null
+++ b/app/views/categories/_category.html.erb
@@ -0,0 +1,21 @@
+
+
+ <%= display_color_for_category(category) %>
+ <%= category.name %>
+ <% if category.children.count > 0 %>
+
+
<%= _('Hide') %>
+ <% end %>
+
+
+ <%= link_to _('Add subcategory'), :action => 'new', :parent_id => category %>
+ <%= link_to _('Edit'), :action => 'edit', :id => category %>
+ <%= link_to _('Remove'), { :action => 'remove', :id => category, }, :method => 'post', :confirm => (category.children.empty? ? (_('Are you sure you want to remove "%s"?') % category.name) : (_('Are you sure you want to remove "%s" and all its subcategories?') % category.name) ) %>
+
+
+
+
+
+
diff --git a/app/views/categories/_category.rhtml b/app/views/categories/_category.rhtml
deleted file mode 100644
index 946e08b..0000000
--- a/app/views/categories/_category.rhtml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
- <%= display_color_for_category(category) %>
- <%= category.name %>
- <% if category.children.count > 0 %>
-
-
<%= _('Hide') %>
- <% end %>
-
-
- <%= link_to _('Add subcategory'), :action => 'new', :parent_id => category %>
- <%= link_to _('Edit'), :action => 'edit', :id => category %>
- <%= link_to _('Remove'), { :action => 'remove', :id => category, }, :method => 'post', :confirm => (category.children.empty? ? (_('Are you sure you want to remove "%s"?') % category.name) : (_('Are you sure you want to remove "%s" and all its subcategories?') % category.name) ) %>
-
-
-
-
-
-
diff --git a/app/views/categories/_category_children.html.erb b/app/views/categories/_category_children.html.erb
new file mode 100644
index 0000000..06db922
--- /dev/null
+++ b/app/views/categories/_category_children.html.erb
@@ -0,0 +1,3 @@
+<% children.each do |category| %>
+ <%= render :partial => 'category', :locals => {:category => category} %>
+<% end %>
diff --git a/app/views/categories/_category_children.rhtml b/app/views/categories/_category_children.rhtml
deleted file mode 100644
index 06db922..0000000
--- a/app/views/categories/_category_children.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<% children.each do |category| %>
- <%= render :partial => 'category', :locals => {:category => category} %>
-<% end %>
diff --git a/app/views/categories/_form.html.erb b/app/views/categories/_form.html.erb
new file mode 100644
index 0000000..4eee4be
--- /dev/null
+++ b/app/views/categories/_form.html.erb
@@ -0,0 +1,29 @@
+<%= error_messages_for 'category' %>
+
+<% labelled_form_for 'category', @category, :html => { :multipart => true} do |f| %>
+
+ <%= required_fields_message %>
+
+ <% if @category.new_record? %>
+ <% if @category.parent %>
+ <%= hidden_field_tag('parent_id', @category.parent.id) %>
+ <%= hidden_field_tag('parent_type', @category.parent.class.name) %>
+ <% else %>
+ <%= select_category_type :type %>
+ <% end %>
+ <% end %>
+
+ <%= select_color_for_category if !environment.enabled?('disable_categories_menu') %>
+
+ <%= required f.text_field('name') %>
+
+ <%= labelled_check_box(_('Display in the menu'), 'category[display_in_menu]', '1', @category.display_in_menu) %>
+
+ <% f.fields_for :image_builder, @category.image do |i| %>
+ <%= file_field_or_thumbnail(_('Image:'), @category.image, i) %>
+ <% end %>
+
+ <% button_bar do %>
+ <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
+ <% end%>
+<% end %>
diff --git a/app/views/categories/_form.rhtml b/app/views/categories/_form.rhtml
deleted file mode 100644
index 4eee4be..0000000
--- a/app/views/categories/_form.rhtml
+++ /dev/null
@@ -1,29 +0,0 @@
-<%= error_messages_for 'category' %>
-
-<% labelled_form_for 'category', @category, :html => { :multipart => true} do |f| %>
-
- <%= required_fields_message %>
-
- <% if @category.new_record? %>
- <% if @category.parent %>
- <%= hidden_field_tag('parent_id', @category.parent.id) %>
- <%= hidden_field_tag('parent_type', @category.parent.class.name) %>
- <% else %>
- <%= select_category_type :type %>
- <% end %>
- <% end %>
-
- <%= select_color_for_category if !environment.enabled?('disable_categories_menu') %>
-
- <%= required f.text_field('name') %>
-
- <%= labelled_check_box(_('Display in the menu'), 'category[display_in_menu]', '1', @category.display_in_menu) %>
-
- <% f.fields_for :image_builder, @category.image do |i| %>
- <%= file_field_or_thumbnail(_('Image:'), @category.image, i) %>
- <% end %>
-
- <% button_bar do %>
- <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
- <% end%>
-<% end %>
diff --git a/app/views/categories/edit.html.erb b/app/views/categories/edit.html.erb
new file mode 100644
index 0000000..385b44d
--- /dev/null
+++ b/app/views/categories/edit.html.erb
@@ -0,0 +1,2 @@
+<%= _('Editing %s') % @category.name %>
+<%= render :partial => 'form' %>
diff --git a/app/views/categories/edit.rhtml b/app/views/categories/edit.rhtml
deleted file mode 100644
index 385b44d..0000000
--- a/app/views/categories/edit.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= _('Editing %s') % @category.name %>
-<%= render :partial => 'form' %>
diff --git a/app/views/categories/index.html.erb b/app/views/categories/index.html.erb
new file mode 100644
index 0000000..b19fc68
--- /dev/null
+++ b/app/views/categories/index.html.erb
@@ -0,0 +1,28 @@
+<%= _('Categories') %>
+
+
+ <%= render :partial => 'category', :collection => @categories %>
+
+
+ <%= link_to _('New category'), :action => 'new' %>
+
+
+<%= _('Product Categories') %>
+
+ <%= render :partial => 'category', :collection => @product_categories %>
+
+
+
+ <%= link_to _('New category'), :action => 'new', :type => 'ProductCategory' %>
+
+
+<%= _('Regions') %>
+
+ <%= render :partial => 'category', :collection => @regions %>
+
+
+
+ <%= link_to _('New category'), :action => 'new', :type => 'Region' %>
+
+
+<%= javascript_include_tag 'manage-categories' %>
diff --git a/app/views/categories/index.rhtml b/app/views/categories/index.rhtml
deleted file mode 100644
index b19fc68..0000000
--- a/app/views/categories/index.rhtml
+++ /dev/null
@@ -1,28 +0,0 @@
-<%= _('Categories') %>
-
-
- <%= render :partial => 'category', :collection => @categories %>
-
-
- <%= link_to _('New category'), :action => 'new' %>
-
-
-<%= _('Product Categories') %>
-
- <%= render :partial => 'category', :collection => @product_categories %>
-
-
-
- <%= link_to _('New category'), :action => 'new', :type => 'ProductCategory' %>
-
-
-<%= _('Regions') %>
-
- <%= render :partial => 'category', :collection => @regions %>
-
-
-
- <%= link_to _('New category'), :action => 'new', :type => 'Region' %>
-
-
-<%= javascript_include_tag 'manage-categories' %>
diff --git a/app/views/categories/new.html.erb b/app/views/categories/new.html.erb
new file mode 100644
index 0000000..122ca82
--- /dev/null
+++ b/app/views/categories/new.html.erb
@@ -0,0 +1,3 @@
+<%= _('New category') %>
+<%= render :partial => 'form' %>
+
diff --git a/app/views/categories/new.rhtml b/app/views/categories/new.rhtml
deleted file mode 100644
index 122ca82..0000000
--- a/app/views/categories/new.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= _('New category') %>
-<%= render :partial => 'form' %>
-
diff --git a/app/views/chat/auto_connect_busy.html.erb b/app/views/chat/auto_connect_busy.html.erb
new file mode 100644
index 0000000..26feb96
--- /dev/null
+++ b/app/views/chat/auto_connect_busy.html.erb
@@ -0,0 +1,5 @@
+
diff --git a/app/views/chat/auto_connect_busy.rhtml b/app/views/chat/auto_connect_busy.rhtml
deleted file mode 100644
index 26feb96..0000000
--- a/app/views/chat/auto_connect_busy.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/app/views/chat/auto_connect_online.html.erb b/app/views/chat/auto_connect_online.html.erb
new file mode 100644
index 0000000..16868be
--- /dev/null
+++ b/app/views/chat/auto_connect_online.html.erb
@@ -0,0 +1,5 @@
+
diff --git a/app/views/chat/auto_connect_online.rhtml b/app/views/chat/auto_connect_online.rhtml
deleted file mode 100644
index 16868be..0000000
--- a/app/views/chat/auto_connect_online.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/app/views/chat/start_session_error.html.erb b/app/views/chat/start_session_error.html.erb
new file mode 100644
index 0000000..405245e
--- /dev/null
+++ b/app/views/chat/start_session_error.html.erb
@@ -0,0 +1,4 @@
+
+<%= ui_icon('ui-icon-alert') %>
+<%= _('Could not connect to chat') %>, <%= _('try again') %> .
+
diff --git a/app/views/chat/start_session_error.rhtml b/app/views/chat/start_session_error.rhtml
deleted file mode 100644
index 405245e..0000000
--- a/app/views/chat/start_session_error.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-<%= ui_icon('ui-icon-alert') %>
-<%= _('Could not connect to chat') %>, <%= _('try again') %> .
-
diff --git a/app/views/cms/_article.html.erb b/app/views/cms/_article.html.erb
new file mode 120000
index 0000000..8f01891
--- /dev/null
+++ b/app/views/cms/_article.html.erb
@@ -0,0 +1 @@
+_tiny_mce_article.rhtml
\ No newline at end of file
diff --git a/app/views/cms/_article.rhtml b/app/views/cms/_article.rhtml
deleted file mode 120000
index 8f01891..0000000
--- a/app/views/cms/_article.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-_tiny_mce_article.rhtml
\ No newline at end of file
diff --git a/app/views/cms/_blog.html.erb b/app/views/cms/_blog.html.erb
new file mode 100644
index 0000000..62a4b3b
--- /dev/null
+++ b/app/views/cms/_blog.html.erb
@@ -0,0 +1,85 @@
+<%= error_messages_for 'blog' %>
+
+<%= _('My Blog') %>
+
+<%= render :file => 'shared/tiny_mce' %>
+
+<%= required f.text_field(:name, :size => '64', :onchange => "updateUrlField(this, 'article_slug')") %>
+
+<%= render :partial => 'general_fields' %>
+
+
+
+<%= hidden_field_tag 'old_article_slug', @article.slug %>
+
+ <%= labelled_form_field( _('Address'),
+ content_tag('code',
+ url_for(@article.url).gsub(/#{@article.slug}$/, '') +
+ text_field(:article, :slug, :onchange => "warn_value_change()", :size => 25)
+ ) +
+ content_tag('div',
+ content_tag('strong', _('WARNING!')) + ' ' +
+ _("You are about to change the address, and this will break external links to this blog or to posts inside it. Do you really want to change?") +
+ content_tag('div',
+ button_to_function(:ok, _("Yes"), "confirm_change()") + ' ' +
+ button_to_function(:cancel, _('No'), 'no_change()')
+ ),
+ :id => 'slug-change-confirmation',
+ :class => 'change-confirmation',
+ :style => 'display: none;'
+ )
+ )
+ %>
+
+
+<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 10)) %>
+
+<%= labelled_form_field(_('How to display posts:'), f.select(:visualization_format, [ [ _('Full post'), 'full'], [ _('First paragraph'), 'short'] ])) %>
+
+<%= labelled_form_field(_('Posts per page:'), f.select(:posts_per_page, [5, 10, 20, 50, 100])) %>
+
+<%= labelled_check_box(_("List only translated posts"), 'article[display_posts_in_current_language]', '1', @article.display_posts_in_current_language?) %>
+
+<% f.fields_for 'feed', @article.feed do |feed| %>
+ <%= labelled_form_field(_('Limit of posts in RSS Feed'), feed.select(:limit, [5, 10, 20, 50])) %>
+ <%= labelled_form_field(_('Include in RSS Feed only posts from language:'), feed.select(:language, [[_('All'), nil ]] + environment.locales.map { |k,v| [v, k]})) %>
+<% end %>
+
+<% f.fields_for 'external_feed_builder', @article.external_feed do |efeed| %>
+
+ <% enabled = @article.external_feed && @article.external_feed.enabled %>
+ <% only_once = @article.external_feed ? @article.external_feed.only_once : true %>
+ <%= labelled_check_box(_('Fetch posts from an external feed'), 'article[external_feed_builder][enabled]', 'true', enabled, {:onchange => "$('external-feed-options').toggle()"}) %>
+
+ <%= efeed.hidden_field(:id) %>
+ <%= labelled_form_field( _('Feed address'), efeed.text_field(:address) ) %>
+
+ <%= labelled_radio_button( _('Fetch posts only once'), 'article[external_feed_builder][only_once]', 'true', only_once) %>
+ <%= labelled_radio_button( _('Fetch posts periodically'), 'article[external_feed_builder][only_once]', 'false', !only_once) %>
+
+ <%= _('Feeds are updated in batches periodically. Please note that your posts will not be fetched immediately.') %>
+
+
+
+
+<% end %>
diff --git a/app/views/cms/_blog.rhtml b/app/views/cms/_blog.rhtml
deleted file mode 100644
index 62a4b3b..0000000
--- a/app/views/cms/_blog.rhtml
+++ /dev/null
@@ -1,85 +0,0 @@
-<%= error_messages_for 'blog' %>
-
-<%= _('My Blog') %>
-
-<%= render :file => 'shared/tiny_mce' %>
-
-<%= required f.text_field(:name, :size => '64', :onchange => "updateUrlField(this, 'article_slug')") %>
-
-<%= render :partial => 'general_fields' %>
-
-
-
-<%= hidden_field_tag 'old_article_slug', @article.slug %>
-
- <%= labelled_form_field( _('Address'),
- content_tag('code',
- url_for(@article.url).gsub(/#{@article.slug}$/, '') +
- text_field(:article, :slug, :onchange => "warn_value_change()", :size => 25)
- ) +
- content_tag('div',
- content_tag('strong', _('WARNING!')) + ' ' +
- _("You are about to change the address, and this will break external links to this blog or to posts inside it. Do you really want to change?") +
- content_tag('div',
- button_to_function(:ok, _("Yes"), "confirm_change()") + ' ' +
- button_to_function(:cancel, _('No'), 'no_change()')
- ),
- :id => 'slug-change-confirmation',
- :class => 'change-confirmation',
- :style => 'display: none;'
- )
- )
- %>
-
-
-<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 10)) %>
-
-<%= labelled_form_field(_('How to display posts:'), f.select(:visualization_format, [ [ _('Full post'), 'full'], [ _('First paragraph'), 'short'] ])) %>
-
-<%= labelled_form_field(_('Posts per page:'), f.select(:posts_per_page, [5, 10, 20, 50, 100])) %>
-
-<%= labelled_check_box(_("List only translated posts"), 'article[display_posts_in_current_language]', '1', @article.display_posts_in_current_language?) %>
-
-<% f.fields_for 'feed', @article.feed do |feed| %>
- <%= labelled_form_field(_('Limit of posts in RSS Feed'), feed.select(:limit, [5, 10, 20, 50])) %>
- <%= labelled_form_field(_('Include in RSS Feed only posts from language:'), feed.select(:language, [[_('All'), nil ]] + environment.locales.map { |k,v| [v, k]})) %>
-<% end %>
-
-<% f.fields_for 'external_feed_builder', @article.external_feed do |efeed| %>
-
- <% enabled = @article.external_feed && @article.external_feed.enabled %>
- <% only_once = @article.external_feed ? @article.external_feed.only_once : true %>
- <%= labelled_check_box(_('Fetch posts from an external feed'), 'article[external_feed_builder][enabled]', 'true', enabled, {:onchange => "$('external-feed-options').toggle()"}) %>
-
- <%= efeed.hidden_field(:id) %>
- <%= labelled_form_field( _('Feed address'), efeed.text_field(:address) ) %>
-
- <%= labelled_radio_button( _('Fetch posts only once'), 'article[external_feed_builder][only_once]', 'true', only_once) %>
- <%= labelled_radio_button( _('Fetch posts periodically'), 'article[external_feed_builder][only_once]', 'false', !only_once) %>
-
- <%= _('Feeds are updated in batches periodically. Please note that your posts will not be fetched immediately.') %>
-
-
-
-
-<% end %>
diff --git a/app/views/cms/_drag_and_drop_note.html.erb b/app/views/cms/_drag_and_drop_note.html.erb
new file mode 100644
index 0000000..a2af7a1
--- /dev/null
+++ b/app/views/cms/_drag_and_drop_note.html.erb
@@ -0,0 +1,6 @@
+
+
+ <%= _('Drag images to add them to the text.') %>
+ <%= _('Drag file names to the text to add links.') %>
+
+
diff --git a/app/views/cms/_drag_and_drop_note.rhtml b/app/views/cms/_drag_and_drop_note.rhtml
deleted file mode 100644
index a2af7a1..0000000
--- a/app/views/cms/_drag_and_drop_note.rhtml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- <%= _('Drag images to add them to the text.') %>
- <%= _('Drag file names to the text to add links.') %>
-
-
diff --git a/app/views/cms/_enterprise_homepage.html.erb b/app/views/cms/_enterprise_homepage.html.erb
new file mode 100644
index 0000000..8e5cbf6
--- /dev/null
+++ b/app/views/cms/_enterprise_homepage.html.erb
@@ -0,0 +1,4 @@
+<%= render :file => 'shared/tiny_mce' %>
+
+<%= labelled_form_field(_('Text'), text_area(:article, 'body', :cols => 40, :style => 'width:99%')) %>
+
diff --git a/app/views/cms/_enterprise_homepage.rhtml b/app/views/cms/_enterprise_homepage.rhtml
deleted file mode 100644
index 8e5cbf6..0000000
--- a/app/views/cms/_enterprise_homepage.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<%= render :file => 'shared/tiny_mce' %>
-
-<%= labelled_form_field(_('Text'), text_area(:article, 'body', :cols => 40, :style => 'width:99%')) %>
-
diff --git a/app/views/cms/_event.html.erb b/app/views/cms/_event.html.erb
new file mode 100644
index 0000000..4b9bf5b
--- /dev/null
+++ b/app/views/cms/_event.html.erb
@@ -0,0 +1,19 @@
+<%= required_fields_message %>
+
+<%# TODO add Textile help here %>
+<%= render :file => 'shared/tiny_mce' %>
+
+<%= required f.text_field('name', :size => '64') %>
+
+<%= render :partial => 'general_fields' %>
+<%= render :partial => 'translatable' %>
+
+<%= labelled_form_field(_('Start date'), pick_date(:article, :start_date)) %>
+
+<%= labelled_form_field(_('End date'), pick_date(:article, :end_date)) %>
+
+<%= labelled_form_field(_('Event website:'), text_field(:article, :link)) %>
+
+<%= labelled_form_field(_('Address:'), text_field(:article, :address)) %>
+
+<%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true, :body_label => 'Information about the event:'} %>
diff --git a/app/views/cms/_event.rhtml b/app/views/cms/_event.rhtml
deleted file mode 100644
index 4b9bf5b..0000000
--- a/app/views/cms/_event.rhtml
+++ /dev/null
@@ -1,19 +0,0 @@
-<%= required_fields_message %>
-
-<%# TODO add Textile help here %>
-<%= render :file => 'shared/tiny_mce' %>
-
-<%= required f.text_field('name', :size => '64') %>
-
-<%= render :partial => 'general_fields' %>
-<%= render :partial => 'translatable' %>
-
-<%= labelled_form_field(_('Start date'), pick_date(:article, :start_date)) %>
-
-<%= labelled_form_field(_('End date'), pick_date(:article, :end_date)) %>
-
-<%= labelled_form_field(_('Event website:'), text_field(:article, :link)) %>
-
-<%= labelled_form_field(_('Address:'), text_field(:article, :address)) %>
-
-<%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true, :body_label => 'Information about the event:'} %>
diff --git a/app/views/cms/_folder.html.erb b/app/views/cms/_folder.html.erb
new file mode 100644
index 0000000..b173914
--- /dev/null
+++ b/app/views/cms/_folder.html.erb
@@ -0,0 +1,6 @@
+<%= required_fields_message %>
+
+<%= required f.text_field('name', :size => '64') %>
+<%= render :partial => 'general_fields' %>
+
+<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %>
diff --git a/app/views/cms/_folder.rhtml b/app/views/cms/_folder.rhtml
deleted file mode 100644
index b173914..0000000
--- a/app/views/cms/_folder.rhtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<%= required_fields_message %>
-
-<%= required f.text_field('name', :size => '64') %>
-<%= render :partial => 'general_fields' %>
-
-<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %>
diff --git a/app/views/cms/_forum.html.erb b/app/views/cms/_forum.html.erb
new file mode 100644
index 0000000..c0c0829
--- /dev/null
+++ b/app/views/cms/_forum.html.erb
@@ -0,0 +1,13 @@
+<%= error_messages_for 'forum' %>
+
+<%= _('My Forum') %>
+
+<%= render :file => 'shared/tiny_mce' %>
+
+<%= required f.text_field(:name, :size => '64', :onchange => "updateUrlField(this, 'article_slug')") %>
+
+<%= render :partial => 'general_fields' %>
+
+<%= labelled_form_field(_('Description:'), text_area(:article, :body, :cols => 64, :rows => 10)) %>
+
+<%= labelled_form_field(_('Posts per page:'), f.select(:posts_per_page, [5, 10, 20, 50, 100])) %>
diff --git a/app/views/cms/_forum.rhtml b/app/views/cms/_forum.rhtml
deleted file mode 100644
index c0c0829..0000000
--- a/app/views/cms/_forum.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<%= error_messages_for 'forum' %>
-
-<%= _('My Forum') %>
-
-<%= render :file => 'shared/tiny_mce' %>
-
-<%= required f.text_field(:name, :size => '64', :onchange => "updateUrlField(this, 'article_slug')") %>
-
-<%= render :partial => 'general_fields' %>
-
-<%= labelled_form_field(_('Description:'), text_area(:article, :body, :cols => 64, :rows => 10)) %>
-
-<%= labelled_form_field(_('Posts per page:'), f.select(:posts_per_page, [5, 10, 20, 50, 100])) %>
diff --git a/app/views/cms/_gallery.html.erb b/app/views/cms/_gallery.html.erb
new file mode 100644
index 0000000..72689c2
--- /dev/null
+++ b/app/views/cms/_gallery.html.erb
@@ -0,0 +1,7 @@
+<%= required_fields_message %>
+
+<%= required f.text_field('name', :size => '64') %>
+
+<%= render :partial => 'general_fields' %>
+
+<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %>
diff --git a/app/views/cms/_gallery.rhtml b/app/views/cms/_gallery.rhtml
deleted file mode 100644
index 72689c2..0000000
--- a/app/views/cms/_gallery.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= required_fields_message %>
-
-<%= required f.text_field('name', :size => '64') %>
-
-<%= render :partial => 'general_fields' %>
-
-<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %>
diff --git a/app/views/cms/_published_article.html.erb b/app/views/cms/_published_article.html.erb
new file mode 100644
index 0000000..e6a2622
--- /dev/null
+++ b/app/views/cms/_published_article.html.erb
@@ -0,0 +1,4 @@
+<%= f.text_field 'name', :size => '64' %>
+<%= render :partial => 'general_fields' %>
+
+<%= _('This is a republication of "%s", by %s.') % [link_to(h(@article.reference_article.name), @article.reference_article.url), @article.reference_article.profile.name] %>
diff --git a/app/views/cms/_published_article.rhtml b/app/views/cms/_published_article.rhtml
deleted file mode 100644
index e6a2622..0000000
--- a/app/views/cms/_published_article.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<%= f.text_field 'name', :size => '64' %>
-<%= render :partial => 'general_fields' %>
-
-<%= _('This is a republication of "%s", by %s.') % [link_to(h(@article.reference_article.name), @article.reference_article.url), @article.reference_article.profile.name] %>
diff --git a/app/views/cms/_raw_html_article.html.erb b/app/views/cms/_raw_html_article.html.erb
new file mode 100644
index 0000000..fbdff06
--- /dev/null
+++ b/app/views/cms/_raw_html_article.html.erb
@@ -0,0 +1,7 @@
+<%= required_fields_message %>
+
+<%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '64')) %>
+
+<%= render :partial => 'general_fields' %>
+<%= render :partial => 'translatable' %>
+<%= render :partial => 'shared/lead_and_body' %>
diff --git a/app/views/cms/_raw_html_article.rhtml b/app/views/cms/_raw_html_article.rhtml
deleted file mode 100644
index fbdff06..0000000
--- a/app/views/cms/_raw_html_article.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= required_fields_message %>
-
-<%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '64')) %>
-
-<%= render :partial => 'general_fields' %>
-<%= render :partial => 'translatable' %>
-<%= render :partial => 'shared/lead_and_body' %>
diff --git a/app/views/cms/_rss_feed.html.erb b/app/views/cms/_rss_feed.html.erb
new file mode 100644
index 0000000..112c6c1
--- /dev/null
+++ b/app/views/cms/_rss_feed.html.erb
@@ -0,0 +1,13 @@
+<%= required_fields_message %>
+
+<%= required f.text_field(:name) %>
+
+<%= render :partial => 'general_fields' %>
+
+<%= required labelled_form_field(_('Limit of articles'), text_field(:article, :limit)) %>
+
+<%= labelled_form_field(_('Include in RSS Feed only posts from language:'), f.select(:language, [[_('All'), nil ]] + environment.locales.map { |k,v| [v, k]})) %>
+
+<%= labelled_form_field(_('Use as item description:'), select(:article, :feed_item_description, [ [ _('Article abstract'), 'abstract'], [ _('Article body'), 'body']])) %>
+
+<%= labelled_form_field(_('Include in the feed:'), select(:article, :include, [ [ _('All articles'), 'all' ], [ _('Only articles child of the same article as the feed'), 'parent_and_children']] )) %>
diff --git a/app/views/cms/_rss_feed.rhtml b/app/views/cms/_rss_feed.rhtml
deleted file mode 100644
index 112c6c1..0000000
--- a/app/views/cms/_rss_feed.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<%= required_fields_message %>
-
-<%= required f.text_field(:name) %>
-
-<%= render :partial => 'general_fields' %>
-
-<%= required labelled_form_field(_('Limit of articles'), text_field(:article, :limit)) %>
-
-<%= labelled_form_field(_('Include in RSS Feed only posts from language:'), f.select(:language, [[_('All'), nil ]] + environment.locales.map { |k,v| [v, k]})) %>
-
-<%= labelled_form_field(_('Use as item description:'), select(:article, :feed_item_description, [ [ _('Article abstract'), 'abstract'], [ _('Article body'), 'body']])) %>
-
-<%= labelled_form_field(_('Include in the feed:'), select(:article, :include, [ [ _('All articles'), 'all' ], [ _('Only articles child of the same article as the feed'), 'parent_and_children']] )) %>
diff --git a/app/views/cms/_text_editor_sidebar.html.erb b/app/views/cms/_text_editor_sidebar.html.erb
new file mode 100644
index 0000000..e67dc5a
--- /dev/null
+++ b/app/views/cms/_text_editor_sidebar.html.erb
@@ -0,0 +1,47 @@
+
+
+
diff --git a/app/views/cms/_text_editor_sidebar.rhtml b/app/views/cms/_text_editor_sidebar.rhtml
deleted file mode 100644
index e67dc5a..0000000
--- a/app/views/cms/_text_editor_sidebar.rhtml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
diff --git a/app/views/cms/_textile_article.html.erb b/app/views/cms/_textile_article.html.erb
new file mode 100644
index 0000000..2299d27
--- /dev/null
+++ b/app/views/cms/_textile_article.html.erb
@@ -0,0 +1,9 @@
+<%= required_fields_message %>
+
+<%# TODO add Textile help here %>
+
+<%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '72')) %>
+
+<%= render :partial => 'general_fields' %>
+<%= render :partial => 'translatable' %>
+<%= render :partial => 'shared/lead_and_body' %>
diff --git a/app/views/cms/_textile_article.rhtml b/app/views/cms/_textile_article.rhtml
deleted file mode 100644
index 2299d27..0000000
--- a/app/views/cms/_textile_article.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= required_fields_message %>
-
-<%# TODO add Textile help here %>
-
-<%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '72')) %>
-
-<%= render :partial => 'general_fields' %>
-<%= render :partial => 'translatable' %>
-<%= render :partial => 'shared/lead_and_body' %>
diff --git a/app/views/cms/_textile_quick_reference.html.erb b/app/views/cms/_textile_quick_reference.html.erb
new file mode 100644
index 0000000..a91fb29
--- /dev/null
+++ b/app/views/cms/_textile_quick_reference.html.erb
@@ -0,0 +1,28 @@
+
+
diff --git a/app/views/cms/_textile_quick_reference.rhtml b/app/views/cms/_textile_quick_reference.rhtml
deleted file mode 100644
index a91fb29..0000000
--- a/app/views/cms/_textile_quick_reference.rhtml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
diff --git a/app/views/cms/_tiny_mce_article.html.erb b/app/views/cms/_tiny_mce_article.html.erb
new file mode 100644
index 0000000..69dafbf
--- /dev/null
+++ b/app/views/cms/_tiny_mce_article.html.erb
@@ -0,0 +1,11 @@
+<%= required_fields_message %>
+
+<%= render :file => 'shared/tiny_mce' %>
+
+
+ <%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '64')) %>
+
+ <%= render :partial => 'general_fields' %>
+ <%= render :partial => 'translatable' %>
+ <%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true} %>
+
diff --git a/app/views/cms/_tiny_mce_article.rhtml b/app/views/cms/_tiny_mce_article.rhtml
deleted file mode 100644
index 69dafbf..0000000
--- a/app/views/cms/_tiny_mce_article.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= required_fields_message %>
-
-<%= render :file => 'shared/tiny_mce' %>
-
-
- <%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '64')) %>
-
- <%= render :partial => 'general_fields' %>
- <%= render :partial => 'translatable' %>
- <%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true} %>
-
diff --git a/app/views/cms/_translatable.html.erb b/app/views/cms/_translatable.html.erb
new file mode 100644
index 0000000..4f69bed
--- /dev/null
+++ b/app/views/cms/_translatable.html.erb
@@ -0,0 +1,7 @@
+<% if @article.translatable? %>
+
+ <%= label :article, :language, _('Language') %>
+ <%= select :article, :language, @locales, { :selected => @selected_locale, :include_blank => true } %>
+ <%= hidden_field(:article, :translation_of_id) %>
+
+<% end %>
diff --git a/app/views/cms/_translatable.rhtml b/app/views/cms/_translatable.rhtml
deleted file mode 100644
index 4f69bed..0000000
--- a/app/views/cms/_translatable.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<% if @article.translatable? %>
-
- <%= label :article, :language, _('Language') %>
- <%= select :article, :language, @locales, { :selected => @selected_locale, :include_blank => true } %>
- <%= hidden_field(:article, :translation_of_id) %>
-
-<% end %>
diff --git a/app/views/cms/_upload_file.html.erb b/app/views/cms/_upload_file.html.erb
new file mode 100644
index 0000000..c7c4eda
--- /dev/null
+++ b/app/views/cms/_upload_file.html.erb
@@ -0,0 +1,2 @@
+<%= file_field_tag('uploaded_files[]', :size => size) %>
+<%= javascript_tag("$('uploaded_files').scrollTop = $('uploaded_files').scrollHeight") %>
diff --git a/app/views/cms/_upload_file.rhtml b/app/views/cms/_upload_file.rhtml
deleted file mode 100644
index c7c4eda..0000000
--- a/app/views/cms/_upload_file.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= file_field_tag('uploaded_files[]', :size => size) %>
-<%= javascript_tag("$('uploaded_files').scrollTop = $('uploaded_files').scrollHeight") %>
diff --git a/app/views/cms/_upload_file_form.html.erb b/app/views/cms/_upload_file_form.html.erb
new file mode 100644
index 0000000..0786dc4
--- /dev/null
+++ b/app/views/cms/_upload_file_form.html.erb
@@ -0,0 +1,22 @@
+<% if @parent %>
+ <%= hidden_field_tag('parent_id', @parent.id) %>
+<% else %>
+ <%= select_profile_folder(_('Choose folder to upload files:'), :parent_id, profile) %>
+<% end %>
+
+
+ <% 3.times do %>
+ <%= render :partial => 'upload_file', :locals => {:size => size} %>
+ <% end %>
+
+
+<%= hidden_field_tag('back_to', @back_to) %>
+
+<% button_bar do %>
+ <%= add_upload_file_field(_('More files'), {:size => size}) %>
+ <% if @back_to %>
+ <%= submit_button :save, _('Upload'), :cancel => @back_to %>
+ <% else %>
+ <%= submit_button :save, _('Upload'), :cancel => {:action => (@parent ? 'view' : 'index'), :id => @parent } %>
+ <% end %>
+<% end %>
diff --git a/app/views/cms/_upload_file_form.rhtml b/app/views/cms/_upload_file_form.rhtml
deleted file mode 100644
index 0786dc4..0000000
--- a/app/views/cms/_upload_file_form.rhtml
+++ /dev/null
@@ -1,22 +0,0 @@
-<% if @parent %>
- <%= hidden_field_tag('parent_id', @parent.id) %>
-<% else %>
- <%= select_profile_folder(_('Choose folder to upload files:'), :parent_id, profile) %>
-<% end %>
-
-
- <% 3.times do %>
- <%= render :partial => 'upload_file', :locals => {:size => size} %>
- <% end %>
-
-
-<%= hidden_field_tag('back_to', @back_to) %>
-
-<% button_bar do %>
- <%= add_upload_file_field(_('More files'), {:size => size}) %>
- <% if @back_to %>
- <%= submit_button :save, _('Upload'), :cancel => @back_to %>
- <% else %>
- <%= submit_button :save, _('Upload'), :cancel => {:action => (@parent ? 'view' : 'index'), :id => @parent } %>
- <% end %>
-<% end %>
diff --git a/app/views/cms/_uploaded_file.html.erb b/app/views/cms/_uploaded_file.html.erb
new file mode 100644
index 0000000..b9ae689
--- /dev/null
+++ b/app/views/cms/_uploaded_file.html.erb
@@ -0,0 +1,8 @@
+<%= labelled_form_field(_('Title'), text_field(:article, :title, :maxlength => 60)) %>
+
+<%= render :partial => 'general_fields' %>
+
+<%= labelled_form_field(_('Description'), text_area(:article, :abstract, :rows => 3, :cols => 64)) %>
+<% if @article.image? %>
+ <%= f.text_field(:external_link, :size => 64) %>
+<% end %>
diff --git a/app/views/cms/_uploaded_file.rhtml b/app/views/cms/_uploaded_file.rhtml
deleted file mode 100644
index b9ae689..0000000
--- a/app/views/cms/_uploaded_file.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-<%= labelled_form_field(_('Title'), text_field(:article, :title, :maxlength => 60)) %>
-
-<%= render :partial => 'general_fields' %>
-
-<%= labelled_form_field(_('Description'), text_area(:article, :abstract, :rows => 3, :cols => 64)) %>
-<% if @article.image? %>
- <%= f.text_field(:external_link, :size => 64) %>
-<% end %>
diff --git a/app/views/cms/destroy.html.erb b/app/views/cms/destroy.html.erb
new file mode 100644
index 0000000..e9fcb08
--- /dev/null
+++ b/app/views/cms/destroy.html.erb
@@ -0,0 +1,28 @@
+<%= _('Delete: %s') % @article.name %>
+
+<%= error_messages_for 'article' %>
+
+<% labelled_form_for 'article', @article, :url => { :action => 'destroy' }, :method => 'post' do |f| %>
+
+
+ <% if @article.folder? %>
+ <%= _('Are you sure that you want to remove this folder? Note that all the items inside it will also be removed!') %>
+ <% else %>
+ <%= _('Are you sure that you want to remove this item?') %>
+ <% end %>
+
+
+ <% button_bar do %>
+ <%= submit_button :save, _('Yes, I want.') %>
+ <%= button :cancel, _("No, I don't want."), @article.url %>
+ <% end %>
+
+ <%= @article.title %>
+
+ <%= @article.to_html %>
+
+ <%= hidden_field_tag('id', @article) %>
+
+
+
+<% end %>
diff --git a/app/views/cms/destroy.rhtml b/app/views/cms/destroy.rhtml
deleted file mode 100644
index e9fcb08..0000000
--- a/app/views/cms/destroy.rhtml
+++ /dev/null
@@ -1,28 +0,0 @@
-<%= _('Delete: %s') % @article.name %>
-
-<%= error_messages_for 'article' %>
-
-<% labelled_form_for 'article', @article, :url => { :action => 'destroy' }, :method => 'post' do |f| %>
-
-
- <% if @article.folder? %>
- <%= _('Are you sure that you want to remove this folder? Note that all the items inside it will also be removed!') %>
- <% else %>
- <%= _('Are you sure that you want to remove this item?') %>
- <% end %>
-
-
- <% button_bar do %>
- <%= submit_button :save, _('Yes, I want.') %>
- <%= button :cancel, _("No, I don't want."), @article.url %>
- <% end %>
-
- <%= @article.title %>
-
- <%= @article.to_html %>
-
- <%= hidden_field_tag('id', @article) %>
-
-
-
-<% end %>
diff --git a/app/views/cms/edit.html.erb b/app/views/cms/edit.html.erb
new file mode 100644
index 0000000..566ae87
--- /dev/null
+++ b/app/views/cms/edit.html.erb
@@ -0,0 +1,56 @@
+<%= error_messages_for 'article' %>
+
+'>
+<% labelled_form_for 'article', @article, :html => { :multipart => true, :class => @type } do |f| %>
+
+ <%= hidden_field_tag("type", @type) if @type %>
+
+ <%= hidden_field_tag('parent_id', @parent_id) if @parent_id %>
+
+ <%= hidden_field_tag('back_to', @back_to) %>
+
+ <%= render :partial => partial_for_class(@article.class), :locals => { :f => f } %>
+
+ <% if environment.is_portal_community?(profile) %>
+
+ <%= check_box(:article, :highlighted) %>
+ <%= _('Highlight this article')%>
+
+ <% end %>
+
+ <% button_bar do %>
+ <%= submit_button :save, _('Save') %>
+ <%= submit_button :save, _('Save and continue'), :name => "continue" %>
+ <% end %>
+
+
+ <%= lightbox_button :help, _('Why categorize?'), :action => 'why_categorize' %>
+
+
+ <%= select_categories(:article, _('Categorize your article')) %>
+
+ <%= f.text_field('tag_list', :size => 64) %>
+ <%= content_tag( 'small', _('Separate tags with commas') ) %>
+
+
+ <%= options_for_article(@article) %>
+
+
+ <% button_bar do %>
+ <%= submit_button :save, _('Save') %>
+ <% if @back_to %>
+ <%= button :cancel, _('Cancel'), @back_to %>
+ <% elsif @parent_id || @article.parent %>
+ <%= button :cancel, _('Cancel'), :action => 'view', :id => @parent_id || @article.parent %>
+ <% else %>
+ <%= button :cancel, _('Cancel'), :action => 'index' %>
+ <% end %>
+ <% end %>
+<% end %>
+
+
+<% if environment.enabled?('media_panel') && [TinyMceArticle, TextileArticle, Event, EnterpriseHomepage].any?{|klass| @article.kind_of?(klass)} %>
+ <%= render :partial => 'text_editor_sidebar' %>
+<% end %>
+
+
diff --git a/app/views/cms/edit.rhtml b/app/views/cms/edit.rhtml
deleted file mode 100644
index 566ae87..0000000
--- a/app/views/cms/edit.rhtml
+++ /dev/null
@@ -1,56 +0,0 @@
-<%= error_messages_for 'article' %>
-
-'>
-<% labelled_form_for 'article', @article, :html => { :multipart => true, :class => @type } do |f| %>
-
- <%= hidden_field_tag("type", @type) if @type %>
-
- <%= hidden_field_tag('parent_id', @parent_id) if @parent_id %>
-
- <%= hidden_field_tag('back_to', @back_to) %>
-
- <%= render :partial => partial_for_class(@article.class), :locals => { :f => f } %>
-
- <% if environment.is_portal_community?(profile) %>
-
- <%= check_box(:article, :highlighted) %>
- <%= _('Highlight this article')%>
-
- <% end %>
-
- <% button_bar do %>
- <%= submit_button :save, _('Save') %>
- <%= submit_button :save, _('Save and continue'), :name => "continue" %>
- <% end %>
-
-
- <%= lightbox_button :help, _('Why categorize?'), :action => 'why_categorize' %>
-
-
- <%= select_categories(:article, _('Categorize your article')) %>
-
- <%= f.text_field('tag_list', :size => 64) %>
- <%= content_tag( 'small', _('Separate tags with commas') ) %>
-
-
- <%= options_for_article(@article) %>
-
-
- <% button_bar do %>
- <%= submit_button :save, _('Save') %>
- <% if @back_to %>
- <%= button :cancel, _('Cancel'), @back_to %>
- <% elsif @parent_id || @article.parent %>
- <%= button :cancel, _('Cancel'), :action => 'view', :id => @parent_id || @article.parent %>
- <% else %>
- <%= button :cancel, _('Cancel'), :action => 'index' %>
- <% end %>
- <% end %>
-<% end %>
-
-
-<% if environment.enabled?('media_panel') && [TinyMceArticle, TextileArticle, Event, EnterpriseHomepage].any?{|klass| @article.kind_of?(klass)} %>
- <%= render :partial => 'text_editor_sidebar' %>
-<% end %>
-
-
diff --git a/app/views/cms/publish.html.erb b/app/views/cms/publish.html.erb
new file mode 100644
index 0000000..d7cfc99
--- /dev/null
+++ b/app/views/cms/publish.html.erb
@@ -0,0 +1,28 @@
+<%= _('Select the groups where you want to publish your article') %>
+
+<% if !@failed.blank? %>
+
+
<%=_("There were errors with the following communities: ")%>
+ <% @failed.each do |error, communities|%>
+
<%= error %>:
+
+ <% communities.each do |community| %>
+ <%= community %>
+ <% end %>
+
+ <% end %>
+
+<% end %>
+
+<% form_tag do%>
+ <%= hidden_field_tag :back_to, @back_to %>
+ <% @groups.each do |group| %>
+ <%= labelled_check_box group.name, "marked_groups[#{group.id}][group_id]", group.id, @marked_groups.include?(group) %>
+ <%= labelled_text_field _('Title') + ': ', "marked_groups[#{group.id}][name]", @article.name, :style => 'width: 100%' %>
+
+ <% end %>
+
+ <% button_bar do %>
+ <%= submit_button 'spread', _('Spread this'), :cancel => @back_to %>
+ <% end %>
+<% end %>
diff --git a/app/views/cms/publish.rhtml b/app/views/cms/publish.rhtml
deleted file mode 100644
index d7cfc99..0000000
--- a/app/views/cms/publish.rhtml
+++ /dev/null
@@ -1,28 +0,0 @@
-<%= _('Select the groups where you want to publish your article') %>
-
-<% if !@failed.blank? %>
-
-
<%=_("There were errors with the following communities: ")%>
- <% @failed.each do |error, communities|%>
-
<%= error %>:
-
- <% communities.each do |community| %>
- <%= community %>
- <% end %>
-
- <% end %>
-
-<% end %>
-
-<% form_tag do%>
- <%= hidden_field_tag :back_to, @back_to %>
- <% @groups.each do |group| %>
- <%= labelled_check_box group.name, "marked_groups[#{group.id}][group_id]", group.id, @marked_groups.include?(group) %>
- <%= labelled_text_field _('Title') + ': ', "marked_groups[#{group.id}][name]", @article.name, :style => 'width: 100%' %>
-
- <% end %>
-
- <% button_bar do %>
- <%= submit_button 'spread', _('Spread this'), :cancel => @back_to %>
- <% end %>
-<% end %>
diff --git a/app/views/cms/publish_on_portal_community.html.erb b/app/views/cms/publish_on_portal_community.html.erb
new file mode 100644
index 0000000..54d5cef
--- /dev/null
+++ b/app/views/cms/publish_on_portal_community.html.erb
@@ -0,0 +1,21 @@
+<% if environment.portal_community %>
+ <%= _("Publish your article on portal community") %>
+
+ <% form_tag do%>
+ <%= hidden_field_tag :back_to, @back_to %>
+ <%= labelled_text_field _('Title') + ': ', :name, @article.name, :style => 'width: 100%' %>
+
+ <% button_bar do %>
+ <%= submit_button 'spread', _('Spread this'), :cancel => @back_to %>
+ <% end %>
+ <% end %>
+<% else %>
+
+ <%= _("There is no portal community in this environment.") %>
+
+
+ <% button_bar do %>
+ <%= button :back, _('Back'), :controller => 'cms' %>
+ <% end %>
+<% end %>
+
diff --git a/app/views/cms/publish_on_portal_community.rhtml b/app/views/cms/publish_on_portal_community.rhtml
deleted file mode 100644
index 54d5cef..0000000
--- a/app/views/cms/publish_on_portal_community.rhtml
+++ /dev/null
@@ -1,21 +0,0 @@
-<% if environment.portal_community %>
- <%= _("Publish your article on portal community") %>
-
- <% form_tag do%>
- <%= hidden_field_tag :back_to, @back_to %>
- <%= labelled_text_field _('Title') + ': ', :name, @article.name, :style => 'width: 100%' %>
-
- <% button_bar do %>
- <%= submit_button 'spread', _('Spread this'), :cancel => @back_to %>
- <% end %>
- <% end %>
-<% else %>
-
- <%= _("There is no portal community in this environment.") %>
-
-
- <% button_bar do %>
- <%= button :back, _('Back'), :controller => 'cms' %>
- <% end %>
-<% end %>
-
diff --git a/app/views/cms/select_article_type.html.erb b/app/views/cms/select_article_type.html.erb
new file mode 100644
index 0000000..d0fd8c2
--- /dev/null
+++ b/app/views/cms/select_article_type.html.erb
@@ -0,0 +1,16 @@
+ <%= _('Choose the type of content:') %>
+
+
+ <% for type in @article_types %>
+ <% action = type[:class].name == 'UploadedFile' ? {:action => 'upload_files'} : {:action => 'new', :type => type[:class].name} %>
+ <% content_tag('a', :href => url_for(action.merge(:parent_id => @parent_id, :back_to => @back_to))) do %>
+
+ <%= type[:short_description] %>
+ <%= type[:description] %>
+
+ <% end %>
+ <% end %>
+
+
+
+<%= colorbox_close_button(_('Cancel')) %>
diff --git a/app/views/cms/select_article_type.rhtml b/app/views/cms/select_article_type.rhtml
deleted file mode 100644
index d0fd8c2..0000000
--- a/app/views/cms/select_article_type.rhtml
+++ /dev/null
@@ -1,16 +0,0 @@
- <%= _('Choose the type of content:') %>
-
-
- <% for type in @article_types %>
- <% action = type[:class].name == 'UploadedFile' ? {:action => 'upload_files'} : {:action => 'new', :type => type[:class].name} %>
- <% content_tag('a', :href => url_for(action.merge(:parent_id => @parent_id, :back_to => @back_to))) do %>
-
- <%= type[:short_description] %>
- <%= type[:description] %>
-
- <% end %>
- <% end %>
-
-
-
-<%= colorbox_close_button(_('Cancel')) %>
diff --git a/app/views/cms/suggest_an_article.html.erb b/app/views/cms/suggest_an_article.html.erb
new file mode 100644
index 0000000..d71f07f
--- /dev/null
+++ b/app/views/cms/suggest_an_article.html.erb
@@ -0,0 +1,29 @@
+<%= error_messages_for 'task' %>
+
+<%= required_fields_message %>
+
+<%= render :file => 'shared/tiny_mce' %>
+
+<% labelled_form_for 'task', @task do |f| %>
+
+ <%= required labelled_form_field(_('Title'), text_field(:task, 'article_name', :size => 50)) %>
+
+ <%= labelled_form_field(_('Source'), text_field(:task, 'source_name')) %>
+
+ <%= labelled_form_field(_('Source URL'), text_field(:task, 'source')) %>
+
+ <%= required labelled_form_field(_('Your name'), text_field(:task, 'name')) %>
+
+ <%= required labelled_form_field(_('Email'), text_field(:task, 'email')) %>
+
+ <%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true, :object => :task, :abstract_method => 'article_abstract', :body_method => 'article_body'} %>
+
+ <%= hidden_field_tag('back_to', @back_to) %>
+
+ <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %>
+
+ <% button_bar do %>
+ <%= submit_button :save, _('Save') %>
+ <%= button :cancel, _('Cancel'), @back_to %>
+ <% end %>
+<% end %>
diff --git a/app/views/cms/suggest_an_article.rhtml b/app/views/cms/suggest_an_article.rhtml
deleted file mode 100644
index d71f07f..0000000
--- a/app/views/cms/suggest_an_article.rhtml
+++ /dev/null
@@ -1,29 +0,0 @@
-<%= error_messages_for 'task' %>
-
-<%= required_fields_message %>
-
-<%= render :file => 'shared/tiny_mce' %>
-
-<% labelled_form_for 'task', @task do |f| %>
-
- <%= required labelled_form_field(_('Title'), text_field(:task, 'article_name', :size => 50)) %>
-
- <%= labelled_form_field(_('Source'), text_field(:task, 'source_name')) %>
-
- <%= labelled_form_field(_('Source URL'), text_field(:task, 'source')) %>
-
- <%= required labelled_form_field(_('Your name'), text_field(:task, 'name')) %>
-
- <%= required labelled_form_field(_('Email'), text_field(:task, 'email')) %>
-
- <%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true, :object => :task, :abstract_method => 'article_abstract', :body_method => 'article_body'} %>
-
- <%= hidden_field_tag('back_to', @back_to) %>
-
- <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %>
-
- <% button_bar do %>
- <%= submit_button :save, _('Save') %>
- <%= button :cancel, _('Cancel'), @back_to %>
- <% end %>
-<% end %>
diff --git a/app/views/cms/upload_files.html.erb b/app/views/cms/upload_files.html.erb
new file mode 100644
index 0000000..9527971
--- /dev/null
+++ b/app/views/cms/upload_files.html.erb
@@ -0,0 +1,24 @@
+<% if @errors %>
+
+
<%= n_('This file couldn\'t be saved', 'These %{num} files couldn\'t be saved', @errors.size) % { :num => @errors.size } %>
+
<%= _('There were problems with the following files:') %>
+
+ <% for file in @uploaded_files %>
+ <% for msg in file.errors.full_messages %>
+ <%= file.name %> : <%= msg %>
+ <% end %>
+ <% end %>
+
+
+<% end %>
+
+<%= _('Publish media') %>
+
+<%= _("Select the files you want to upload (max size %s):") % UploadedFile.max_size.to_humanreadable %>
+<%= _('Documents, Images, Videos, Audio') %>
+
+<%= _('Uploading files to %s') % content_tag('code', @target) %>
+
+<% form_for('uploaded_file', :url => { :action => 'upload_files' }, :html => {:multipart => true}) do |f| %>
+ <%= render :partial => 'upload_file_form', :locals => { :size => '45'} %>
+<% end %>
diff --git a/app/views/cms/upload_files.rhtml b/app/views/cms/upload_files.rhtml
deleted file mode 100644
index 9527971..0000000
--- a/app/views/cms/upload_files.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-<% if @errors %>
-
-
<%= n_('This file couldn\'t be saved', 'These %{num} files couldn\'t be saved', @errors.size) % { :num => @errors.size } %>
-
<%= _('There were problems with the following files:') %>
-
- <% for file in @uploaded_files %>
- <% for msg in file.errors.full_messages %>
- <%= file.name %> : <%= msg %>
- <% end %>
- <% end %>
-
-
-<% end %>
-
-<%= _('Publish media') %>
-
-<%= _("Select the files you want to upload (max size %s):") % UploadedFile.max_size.to_humanreadable %>
-<%= _('Documents, Images, Videos, Audio') %>
-
-<%= _('Uploading files to %s') % content_tag('code', @target) %>
-
-<% form_for('uploaded_file', :url => { :action => 'upload_files' }, :html => {:multipart => true}) do |f| %>
- <%= render :partial => 'upload_file_form', :locals => { :size => '45'} %>
-<% end %>
diff --git a/app/views/cms/view.html.erb b/app/views/cms/view.html.erb
new file mode 100644
index 0000000..8a32f89
--- /dev/null
+++ b/app/views/cms/view.html.erb
@@ -0,0 +1,65 @@
+
+ <%= _('Content management') %>
+
+
+<% button_bar(:style => 'margin-bottom: 1em;') do %>
+ <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %>
+
+ <%= colorbox_button('new', _('New content'), :action => 'new', :parent_id => parent_id, :cms => true) %>
+ <%= button(:back, _('Back to control panel'), :controller => 'profile_editor', :action => "index") %>
+<% end %>
+
+<% if @article %>
+
+ <%= _('Current folder: ') %>
+ <%= link_to profile.identifier, :action => 'index' %>
+ <%= @article.hierarchy.map {|item| " / " + ((item == @article) ? item.name : link_to(item.slug, :id => item.id)) } %>
+
+<% end %>
+
+
+
+ <%# header %>
+
+ <%= _('Name') %>
+ <%= _('Type') %>
+ <%= _('Actions') %>
+
+
+ <% if @article %>
+
+
+ <% if @article.parent %>
+ <%= link_to '.. (' + _('parent folder') + ')', {:action => 'view', :id => @article.parent.id}, :class => 'icon-parent-folder' %>
+ <% else %>
+ <%= link_to '.. (' + _('parent folder') + ')', {:action => 'index'}, :class => 'icon-parent-folder' %>
+ <% end %>
+
+ <%= Folder.short_description %>
+
+
+ <% end %>
+
+ <% @articles.each do |article| %>
+
+
+ <%= link_to_article(article) %>
+
+
+ <%= article.class.short_description %>
+
+
+ <%= expirable_button article, :edit, _('Edit'), {:action => 'edit', :id => article.id} if !remove_content_button(:edit) %>
+ <%= button_without_text :eyes, _('Public view'), article.view_url %>
+ <%= display_spread_button(profile, article) unless article.folder? || remove_content_button(:spread)%>
+ <% if !environment.enabled?('cant_change_homepage') && !remove_content_button(:home) %>
+ <%= expirable_button article, :home, _('Use as homepage'), { :action => 'set_home_page', :id => article.id }, :method => :post %>
+ <% end %>
+ <%= display_delete_button(article) if !remove_content_button(:delete) %>
+
+
+ <% end %>
+
+
+
+<%= pagination_links @articles, {:param_name => 'npage', :page_links => true} %>
diff --git a/app/views/cms/view.rhtml b/app/views/cms/view.rhtml
deleted file mode 100644
index 8a32f89..0000000
--- a/app/views/cms/view.rhtml
+++ /dev/null
@@ -1,65 +0,0 @@
-
- <%= _('Content management') %>
-
-
-<% button_bar(:style => 'margin-bottom: 1em;') do %>
- <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %>
-
- <%= colorbox_button('new', _('New content'), :action => 'new', :parent_id => parent_id, :cms => true) %>
- <%= button(:back, _('Back to control panel'), :controller => 'profile_editor', :action => "index") %>
-<% end %>
-
-<% if @article %>
-
- <%= _('Current folder: ') %>
- <%= link_to profile.identifier, :action => 'index' %>
- <%= @article.hierarchy.map {|item| " / " + ((item == @article) ? item.name : link_to(item.slug, :id => item.id)) } %>
-
-<% end %>
-
-
-
- <%# header %>
-
- <%= _('Name') %>
- <%= _('Type') %>
- <%= _('Actions') %>
-
-
- <% if @article %>
-
-
- <% if @article.parent %>
- <%= link_to '.. (' + _('parent folder') + ')', {:action => 'view', :id => @article.parent.id}, :class => 'icon-parent-folder' %>
- <% else %>
- <%= link_to '.. (' + _('parent folder') + ')', {:action => 'index'}, :class => 'icon-parent-folder' %>
- <% end %>
-
- <%= Folder.short_description %>
-
-
- <% end %>
-
- <% @articles.each do |article| %>
-
-
- <%= link_to_article(article) %>
-
-
- <%= article.class.short_description %>
-
-
- <%= expirable_button article, :edit, _('Edit'), {:action => 'edit', :id => article.id} if !remove_content_button(:edit) %>
- <%= button_without_text :eyes, _('Public view'), article.view_url %>
- <%= display_spread_button(profile, article) unless article.folder? || remove_content_button(:spread)%>
- <% if !environment.enabled?('cant_change_homepage') && !remove_content_button(:home) %>
- <%= expirable_button article, :home, _('Use as homepage'), { :action => 'set_home_page', :id => article.id }, :method => :post %>
- <% end %>
- <%= display_delete_button(article) if !remove_content_button(:delete) %>
-
-
- <% end %>
-
-
-
-<%= pagination_links @articles, {:param_name => 'npage', :page_links => true} %>
diff --git a/app/views/cms/why_categorize.html.erb b/app/views/cms/why_categorize.html.erb
new file mode 100644
index 0000000..0735f68
--- /dev/null
+++ b/app/views/cms/why_categorize.html.erb
@@ -0,0 +1,9 @@
+<%= _('Why categorize?') %>
+
+
+<%= _('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.') %>
+
+
+<% button_bar do %>
+ <%= lightbox_close_button _('Close') %>
+<% end %>
diff --git a/app/views/cms/why_categorize.rhtml b/app/views/cms/why_categorize.rhtml
deleted file mode 100644
index 0735f68..0000000
--- a/app/views/cms/why_categorize.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= _('Why categorize?') %>
-
-
-<%= _('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.') %>
-
-
-<% button_bar do %>
- <%= lightbox_close_button _('Close') %>
-<% end %>
diff --git a/app/views/comment/notifier/mail.html.erb b/app/views/comment/notifier/mail.html.erb
new file mode 100644
index 0000000..5fd6d71
--- /dev/null
+++ b/app/views/comment/notifier/mail.html.erb
@@ -0,0 +1,19 @@
+<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
+
+<%= word_wrap(_('%{sender} (%{sender_link}) created a new comment on your article "%{article_title}".') % { :sender => @sender, :sender_link => url_for(@sender_link), :article_title => @article_title }) %>
+
+<%= word_wrap(_('Title: %s') % @comment_title) %>
+
+<%= _("Comment:") %>
+-------------------------------------------------------------------------------
+<%= word_wrap(@comment_body) %>
+-------------------------------------------------------------------------------
+
+<%= _('Access the address below to view this comment:') %>
+<%= url_for @comment_url %>
+
+<%= _("Greetings,") %>
+
+--
+<%= _('%s team.') % @environment %>
+<%= url_for @url %>
diff --git a/app/views/comment/notifier/mail.rhtml b/app/views/comment/notifier/mail.rhtml
deleted file mode 100644
index 5fd6d71..0000000
--- a/app/views/comment/notifier/mail.rhtml
+++ /dev/null
@@ -1,19 +0,0 @@
-<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
-
-<%= word_wrap(_('%{sender} (%{sender_link}) created a new comment on your article "%{article_title}".') % { :sender => @sender, :sender_link => url_for(@sender_link), :article_title => @article_title }) %>
-
-<%= word_wrap(_('Title: %s') % @comment_title) %>
-
-<%= _("Comment:") %>
--------------------------------------------------------------------------------
-<%= word_wrap(@comment_body) %>
--------------------------------------------------------------------------------
-
-<%= _('Access the address below to view this comment:') %>
-<%= url_for @comment_url %>
-
-<%= _("Greetings,") %>
-
---
-<%= _('%s team.') % @environment %>
-<%= url_for @url %>
diff --git a/app/views/comment/notifier/mail_to_followers.html.erb b/app/views/comment/notifier/mail_to_followers.html.erb
new file mode 100644
index 0000000..10d28d7
--- /dev/null
+++ b/app/views/comment/notifier/mail_to_followers.html.erb
@@ -0,0 +1,22 @@
+<%= _('Hi!') %>
+
+<%= word_wrap(_('%{sender} (%{sender_link}) commented on the content "%{article_title}".') % { :sender => @sender, :sender_link => url_for(@sender_link), :article_title => @article_title }) %>
+
+<%= word_wrap(_('Title: %s') % @comment_title) if @comment_title %>
+
+<%= _("Comment:") %>
+-------------------------------------------------------------------------------
+<%= word_wrap(@comment_body) %>
+-------------------------------------------------------------------------------
+
+<%= _('Click on the address below to view this comment:') %>
+<%= url_for @comment_url %>
+
+<%= _('Click on the address below to cancel the notification of new comments:') %>
+<%= url_for @unsubscribe_url %>
+
+<%= _("Greetings,") %>
+
+--
+<%= _('%s team.') % @environment %>
+<%= url_for @url %>
diff --git a/app/views/comment/notifier/mail_to_followers.rhtml b/app/views/comment/notifier/mail_to_followers.rhtml
deleted file mode 100644
index 10d28d7..0000000
--- a/app/views/comment/notifier/mail_to_followers.rhtml
+++ /dev/null
@@ -1,22 +0,0 @@
-<%= _('Hi!') %>
-
-<%= word_wrap(_('%{sender} (%{sender_link}) commented on the content "%{article_title}".') % { :sender => @sender, :sender_link => url_for(@sender_link), :article_title => @article_title }) %>
-
-<%= word_wrap(_('Title: %s') % @comment_title) if @comment_title %>
-
-<%= _("Comment:") %>
--------------------------------------------------------------------------------
-<%= word_wrap(@comment_body) %>
--------------------------------------------------------------------------------
-
-<%= _('Click on the address below to view this comment:') %>
-<%= url_for @comment_url %>
-
-<%= _('Click on the address below to cancel the notification of new comments:') %>
-<%= url_for @unsubscribe_url %>
-
-<%= _("Greetings,") %>
-
---
-<%= _('%s team.') % @environment %>
-<%= url_for @url %>
diff --git a/app/views/contact/new.html.erb b/app/views/contact/new.html.erb
new file mode 100644
index 0000000..29cfe4c
--- /dev/null
+++ b/app/views/contact/new.html.erb
@@ -0,0 +1,26 @@
+<% if profile.person? %>
+ <%= _('Send an e-mail to %s') % profile.name %>
+<% else %>
+ <%= _('Send an e-mail to administrators') %>
+
+ <%= _("The e-mail will be sent to the administrators of '%s'") % profile.name %>
+<% end %>
+
+<%= error_messages_for 'contact' %>
+
+<% labelled_form_for :contact, @contact do |f| %>
+ <%= hidden_field_tag(:confirm, 'false') %>
+
+ <%= required_fields_message %>
+
+ <% location_fields = select_city(true) %>
+
+ <% unless environment.enabled?('disable_select_city_for_contact') || location_fields.blank? %>
+ <%= labelled_form_field _('City and state'), location_fields %>
+ <% end %>
+ <%= required f.text_field(:subject) %>
+ <%= required f.text_area(:message, :rows => 10, :cols => 60) %>
+ <%= labelled_form_field check_box(:contact, :receive_a_copy) + _('I want to receive a copy of the message in my e-mail.'), '' %>
+
+ <%= submit_button(:send, _('Send'), :onclick => "$('confirm').value = 'true'") %>
+<% end %>
diff --git a/app/views/contact/new.rhtml b/app/views/contact/new.rhtml
deleted file mode 100644
index 29cfe4c..0000000
--- a/app/views/contact/new.rhtml
+++ /dev/null
@@ -1,26 +0,0 @@
-<% if profile.person? %>
- <%= _('Send an e-mail to %s') % profile.name %>
-<% else %>
- <%= _('Send an e-mail to administrators') %>
-
- <%= _("The e-mail will be sent to the administrators of '%s'") % profile.name %>
-<% end %>
-
-<%= error_messages_for 'contact' %>
-
-<% labelled_form_for :contact, @contact do |f| %>
- <%= hidden_field_tag(:confirm, 'false') %>
-
- <%= required_fields_message %>
-
- <% location_fields = select_city(true) %>
-
- <% unless environment.enabled?('disable_select_city_for_contact') || location_fields.blank? %>
- <%= labelled_form_field _('City and state'), location_fields %>
- <% end %>
- <%= required f.text_field(:subject) %>
- <%= required f.text_area(:message, :rows => 10, :cols => 60) %>
- <%= labelled_form_field check_box(:contact, :receive_a_copy) + _('I want to receive a copy of the message in my e-mail.'), '' %>
-
- <%= submit_button(:send, _('Send'), :onclick => "$('confirm').value = 'true'") %>
-<% end %>
diff --git a/app/views/contact/sender/mail.html.erb b/app/views/contact/sender/mail.html.erb
new file mode 100644
index 0000000..817205d
--- /dev/null
+++ b/app/views/contact/sender/mail.html.erb
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ <%= _('This message was sent by %{sender} to %{target} on %{environment}.') %
+ {:sender => @name, :target => @target, :environment => @environment} %>
+ <%= _('Information about the user who sent this message:')%>
+
+ <%= content_tag('b', _('Name')+': ') + @name.to_s %>
+ <%= content_tag('b', _('Email')+': ') + @email.to_s %>
+ <% if @city || @state %>
+ <%= content_tag('b', _('City and state')+': ') + (@city || '?')+'/'+(@state || '?') %>
+ <% end %>
+
+
+ <%= content_tag('b', _('Message:')) %>
+ <%= word_wrap(@message) %>
+
+ --
+ <%= _('Greetings,') %>
+ <%= _('%s team.') % @environment %>
+ <%= @url %>
+
+
+
diff --git a/app/views/contact/sender/mail.rhtml b/app/views/contact/sender/mail.rhtml
deleted file mode 100644
index 817205d..0000000
--- a/app/views/contact/sender/mail.rhtml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
- <%= _('This message was sent by %{sender} to %{target} on %{environment}.') %
- {:sender => @name, :target => @target, :environment => @environment} %>
- <%= _('Information about the user who sent this message:')%>
-
- <%= content_tag('b', _('Name')+': ') + @name.to_s %>
- <%= content_tag('b', _('Email')+': ') + @email.to_s %>
- <% if @city || @state %>
- <%= content_tag('b', _('City and state')+': ') + (@city || '?')+'/'+(@state || '?') %>
- <% end %>
-
-
- <%= content_tag('b', _('Message:')) %>
- <%= word_wrap(@message) %>
-
- --
- <%= _('Greetings,') %>
- <%= _('%s team.') % @environment %>
- <%= @url %>
-
-
-
diff --git a/app/views/content_viewer/_article.html.erb b/app/views/content_viewer/_article.html.erb
new file mode 100644
index 0000000..5f6b119
--- /dev/null
+++ b/app/views/content_viewer/_article.html.erb
@@ -0,0 +1,2 @@
+<%= link_to content_tag(:span, article.title), article.url, :class => article.css_class_name %>
+<%= article.title %>
diff --git a/app/views/content_viewer/_article.rhtml b/app/views/content_viewer/_article.rhtml
deleted file mode 100644
index 5f6b119..0000000
--- a/app/views/content_viewer/_article.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= link_to content_tag(:span, article.title), article.url, :class => article.css_class_name %>
-<%= article.title %>
diff --git a/app/views/content_viewer/_article_toolbar.html.erb b/app/views/content_viewer/_article_toolbar.html.erb
new file mode 100644
index 0000000..aee80d5
--- /dev/null
+++ b/app/views/content_viewer/_article_toolbar.html.erb
@@ -0,0 +1,59 @@
+>
+
+
+
+ <% if @page.allow_edit?(user) && !remove_content_button(:edit) %>
+ <% content = content_tag('span', label_for_edit_article(@page)) %>
+ <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }) %>
+ <%= expirable_button @page, :edit, content, url %>
+ <% end %>
+
+ <% if @page != profile.home_page && !@page.has_posts? && @page.allow_delete?(user) && !remove_content_button(:delete)%>
+ <% content = content_tag( 'span', _('Delete') ) %>
+ <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page}) %>
+ <% options = {:method => :post, :confirm => delete_article_message(@page)} %>
+ <%= expirable_button @page, :delete, content, url, options %>
+ <% end %>
+
+ <% if !@page.folder? && @page.allow_spread?(user) && !remove_content_button(:spread) %>
+ <% content = content_tag( 'span', _('Spread this') ) %>
+ <% url = nil %>
+ <% if profile.kind_of?(Person) %>
+ <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }) %>
+ <% elsif profile.kind_of?(Community) && environment.portal_community %>
+ <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }) %>
+ <% end %>
+ <%= expirable_button @page, :spread, content, url if url %>
+ <% end %>
+
+ <% if !@page.gallery? && @page.allow_create?(user) %>
+ <% if @page.translatable? && !@page.native_translation.language.blank? && !remove_content_button(:locale) %>
+ <% content = _('Add translation') %>
+ <% parent_id = (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)) %>
+ <% url = profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => parent_id, :type => @page.type, :article => { :translation_of_id => @page.native_translation.id })%>
+ <%= expirable_button @page, :locale, content, url %>
+ <% end %>
+
+ <%= colorbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) unless remove_content_button(:new) %>
+ <% end %>
+
+ <% if @page.accept_uploads? && @page.allow_create?(user) %>
+ <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) unless remove_content_button(:upload)%>
+ <% end %>
+
+ <% if !@page.allow_create?(user) && profile.community? && (@page.blog? || @page.parent && @page.parent.blog?) && !remove_content_button(:suggest) %>
+ <% content = content_tag( 'span', _('Suggest an article') ) %>
+ <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'suggest_an_article'}) %>
+ <% options = {:id => 'suggest-article-link'} %>
+ <%= expirable_button @page, :suggest, content, url, options %>
+ <% end %>
+
+ <%= report_abuse(profile, :link, @page) %>
+
+
+
+ <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.has_posts? && @page.feed %>
+ <%= article_title(@page, :no_link => true) %>
+ <%= article_translations(@page) %>
+
+
diff --git a/app/views/content_viewer/_article_toolbar.rhtml b/app/views/content_viewer/_article_toolbar.rhtml
deleted file mode 100644
index aee80d5..0000000
--- a/app/views/content_viewer/_article_toolbar.rhtml
+++ /dev/null
@@ -1,59 +0,0 @@
->
-
-
-
- <% if @page.allow_edit?(user) && !remove_content_button(:edit) %>
- <% content = content_tag('span', label_for_edit_article(@page)) %>
- <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }) %>
- <%= expirable_button @page, :edit, content, url %>
- <% end %>
-
- <% if @page != profile.home_page && !@page.has_posts? && @page.allow_delete?(user) && !remove_content_button(:delete)%>
- <% content = content_tag( 'span', _('Delete') ) %>
- <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page}) %>
- <% options = {:method => :post, :confirm => delete_article_message(@page)} %>
- <%= expirable_button @page, :delete, content, url, options %>
- <% end %>
-
- <% if !@page.folder? && @page.allow_spread?(user) && !remove_content_button(:spread) %>
- <% content = content_tag( 'span', _('Spread this') ) %>
- <% url = nil %>
- <% if profile.kind_of?(Person) %>
- <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }) %>
- <% elsif profile.kind_of?(Community) && environment.portal_community %>
- <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }) %>
- <% end %>
- <%= expirable_button @page, :spread, content, url if url %>
- <% end %>
-
- <% if !@page.gallery? && @page.allow_create?(user) %>
- <% if @page.translatable? && !@page.native_translation.language.blank? && !remove_content_button(:locale) %>
- <% content = _('Add translation') %>
- <% parent_id = (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)) %>
- <% url = profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => parent_id, :type => @page.type, :article => { :translation_of_id => @page.native_translation.id })%>
- <%= expirable_button @page, :locale, content, url %>
- <% end %>
-
- <%= colorbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) unless remove_content_button(:new) %>
- <% end %>
-
- <% if @page.accept_uploads? && @page.allow_create?(user) %>
- <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) unless remove_content_button(:upload)%>
- <% end %>
-
- <% if !@page.allow_create?(user) && profile.community? && (@page.blog? || @page.parent && @page.parent.blog?) && !remove_content_button(:suggest) %>
- <% content = content_tag( 'span', _('Suggest an article') ) %>
- <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'suggest_an_article'}) %>
- <% options = {:id => 'suggest-article-link'} %>
- <%= expirable_button @page, :suggest, content, url, options %>
- <% end %>
-
- <%= report_abuse(profile, :link, @page) %>
-
-
-
- <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.has_posts? && @page.feed %>
- <%= article_title(@page, :no_link => true) %>
- <%= article_translations(@page) %>
-
-
diff --git a/app/views/content_viewer/_comment.html.erb b/app/views/content_viewer/_comment.html.erb
new file mode 100644
index 0000000..403de25
--- /dev/null
+++ b/app/views/content_viewer/_comment.html.erb
@@ -0,0 +1,99 @@
+
+
+
+
+
+ <% unless comment.replies.blank? || comment.spam? %>
+
+ <% end %>
+
+
+
diff --git a/app/views/content_viewer/_comment.rhtml b/app/views/content_viewer/_comment.rhtml
deleted file mode 100644
index 403de25..0000000
--- a/app/views/content_viewer/_comment.rhtml
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
- <% unless comment.replies.blank? || comment.spam? %>
-
- <% end %>
-
-
-
diff --git a/app/views/content_viewer/_comment_form.html.erb b/app/views/content_viewer/_comment_form.html.erb
new file mode 100644
index 0000000..c19a877
--- /dev/null
+++ b/app/views/content_viewer/_comment_form.html.erb
@@ -0,0 +1,97 @@
+
+
+<% focus_on = logged_in? ? 'title' : 'name' %>
+
+<% if @comment && @comment.errors.any? && @comment.reply_of_id.blank? %>
+ <%= error_messages_for :comment %>
+
+<% end %>
+
+<% @form_div ||= 'closed' %>
+
+
diff --git a/app/views/content_viewer/_comment_form.rhtml b/app/views/content_viewer/_comment_form.rhtml
deleted file mode 100644
index c19a877..0000000
--- a/app/views/content_viewer/_comment_form.rhtml
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-<% focus_on = logged_in? ? 'title' : 'name' %>
-
-<% if @comment && @comment.errors.any? && @comment.reply_of_id.blank? %>
- <%= error_messages_for :comment %>
-
-<% end %>
-
-<% @form_div ||= 'closed' %>
-
-
diff --git a/app/views/content_viewer/_confirm_unfollow.html.erb b/app/views/content_viewer/_confirm_unfollow.html.erb
new file mode 100644
index 0000000..e224228
--- /dev/null
+++ b/app/views/content_viewer/_confirm_unfollow.html.erb
@@ -0,0 +1,13 @@
+<% if @unfollow_form %>
+
+
<%= _('Cancel notification of new comments') %>
+
<%= _("Fill in the following field with your e-mail if you don't want to be notified when this content receives new comments anymore.") %>
+ <% form_tag(@page.view_url.merge({:only_path => true}), {:method => 'post', :class => 'comment_form'}) do %>
+ <%= hidden_field_tag(:unfollow, 'commit') %>
+ <%= labelled_form_field(_('Enter your e-Mail'), text_field_tag(:email, nil, {:size => 40})) %>
+ <% button_bar do %>
+ <%= submit_button(:ok, _('Cancel notifications for e-mail above') ) %>
+ <% end %>
+ <% end %>
+
+<% end %>
diff --git a/app/views/content_viewer/_confirm_unfollow.rhtml b/app/views/content_viewer/_confirm_unfollow.rhtml
deleted file mode 100644
index e224228..0000000
--- a/app/views/content_viewer/_confirm_unfollow.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<% if @unfollow_form %>
-
-
<%= _('Cancel notification of new comments') %>
-
<%= _("Fill in the following field with your e-mail if you don't want to be notified when this content receives new comments anymore.") %>
- <% form_tag(@page.view_url.merge({:only_path => true}), {:method => 'post', :class => 'comment_form'}) do %>
- <%= hidden_field_tag(:unfollow, 'commit') %>
- <%= labelled_form_field(_('Enter your e-Mail'), text_field_tag(:email, nil, {:size => 40})) %>
- <% button_bar do %>
- <%= submit_button(:ok, _('Cancel notifications for e-mail above') ) %>
- <% end %>
- <% end %>
-
-<% end %>
diff --git a/app/views/content_viewer/_enterprise_homepage.html.erb b/app/views/content_viewer/_enterprise_homepage.html.erb
new file mode 100644
index 0000000..154890e
--- /dev/null
+++ b/app/views/content_viewer/_enterprise_homepage.html.erb
@@ -0,0 +1,3 @@
+<%= display_profile_info enterprise_homepage.profile %>
+<%= enterprise_homepage.body %>
+<%= render :file => 'catalog/index' unless enterprise_homepage.profile.environment.enabled?('disable_products_for_enterprises') %>
diff --git a/app/views/content_viewer/_enterprise_homepage.rhtml b/app/views/content_viewer/_enterprise_homepage.rhtml
deleted file mode 100644
index 154890e..0000000
--- a/app/views/content_viewer/_enterprise_homepage.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= display_profile_info enterprise_homepage.profile %>
-<%= enterprise_homepage.body %>
-<%= render :file => 'catalog/index' unless enterprise_homepage.profile.environment.enabled?('disable_products_for_enterprises') %>
diff --git a/app/views/content_viewer/_published_article.html.erb b/app/views/content_viewer/_published_article.html.erb
new file mode 100644
index 0000000..ebd0660
--- /dev/null
+++ b/app/views/content_viewer/_published_article.html.erb
@@ -0,0 +1,7 @@
+<% article = published_article.reference_article %>
+<% if article.image? %>
+ <%= link_to image_tag(article.public_filename(:thumb)), article.view_url %>
+<% else %>
+ <%= render :partial => 'article', :object => article %>
+<% end %>
+
diff --git a/app/views/content_viewer/_published_article.rhtml b/app/views/content_viewer/_published_article.rhtml
deleted file mode 100644
index ebd0660..0000000
--- a/app/views/content_viewer/_published_article.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<% article = published_article.reference_article %>
-<% if article.image? %>
- <%= link_to image_tag(article.public_filename(:thumb)), article.view_url %>
-<% else %>
- <%= render :partial => 'article', :object => article %>
-<% end %>
-
diff --git a/app/views/content_viewer/_uploaded_file.html.erb b/app/views/content_viewer/_uploaded_file.html.erb
new file mode 100644
index 0000000..b32ec6c
--- /dev/null
+++ b/app/views/content_viewer/_uploaded_file.html.erb
@@ -0,0 +1,10 @@
+<% if uploaded_file.image? %>
+ <%= link_to '',
+ uploaded_file.view_url,
+ :class => 'image',
+ :style => 'background-image: url(%s)'% uploaded_file.public_filename(:thumb)
+ %>
+ <%=h uploaded_file.title %>
+<% else %>
+ <%= render :partial => 'article', :object => uploaded_file %>
+<% end %>
diff --git a/app/views/content_viewer/_uploaded_file.rhtml b/app/views/content_viewer/_uploaded_file.rhtml
deleted file mode 100644
index b32ec6c..0000000
--- a/app/views/content_viewer/_uploaded_file.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<% if uploaded_file.image? %>
- <%= link_to '',
- uploaded_file.view_url,
- :class => 'image',
- :style => 'background-image: url(%s)'% uploaded_file.public_filename(:thumb)
- %>
- <%=h uploaded_file.title %>
-<% else %>
- <%= render :partial => 'article', :object => uploaded_file %>
-<% end %>
diff --git a/app/views/content_viewer/blog_page.html.erb b/app/views/content_viewer/blog_page.html.erb
new file mode 100644
index 0000000..4eba287
--- /dev/null
+++ b/app/views/content_viewer/blog_page.html.erb
@@ -0,0 +1,13 @@
+<% add_rss_feed_to_head(@page.name, @page.feed.url) if @page.blog? && @page.feed %>
+
+<%= content_tag('em', _('(external feed was not loaded yet)'), :id => 'external-feed-info', :class => 'metadata') if @page.blog? && @page.external_feed && @page.external_feed.enabled && @page.external_feed.fetched_at.nil? %>
+
+
+
+ <%= @page.body %>
+
+
+
+
+ <%= (@page.empty? ? content_tag('em', _('(no posts)')) : list_posts(@posts, @page.visualization_format)) %>
+
diff --git a/app/views/content_viewer/blog_page.rhtml b/app/views/content_viewer/blog_page.rhtml
deleted file mode 100644
index 4eba287..0000000
--- a/app/views/content_viewer/blog_page.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<% add_rss_feed_to_head(@page.name, @page.feed.url) if @page.blog? && @page.feed %>
-
-<%= content_tag('em', _('(external feed was not loaded yet)'), :id => 'external-feed-info', :class => 'metadata') if @page.blog? && @page.external_feed && @page.external_feed.enabled && @page.external_feed.fetched_at.nil? %>
-
-
-
- <%= @page.body %>
-
-
-
-
- <%= (@page.empty? ? content_tag('em', _('(no posts)')) : list_posts(@posts, @page.visualization_format)) %>
-
diff --git a/app/views/content_viewer/folder.html.erb b/app/views/content_viewer/folder.html.erb
new file mode 100644
index 0000000..a670b39
--- /dev/null
+++ b/app/views/content_viewer/folder.html.erb
@@ -0,0 +1,12 @@
+<% unless folder.body.blank? %>
+
+ <%= folder.body %>
+
+
+<% end %>
+
+<% if folder.children.empty? %>
+ <%= _('(empty folder)') %>
+<% else %>
+ <%= list_articles(folder.children) %>
+<% end %>
diff --git a/app/views/content_viewer/folder.rhtml b/app/views/content_viewer/folder.rhtml
deleted file mode 100644
index a670b39..0000000
--- a/app/views/content_viewer/folder.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<% unless folder.body.blank? %>
-
- <%= folder.body %>
-
-
-<% end %>
-
-<% if folder.children.empty? %>
- <%= _('(empty folder)') %>
-<% else %>
- <%= list_articles(folder.children) %>
-<% end %>
diff --git a/app/views/content_viewer/forum_page.html.erb b/app/views/content_viewer/forum_page.html.erb
new file mode 100644
index 0000000..21938dd
--- /dev/null
+++ b/app/views/content_viewer/forum_page.html.erb
@@ -0,0 +1,11 @@
+<% add_rss_feed_to_head(@page.name, @page.feed.url) if @page.forum? && @page.feed %>
+
+
+
+ <%= @page.body %>
+
+
+
+
+ <%= (@posts.compact.empty? ? content_tag('em', _('(no posts)')) : list_forum_posts(@posts)) %>
+
diff --git a/app/views/content_viewer/forum_page.rhtml b/app/views/content_viewer/forum_page.rhtml
deleted file mode 100644
index 21938dd..0000000
--- a/app/views/content_viewer/forum_page.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<% add_rss_feed_to_head(@page.name, @page.feed.url) if @page.forum? && @page.feed %>
-
-
-
- <%= @page.body %>
-
-
-
-
- <%= (@posts.compact.empty? ? content_tag('em', _('(no posts)')) : list_forum_posts(@posts)) %>
-
diff --git a/app/views/content_viewer/image_gallery.html.erb b/app/views/content_viewer/image_gallery.html.erb
new file mode 100644
index 0000000..585adbd
--- /dev/null
+++ b/app/views/content_viewer/image_gallery.html.erb
@@ -0,0 +1,20 @@
+
+ <%= @page.body %>
+
+
+
+ <% if @images.empty? %>
+
<%= _('This gallery contains no images yet') %>
+ <% else %>
+
<%= button(:slideshow, _('View slideshow'), @page.url.merge(:slideshow => true))%>
+ <% end %>
+
+ <% @images.each do |a| %>
+ <% content_tag('li', :title => a.title, :class => 'image-gallery-item' ) do %>
+ <%= render :partial => partial_for_class(a.class), :object => a %>
+ <% end %>
+ <% end %>
+
+
+ <%= pagination_links @images, :param_name => 'npage' %>
+
diff --git a/app/views/content_viewer/image_gallery.rhtml b/app/views/content_viewer/image_gallery.rhtml
deleted file mode 100644
index 585adbd..0000000
--- a/app/views/content_viewer/image_gallery.rhtml
+++ /dev/null
@@ -1,20 +0,0 @@
-
- <%= @page.body %>
-
-
-
- <% if @images.empty? %>
-
<%= _('This gallery contains no images yet') %>
- <% else %>
-
<%= button(:slideshow, _('View slideshow'), @page.url.merge(:slideshow => true))%>
- <% end %>
-
- <% @images.each do |a| %>
- <% content_tag('li', :title => a.title, :class => 'image-gallery-item' ) do %>
- <%= render :partial => partial_for_class(a.class), :object => a %>
- <% end %>
- <% end %>
-
-
- <%= pagination_links @images, :param_name => 'npage' %>
-
diff --git a/app/views/content_viewer/slideshow.html.erb b/app/views/content_viewer/slideshow.html.erb
new file mode 100644
index 0000000..079fbf9
--- /dev/null
+++ b/app/views/content_viewer/slideshow.html.erb
@@ -0,0 +1,8 @@
+<%= button('', _('Back to gallery'), @page.url)%>
+
+ <% @images.each do |img| -%>
+ <% if img.image? -%>
+ <%= image_tag(url_for(img.public_filename(:display)), :title => (img.abstract.blank? ? img.name : img.abstract)) %>
+ <% end -%>
+ <% end unless @images.blank? -%>
+
diff --git a/app/views/content_viewer/slideshow.rhtml b/app/views/content_viewer/slideshow.rhtml
deleted file mode 100644
index 079fbf9..0000000
--- a/app/views/content_viewer/slideshow.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-<%= button('', _('Back to gallery'), @page.url)%>
-
- <% @images.each do |img| -%>
- <% if img.image? -%>
- <%= image_tag(url_for(img.public_filename(:display)), :title => (img.abstract.blank? ? img.name : img.abstract)) %>
- <% end -%>
- <% end unless @images.blank? -%>
-
diff --git a/app/views/content_viewer/view_page.html.erb b/app/views/content_viewer/view_page.html.erb
new file mode 100644
index 0000000..15023a4
--- /dev/null
+++ b/app/views/content_viewer/view_page.html.erb
@@ -0,0 +1,106 @@
+<%
+ if @page.parent && @page.parent.has_posts? && @page.parent.feed
+ add_rss_feed_to_head(@page.parent.name, @page.parent.feed.url)
+ end
+%>
+
+
+
+<%= render :partial => 'confirm_unfollow' %>
+
+
+
+
+
+<% if @page.display_hits? || @page.license.present? %>
+
+ <% if @page.display_hits? %>
+
+ <%= n_('Viewed one time', 'Viewed %{num} times', @page.hits) % { :num => @page.hits } %>
+
+ <% end %>
+
+ <% if @page.license.present? %>
+
+ <%= _('Licensed under %s') % (@page.license.url.present? ? link_to(@page.license.name, @page.license.url, :target => '_blank') : @page.license.name) %>
+
+ <% end %>
+
+<% end %>
+
+<% if !@page.tags.empty? %>
+
+ <%= _("This article's tags:") %>
+ <%= @page.tags.map { |t| link_to(t, :controller => 'profile', :profile => @profile.identifier, :action => 'tags', :id => t.name ) }.join("\n") %>
+
+<% end %>
+
+<% if @page.parent && !@page.parent.path.blank? %>
+
+ <%= button(:back, _('Go back to %s') % @page.parent.short_title, @page.parent.url) %>
+
+<% end %>
+
+<%= render :partial => 'shared/disabled_enterprise' %>
+
+<% if NOOSFERO_CONF['addthis_enabled'] %>
+
+<% end %>
+
+<% cache(@page.cache_key(params, user, language)) do %>
+
">
+ <% options = @page.image? ? {:gallery_view => true} : {} %>
+ <%= article_to_html(@page, options) %>
+
+
+<% end %>
+
+<% if ! @page.categories.empty? %>
+
+
<%= _('Categories') %>
+ <%= @page.categories.map {|item| link_to_category(item, false) }.join(", ") %>
+
+<% end %>
+
+<%= display_source_info(@page) %>
+
+
+
+
+<%= add_zoom_to_article_images %>
diff --git a/app/views/content_viewer/view_page.rhtml b/app/views/content_viewer/view_page.rhtml
deleted file mode 100644
index 15023a4..0000000
--- a/app/views/content_viewer/view_page.rhtml
+++ /dev/null
@@ -1,106 +0,0 @@
-<%
- if @page.parent && @page.parent.has_posts? && @page.parent.feed
- add_rss_feed_to_head(@page.parent.name, @page.parent.feed.url)
- end
-%>
-
-
-
-<%= render :partial => 'confirm_unfollow' %>
-
-
-
-
-
-<% if @page.display_hits? || @page.license.present? %>
-
- <% if @page.display_hits? %>
-
- <%= n_('Viewed one time', 'Viewed %{num} times', @page.hits) % { :num => @page.hits } %>
-
- <% end %>
-
- <% if @page.license.present? %>
-
- <%= _('Licensed under %s') % (@page.license.url.present? ? link_to(@page.license.name, @page.license.url, :target => '_blank') : @page.license.name) %>
-
- <% end %>
-
-<% end %>
-
-<% if !@page.tags.empty? %>
-
- <%= _("This article's tags:") %>
- <%= @page.tags.map { |t| link_to(t, :controller => 'profile', :profile => @profile.identifier, :action => 'tags', :id => t.name ) }.join("\n") %>
-
-<% end %>
-
-<% if @page.parent && !@page.parent.path.blank? %>
-
- <%= button(:back, _('Go back to %s') % @page.parent.short_title, @page.parent.url) %>
-
-<% end %>
-
-<%= render :partial => 'shared/disabled_enterprise' %>
-
-<% if NOOSFERO_CONF['addthis_enabled'] %>
-
-<% end %>
-
-<% cache(@page.cache_key(params, user, language)) do %>
-
">
- <% options = @page.image? ? {:gallery_view => true} : {} %>
- <%= article_to_html(@page, options) %>
-
-
-<% end %>
-
-<% if ! @page.categories.empty? %>
-
-
<%= _('Categories') %>
- <%= @page.categories.map {|item| link_to_category(item, false) }.join(", ") %>
-
-<% end %>
-
-<%= display_source_info(@page) %>
-
-
-
-
-<%= add_zoom_to_article_images %>
diff --git a/app/views/enterprise_registration/_hidden_fields.html.erb b/app/views/enterprise_registration/_hidden_fields.html.erb
new file mode 100644
index 0000000..bdf5533
--- /dev/null
+++ b/app/views/enterprise_registration/_hidden_fields.html.erb
@@ -0,0 +1,11 @@
+<%= hidden_field 'create_enterprise', 'identifier' %>
+<%= hidden_field 'create_enterprise', 'name' %>
+<%= hidden_field 'create_enterprise', 'address' %>
+<%= hidden_field 'create_enterprise', 'contact_phone' %>
+<%= hidden_field 'create_enterprise', 'contact_person' %>
+<%= hidden_field 'create_enterprise', 'acronym' %>
+<%= hidden_field 'create_enterprise', 'foundation_year' %>
+<%= hidden_field 'create_enterprise', 'legal_form' %>
+<%= hidden_field 'create_enterprise', 'economic_activity' %>
+<%= hidden_field 'create_enterprise', 'management_information' %>
+<%= hidden_field 'create_enterprise', 'region_id' %>
diff --git a/app/views/enterprise_registration/_hidden_fields.rhtml b/app/views/enterprise_registration/_hidden_fields.rhtml
deleted file mode 100644
index bdf5533..0000000
--- a/app/views/enterprise_registration/_hidden_fields.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= hidden_field 'create_enterprise', 'identifier' %>
-<%= hidden_field 'create_enterprise', 'name' %>
-<%= hidden_field 'create_enterprise', 'address' %>
-<%= hidden_field 'create_enterprise', 'contact_phone' %>
-<%= hidden_field 'create_enterprise', 'contact_person' %>
-<%= hidden_field 'create_enterprise', 'acronym' %>
-<%= hidden_field 'create_enterprise', 'foundation_year' %>
-<%= hidden_field 'create_enterprise', 'legal_form' %>
-<%= hidden_field 'create_enterprise', 'economic_activity' %>
-<%= hidden_field 'create_enterprise', 'management_information' %>
-<%= hidden_field 'create_enterprise', 'region_id' %>
diff --git a/app/views/enterprise_registration/basic_information.html.erb b/app/views/enterprise_registration/basic_information.html.erb
new file mode 100644
index 0000000..8f375ab
--- /dev/null
+++ b/app/views/enterprise_registration/basic_information.html.erb
@@ -0,0 +1,43 @@
+<%= error_messages_for 'create_enterprise' %>
+
+<%= __('Enterprise registration') %>
+
+
+<% if @validation == :region && @regions.empty? %>
+
+ <%= __('There are no validators to validate the registration of this new enterprise. Contact your administrator for instructions.') %>
+
+
+ <% button_bar do %>
+ <%= button :back, _('Go back'), { :profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile" }%>
+ <% end %>
+<% else %>
+
+ <%= __('To register a new enterprise, fill in the form and hit the Register button. Then the enterprise will be submitted for evaluation at the validation entitiy of your choice (within your state) and when the enterprise is aproved you will be able to activate its profile.') %>
+
+
+ <%= required_fields_message %>
+
+ <% labelled_form_for(:create_enterprise, @create_enterprise) do |f| %>
+ <%= required f.text_field 'name', :onchange => "updateUrlField(this, 'create_enterprise_identifier')", :size => 40 %>
+ <%= required labelled_form_field(_('Address'), content_tag('code', environment.top_url + "/" + text_field(:create_enterprise, 'identifier', :size => 26))) %>
+ <%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => :create_enterprise, :profile => @create_enterprise } %>
+ <%= required labelled_form_field(_('Region'), f.select('region_id', @regions)) if @validation == :region %>
+
+ <% if @validation == :admin %>
+ <%= hidden_field_tag 'create_enterprise[target_id]', environment.id %>
+ <% end %>
+
+ <% @plugins.dispatch(:enterprise_registration_hidden_fields).each do |field| %>
+ <% field.each do |key, value| %>
+ <%= f.hidden_field(key, :value => value) %>
+ <% end %>
+ <% end %>
+
+ <%= template_options(Enterprise, 'create_enterprise')%>
+
+ <% button_bar do %>
+ <%= submit_button('next', _('Next'), :cancel => {:profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile"}) %>
+ <% end %>
+ <% end %>
+<% end %>
diff --git a/app/views/enterprise_registration/basic_information.rhtml b/app/views/enterprise_registration/basic_information.rhtml
deleted file mode 100644
index 8f375ab..0000000
--- a/app/views/enterprise_registration/basic_information.rhtml
+++ /dev/null
@@ -1,43 +0,0 @@
-<%= error_messages_for 'create_enterprise' %>
-
-<%= __('Enterprise registration') %>
-
-
-<% if @validation == :region && @regions.empty? %>
-
- <%= __('There are no validators to validate the registration of this new enterprise. Contact your administrator for instructions.') %>
-
-
- <% button_bar do %>
- <%= button :back, _('Go back'), { :profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile" }%>
- <% end %>
-<% else %>
-
- <%= __('To register a new enterprise, fill in the form and hit the Register button. Then the enterprise will be submitted for evaluation at the validation entitiy of your choice (within your state) and when the enterprise is aproved you will be able to activate its profile.') %>
-
-
- <%= required_fields_message %>
-
- <% labelled_form_for(:create_enterprise, @create_enterprise) do |f| %>
- <%= required f.text_field 'name', :onchange => "updateUrlField(this, 'create_enterprise_identifier')", :size => 40 %>
- <%= required labelled_form_field(_('Address'), content_tag('code', environment.top_url + "/" + text_field(:create_enterprise, 'identifier', :size => 26))) %>
- <%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => :create_enterprise, :profile => @create_enterprise } %>
- <%= required labelled_form_field(_('Region'), f.select('region_id', @regions)) if @validation == :region %>
-
- <% if @validation == :admin %>
- <%= hidden_field_tag 'create_enterprise[target_id]', environment.id %>
- <% end %>
-
- <% @plugins.dispatch(:enterprise_registration_hidden_fields).each do |field| %>
- <% field.each do |key, value| %>
- <%= f.hidden_field(key, :value => value) %>
- <% end %>
- <% end %>
-
- <%= template_options(Enterprise, 'create_enterprise')%>
-
- <% button_bar do %>
- <%= submit_button('next', _('Next'), :cancel => {:profile => current_user.person.identifier, :action=>"enterprises", :controller=>"profile"}) %>
- <% end %>
- <% end %>
-<% end %>
diff --git a/app/views/enterprise_registration/confirmation.html.erb b/app/views/enterprise_registration/confirmation.html.erb
new file mode 100644
index 0000000..f7e2b15
--- /dev/null
+++ b/app/views/enterprise_registration/confirmation.html.erb
@@ -0,0 +1,9 @@
+<%= __('Enterprise registration completed') %>
+
+
+<%= __("Your enterprise registration request was successfully registered. The validator organization you choose (%s) should get in touch with to start the validation process. As soon as the validators approve (or reject) your request, you will be notified by e-mail.") % @create_enterprise.target.name %>
+
+
+
+<%= link_to _('You can continue to browse this environment.'), :controller => 'home' %>
+
diff --git a/app/views/enterprise_registration/confirmation.rhtml b/app/views/enterprise_registration/confirmation.rhtml
deleted file mode 100644
index f7e2b15..0000000
--- a/app/views/enterprise_registration/confirmation.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= __('Enterprise registration completed') %>
-
-
-<%= __("Your enterprise registration request was successfully registered. The validator organization you choose (%s) should get in touch with to start the validation process. As soon as the validators approve (or reject) your request, you will be notified by e-mail.") % @create_enterprise.target.name %>
-
-
-
-<%= link_to _('You can continue to browse this environment.'), :controller => 'home' %>
-
diff --git a/app/views/enterprise_registration/creation.html.erb b/app/views/enterprise_registration/creation.html.erb
new file mode 100644
index 0000000..77e742c
--- /dev/null
+++ b/app/views/enterprise_registration/creation.html.erb
@@ -0,0 +1,9 @@
+<%= __('Enterprise registration completed') %>
+
+
+<%= __("Your enterprise (%s) was successfully registered.") % @enterprise.name %>
+
+
+
+<%= link_to __('You can manage your enterprise now.'), @enterprise.admin_url %>
+
diff --git a/app/views/enterprise_registration/creation.rhtml b/app/views/enterprise_registration/creation.rhtml
deleted file mode 100644
index 77e742c..0000000
--- a/app/views/enterprise_registration/creation.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= __('Enterprise registration completed') %>
-
-
-<%= __("Your enterprise (%s) was successfully registered.") % @enterprise.name %>
-
-
-
-<%= link_to __('You can manage your enterprise now.'), @enterprise.admin_url %>
-
diff --git a/app/views/enterprise_registration/select_validator.html.erb b/app/views/enterprise_registration/select_validator.html.erb
new file mode 100644
index 0000000..689486c
--- /dev/null
+++ b/app/views/enterprise_registration/select_validator.html.erb
@@ -0,0 +1,28 @@
+<%= __('Enterprise registration: validator organization') %>
+
+
+<%= __('Select one organization to validate your enterprise registration request. Check the provided information about their validation methodoly and criteria.') %>
+
+
+<% form_tag do %>
+ <%= render :partial => 'hidden_fields' %>
+
+
+
+ <%= _('Name') %>
+ <%= _('Validation Methodology:') %>
+ <%= _('Restrictions (if any):') %>
+
+ <% @validators.each do |validator| %>
+
+ <%= labelled_radio_button validator.name, 'create_enterprise[target_id]', validator.id %>
+ <%= validator.validation_methodology || _("(not informed)") %>
+ <%= validator.validation_restrictions || _("(not informed)") %>
+
+ <% end %>
+
+
+ <% button_bar do %>
+ <%= submit_button 'save', _('Confirm') %>
+ <% end %>
+<% end %>
diff --git a/app/views/enterprise_registration/select_validator.rhtml b/app/views/enterprise_registration/select_validator.rhtml
deleted file mode 100644
index 689486c..0000000
--- a/app/views/enterprise_registration/select_validator.rhtml
+++ /dev/null
@@ -1,28 +0,0 @@
-<%= __('Enterprise registration: validator organization') %>
-
-
-<%= __('Select one organization to validate your enterprise registration request. Check the provided information about their validation methodoly and criteria.') %>
-
-
-<% form_tag do %>
- <%= render :partial => 'hidden_fields' %>
-
-
-
- <%= _('Name') %>
- <%= _('Validation Methodology:') %>
- <%= _('Restrictions (if any):') %>
-
- <% @validators.each do |validator| %>
-
- <%= labelled_radio_button validator.name, 'create_enterprise[target_id]', validator.id %>
- <%= validator.validation_methodology || _("(not informed)") %>
- <%= validator.validation_restrictions || _("(not informed)") %>
-
- <% end %>
-
-
- <% 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
new file mode 100644
index 0000000..ff1a910
--- /dev/null
+++ b/app/views/enterprise_validation/_details.html.erb
@@ -0,0 +1,42 @@
+
+
+ <%= _('Name') %>
+ <%= request.name %>
+
+
+ <%= _('Address') %>
+ <%= request.address %>
+
+
+ <%= _('Contact Phone') %>
+ <%= request.contact_phone %>
+
+
+ <%= _('Contact Person') %>
+ <%= request.contact_person %>
+
+
+ <%= _('Acronym') %>
+ <%= request.acronym %>
+
+
+ <%= _('Identifier') %>
+ <%= request.identifier %>
+
+
+ <%= _('Foundation Year') %>
+ <%= request.foundation_year %>
+
+
+ <%= _('Legal Form') %>
+ <%= request.legal_form %>
+
+
+ <%= _('Economic Activity') %>
+ <%= request.economic_activity %>
+
+
+ <%= _('Management Information') %>
+ <%= request.management_information %>
+
+
diff --git a/app/views/enterprise_validation/_details.rhtml b/app/views/enterprise_validation/_details.rhtml
deleted file mode 100644
index ff1a910..0000000
--- a/app/views/enterprise_validation/_details.rhtml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
- <%= _('Name') %>
- <%= request.name %>
-
-
- <%= _('Address') %>
- <%= request.address %>
-
-
- <%= _('Contact Phone') %>
- <%= request.contact_phone %>
-
-
- <%= _('Contact Person') %>
- <%= request.contact_person %>
-
-
- <%= _('Acronym') %>
- <%= request.acronym %>
-
-
- <%= _('Identifier') %>
- <%= request.identifier %>
-
-
- <%= _('Foundation Year') %>
- <%= request.foundation_year %>
-
-
- <%= _('Legal Form') %>
- <%= request.legal_form %>
-
-
- <%= _('Economic Activity') %>
- <%= request.economic_activity %>
-
-
- <%= _('Management Information') %>
- <%= request.management_information %>
-
-
diff --git a/app/views/enterprise_validation/details.html.erb b/app/views/enterprise_validation/details.html.erb
new file mode 100644
index 0000000..5d46c4d
--- /dev/null
+++ b/app/views/enterprise_validation/details.html.erb
@@ -0,0 +1,34 @@
+<%= _("%s's validation") % @pending.name %>
+
+<%= link_to _('Back'), :action => 'index' %>
+
+<%= error_messages_for 'pending' %>
+
+<%= _('Provided information') %>
+
+<%= render :partial => 'details', :locals => { :request => @pending } %>
+
+<%= _('Final decision:') %>
+
+<%= _('Approve') %>
+
+<%= __('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 %>
+ <%= submit_button('approve', _('Approve')) %>
+ <% end %>
+<% end %>
+
+<%= _('Reject') %>
+
+<%= __('If this enterprise does not pass the criteria do be considered, use this form.') %>
+
+<% 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 %>
+ <%= submit_button('reject', _('Reject')) %>
+ <% end %>
+
+<% end %>
diff --git a/app/views/enterprise_validation/details.rhtml b/app/views/enterprise_validation/details.rhtml
deleted file mode 100644
index 5d46c4d..0000000
--- a/app/views/enterprise_validation/details.rhtml
+++ /dev/null
@@ -1,34 +0,0 @@
-<%= _("%s's validation") % @pending.name %>
-
-<%= link_to _('Back'), :action => 'index' %>
-
-<%= error_messages_for 'pending' %>
-
-<%= _('Provided information') %>
-
-<%= render :partial => 'details', :locals => { :request => @pending } %>
-
-<%= _('Final decision:') %>
-
-<%= _('Approve') %>
-
-<%= __('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 %>
- <%= submit_button('approve', _('Approve')) %>
- <% end %>
-<% end %>
-
-<%= _('Reject') %>
-
-<%= __('If this enterprise does not pass the criteria do be considered, use this form.') %>
-
-<% 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 %>
- <%= submit_button('reject', _('Reject')) %>
- <% end %>
-
-<% end %>
diff --git a/app/views/enterprise_validation/edit_validation_info.html.erb b/app/views/enterprise_validation/edit_validation_info.html.erb
new file mode 100644
index 0000000..b669a99
--- /dev/null
+++ b/app/views/enterprise_validation/edit_validation_info.html.erb
@@ -0,0 +1,11 @@
+<% _('Editing the validation info') %>
+
+<%= error_messages_for :info %>
+
+<% labelled_form_for :info, @info do |f| %>
+ <%= f.text_area(:validation_methodology, :cols => 50, :rows => 10) %>
+ <%= f.text_area(:restrictions, :cols => 50, :rows => 7) %>
+ <% button_bar do %>
+ <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
+ <% end %>
+<% end %>
diff --git a/app/views/enterprise_validation/edit_validation_info.rhtml b/app/views/enterprise_validation/edit_validation_info.rhtml
deleted file mode 100644
index b669a99..0000000
--- a/app/views/enterprise_validation/edit_validation_info.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<% _('Editing the validation info') %>
-
-<%= error_messages_for :info %>
-
-<% labelled_form_for :info, @info do |f| %>
- <%= f.text_area(:validation_methodology, :cols => 50, :rows => 10) %>
- <%= f.text_area(:restrictions, :cols => 50, :rows => 7) %>
- <% button_bar do %>
- <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
- <% end %>
-<% end %>
diff --git a/app/views/enterprise_validation/index.html.erb b/app/views/enterprise_validation/index.html.erb
new file mode 100644
index 0000000..90d3152
--- /dev/null
+++ b/app/views/enterprise_validation/index.html.erb
@@ -0,0 +1,33 @@
+<%= __('Enterprise validations') %>
+
+<% button_bar do %>
+ <%= button(:edit, _('Edit validation info'), { :action => 'edit_validation_info' }) %>
+ <%= button(:back, _('Go Back'), { :controller => 'profile_editor' }) %>
+<% end %>
+
+<%= __("Pending enterprise validations") %>
+
+<% for pending in @pending_validations %>
+ <%= pending.name %>
+
+
+ <%= _('Address') %>:
+ <%= pending.address %>
+
+
+ <%= _('Contact Phone') %>:
+ <%= pending.contact_phone %>
+
+
+ <%= _('Contact Person') %>:
+ <%= pending.contact_person %>
+
+
+
+ <%= link_to _("See details/approve/reject"), :action => 'details', :id => pending.code %>
+<% end %>
+
+<%= __('Processed enterprise validations') %>
+
+<%= link_to __("See the list of processed enterprise validations"), :action => 'list_processed' %>
+
diff --git a/app/views/enterprise_validation/index.rhtml b/app/views/enterprise_validation/index.rhtml
deleted file mode 100644
index 90d3152..0000000
--- a/app/views/enterprise_validation/index.rhtml
+++ /dev/null
@@ -1,33 +0,0 @@
-<%= __('Enterprise validations') %>
-
-<% button_bar do %>
- <%= button(:edit, _('Edit validation info'), { :action => 'edit_validation_info' }) %>
- <%= button(:back, _('Go Back'), { :controller => 'profile_editor' }) %>
-<% end %>
-
-<%= __("Pending enterprise validations") %>
-
-<% for pending in @pending_validations %>
- <%= pending.name %>
-
-
- <%= _('Address') %>:
- <%= pending.address %>
-
-
- <%= _('Contact Phone') %>:
- <%= pending.contact_phone %>
-
-
- <%= _('Contact Person') %>:
- <%= pending.contact_person %>
-
-
-
- <%= link_to _("See details/approve/reject"), :action => 'details', :id => pending.code %>
-<% end %>
-
-<%= __('Processed enterprise validations') %>
-
-<%= link_to __("See the list of processed enterprise validations"), :action => 'list_processed' %>
-
diff --git a/app/views/enterprise_validation/list_processed.html.erb b/app/views/enterprise_validation/list_processed.html.erb
new file mode 100644
index 0000000..c3dcc8e
--- /dev/null
+++ b/app/views/enterprise_validation/list_processed.html.erb
@@ -0,0 +1,24 @@
+<%= __("Processed enterprise validations") %>
+
+<%= link_to _("Back"), :action => 'index' %>
+
+<% for processed in @processed_validations %>
+ <%= processed.name %> (<%=status(processed)%>)
+
+
+ <%= _('Address') %>:
+ <%= processed.address %>
+
+
+ <%= _('Contact Phone') %>:
+ <%= processed.contact_phone %>
+
+
+ <%= _('Contact Person') %>:
+ <%= processed.contact_person %>
+
+
+
+
+ <%= link_to _("See details"), :action => 'view_processed', :id => processed.code %>
+<% end %>
diff --git a/app/views/enterprise_validation/list_processed.rhtml b/app/views/enterprise_validation/list_processed.rhtml
deleted file mode 100644
index c3dcc8e..0000000
--- a/app/views/enterprise_validation/list_processed.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-<%= __("Processed enterprise validations") %>
-
-<%= link_to _("Back"), :action => 'index' %>
-
-<% for processed in @processed_validations %>
- <%= processed.name %> (<%=status(processed)%>)
-
-
- <%= _('Address') %>:
- <%= processed.address %>
-
-
- <%= _('Contact Phone') %>:
- <%= processed.contact_phone %>
-
-
- <%= _('Contact Person') %>:
- <%= processed.contact_person %>
-
-
-
-
- <%= link_to _("See details"), :action => 'view_processed', :id => processed.code %>
-<% end %>
diff --git a/app/views/enterprise_validation/view_processed.html.erb b/app/views/enterprise_validation/view_processed.html.erb
new file mode 100644
index 0000000..fe2ae3a
--- /dev/null
+++ b/app/views/enterprise_validation/view_processed.html.erb
@@ -0,0 +1,6 @@
+<%= _('Processed validation request for %s ') % @processed.name %> (<%= status(@processed) %>)
+
+<%= link_to _('Back'), :action => 'index' %>
+
+<%= render :partial => 'details', :locals => { :request => @processed } %>
+
diff --git a/app/views/enterprise_validation/view_processed.rhtml b/app/views/enterprise_validation/view_processed.rhtml
deleted file mode 100644
index fe2ae3a..0000000
--- a/app/views/enterprise_validation/view_processed.rhtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<%= _('Processed validation request for %s ') % @processed.name %> (<%= status(@processed) %>)
-
-<%= link_to _('Back'), :action => 'index' %>
-
-<%= render :partial => 'details', :locals => { :request => @processed } %>
-
diff --git a/app/views/environment_role_manager/affiliate.html.erb b/app/views/environment_role_manager/affiliate.html.erb
new file mode 100644
index 0000000..8d0d83d
--- /dev/null
+++ b/app/views/environment_role_manager/affiliate.html.erb
@@ -0,0 +1,9 @@
+ <%= @member.name %>
+
+<% 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 %>
+ <%= submit_button('affiliate', _('Affiliate', :cancel => {:action => 'index'}) %>
+ <% end %>
+<% end %>
diff --git a/app/views/environment_role_manager/affiliate.rhtml b/app/views/environment_role_manager/affiliate.rhtml
deleted file mode 100644
index 8d0d83d..0000000
--- a/app/views/environment_role_manager/affiliate.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
- <%= @member.name %>
-
-<% 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 %>
- <%= 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
new file mode 100644
index 0000000..f147166
--- /dev/null
+++ b/app/views/environment_role_manager/change_role.html.erb
@@ -0,0 +1,14 @@
+<%= _('Changing role of %s') % @admin.name %>
+
+<% labelled_form_for :member, @admin, :url => {:action => 'update_roles'} do |f| %>
+
+ <%= _('Roles:') %>
+ <% @roles.each do |r| %>
+ <%= labelled_form_field(r.name, (check_box_tag "roles[]", r.id, @admin.role_assignments.map{|ra|ra.role}.include?(r))) %>
+ <% end %>
+ <%= hidden_field_tag 'person', @admin.id %>
+
+ <% button_bar do %>
+ <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %>
+ <% end %>
+<% end %>
diff --git a/app/views/environment_role_manager/change_role.rhtml b/app/views/environment_role_manager/change_role.rhtml
deleted file mode 100644
index f147166..0000000
--- a/app/views/environment_role_manager/change_role.rhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<%= _('Changing role of %s') % @admin.name %>
-
-<% labelled_form_for :member, @admin, :url => {:action => 'update_roles'} do |f| %>
-
- <%= _('Roles:') %>
- <% @roles.each do |r| %>
- <%= labelled_form_field(r.name, (check_box_tag "roles[]", r.id, @admin.role_assignments.map{|ra|ra.role}.include?(r))) %>
- <% end %>
- <%= hidden_field_tag 'person', @admin.id %>
-
- <% button_bar do %>
- <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %>
- <% end %>
-<% end %>
diff --git a/app/views/environment_role_manager/index.html.erb b/app/views/environment_role_manager/index.html.erb
new file mode 100644
index 0000000..aa9c919
--- /dev/null
+++ b/app/views/environment_role_manager/index.html.erb
@@ -0,0 +1,13 @@
+ <%= _('Listing Administrators') %>
+
+<%= link_to _('Make new admin'), :action => 'make_admin' %>
+
+
+ <% @admins.each do |a| %>
+ <%= a.name %>
+ <%= link_to _('Edit member role'), :action => 'change_role', :id => a %>
+ <%= link_to _('Remove member'), :action => 'unassociate', :id => a %>
+ <% end %>
+
+
+<%= link_to _('Back'), :controller => 'admin_panel' %>
diff --git a/app/views/environment_role_manager/index.rhtml b/app/views/environment_role_manager/index.rhtml
deleted file mode 100644
index aa9c919..0000000
--- a/app/views/environment_role_manager/index.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
- <%= _('Listing Administrators') %>
-
-<%= link_to _('Make new admin'), :action => 'make_admin' %>
-
-
- <% @admins.each do |a| %>
- <%= a.name %>
- <%= link_to _('Edit member role'), :action => 'change_role', :id => a %>
- <%= link_to _('Remove member'), :action => 'unassociate', :id => a %>
- <% end %>
-
-
-<%= link_to _('Back'), :controller => 'admin_panel' %>
diff --git a/app/views/environment_role_manager/make_admin.html.erb b/app/views/environment_role_manager/make_admin.html.erb
new file mode 100644
index 0000000..43547ca
--- /dev/null
+++ b/app/views/environment_role_manager/make_admin.html.erb
@@ -0,0 +1,15 @@
+ <% _('Make new admin') %>
+
+<% labelled_form_for :person, @person, :url => {:action => 'update_roles'} do |f| %>
+ <%= _('Admin') %>
+ <% @people.each do |p| %>
+ <%= labelled_form_field(p.name, (radio_button_tag "person", p.id)) %>
+ <% end %>
+ <%= _('Roles:') %>
+ <% @roles.each do |r| %>
+ <%= labelled_form_field(r.name, (check_box_tag "roles[]", r.id)) %>
+ <% end %>
+ <% button_bar do %>
+ <%= submit_button( 'save', _('Make'), :cancel => {:action => 'index'} ) %>
+ <% end %>
+<% end %>
diff --git a/app/views/environment_role_manager/make_admin.rhtml b/app/views/environment_role_manager/make_admin.rhtml
deleted file mode 100644
index 43547ca..0000000
--- a/app/views/environment_role_manager/make_admin.rhtml
+++ /dev/null
@@ -1,15 +0,0 @@
- <% _('Make new admin') %>
-
-<% labelled_form_for :person, @person, :url => {:action => 'update_roles'} do |f| %>
- <%= _('Admin') %>
- <% @people.each do |p| %>
- <%= labelled_form_field(p.name, (radio_button_tag "person", p.id)) %>
- <% end %>
- <%= _('Roles:') %>
- <% @roles.each do |r| %>
- <%= labelled_form_field(r.name, (check_box_tag "roles[]", r.id)) %>
- <% end %>
- <% button_bar do %>
- <%= submit_button( 'save', _('Make'), :cancel => {:action => 'index'} ) %>
- <% end %>
-<% end %>
diff --git a/app/views/events/_agenda.html.erb b/app/views/events/_agenda.html.erb
new file mode 100644
index 0000000..93b95d1
--- /dev/null
+++ b/app/views/events/_agenda.html.erb
@@ -0,0 +1,24 @@
+
+
+
+
+ <%= show_month(params[:year], params[:month]) %>
+ <%= link_to_previous_month(params[:year], params[:month], '« %s' % _('previous')) %>
+ <%= link_to_next_month(params[:year], params[:month], '%s »' % _('next')) %>
+
+ <%= render :partial => 'events/month', :locals => {:calendar => @calendar, :abbreviated => true} %>
+
+
+ <%= link_to_previous_month(params[:year], params[:month], show_month(params[:year], params[:month], :previous => true)) %>
+ <%= render :partial => 'events/month', :locals => {:calendar => @previous_calendar, :abbreviated => true} %>
+
+
+ <%= link_to_next_month(params[:year], params[:month], show_month(params[:year], params[:month], :next => true)) %>
+ <%= render :partial => 'events/month', :locals => {:calendar => @next_calendar, :abbreviated => true} %>
+
+
+
+
+ <%= render :partial => 'events/events_by_day' %>
+
+
diff --git a/app/views/events/_agenda.rhtml b/app/views/events/_agenda.rhtml
deleted file mode 100644
index 93b95d1..0000000
--- a/app/views/events/_agenda.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
- <%= show_month(params[:year], params[:month]) %>
- <%= link_to_previous_month(params[:year], params[:month], '« %s' % _('previous')) %>
- <%= link_to_next_month(params[:year], params[:month], '%s »' % _('next')) %>
-
- <%= render :partial => 'events/month', :locals => {:calendar => @calendar, :abbreviated => true} %>
-
-
- <%= link_to_previous_month(params[:year], params[:month], show_month(params[:year], params[:month], :previous => true)) %>
- <%= render :partial => 'events/month', :locals => {:calendar => @previous_calendar, :abbreviated => true} %>
-
-
- <%= link_to_next_month(params[:year], params[:month], show_month(params[:year], params[:month], :next => true)) %>
- <%= render :partial => 'events/month', :locals => {:calendar => @next_calendar, :abbreviated => true} %>
-
-
-
-
- <%= render :partial => 'events/events_by_day' %>
-
-
diff --git a/app/views/events/_events_by_day.html.erb b/app/views/events/_events_by_day.html.erb
new file mode 100644
index 0000000..e8b37c6
--- /dev/null
+++ b/app/views/events/_events_by_day.html.erb
@@ -0,0 +1 @@
+<%= list_events(@selected_day, @events_of_the_day) %>
diff --git a/app/views/events/_events_by_day.rhtml b/app/views/events/_events_by_day.rhtml
deleted file mode 100644
index e8b37c6..0000000
--- a/app/views/events/_events_by_day.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= list_events(@selected_day, @events_of_the_day) %>
diff --git a/app/views/events/_month.html.erb b/app/views/events/_month.html.erb
new file mode 100644
index 0000000..a1aa702
--- /dev/null
+++ b/app/views/events/_month.html.erb
@@ -0,0 +1,25 @@
+
+ <% calendar.first(7).each do |day,event| %>
+ <%= show_day_of_week(day, abbreviated) %>
+ <% end %>
+
+ <% calendar.in_groups_of(7).each do |week| %>
+
+ <% week.each do |date, has_events, this_month| %>
+
+
+ <%= has_events ?
+ link_to_remote(
+ date.day,
+ :url => {:action => 'events_by_day', :year => date.year, :month => date.month, :day => date.day, :category_id => @category_id},
+ :update => 'events-of-the-day',
+ :loading => '$("events-of-the-day").addClassName("loading")',
+ :complete => '$("events-of-the-day").removeClassName("loading")'
+ ) :
+ date.day
+ %>
+
+
+ <% end %>
+
+ <% end %>
diff --git a/app/views/events/_month.rhtml b/app/views/events/_month.rhtml
deleted file mode 100644
index a1aa702..0000000
--- a/app/views/events/_month.rhtml
+++ /dev/null
@@ -1,25 +0,0 @@
-
- <% calendar.first(7).each do |day,event| %>
- <%= show_day_of_week(day, abbreviated) %>
- <% end %>
-
- <% calendar.in_groups_of(7).each do |week| %>
-
- <% week.each do |date, has_events, this_month| %>
-
-
- <%= has_events ?
- link_to_remote(
- date.day,
- :url => {:action => 'events_by_day', :year => date.year, :month => date.month, :day => date.day, :category_id => @category_id},
- :update => 'events-of-the-day',
- :loading => '$("events-of-the-day").addClassName("loading")',
- :complete => '$("events-of-the-day").removeClassName("loading")'
- ) :
- date.day
- %>
-
-
- <% end %>
-
- <% end %>
diff --git a/app/views/events/events.html.erb b/app/views/events/events.html.erb
new file mode 100644
index 0000000..316f114
--- /dev/null
+++ b/app/views/events/events.html.erb
@@ -0,0 +1,12 @@
+<%= _("%s's events") % profile.name %>
+
+
+ <%= button :back, _('Back to %s') % profile.name, profile.url %>
+ <% if user && user.has_permission?('post_content', profile) %>
+ <%= button :new, _('New event'), myprofile_url(:controller => 'cms', :action => 'new', :type => 'Event') %>
+ <% end %>
+
+
+
+
+<%= render :partial => 'agenda' %>
diff --git a/app/views/events/events.rhtml b/app/views/events/events.rhtml
deleted file mode 100644
index 316f114..0000000
--- a/app/views/events/events.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<%= _("%s's events") % profile.name %>
-
-
- <%= button :back, _('Back to %s') % profile.name, profile.url %>
- <% if user && user.has_permission?('post_content', profile) %>
- <%= button :new, _('New event'), myprofile_url(:controller => 'cms', :action => 'new', :type => 'Event') %>
- <% end %>
-
-
-
-
-<%= render :partial => 'agenda' %>
diff --git a/app/views/favorite_enterprises/add.html.erb b/app/views/favorite_enterprises/add.html.erb
new file mode 100644
index 0000000..b75d1bd
--- /dev/null
+++ b/app/views/favorite_enterprises/add.html.erb
@@ -0,0 +1,12 @@
+<%= __('Adding %s as a favorite enterprise') % @favorite_enterprise.name %>
+
+
+<%= __('Are you sure you want to add %s as your favorite enterprise?') % @favorite_enterprise.name %>
+
+
+<% form_tag do %>
+ <%= hidden_field_tag(:confirmation, 1) %>
+
+ <%= submit_button(:ok, __("Yes, I am sure"), :title => _("I want to add %s as a favorite enterprise") % @favorite_enterprise.name) %>
+ <%= button(:cancel, _("No, I don't want"), :action => 'index') %>
+<% end %>
diff --git a/app/views/favorite_enterprises/add.rhtml b/app/views/favorite_enterprises/add.rhtml
deleted file mode 100644
index b75d1bd..0000000
--- a/app/views/favorite_enterprises/add.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<%= __('Adding %s as a favorite enterprise') % @favorite_enterprise.name %>
-
-
-<%= __('Are you sure you want to add %s as your favorite enterprise?') % @favorite_enterprise.name %>
-
-
-<% form_tag do %>
- <%= hidden_field_tag(:confirmation, 1) %>
-
- <%= submit_button(:ok, __("Yes, I am sure"), :title => _("I want to add %s as a favorite enterprise") % @favorite_enterprise.name) %>
- <%= button(:cancel, _("No, I don't want"), :action => 'index') %>
-<% end %>
diff --git a/app/views/favorite_enterprises/index.html.erb b/app/views/favorite_enterprises/index.html.erb
new file mode 100644
index 0000000..aded584
--- /dev/null
+++ b/app/views/favorite_enterprises/index.html.erb
@@ -0,0 +1,34 @@
+
+
+
<%= __("%s's favorite enterprises") % profile.name %>
+
+
+<% @favorite_enterprises.each do |enterprise| %>
+
+ <%= link_to_profile profile_image(enterprise) + ' ' + enterprise.name,
+ enterprise.identifier, :class => 'profile-link' %>
+ <%# profile_image_link enterprise, :portrait, 'div' %>
+
+ <%= link_to content_tag('span',_('remove')),
+ { :action => 'remove', :id => enterprise.id },
+ :class => 'button icon-delete',
+ :title => _('remove') %>
+
+
+<% end %>
+
+
+<% if @favorite_enterprises.empty? %>
+
+
+ <%= __('You have no favorite enterprises yet.') %>
+
+
+<% end %>
+
+<% button_bar do %>
+ <%= button(:back, _('Go back'), :controller => 'profile_editor') %>
+<% end %>
+
+
+
diff --git a/app/views/favorite_enterprises/index.rhtml b/app/views/favorite_enterprises/index.rhtml
deleted file mode 100644
index aded584..0000000
--- a/app/views/favorite_enterprises/index.rhtml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
<%= __("%s's favorite enterprises") % profile.name %>
-
-
-<% @favorite_enterprises.each do |enterprise| %>
-
- <%= link_to_profile profile_image(enterprise) + ' ' + enterprise.name,
- enterprise.identifier, :class => 'profile-link' %>
- <%# profile_image_link enterprise, :portrait, 'div' %>
-
- <%= link_to content_tag('span',_('remove')),
- { :action => 'remove', :id => enterprise.id },
- :class => 'button icon-delete',
- :title => _('remove') %>
-
-
-<% end %>
-
-
-<% if @favorite_enterprises.empty? %>
-
-
- <%= __('You have no favorite enterprises yet.') %>
-
-
-<% end %>
-
-<% button_bar do %>
- <%= button(:back, _('Go back'), :controller => 'profile_editor') %>
-<% end %>
-
-
-
diff --git a/app/views/favorite_enterprises/remove.html.erb b/app/views/favorite_enterprises/remove.html.erb
new file mode 100644
index 0000000..c497f3c
--- /dev/null
+++ b/app/views/favorite_enterprises/remove.html.erb
@@ -0,0 +1,18 @@
+
+
+
<%= __('Removing favorite enterprise: %s') % @favorite_enterprise.name %>
+
+<%= profile_image @favorite_enterprise, :thumb, :class => 'favorite_enterprise_picture' %>
+
+
+<%= __('Are you sure you want to remove %s from your favorite enterprise list?') % @favorite_enterprise.name %>
+
+
+<% form_tag do %>
+ <%= hidden_field_tag(:confirmation, 1) %>
+
+ <%= submit_button(:ok, __("Yes, I want to remove %s from my favorite enterprise list") % @favorite_enterprise.name) %>
+ <%= button(:cancel, _("No, I don't want"), :action => 'index') %>
+<% end %>
+
+
diff --git a/app/views/favorite_enterprises/remove.rhtml b/app/views/favorite_enterprises/remove.rhtml
deleted file mode 100644
index c497f3c..0000000
--- a/app/views/favorite_enterprises/remove.rhtml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
<%= __('Removing favorite enterprise: %s') % @favorite_enterprise.name %>
-
-<%= profile_image @favorite_enterprise, :thumb, :class => 'favorite_enterprise_picture' %>
-
-
-<%= __('Are you sure you want to remove %s from your favorite enterprise list?') % @favorite_enterprise.name %>
-
-
-<% form_tag do %>
- <%= hidden_field_tag(:confirmation, 1) %>
-
- <%= submit_button(:ok, __("Yes, I want to remove %s from my favorite enterprise list") % @favorite_enterprise.name) %>
- <%= button(:cancel, _("No, I don't want"), :action => 'index') %>
-<% end %>
-
-
diff --git a/app/views/features/_features_table.html.erb b/app/views/features/_features_table.html.erb
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/views/features/_features_table.html.erb
diff --git a/app/views/features/_features_table.rhtml b/app/views/features/_features_table.rhtml
deleted file mode 100644
index e69de29..0000000
--- a/app/views/features/_features_table.rhtml
+++ /dev/null
diff --git a/app/views/features/_manage_community_fields.html.erb b/app/views/features/_manage_community_fields.html.erb
new file mode 100644
index 0000000..f5972be
--- /dev/null
+++ b/app/views/features/_manage_community_fields.html.erb
@@ -0,0 +1,54 @@
+<%= __('Manage community fields') %>
+
+<% labelled_form_for(:environment, @environment, :url => {:action => 'manage_community_fields'}) do |f| %>
+
+
+
+
+
+
+ <% button_bar do %>
+ <%= submit_button('save', _('Save changes')) %>
+ <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
+ <% end %>
+
+
+<% end %>
+
+
+
+
diff --git a/app/views/features/_manage_community_fields.rhtml b/app/views/features/_manage_community_fields.rhtml
deleted file mode 100644
index f5972be..0000000
--- a/app/views/features/_manage_community_fields.rhtml
+++ /dev/null
@@ -1,54 +0,0 @@
-<%= __('Manage community fields') %>
-
-<% labelled_form_for(:environment, @environment, :url => {:action => 'manage_community_fields'}) do |f| %>
-
-
-
-
-
-
- <% button_bar do %>
- <%= submit_button('save', _('Save changes')) %>
- <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
- <% end %>
-
-
-<% end %>
-
-
-
-
diff --git a/app/views/features/_manage_enterprise_fields.html.erb b/app/views/features/_manage_enterprise_fields.html.erb
new file mode 100644
index 0000000..6c4b731
--- /dev/null
+++ b/app/views/features/_manage_enterprise_fields.html.erb
@@ -0,0 +1,54 @@
+<%= __('Manage enterprise fields') %>
+
+<% labelled_form_for(:environment, @environment, :url => {:action => 'manage_enterprise_fields'}) do |f| %>
+
+
+
+ <%= _('Field') %>
+ <%= _('Active') %>
+ <%= _('Required') %>
+ <%= _('Display on registration?') %>
+
+ <% @enterprise_fields.each do |field| %>
+
+
+ <%= _(field.humanize) %>
+
+ <%= hidden_field_tag "enterprise_fields[#{field}][active]", false %>
+ <%= check_box_tag "enterprise_fields[#{field}][active]", true, environment.custom_enterprise_field(field, 'active'), :onclick => "$('enterprise_fields[#{field}][required]').disabled=$('enterprise_fields[#{field}][signup]').disabled=!this.checked;" %>
+
+
+ <%= hidden_field_tag "enterprise_fields[#{field}][required]", false %>
+ <%= check_box_tag "enterprise_fields[#{field}][required]", true, environment.custom_enterprise_field(field, 'required'), :onclick => "if(this.checked) $('enterprise_fields[#{field}][signup]').checked = true;" %>
+
+
+ <%= hidden_field_tag "enterprise_fields[#{field}][signup]", false %>
+ <%= check_box_tag "enterprise_fields[#{field}][signup]", true, environment.custom_enterprise_field(field, 'signup'), :onclick => "if(!this.checked) $('enterprise_fields[#{field}][required]').checked = false;" %>
+
+
+
+ <% end %>
+
+
+
+
+
+ <% button_bar do %>
+ <%= submit_button('save', _('Save changes')) %>
+ <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
+ <% end %>
+
+
+<% end %>
+
+
+
+
diff --git a/app/views/features/_manage_enterprise_fields.rhtml b/app/views/features/_manage_enterprise_fields.rhtml
deleted file mode 100644
index 6c4b731..0000000
--- a/app/views/features/_manage_enterprise_fields.rhtml
+++ /dev/null
@@ -1,54 +0,0 @@
-<%= __('Manage enterprise fields') %>
-
-<% labelled_form_for(:environment, @environment, :url => {:action => 'manage_enterprise_fields'}) do |f| %>
-
-
-
- <%= _('Field') %>
- <%= _('Active') %>
- <%= _('Required') %>
- <%= _('Display on registration?') %>
-
- <% @enterprise_fields.each do |field| %>
-
-
- <%= _(field.humanize) %>
-
- <%= hidden_field_tag "enterprise_fields[#{field}][active]", false %>
- <%= check_box_tag "enterprise_fields[#{field}][active]", true, environment.custom_enterprise_field(field, 'active'), :onclick => "$('enterprise_fields[#{field}][required]').disabled=$('enterprise_fields[#{field}][signup]').disabled=!this.checked;" %>
-
-
- <%= hidden_field_tag "enterprise_fields[#{field}][required]", false %>
- <%= check_box_tag "enterprise_fields[#{field}][required]", true, environment.custom_enterprise_field(field, 'required'), :onclick => "if(this.checked) $('enterprise_fields[#{field}][signup]').checked = true;" %>
-
-
- <%= hidden_field_tag "enterprise_fields[#{field}][signup]", false %>
- <%= check_box_tag "enterprise_fields[#{field}][signup]", true, environment.custom_enterprise_field(field, 'signup'), :onclick => "if(!this.checked) $('enterprise_fields[#{field}][required]').checked = false;" %>
-
-
-
- <% end %>
-
-
-
-
-
- <% button_bar do %>
- <%= submit_button('save', _('Save changes')) %>
- <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
- <% end %>
-
-
-<% end %>
-
-
-
-
diff --git a/app/views/features/_manage_person_fields.html.erb b/app/views/features/_manage_person_fields.html.erb
new file mode 100644
index 0000000..39f879b
--- /dev/null
+++ b/app/views/features/_manage_person_fields.html.erb
@@ -0,0 +1,53 @@
+<%= _('Manage person fields') %>
+
+<% labelled_form_for(:environment, @environment, :url => {:action => 'manage_person_fields'}) do |f| %>
+
+
+
+ <%= _('Field') %>
+ <%= _('Active') %>
+ <%= _('Required') %>
+ <%= _('Display on signup?') %>
+
+ <% @person_fields.each do |field| %>
+
+ <%= _(field.humanize) %>
+
+ <%= hidden_field_tag "person_fields[#{field}][active]", false %>
+ <%= check_box_tag "person_fields[#{field}][active]", true, environment.custom_person_field(field, 'active'), :onclick => "$('person_fields[#{field}][required]').disabled=$('person_fields[#{field}][signup]').disabled=!this.checked;" %>
+
+
+ <%= hidden_field_tag "person_fields[#{field}][required]", false %>
+ <%= check_box_tag "person_fields[#{field}][required]", true, environment.custom_person_field(field, 'required'), :onclick => "if(this.checked) $('person_fields[#{field}][signup]').checked = true;" %>
+
+
+ <%= hidden_field_tag "person_fields[#{field}][signup]", false %>
+ <%= check_box_tag "person_fields[#{field}][signup]", true, environment.custom_person_field(field, 'signup'), :onclick => "if(!this.checked) $('person_fields[#{field}][required]').checked = false;" %>
+
+
+ <% end %>
+
+
+
+
+
+ <% button_bar do %>
+ <%= submit_button('save', _('Save changes')) %>
+ <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
+ <% end %>
+
+
+<% end %>
+
+
+
+
diff --git a/app/views/features/_manage_person_fields.rhtml b/app/views/features/_manage_person_fields.rhtml
deleted file mode 100644
index 39f879b..0000000
--- a/app/views/features/_manage_person_fields.rhtml
+++ /dev/null
@@ -1,53 +0,0 @@
-<%= _('Manage person fields') %>
-
-<% labelled_form_for(:environment, @environment, :url => {:action => 'manage_person_fields'}) do |f| %>
-
-
-
- <%= _('Field') %>
- <%= _('Active') %>
- <%= _('Required') %>
- <%= _('Display on signup?') %>
-
- <% @person_fields.each do |field| %>
-
- <%= _(field.humanize) %>
-
- <%= hidden_field_tag "person_fields[#{field}][active]", false %>
- <%= check_box_tag "person_fields[#{field}][active]", true, environment.custom_person_field(field, 'active'), :onclick => "$('person_fields[#{field}][required]').disabled=$('person_fields[#{field}][signup]').disabled=!this.checked;" %>
-
-
- <%= hidden_field_tag "person_fields[#{field}][required]", false %>
- <%= check_box_tag "person_fields[#{field}][required]", true, environment.custom_person_field(field, 'required'), :onclick => "if(this.checked) $('person_fields[#{field}][signup]').checked = true;" %>
-
-
- <%= hidden_field_tag "person_fields[#{field}][signup]", false %>
- <%= check_box_tag "person_fields[#{field}][signup]", true, environment.custom_person_field(field, 'signup'), :onclick => "if(!this.checked) $('person_fields[#{field}][required]').checked = false;" %>
-
-
- <% end %>
-
-
-
-
-
- <% button_bar do %>
- <%= submit_button('save', _('Save changes')) %>
- <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
- <% end %>
-
-
-<% end %>
-
-
-
-
diff --git a/app/views/features/index.html.erb b/app/views/features/index.html.erb
new file mode 100644
index 0000000..796e632
--- /dev/null
+++ b/app/views/features/index.html.erb
@@ -0,0 +1,43 @@
+<%= _('System features') %>
+
+<%= _('Enable/Disable features') %>
+
+
+<%= _('Here you can enable or disable several features of your environment. Each feature represents some funcionality that your environment can use if you enable it.
+
+Check all the features you want to enable for your environment, uncheck all the ones you don\'t want, and use the "Save changes" button to confirm your changes.') %>
+
+
+<% labelled_form_for(:environment, @environment, :url => {:action => 'update'}) do |f| %>
+
+
+
+ <%= _('Feature') %>
+ <%= _('Enabled?') %>
+
+ <%= hidden_field_tag('environment[enabled_features][]', '') %>
+ <% @features.each do |feature, text| %>
+
+ <%= text %>
+ <%= check_box_tag "environment[enabled_features][]", feature, @environment.enabled?(feature) %>
+
+ <% end %>
+
+
+<%= _('Configure features') %>
+
+<%= _('Page to redirect after login') %>
+ <%= select 'environment', 'redirection_after_login', Environment.login_redirection_options.map{|key,value|[value,key]} %>
+
+<%= _('Organization Approval Method') %>
+ <%= select_organization_approval_method('environment', 'organization_approval_method') %>
+
+
+
+ <% button_bar do %>
+ <%= submit_button('save', _('Save changes')) %>
+ <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
+ <% end %>
+
+
+<% end %>
diff --git a/app/views/features/index.rhtml b/app/views/features/index.rhtml
deleted file mode 100644
index 796e632..0000000
--- a/app/views/features/index.rhtml
+++ /dev/null
@@ -1,43 +0,0 @@
-<%= _('System features') %>
-
-<%= _('Enable/Disable features') %>
-
-
-<%= _('Here you can enable or disable several features of your environment. Each feature represents some funcionality that your environment can use if you enable it.
-
-Check all the features you want to enable for your environment, uncheck all the ones you don\'t want, and use the "Save changes" button to confirm your changes.') %>
-
-
-<% labelled_form_for(:environment, @environment, :url => {:action => 'update'}) do |f| %>
-
-
-
- <%= _('Feature') %>
- <%= _('Enabled?') %>
-
- <%= hidden_field_tag('environment[enabled_features][]', '') %>
- <% @features.each do |feature, text| %>
-
- <%= text %>
- <%= check_box_tag "environment[enabled_features][]", feature, @environment.enabled?(feature) %>
-
- <% end %>
-
-
-<%= _('Configure features') %>
-
-<%= _('Page to redirect after login') %>
- <%= select 'environment', 'redirection_after_login', Environment.login_redirection_options.map{|key,value|[value,key]} %>
-
-<%= _('Organization Approval Method') %>
- <%= select_organization_approval_method('environment', 'organization_approval_method') %>
-
-
-
- <% button_bar do %>
- <%= submit_button('save', _('Save changes')) %>
- <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
- <% end %>
-
-
-<% end %>
diff --git a/app/views/features/manage_fields.html.erb b/app/views/features/manage_fields.html.erb
new file mode 100644
index 0000000..e6db213
--- /dev/null
+++ b/app/views/features/manage_fields.html.erb
@@ -0,0 +1,7 @@
+<%= render :partial => 'manage_person_fields' %>
+
+<% if !environment.enabled?('disable_asset_enterprises') %>
+ <%= render :partial => 'manage_enterprise_fields' %>
+<% end %>
+
+<%= render :partial => 'manage_community_fields' %>
diff --git a/app/views/features/manage_fields.rhtml b/app/views/features/manage_fields.rhtml
deleted file mode 100644
index e6db213..0000000
--- a/app/views/features/manage_fields.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= render :partial => 'manage_person_fields' %>
-
-<% if !environment.enabled?('disable_asset_enterprises') %>
- <%= render :partial => 'manage_enterprise_fields' %>
-<% end %>
-
-<%= render :partial => 'manage_community_fields' %>
diff --git a/app/views/friends/index.html.erb b/app/views/friends/index.html.erb
new file mode 100644
index 0000000..710cd30
--- /dev/null
+++ b/app/views/friends/index.html.erb
@@ -0,0 +1,55 @@
+
+
+
<%= __("%s's friends") % profile.name %>
+
+<% cache_timeout(profile.manage_friends_cache_key(params), 4.hours) do %>
+ <% if @friends.empty? %>
+
+
+ <%= __('You have no friends yet.') %>
+ <%= link_to _('Do you want to see other people in this environment?'), :controller => 'search', :action => 'assets', :asset => 'people' %>
+
+
+ <% else %>
+ <% 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) %>
+ <%= button(:search, _('Invite people from my e-mail contacts'), :controller => 'invite', :action => 'select_address_book') %>
+ <% end %>
+ <% end %>
+ <% end %>
+
+
+ <% @friends.each do |friend| %>
+
+ <%= link_to_profile profile_image(friend) + ' ' + friend.short_name,
+ friend.identifier, :class => 'profile-link' %>
+
+ <%= link_to content_tag('span',_('remove')),
+ { :action => 'remove', :id => friend.id },
+ :class => 'button icon-remove',
+ :title => _('remove') %>
+ <%= link_to content_tag('span',_('contact')),
+ friend.url.merge(:controller => 'contact', :action => 'new', :profile => friend.identifier),
+ :class => 'button icon-menu-mail',
+ :title => _('contact') %>
+
+
+ <% end %>
+
+
+
+ <% 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) %>
+ <%= button(:search, _('Invite people from my e-mail contacts'), :controller => 'invite', :action => 'select_address_book') %>
+ <% end %>
+ <% end %>
+<% end %>
+
+
+
diff --git a/app/views/friends/index.rhtml b/app/views/friends/index.rhtml
deleted file mode 100644
index 710cd30..0000000
--- a/app/views/friends/index.rhtml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
<%= __("%s's friends") % profile.name %>
-
-<% cache_timeout(profile.manage_friends_cache_key(params), 4.hours) do %>
- <% if @friends.empty? %>
-
-
- <%= __('You have no friends yet.') %>
- <%= link_to _('Do you want to see other people in this environment?'), :controller => 'search', :action => 'assets', :asset => 'people' %>
-
-
- <% else %>
- <% 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) %>
- <%= button(:search, _('Invite people from my e-mail contacts'), :controller => 'invite', :action => 'select_address_book') %>
- <% end %>
- <% end %>
- <% end %>
-
-
- <% @friends.each do |friend| %>
-
- <%= link_to_profile profile_image(friend) + ' ' + friend.short_name,
- friend.identifier, :class => 'profile-link' %>
-
- <%= link_to content_tag('span',_('remove')),
- { :action => 'remove', :id => friend.id },
- :class => 'button icon-remove',
- :title => _('remove') %>
- <%= link_to content_tag('span',_('contact')),
- friend.url.merge(:controller => 'contact', :action => 'new', :profile => friend.identifier),
- :class => 'button icon-menu-mail',
- :title => _('contact') %>
-
-
- <% end %>
-
-
-
- <% 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) %>
- <%= button(:search, _('Invite people from my e-mail contacts'), :controller => 'invite', :action => 'select_address_book') %>
- <% end %>
- <% end %>
-<% end %>
-
-
-
diff --git a/app/views/friends/remove.html.erb b/app/views/friends/remove.html.erb
new file mode 100644
index 0000000..7692da3
--- /dev/null
+++ b/app/views/friends/remove.html.erb
@@ -0,0 +1,24 @@
+
+
+
<%= __('Removing friend: %s') % @friend.name %>
+
+<%= profile_image @friend, :thumb, :class => 'friend_picture' %>
+
+
+<%= __('Are you sure you want to remove %s from your friends list?') % @friend.name %>
+
+
+
+
+<%= __('Note that %s will still have you as a friend, unless he/she also wants to remove you from his/her friend list.') % @friend.name %>
+
+
+
+<% form_tag do %>
+ <%= hidden_field_tag(:confirmation, 1) %>
+
+ <%= submit_button(:ok, __("Yes") % @friend.name) %>
+ <%= button(:cancel, _("No"), :action => 'index') %>
+<% end %>
+
+
diff --git a/app/views/friends/remove.rhtml b/app/views/friends/remove.rhtml
deleted file mode 100644
index 7692da3..0000000
--- a/app/views/friends/remove.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
<%= __('Removing friend: %s') % @friend.name %>
-
-<%= profile_image @friend, :thumb, :class => 'friend_picture' %>
-
-
-<%= __('Are you sure you want to remove %s from your friends list?') % @friend.name %>
-
-
-
-
-<%= __('Note that %s will still have you as a friend, unless he/she also wants to remove you from his/her friend list.') % @friend.name %>
-
-
-
-<% form_tag do %>
- <%= hidden_field_tag(:confirmation, 1) %>
-
- <%= submit_button(:ok, __("Yes") % @friend.name) %>
- <%= button(:cancel, _("No"), :action => 'index') %>
-<% end %>
-
-
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
new file mode 100644
index 0000000..748d226
--- /dev/null
+++ b/app/views/home/index.html.erb
@@ -0,0 +1,71 @@
+<% if @has_news %>
+ <%= _('News') %>
+ <% cache @news_cache_key do %>
+
+ <% @highlighted_news.each_with_index do |highlighted, index| %>
+
+
+
<%= link_to(h(highlighted.title), highlighted.url, :class => 'post-title') %>
+
<%= show_date(highlighted.published_at, true) %>
+
<%= highlighted.lead %>
+
+ <%= link_to(_('Read more'), highlighted.url) %>
+
+
+
+
+ <% end %>
+
+
+
+
+
+
+ <% @portal_news.each do |news| %>
+
+ <%= show_date(news.published_at, true) %>
+ <%= link_to(h(news.title), news.url, :class => 'post-title' ) %>
+
+ <% end %>
+
+
+
+
+
+ <% @area_news.each_with_index do |folder, i| %>
+ <% content_tag(:div, :class => ["news-area", ['even', 'odd'][i%2]].join(' ')) do %>
+ <% content_tag(:div, :class => 'news-area-inner-1') do %>
+ <% content_tag(:div, :class => 'news-area-inner-2') do %>
+ <%= link_to h(folder.title), folder.url %>
+
+ <% folder.news(environment.news_amount_by_folder).each do |news| %>
+ <%= link_to(h(news.title), news.url) %>
+ <% end%>
+
+ <%= link_to _('View more'), folder.url, :class => 'news-see-more' %>
+ <% end %>
+ <% end %>
+ <% end %>
+ <% end %>
+ <% end %>
+<% else %>
+ <%= environment.description %>
+<% end %>
+
+<% if environment.enabled?('search_in_home') %>
+
+ <% form_tag :controller => 'search', :action => 'index' do %>
+
+
+ <%= text_field_tag('query', '', :size => 50) %>
+ <%= submit_button(:search, _('Search')) %>
+
+
+
+ <%= lightbox_link_to _('More options'), :controller => 'search', :action => 'popup' %>
+
+ <% end %>
+
+<% end %>
+
+
diff --git a/app/views/home/index.rhtml b/app/views/home/index.rhtml
deleted file mode 100644
index 748d226..0000000
--- a/app/views/home/index.rhtml
+++ /dev/null
@@ -1,71 +0,0 @@
-<% if @has_news %>
- <%= _('News') %>
- <% cache @news_cache_key do %>
-
- <% @highlighted_news.each_with_index do |highlighted, index| %>
-
-
-
<%= link_to(h(highlighted.title), highlighted.url, :class => 'post-title') %>
-
<%= show_date(highlighted.published_at, true) %>
-
<%= highlighted.lead %>
-
- <%= link_to(_('Read more'), highlighted.url) %>
-
-
-
-
- <% end %>
-
-
-
-
-
-
- <% @portal_news.each do |news| %>
-
- <%= show_date(news.published_at, true) %>
- <%= link_to(h(news.title), news.url, :class => 'post-title' ) %>
-
- <% end %>
-
-
-
-
-
- <% @area_news.each_with_index do |folder, i| %>
- <% content_tag(:div, :class => ["news-area", ['even', 'odd'][i%2]].join(' ')) do %>
- <% content_tag(:div, :class => 'news-area-inner-1') do %>
- <% content_tag(:div, :class => 'news-area-inner-2') do %>
- <%= link_to h(folder.title), folder.url %>
-
- <% folder.news(environment.news_amount_by_folder).each do |news| %>
- <%= link_to(h(news.title), news.url) %>
- <% end%>
-
- <%= link_to _('View more'), folder.url, :class => 'news-see-more' %>
- <% end %>
- <% end %>
- <% end %>
- <% end %>
- <% end %>
-<% else %>
- <%= environment.description %>
-<% end %>
-
-<% if environment.enabled?('search_in_home') %>
-
- <% form_tag :controller => 'search', :action => 'index' do %>
-
-
- <%= text_field_tag('query', '', :size => 50) %>
- <%= submit_button(:search, _('Search')) %>
-
-
-
- <%= lightbox_link_to _('More options'), :controller => 'search', :action => 'popup' %>
-
- <% end %>
-
-<% end %>
-
-
diff --git a/app/views/home/terms.html.erb b/app/views/home/terms.html.erb
new file mode 100644
index 0000000..830f50b
--- /dev/null
+++ b/app/views/home/terms.html.erb
@@ -0,0 +1,2 @@
+<%= _('Terms of use - %s') % environment.name %>
+<%= environment.terms_of_use %>
diff --git a/app/views/home/terms.rhtml b/app/views/home/terms.rhtml
deleted file mode 100644
index 830f50b..0000000
--- a/app/views/home/terms.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= _('Terms of use - %s') % environment.name %>
-<%= environment.terms_of_use %>
diff --git a/app/views/invite/_contact_list.html.erb b/app/views/invite/_contact_list.html.erb
new file mode 100644
index 0000000..2f3ab6c
--- /dev/null
+++ b/app/views/invite/_contact_list.html.erb
@@ -0,0 +1,12 @@
+<% friend_pos = 0 %>
+<% contacts.each do |contact| %>
+ <% friend_pos += 1 %>
+
+ <%= check_box_tag("webmail_import_addresses[]", contact[2],
+ (!@webmail_import_addresses || @webmail_import_addresses.include?(contact[2])),
+ :id => "contacts_to_invite_#{friend_pos}",
+ :class => "contact_to_invite" )
+ %>
+ "><%= "#{contact[0]} (#{contact[1]})" %>
+
+<% end %>
diff --git a/app/views/invite/_contact_list.rhtml b/app/views/invite/_contact_list.rhtml
deleted file mode 100644
index 2f3ab6c..0000000
--- a/app/views/invite/_contact_list.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<% friend_pos = 0 %>
-<% contacts.each do |contact| %>
- <% friend_pos += 1 %>
-
- <%= check_box_tag("webmail_import_addresses[]", contact[2],
- (!@webmail_import_addresses || @webmail_import_addresses.include?(contact[2])),
- :id => "contacts_to_invite_#{friend_pos}",
- :class => "contact_to_invite" )
- %>
- "><%= "#{contact[0]} (#{contact[1]})" %>
-
-<% end %>
diff --git a/app/views/invite/_dialog_wait_loading.html.erb b/app/views/invite/_dialog_wait_loading.html.erb
new file mode 100644
index 0000000..360723c
--- /dev/null
+++ b/app/views/invite/_dialog_wait_loading.html.erb
@@ -0,0 +1,23 @@
+<% javascript_tag do %>
+ jQuery(function($) {
+ $("#loading-dialog").dialog({
+ height: 160,
+ width: 450,
+ modal: true,
+ resizable: false,
+ title: "<%= ui_icon('ui-icon-info') + _('Please, wait...') %>",
+ open: check_contact_list('<%= contact_list.to_s %>'),
+ });
+ });
+<% end %>
+
+
+
+
<%= _('Your e-mails contacts are being fetched') %>
+
<%= _('If it takes too long, you will be redirected to the previous page to try again. Be sure to fill in the fields with your correct login and password.') %>
+
+ <%= link_to(_('Verify contact list'), {:action => 'invitation_data', :contact_list => @contact_list}, :id => "verify-contact-list", :style => 'display:none') %>
+ <%= link_to(_('Add contact list'), {:action => 'add_contact_list', :contact_list => @contact_list}, :id => "add-contact-list", :style => 'display:none') %>
+ <%= link_to(_('Cancel fetching e-mails'), {:action => 'cancel_fetching_emails', :contact_list => @contact_list}, :id => "cancel-fetching-emails", :style => 'display:none') %>
+
+
diff --git a/app/views/invite/_dialog_wait_loading.rhtml b/app/views/invite/_dialog_wait_loading.rhtml
deleted file mode 100644
index 360723c..0000000
--- a/app/views/invite/_dialog_wait_loading.rhtml
+++ /dev/null
@@ -1,23 +0,0 @@
-<% javascript_tag do %>
- jQuery(function($) {
- $("#loading-dialog").dialog({
- height: 160,
- width: 450,
- modal: true,
- resizable: false,
- title: "<%= ui_icon('ui-icon-info') + _('Please, wait...') %>",
- open: check_contact_list('<%= contact_list.to_s %>'),
- });
- });
-<% end %>
-
-
-
-
<%= _('Your e-mails contacts are being fetched') %>
-
<%= _('If it takes too long, you will be redirected to the previous page to try again. Be sure to fill in the fields with your correct login and password.') %>
-
- <%= link_to(_('Verify contact list'), {:action => 'invitation_data', :contact_list => @contact_list}, :id => "verify-contact-list", :style => 'display:none') %>
- <%= link_to(_('Add contact list'), {:action => 'add_contact_list', :contact_list => @contact_list}, :id => "add-contact-list", :style => 'display:none') %>
- <%= link_to(_('Cancel fetching e-mails'), {:action => 'cancel_fetching_emails', :contact_list => @contact_list}, :id => "cancel-fetching-emails", :style => 'display:none') %>
-
-
diff --git a/app/views/invite/select_address_book.html.erb b/app/views/invite/select_address_book.html.erb
new file mode 100644
index 0000000..64b348c
--- /dev/null
+++ b/app/views/invite/select_address_book.html.erb
@@ -0,0 +1,51 @@
+<% if profile.person? %>
+ <%= _('Invite your friends') %>
+<% else %>
+ <%= _('Invite your friends to join %s') % profile.name %>
+<% end %>
+
+<%= _('Step 1 of 2: Select address book') %>
+
+<% form_tag do %>
+
+ <%= [
+ radio_button_tag(:import_from, "manual", @import_from == "manual", :onclick => 'hide_invite_friend_login_password()') + content_tag('label', _('Manually (empty field)'), :for => "import_from_manual"),
+ radio_button_tag(:import_from, "gmail", @import_from == "gmail", :onclick => 'show_invite_friend_login_password(this.value)') + content_tag('label', 'Gmail', :for => 'import_from_gmail'),
+ radio_button_tag(:import_from, "yahoo", @import_from == "yahoo", :onclick => 'show_invite_friend_login_password(this.value)') + content_tag('label', 'Yahoo', :for => "import_from_yahoo"),
+ radio_button_tag(:import_from, "hotmail", @import_from == "hotmail", :onclick => 'show_invite_friend_login_password(this.value)') + content_tag('label', 'Hotmail', :for => "import_from_hotmail")
+ ].join("\n \n") %>
+
+
+ >
+
+ <%= ui_icon('ui-icon-alert') %>
+ <%= _('Please type your username in the format yourname@example.com') %>
+
+
+ <%= labelled_form_field(_("Username") + ":", text_field_tag(:login, @login)) %>
+ <%= labelled_form_field(_("Password") + ":", password_field_tag(:password)) %>
+
+
+ <% button_bar do %>
+ <%= submit_button(:forward, _("Next")) %>
+ <% end %>
+ <%= _("We won't store your password or contact anyone without your permission.") %>
+<% end %>
+
+
+
+
+
diff --git a/app/views/invite/select_address_book.rhtml b/app/views/invite/select_address_book.rhtml
deleted file mode 100644
index 64b348c..0000000
--- a/app/views/invite/select_address_book.rhtml
+++ /dev/null
@@ -1,51 +0,0 @@
-<% if profile.person? %>
- <%= _('Invite your friends') %>
-<% else %>
- <%= _('Invite your friends to join %s') % profile.name %>
-<% end %>
-
-<%= _('Step 1 of 2: Select address book') %>
-
-<% form_tag do %>
-
- <%= [
- radio_button_tag(:import_from, "manual", @import_from == "manual", :onclick => 'hide_invite_friend_login_password()') + content_tag('label', _('Manually (empty field)'), :for => "import_from_manual"),
- radio_button_tag(:import_from, "gmail", @import_from == "gmail", :onclick => 'show_invite_friend_login_password(this.value)') + content_tag('label', 'Gmail', :for => 'import_from_gmail'),
- radio_button_tag(:import_from, "yahoo", @import_from == "yahoo", :onclick => 'show_invite_friend_login_password(this.value)') + content_tag('label', 'Yahoo', :for => "import_from_yahoo"),
- radio_button_tag(:import_from, "hotmail", @import_from == "hotmail", :onclick => 'show_invite_friend_login_password(this.value)') + content_tag('label', 'Hotmail', :for => "import_from_hotmail")
- ].join("\n \n") %>
-
-
- >
-
- <%= ui_icon('ui-icon-alert') %>
- <%= _('Please type your username in the format yourname@example.com') %>
-
-
- <%= labelled_form_field(_("Username") + ":", text_field_tag(:login, @login)) %>
- <%= labelled_form_field(_("Password") + ":", password_field_tag(:password)) %>
-
-
- <% button_bar do %>
- <%= submit_button(:forward, _("Next")) %>
- <% end %>
- <%= _("We won't store your password or contact anyone without your permission.") %>
-<% end %>
-
-
-
-
-
diff --git a/app/views/invite/select_friends.html.erb b/app/views/invite/select_friends.html.erb
new file mode 100644
index 0000000..721a377
--- /dev/null
+++ b/app/views/invite/select_friends.html.erb
@@ -0,0 +1,47 @@
+<%= render :partial => 'invite/dialog_wait_loading', :locals => {:contact_list => @contact_list.id } if @import_from != 'manual' %>
+
+<% if profile.person? %>
+ <%= _('Invite your friends') %>
+<% else %>
+ <%= _('Invite your friends to join %s') % profile.name %>
+<% end %>
+
+
+<%= _('Step 2 of 2: Selecting Friends') %>
+
+<%= button(:back, _('Back'), { :action => 'select_address_book' }, :id => 'invitation_back_button') %>
+
+
+<%= _('Indicate which friends you want to invite.') %>
+
+
+<% form_tag do %>
+ <%= hidden_field_tag(:import_from, @import_from) %>
+ <%= hidden_field_tag(:contact_list, @contact_list.id) %>
+
+
+ <%= labelled_form_field(_('Enter one e-mail address per line:'), text_area_tag(:manual_import_addresses, (@manual_import_addresses || ''), :rows => 5, :style => 'width: 98%;')) %>
+
+ <% if @import_from != 'manual' %>
+
+ <%= link_to_function _('Check all'), "$$('input.contact_to_invite').each(function(checkbox) { checkbox.checked = true; });" %>
+ <%= link_to_function _('Uncheck all'), "$$('input.contact_to_invite').each(function(checkbox) { checkbox.checked = false; });" %>
+
+
+ <% end -%>
+
+
+
+ <%= link_to_function(_('Personalize invitation mail'), nil) do |page|
+ page['invitation-mail_template'].show
+ end %>
+
+
+ <%= h _("Now enter an invitation message. You must keep the code in your invitation text. When your friends receive the invitation e-mail, will be replaced by a link that they need to click to activate their account. and codes will be replaced by your name and friend name, but they are optional.") %>
+ <%= labelled_form_field(_('Invitation text:'), text_area_tag(:mail_template, @mail_template, :cols => 72, :rows => 8)) %>
+
+
+ <% button_bar do %>
+ <%= submit_button(:ok, _("Invite my friends!")) %>
+ <% end %>
+<% end %>
diff --git a/app/views/invite/select_friends.rhtml b/app/views/invite/select_friends.rhtml
deleted file mode 100644
index 721a377..0000000
--- a/app/views/invite/select_friends.rhtml
+++ /dev/null
@@ -1,47 +0,0 @@
-<%= render :partial => 'invite/dialog_wait_loading', :locals => {:contact_list => @contact_list.id } if @import_from != 'manual' %>
-
-<% if profile.person? %>
- <%= _('Invite your friends') %>
-<% else %>
- <%= _('Invite your friends to join %s') % profile.name %>
-<% end %>
-
-
-<%= _('Step 2 of 2: Selecting Friends') %>
-
-<%= button(:back, _('Back'), { :action => 'select_address_book' }, :id => 'invitation_back_button') %>
-
-
-<%= _('Indicate which friends you want to invite.') %>
-
-
-<% form_tag do %>
- <%= hidden_field_tag(:import_from, @import_from) %>
- <%= hidden_field_tag(:contact_list, @contact_list.id) %>
-
-
- <%= labelled_form_field(_('Enter one e-mail address per line:'), text_area_tag(:manual_import_addresses, (@manual_import_addresses || ''), :rows => 5, :style => 'width: 98%;')) %>
-
- <% if @import_from != 'manual' %>
-
- <%= link_to_function _('Check all'), "$$('input.contact_to_invite').each(function(checkbox) { checkbox.checked = true; });" %>
- <%= link_to_function _('Uncheck all'), "$$('input.contact_to_invite').each(function(checkbox) { checkbox.checked = false; });" %>
-
-
- <% end -%>
-
-
-
- <%= link_to_function(_('Personalize invitation mail'), nil) do |page|
- page['invitation-mail_template'].show
- end %>
-
-
- <%= h _("Now enter an invitation message. You must keep the code in your invitation text. When your friends receive the invitation e-mail, will be replaced by a link that they need to click to activate their account. and codes will be replaced by your name and friend name, but they are optional.") %>
- <%= labelled_form_field(_('Invitation text:'), text_area_tag(:mail_template, @mail_template, :cols => 72, :rows => 8)) %>
-
-
- <% button_bar do %>
- <%= submit_button(:ok, _("Invite my friends!")) %>
- <% end %>
-<% end %>
diff --git a/app/views/layouts/_javascript.html.erb b/app/views/layouts/_javascript.html.erb
new file mode 100644
index 0000000..1c9e5dd
--- /dev/null
+++ b/app/views/layouts/_javascript.html.erb
@@ -0,0 +1,13 @@
+<%= javascript_include_tag :defaults, 'jquery-latest.js',
+'jquery.noconflict.js', 'jquery.cycle.all.min.js', 'thickbox.js', 'lightbox', 'colorbox',
+'jquery-ui-1.8.2.custom.min', 'jquery.scrollTo', 'jquery.form.js', 'jquery-validation/jquery.validate',
+'jquery.cookie', 'jquery.ba-bbq.min.js', 'reflection', 'jquery.tokeninput',
+'add-and-join', 'report-abuse', 'catalog', 'manage-products',
+'jquery-ui-timepicker-addon', :cache => 'cache-general' %>
+
+<% language = FastGettext.locale %>
+<% %w{messages methods}.each do |type| %>
+ <% require_path = File.join('jquery-validation', 'localization', type+'_'+language) %>
+ <% full_path = File.join(Rails.root, 'public', 'javascripts', require_path+'.js')%>
+ <%= javascript_include_tag require_path if File.exists?(full_path) %>
+<% end %>
diff --git a/app/views/layouts/_javascript.rhtml b/app/views/layouts/_javascript.rhtml
deleted file mode 100644
index 1c9e5dd..0000000
--- a/app/views/layouts/_javascript.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<%= javascript_include_tag :defaults, 'jquery-latest.js',
-'jquery.noconflict.js', 'jquery.cycle.all.min.js', 'thickbox.js', 'lightbox', 'colorbox',
-'jquery-ui-1.8.2.custom.min', 'jquery.scrollTo', 'jquery.form.js', 'jquery-validation/jquery.validate',
-'jquery.cookie', 'jquery.ba-bbq.min.js', 'reflection', 'jquery.tokeninput',
-'add-and-join', 'report-abuse', 'catalog', 'manage-products',
-'jquery-ui-timepicker-addon', :cache => 'cache-general' %>
-
-<% language = FastGettext.locale %>
-<% %w{messages methods}.each do |type| %>
- <% require_path = File.join('jquery-validation', 'localization', type+'_'+language) %>
- <% full_path = File.join(Rails.root, 'public', 'javascripts', require_path+'.js')%>
- <%= javascript_include_tag require_path if File.exists?(full_path) %>
-<% end %>
diff --git a/app/views/layouts/application-ng.html.erb b/app/views/layouts/application-ng.html.erb
new file mode 100644
index 0000000..480e3f9
--- /dev/null
+++ b/app/views/layouts/application-ng.html.erb
@@ -0,0 +1,103 @@
+
+
+
+ <%= h page_title %>
+ <%= yield(:feeds) %>
+
+
+
+
+ <%= noosfero_javascript %>
+ <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
+ <%= stylesheet_link_tag template_stylesheet_path %>
+ <%= stylesheet_link_tag icon_theme_stylesheet_path %>
+ <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
+ <%
+ plugins_stylesheets = @plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') }
+ %>
+ <%= stylesheet_link_tag(plugins_stylesheets, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_stylesheets.to_s)) unless plugins_stylesheets.empty? %>
+ <%= stylesheet_link_tag theme_stylesheet_path %>
+
+ <%# Add custom tags/styles/etc via content_for %>
+ <%= yield :head %>
+ <%= javascript_tag('render_all_jquery_ui_widgets()') %>
+ <%
+ plugins_javascripts = @plugins.map { |plugin| plugin.js_files.map { |js| plugin.class.public_path(js) } }.flatten
+ %>
+ <%= javascript_include_tag(plugins_javascripts, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_javascripts.to_s)) unless plugins_javascripts.empty? %>
+ <%=
+ @plugins.dispatch(:head_ending).collect do |content|
+ content.respond_to?(:call) ? content.call : content
+ end.join("\n")
+ %>
+
+ " >
+
+ <%= _("Go to the content") %>
+ <%=
+ @plugins.dispatch(:body_beginning).collect do |content|
+ content.respond_to?(:call) ? content.call : content
+ end.join("\n")
+ %>
+
+
+
+
+
+
+ <%= usermenu_logged_in %>
+
+
+
+ <%= _("%s ") % thickbox_inline_popup_link('' + _('Login') + ' ', login_url, 'inlineLoginBox', :id => 'link_login') %>
+ <%= @plugins.dispatch(:alternative_authentication_link).collect { |content| instance_eval(&content) }.join("") %>
+
+
+ <%= render :file => 'account/login', :locals => { :is_thickbox => true } %>
+
+
+ <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
+ <%= _("or %s ") % link_to('' + _('Sign up') + ' ', :controller => 'account', :action => 'signup')%>
+ <% end %>
+
+
+
+
+
+
+ <%= theme_site_title %>
+
+
+
+ <%= theme_extra_navigation %>
+
+
+
+
+
+ <%= insert_boxes(yield) %>
+
+
+
+
+
+ <%= render_environment_features(:logged_in) %>
+
+ <%= noosfero_layout_features %>
+ <%= theme_javascript_ng %>
+
+
diff --git a/app/views/layouts/application-ng.rhtml b/app/views/layouts/application-ng.rhtml
deleted file mode 100644
index 480e3f9..0000000
--- a/app/views/layouts/application-ng.rhtml
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
- <%= h page_title %>
- <%= yield(:feeds) %>
-
-
-
-
- <%= noosfero_javascript %>
- <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
- <%= stylesheet_link_tag template_stylesheet_path %>
- <%= stylesheet_link_tag icon_theme_stylesheet_path %>
- <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
- <%
- plugins_stylesheets = @plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') }
- %>
- <%= stylesheet_link_tag(plugins_stylesheets, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_stylesheets.to_s)) unless plugins_stylesheets.empty? %>
- <%= stylesheet_link_tag theme_stylesheet_path %>
-
- <%# Add custom tags/styles/etc via content_for %>
- <%= yield :head %>
- <%= javascript_tag('render_all_jquery_ui_widgets()') %>
- <%
- plugins_javascripts = @plugins.map { |plugin| plugin.js_files.map { |js| plugin.class.public_path(js) } }.flatten
- %>
- <%= javascript_include_tag(plugins_javascripts, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_javascripts.to_s)) unless plugins_javascripts.empty? %>
- <%=
- @plugins.dispatch(:head_ending).collect do |content|
- content.respond_to?(:call) ? content.call : content
- end.join("\n")
- %>
-
- " >
-
- <%= _("Go to the content") %>
- <%=
- @plugins.dispatch(:body_beginning).collect do |content|
- content.respond_to?(:call) ? content.call : content
- end.join("\n")
- %>
-
-
-
-
-
-
- <%= usermenu_logged_in %>
-
-
-
- <%= _("%s ") % thickbox_inline_popup_link('' + _('Login') + ' ', login_url, 'inlineLoginBox', :id => 'link_login') %>
- <%= @plugins.dispatch(:alternative_authentication_link).collect { |content| instance_eval(&content) }.join("") %>
-
-
- <%= render :file => 'account/login', :locals => { :is_thickbox => true } %>
-
-
- <% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
- <%= _("or %s ") % link_to('' + _('Sign up') + ' ', :controller => 'account', :action => 'signup')%>
- <% end %>
-
-
-
-
-
-
- <%= theme_site_title %>
-
-
-
- <%= theme_extra_navigation %>
-
-
-
-
-
- <%= insert_boxes(yield) %>
-
-
-
-
-
- <%= render_environment_features(:logged_in) %>
-
- <%= noosfero_layout_features %>
- <%= theme_javascript_ng %>
-
-
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
new file mode 100644
index 0000000..29f69d6
--- /dev/null
+++ b/app/views/layouts/application.html.erb
@@ -0,0 +1,122 @@
+
+
+
+ <%= h page_title %>
+
+
+
+
+ <%= yield(:feeds) %>
+
+ <%= noosfero_javascript %>
+ <%= theme_javascript %>
+
+ <%=
+ # Load the principal css files:
+ stylesheet_link_tag(noosfero_stylesheets, :cache => 'cache') +
+ stylesheet_import( %w( common help menu article button search blocks forms login-box ),
+ :themed_source => true ) + "\n" +
+ import_blocks_stylesheets(:themed_source => true) + "\n" +
+ # Load the controller's css file if it exists:
+ import_controller_stylesheets(:themed_source => true)
+ %>
+ <%= stylesheet_link_tag template_stylesheet_path %>
+ <%= stylesheet_link_tag icon_theme_stylesheet_path %>
+ <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
+
+ <%# Add custom tags/styles/etc via content_for %>
+ <%= yield :head %>
+ <%= javascript_tag('render_all_jquery_ui_widgets()') %>
+
+ <%= render :partial => 'shared/numbers_only_javascript' %>
+
+
+
+
+
+
+
+
+
+
+
+
+
BETA
+
+
+
+
+ <%= link_to ""+ @environment.name() +" ",
+ @environment.top_url,
+ :id=>"menu_link_to_envhome",
+ :title=>@environment.name %>
+ <% unless environment.enabled?(:disable_categories) %>
+ <% cache(environment.id.to_s + '_categories_menu') do %>
+ <%= render :file => 'shared/categories_menu' %>
+ <% end %>
+ <% end %>
+ <%= render :file => 'shared/assets_menu' %>
+
+
+
+ <%= language_chooser(environment, :element => 'dropdown') %>
+
+
+
+ <%= render :file => 'shared/user_menu' %>
+
+
+
<%= _('Manual') %>
+
+
+
+
+
+
+
+
+ <%= insert_boxes(yield) %>
+
+
+
+
+
+
+
+
+
+
+
+ <%# if you need to add HTML stuff to the layout, include it in
+ app/views/shared/noosfero_layout_features.rhtml! %>
+ <%= noosfero_layout_features %>
+
+
diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml
deleted file mode 100644
index 29f69d6..0000000
--- a/app/views/layouts/application.rhtml
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
- <%= h page_title %>
-
-
-
-
- <%= yield(:feeds) %>
-
- <%= noosfero_javascript %>
- <%= theme_javascript %>
-
- <%=
- # Load the principal css files:
- stylesheet_link_tag(noosfero_stylesheets, :cache => 'cache') +
- stylesheet_import( %w( common help menu article button search blocks forms login-box ),
- :themed_source => true ) + "\n" +
- import_blocks_stylesheets(:themed_source => true) + "\n" +
- # Load the controller's css file if it exists:
- import_controller_stylesheets(:themed_source => true)
- %>
- <%= stylesheet_link_tag template_stylesheet_path %>
- <%= stylesheet_link_tag icon_theme_stylesheet_path %>
- <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
-
- <%# Add custom tags/styles/etc via content_for %>
- <%= yield :head %>
- <%= javascript_tag('render_all_jquery_ui_widgets()') %>
-
- <%= render :partial => 'shared/numbers_only_javascript' %>
-
-
-
-
-
-
-
-
-
-
-
-
-
BETA
-
-
-
-
- <%= link_to ""+ @environment.name() +" ",
- @environment.top_url,
- :id=>"menu_link_to_envhome",
- :title=>@environment.name %>
- <% unless environment.enabled?(:disable_categories) %>
- <% cache(environment.id.to_s + '_categories_menu') do %>
- <%= render :file => 'shared/categories_menu' %>
- <% end %>
- <% end %>
- <%= render :file => 'shared/assets_menu' %>
-
-
-
- <%= language_chooser(environment, :element => 'dropdown') %>
-
-
-
- <%= render :file => 'shared/user_menu' %>
-
-
-
<%= _('Manual') %>
-
-
-
-
-
-
-
-
- <%= insert_boxes(yield) %>
-
-
-
-
-
-
-
-
-
-
-
- <%# if you need to add HTML stuff to the layout, include it in
- app/views/shared/noosfero_layout_features.rhtml! %>
- <%= noosfero_layout_features %>
-
-
diff --git a/app/views/layouts/block.html.erb b/app/views/layouts/block.html.erb
new file mode 100644
index 0000000..8988291
--- /dev/null
+++ b/app/views/layouts/block.html.erb
@@ -0,0 +1,26 @@
+
+
+
+ noosfero block
+
+ <%= stylesheet_link_tag 'common' %>
+ <%= stylesheet_link_tag 'button' %>
+ <%= stylesheet_link_tag 'search' %>
+ <%= stylesheet_link_tag 'block' %>
+
+
+ <%# FIXME %>
+ <%= stylesheet_link_tag '/designs/templates/default/stylesheets/style.css' %>
+
+ <%= icon_theme_stylesheet_tag %>
+
+ <%= javascript_include_tag(:defaults) %>
+
+
+
+
+
+ <%= yield %>
+
+
+
diff --git a/app/views/layouts/block.rhtml b/app/views/layouts/block.rhtml
deleted file mode 100644
index 8988291..0000000
--- a/app/views/layouts/block.rhtml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- noosfero block
-
- <%= stylesheet_link_tag 'common' %>
- <%= stylesheet_link_tag 'button' %>
- <%= stylesheet_link_tag 'search' %>
- <%= stylesheet_link_tag 'block' %>
-
-
- <%# FIXME %>
- <%= stylesheet_link_tag '/designs/templates/default/stylesheets/style.css' %>
-
- <%= icon_theme_stylesheet_tag %>
-
- <%= javascript_include_tag(:defaults) %>
-
-
-
-
-
- <%= yield %>
-
-
-
diff --git a/app/views/layouts/chat.html.erb b/app/views/layouts/chat.html.erb
new file mode 100644
index 0000000..9f32d8d
--- /dev/null
+++ b/app/views/layouts/chat.html.erb
@@ -0,0 +1,64 @@
+
+
+
+ <%= h page_title %>
+
+
+
+ <%= noosfero_javascript %>
+ <%= javascript_include_tag 'prototype', 'jquery.scrollabletab', 'strophejs-1.0.1/strophe', 'jquery.emoticon', '/designs/icons/pidgin/emoticons.js', 'ba-linkify', 'jquery.ba-hashchange', 'jquery.sound', 'chat', :cache => 'cache-chat' %>
+ <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
+ <%= stylesheet_link_tag icon_theme_stylesheet_path %>
+ <%= stylesheet_link_tag theme_stylesheet_path %>
+ <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
+
+
+
+
+
<%= _("%s - Friends online (%d )") % [h(page_title), 0] %>
+
+
+
+ <%= image_tag "#{theme_path}/images/thin-logo.png", :title => environment.name, :alt => environment.name %>
+
+
+
+
+
+ <%= yield %>
+
+
diff --git a/app/views/layouts/chat.rhtml b/app/views/layouts/chat.rhtml
deleted file mode 100644
index 9f32d8d..0000000
--- a/app/views/layouts/chat.rhtml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
- <%= h page_title %>
-
-
-
- <%= noosfero_javascript %>
- <%= javascript_include_tag 'prototype', 'jquery.scrollabletab', 'strophejs-1.0.1/strophe', 'jquery.emoticon', '/designs/icons/pidgin/emoticons.js', 'ba-linkify', 'jquery.ba-hashchange', 'jquery.sound', 'chat', :cache => 'cache-chat' %>
- <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
- <%= stylesheet_link_tag icon_theme_stylesheet_path %>
- <%= stylesheet_link_tag theme_stylesheet_path %>
- <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
-
-
-
-
-
<%= _("%s - Friends online (%d )") % [h(page_title), 0] %>
-
-
-
- <%= image_tag "#{theme_path}/images/thin-logo.png", :title => environment.name, :alt => environment.name %>
-
-
-
-
-
- <%= yield %>
-
-
diff --git a/app/views/layouts/slideshow.html.erb b/app/views/layouts/slideshow.html.erb
new file mode 100644
index 0000000..05873ca
--- /dev/null
+++ b/app/views/layouts/slideshow.html.erb
@@ -0,0 +1,33 @@
+
+
+
+
+ <%=
+ (@page ? @page.name + ' - ' : '') +
+ (@profile ? @profile.name + ' - ' : '') +
+ @environment.name +
+ (@category ? "→ #{@category.full_name}" : '')
+ %>
+
+ <%= stylesheet_import "slideshow" %>
+ <%= javascript_include_tag 'jquery-latest', 'sliderjs', 'pikachoose', :cache => 'cache-slideshow' %>
+
+
+
+ <%= yield %>
+
+
diff --git a/app/views/layouts/slideshow.rhtml b/app/views/layouts/slideshow.rhtml
deleted file mode 100644
index 05873ca..0000000
--- a/app/views/layouts/slideshow.rhtml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
- <%=
- (@page ? @page.name + ' - ' : '') +
- (@profile ? @profile.name + ' - ' : '') +
- @environment.name +
- (@category ? "→ #{@category.full_name}" : '')
- %>
-
- <%= stylesheet_import "slideshow" %>
- <%= javascript_include_tag 'jquery-latest', 'sliderjs', 'pikachoose', :cache => 'cache-slideshow' %>
-
-
-
- <%= yield %>
-
-
diff --git a/app/views/mailconf/index.html.erb b/app/views/mailconf/index.html.erb
new file mode 100644
index 0000000..96b1fd9
--- /dev/null
+++ b/app/views/mailconf/index.html.erb
@@ -0,0 +1,43 @@
+<%= _('e-Mail configuration') %>
+
+<%= error_messages_for :task %>
+
+<% if profile.user.email_activation_pending? %>
+
+ <%= _('You already request activation of your mailbox. Please wait until an administrator approves your request.') %>
+
+ <% button_bar do %>
+ <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
+ <% end %>
+
+<% else %>
+
+
+ <% if profile.user.enable_email %>
+ <%= ('E-mail address') %>
+
+ <%= profile.email_addresses.map{|i| content_tag('li', i)}.join("\n") %>
+
+ <%= _('Configuration') %>
+
+
+ <%= 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 :back, _('Back to control panel'), :controller => 'profile_editor' %>
+ <% end %>
+
+ <% else %>
+
+ <%= _("Enable e-Mail account below:") %>
+ <%= profile.email_addresses.map{|i| content_tag('li', i)}.join("\n") %>
+ <%= _("You'll be able to access a webmail from your user menu.") %>
+ <% button_bar do %>
+ <%= button(:ok, _('Enable e-Mail'), { :action => 'enable' }, :method => 'post') %>
+ <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
+ <% end %>
+
+ <% end %>
+
+<% end %>
diff --git a/app/views/mailconf/index.rhtml b/app/views/mailconf/index.rhtml
deleted file mode 100644
index 96b1fd9..0000000
--- a/app/views/mailconf/index.rhtml
+++ /dev/null
@@ -1,43 +0,0 @@
-<%= _('e-Mail configuration') %>
-
-<%= error_messages_for :task %>
-
-<% if profile.user.email_activation_pending? %>
-
- <%= _('You already request activation of your mailbox. Please wait until an administrator approves your request.') %>
-
- <% button_bar do %>
- <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
- <% end %>
-
-<% else %>
-
-
- <% if profile.user.enable_email %>
- <%= ('E-mail address') %>
-
- <%= profile.email_addresses.map{|i| content_tag('li', i)}.join("\n") %>
-
- <%= _('Configuration') %>
-
-
- <%= 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 :back, _('Back to control panel'), :controller => 'profile_editor' %>
- <% end %>
-
- <% else %>
-
- <%= _("Enable e-Mail account below:") %>
- <%= profile.email_addresses.map{|i| content_tag('li', i)}.join("\n") %>
- <%= _("You'll be able to access a webmail from your user menu.") %>
- <% button_bar do %>
- <%= button(:ok, _('Enable e-Mail'), { :action => 'enable' }, :method => 'post') %>
- <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %>
- <% end %>
-
- <% end %>
-
-<% end %>
diff --git a/app/views/mailing/sender/mail.html.erb b/app/views/mailing/sender/mail.html.erb
new file mode 100644
index 0000000..dc92944
--- /dev/null
+++ b/app/views/mailing/sender/mail.html.erb
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ <%= word_wrap(@message) %>
+
+ --
+ <%= @signature_message %>
+ <%= @url %>
+
+
+
+
+
+
diff --git a/app/views/mailing/sender/mail.rhtml b/app/views/mailing/sender/mail.rhtml
deleted file mode 100644
index dc92944..0000000
--- a/app/views/mailing/sender/mail.rhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- <%= word_wrap(@message) %>
-
- --
- <%= @signature_message %>
- <%= @url %>
-
-
-
-
-
-
diff --git a/app/views/manage_products/_add_input.html.erb b/app/views/manage_products/_add_input.html.erb
new file mode 100644
index 0000000..cce9cfd
--- /dev/null
+++ b/app/views/manage_products/_add_input.html.erb
@@ -0,0 +1,25 @@
+
+
+<% form_for(@input,
+ :url => {:action => 'add_input', :id => @product},
+ :html => {:method => 'post', :id => 'input-category-form'}
+ ) do |f| %>
+
+ <%= _('Choose an input or raw material to this product:') %>
+
+ <%= categories_container(select_for_new_category(@categories, @level)) %>
+
+
+
+ <%= submit_button(:save, _('Save and continue'), :id => 'save_and_continue') %>
+
+ <%= ui_icon('ui-icon-alert') %>
+ <%= _('This category does not allow registration of products, select a more specific category') %>
+
+
+ <%= button :cancel, _('Cancel'), '#', :class => 'cancel-add-input' %>
+
+
+<% end %>
+
+<%= javascript_tag "add_input_stuff()" %>
diff --git a/app/views/manage_products/_add_input.rhtml b/app/views/manage_products/_add_input.rhtml
deleted file mode 100644
index cce9cfd..0000000
--- a/app/views/manage_products/_add_input.rhtml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-<% form_for(@input,
- :url => {:action => 'add_input', :id => @product},
- :html => {:method => 'post', :id => 'input-category-form'}
- ) do |f| %>
-
- <%= _('Choose an input or raw material to this product:') %>
-
- <%= categories_container(select_for_new_category(@categories, @level)) %>
-
-
-
- <%= submit_button(:save, _('Save and continue'), :id => 'save_and_continue') %>
-
- <%= ui_icon('ui-icon-alert') %>
- <%= _('This category does not allow registration of products, select a more specific category') %>
-
-
- <%= button :cancel, _('Cancel'), '#', :class => 'cancel-add-input' %>
-
-
-<% end %>
-
-<%= javascript_tag "add_input_stuff()" %>
diff --git a/app/views/manage_products/_categories_for_selection.html.erb b/app/views/manage_products/_categories_for_selection.html.erb
new file mode 100644
index 0000000..cb62882
--- /dev/null
+++ b/app/views/manage_products/_categories_for_selection.html.erb
@@ -0,0 +1,8 @@
+<%= select_for_categories(categories, level) %>
+
+<% javascript_tag do %>
+ jQuery('#categories_container_wrapper').scrollTo('100%', 1000)
+ $('selected_category_id').value = <%= @category && @category.id %>
+ $('hierarchy_navigation').update('<%= escape_javascript(hierarchy_category_navigation(@category, :make_links => true)) %>')
+ toggleDisabled(<%= @category && @category.accept_products? ? 'true' : 'false' %>, $('save_and_continue'))
+<% end %>
diff --git a/app/views/manage_products/_categories_for_selection.rhtml b/app/views/manage_products/_categories_for_selection.rhtml
deleted file mode 100644
index cb62882..0000000
--- a/app/views/manage_products/_categories_for_selection.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-<%= select_for_categories(categories, level) %>
-
-<% javascript_tag do %>
- jQuery('#categories_container_wrapper').scrollTo('100%', 1000)
- $('selected_category_id').value = <%= @category && @category.id %>
- $('hierarchy_navigation').update('<%= escape_javascript(hierarchy_category_navigation(@category, :make_links => true)) %>')
- toggleDisabled(<%= @category && @category.accept_products? ? 'true' : 'false' %>, $('save_and_continue'))
-<% end %>
diff --git a/app/views/manage_products/_certifiers_for_selection.html.erb b/app/views/manage_products/_certifiers_for_selection.html.erb
new file mode 100644
index 0000000..07ae53a
--- /dev/null
+++ b/app/views/manage_products/_certifiers_for_selection.html.erb
@@ -0,0 +1,4 @@
+<%= select_certifiers(@qualifier) + remove_qualifier_button %>
+<% javascript_tag do %>
+ jQuery('#product-qualifiers-list *').removeClass('small-loading')
+<% end %>
diff --git a/app/views/manage_products/_certifiers_for_selection.rhtml b/app/views/manage_products/_certifiers_for_selection.rhtml
deleted file mode 100644
index 07ae53a..0000000
--- a/app/views/manage_products/_certifiers_for_selection.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<%= select_certifiers(@qualifier) + remove_qualifier_button %>
-<% javascript_tag do %>
- jQuery('#product-qualifiers-list *').removeClass('small-loading')
-<% end %>
diff --git a/app/views/manage_products/_display_category.html.erb b/app/views/manage_products/_display_category.html.erb
new file mode 100644
index 0000000..3662191
--- /dev/null
+++ b/app/views/manage_products/_display_category.html.erb
@@ -0,0 +1,4 @@
+
+
+ <%= edit_link( _('Change category'), { :action => 'edit_category', :id => @product.id}, :id => 'link-edit-product-category') %>
+
diff --git a/app/views/manage_products/_display_category.rhtml b/app/views/manage_products/_display_category.rhtml
deleted file mode 100644
index 3662191..0000000
--- a/app/views/manage_products/_display_category.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- <%= edit_link( _('Change category'), { :action => 'edit_category', :id => @product.id}, :id => 'link-edit-product-category') %>
-
diff --git a/app/views/manage_products/_display_description.html.erb b/app/views/manage_products/_display_description.html.erb
new file mode 100644
index 0000000..45d6f7a
--- /dev/null
+++ b/app/views/manage_products/_display_description.html.erb
@@ -0,0 +1,15 @@
+<%= render :file => 'shared/tiny_mce', :locals => {:mode => 'simple'} %>
+<% if !@product.description.blank? %>
+ <%= @product.description %>
+ <%= edit_product_button_to_remote(@product, 'description', _('Edit description'), :title => _('Edit the description of your product and give consumers more information about what you are advertising')) %>
+<% else %>
+ <%= edit_product_ui_button_to_remote(
+ @product,
+ 'description',
+ _('Add some description to your product'),
+ 'data-primary-icon' => 'ui-icon-pencil',
+ 'data-secondary-icon' => 'ui-icon-triangle-1-s',
+ :title => _('Add a description to your product and give consumers more information about what you are advertising')
+ ) %>
+ <%= javascript_tag("render_jquery_ui_buttons('edit-product-remote-button-ui-description')") %>
+<% end%>
diff --git a/app/views/manage_products/_display_description.rhtml b/app/views/manage_products/_display_description.rhtml
deleted file mode 100644
index 45d6f7a..0000000
--- a/app/views/manage_products/_display_description.rhtml
+++ /dev/null
@@ -1,15 +0,0 @@
-<%= render :file => 'shared/tiny_mce', :locals => {:mode => 'simple'} %>
-<% if !@product.description.blank? %>
- <%= @product.description %>
- <%= edit_product_button_to_remote(@product, 'description', _('Edit description'), :title => _('Edit the description of your product and give consumers more information about what you are advertising')) %>
-<% else %>
- <%= edit_product_ui_button_to_remote(
- @product,
- 'description',
- _('Add some description to your product'),
- 'data-primary-icon' => 'ui-icon-pencil',
- 'data-secondary-icon' => 'ui-icon-triangle-1-s',
- :title => _('Add a description to your product and give consumers more information about what you are advertising')
- ) %>
- <%= javascript_tag("render_jquery_ui_buttons('edit-product-remote-button-ui-description')") %>
-<% end%>
diff --git a/app/views/manage_products/_display_image.html.erb b/app/views/manage_products/_display_image.html.erb
new file mode 100644
index 0000000..e8e44fb
--- /dev/null
+++ b/app/views/manage_products/_display_image.html.erb
@@ -0,0 +1,11 @@
+
+ <%= image_tag (@product.reload.default_image('big')), :class => 'product-pic' %>
+
+
+<% if @product.image %>
+ <%= link_to content_tag(:span, _('Zoom in')), @product.image.public_filename,
+ :class => 'zoomify-image' %>
+<% end %>
+<%= add_zoom_to_images %>
+
+<%= edit_product_link_to_remote(@product, 'image', _('Change image')) %>
diff --git a/app/views/manage_products/_display_image.rhtml b/app/views/manage_products/_display_image.rhtml
deleted file mode 100644
index e8e44fb..0000000
--- a/app/views/manage_products/_display_image.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-
- <%= image_tag (@product.reload.default_image('big')), :class => 'product-pic' %>
-
-
-<% if @product.image %>
- <%= link_to content_tag(:span, _('Zoom in')), @product.image.public_filename,
- :class => 'zoomify-image' %>
-<% end %>
-<%= add_zoom_to_images %>
-
-<%= edit_product_link_to_remote(@product, 'image', _('Change image')) %>
diff --git a/app/views/manage_products/_display_info.html.erb b/app/views/manage_products/_display_info.html.erb
new file mode 100644
index 0000000..d7adc96
--- /dev/null
+++ b/app/views/manage_products/_display_info.html.erb
@@ -0,0 +1,17 @@
+
+ <%= display_value(@product) %>
+ <%= display_availability(@product) %>
+ <%= display_qualifiers(@product) %>
+
+ <% if @product.has_basic_info? %>
+ <%= edit_product_button_to_remote(@product, 'info', _('Edit basic information'), :title => _('Click here to edit price, discount and qualifiers/certifiers to make your product more attractive and detailed for the consumers')) %>
+ <% else %>
+ <%= edit_product_ui_button_to_remote(@product, 'info', _('Add price and other basic information'),
+ :title => _('Click here to add price, discount and qualifiers/certifiers to make your product more attractive and detailed for the consumers'),
+ 'data-primary-icon' => 'ui-icon-pencil',
+ 'data-secondary-icon' => 'ui-icon-triangle-1-s')
+ %>
+ <%= javascript_tag("render_jquery_ui_buttons('edit-product-remote-button-ui-info')") %>
+ <% end%>
+
+
diff --git a/app/views/manage_products/_display_info.rhtml b/app/views/manage_products/_display_info.rhtml
deleted file mode 100644
index d7adc96..0000000
--- a/app/views/manage_products/_display_info.rhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-
- <%= display_value(@product) %>
- <%= display_availability(@product) %>
- <%= display_qualifiers(@product) %>
-
- <% if @product.has_basic_info? %>
- <%= edit_product_button_to_remote(@product, 'info', _('Edit basic information'), :title => _('Click here to edit price, discount and qualifiers/certifiers to make your product more attractive and detailed for the consumers')) %>
- <% else %>
- <%= edit_product_ui_button_to_remote(@product, 'info', _('Add price and other basic information'),
- :title => _('Click here to add price, discount and qualifiers/certifiers to make your product more attractive and detailed for the consumers'),
- 'data-primary-icon' => 'ui-icon-pencil',
- 'data-secondary-icon' => 'ui-icon-triangle-1-s')
- %>
- <%= javascript_tag("render_jquery_ui_buttons('edit-product-remote-button-ui-info')") %>
- <% end%>
-
-
diff --git a/app/views/manage_products/_display_input.html.erb b/app/views/manage_products/_display_input.html.erb
new file mode 100644
index 0000000..45f4fb1
--- /dev/null
+++ b/app/views/manage_products/_display_input.html.erb
@@ -0,0 +1,21 @@
+
+
+ <% if user && user.has_permission?('manage_products', profile) %>
+ <%= javascript_tag "input_javascript_stuff(#{input.id})" %>
+ <% end %>
diff --git a/app/views/manage_products/_display_input.rhtml b/app/views/manage_products/_display_input.rhtml
deleted file mode 100644
index 45f4fb1..0000000
--- a/app/views/manage_products/_display_input.rhtml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
- <% if user && user.has_permission?('manage_products', profile) %>
- <%= javascript_tag "input_javascript_stuff(#{input.id})" %>
- <% end %>
diff --git a/app/views/manage_products/_display_inputs.html.erb b/app/views/manage_products/_display_inputs.html.erb
new file mode 100644
index 0000000..1c77287
--- /dev/null
+++ b/app/views/manage_products/_display_inputs.html.erb
@@ -0,0 +1,33 @@
+
+
+
+ <% if @product.inputs.empty? %>
+ <%= edit_ui_button(
+ _('Add the inputs or raw material used by this product'),
+ {:action => 'add_input', :id => @product.id},
+ :id => 'add-input-button',
+ 'data-primary-icon' => 'ui-icon-pencil',
+ 'data-secondary-icon' => 'ui-icon-triangle-1-s',
+ :title => _('Add inputs or raw materials used by this product and give more transparency to consumers about your enterprise')
+ ) %>
+ <%= javascript_tag("render_jquery_ui_buttons('add-input-button')") %>
+ <% else %>
+ <%= edit_button(:add, _('Add new input or raw material'), {:action => 'add_input', :id => @product.id}, :id => 'add-input-button', :title => _('Add new input or raw material used by this product and give more transparency to consumers about your enterprise')) %>
+ <%= content_tag('span', _('Drag the input with the mouse to change the order'), :class => 'hint', :style => 'display: none') %>
+ <% end %>
+
+
+
+
+
+<% if user && user.has_permission?('manage_products', profile) %>
+ <% if @product.inputs.size > 1 %>
+ <%= javascript_tag "input_javascript_ordering_stuff()" %>
+ <% end %>
+ <%= javascript_tag "display_input_stuff()" %>
+<% end %>
diff --git a/app/views/manage_products/_display_inputs.rhtml b/app/views/manage_products/_display_inputs.rhtml
deleted file mode 100644
index 1c77287..0000000
--- a/app/views/manage_products/_display_inputs.rhtml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
- <% if @product.inputs.empty? %>
- <%= edit_ui_button(
- _('Add the inputs or raw material used by this product'),
- {:action => 'add_input', :id => @product.id},
- :id => 'add-input-button',
- 'data-primary-icon' => 'ui-icon-pencil',
- 'data-secondary-icon' => 'ui-icon-triangle-1-s',
- :title => _('Add inputs or raw materials used by this product and give more transparency to consumers about your enterprise')
- ) %>
- <%= javascript_tag("render_jquery_ui_buttons('add-input-button')") %>
- <% else %>
- <%= edit_button(:add, _('Add new input or raw material'), {:action => 'add_input', :id => @product.id}, :id => 'add-input-button', :title => _('Add new input or raw material used by this product and give more transparency to consumers about your enterprise')) %>
- <%= content_tag('span', _('Drag the input with the mouse to change the order'), :class => 'hint', :style => 'display: none') %>
- <% end %>
-
-
-
-
-
-<% if user && user.has_permission?('manage_products', profile) %>
- <% if @product.inputs.size > 1 %>
- <%= javascript_tag "input_javascript_ordering_stuff()" %>
- <% end %>
- <%= javascript_tag "display_input_stuff()" %>
-<% end %>
diff --git a/app/views/manage_products/_display_name.html.erb b/app/views/manage_products/_display_name.html.erb
new file mode 100644
index 0000000..ec64e4e
--- /dev/null
+++ b/app/views/manage_products/_display_name.html.erb
@@ -0,0 +1,13 @@
+
+
<%= @product.name_with_unit %>
+ <%= edit_product_link_to_remote(@product, 'name', _('Edit name and unit'), :title => _('Click here to edit the name of your product and the unit')) %>
+
+<% javascript_tag do %>
+ $$('#display-product-category .hierarchy-category')[0].update('<%=
+ escape_javascript(hierarchy_category_navigation(
+ @product.product_category,
+ :make_links => false,
+ :hide_current_category => @product.name_is_blank?)
+ )
+ %>')
+<% end %>
diff --git a/app/views/manage_products/_display_name.rhtml b/app/views/manage_products/_display_name.rhtml
deleted file mode 100644
index ec64e4e..0000000
--- a/app/views/manage_products/_display_name.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
<%= @product.name_with_unit %>
- <%= edit_product_link_to_remote(@product, 'name', _('Edit name and unit'), :title => _('Click here to edit the name of your product and the unit')) %>
-
-<% javascript_tag do %>
- $$('#display-product-category .hierarchy-category')[0].update('<%=
- escape_javascript(hierarchy_category_navigation(
- @product.product_category,
- :make_links => false,
- :hide_current_category => @product.name_is_blank?)
- )
- %>')
-<% end %>
diff --git a/app/views/manage_products/_display_price_details.html.erb b/app/views/manage_products/_display_price_details.html.erb
new file mode 100644
index 0000000..a65b18b
--- /dev/null
+++ b/app/views/manage_products/_display_price_details.html.erb
@@ -0,0 +1,18 @@
+
+
+
+
+
+ <%= _('Inputs:') %>
+
+ <%= float_to_currency(@product.inputs_cost) %>
+
+
+ <% @product.price_details.each do |price_detail| %>
+
+ <%= "%s:" % price_detail.production_cost.name %>
+ <%= float_to_currency(price_detail.price) %>
+
+ <% end %>
+
+
diff --git a/app/views/manage_products/_display_price_details.rhtml b/app/views/manage_products/_display_price_details.rhtml
deleted file mode 100644
index a65b18b..0000000
--- a/app/views/manage_products/_display_price_details.rhtml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
- <%= _('Inputs:') %>
-
- <%= float_to_currency(@product.inputs_cost) %>
-
-
- <% @product.price_details.each do |price_detail| %>
-
- <%= "%s:" % price_detail.production_cost.name %>
- <%= float_to_currency(price_detail.price) %>
-
- <% end %>
-
-
diff --git a/app/views/manage_products/_edit_description.html.erb b/app/views/manage_products/_edit_description.html.erb
new file mode 100644
index 0000000..c64ce92
--- /dev/null
+++ b/app/views/manage_products/_edit_description.html.erb
@@ -0,0 +1,15 @@
+<%= render :file => 'shared/tiny_mce', :locals => {:mode => 'simple'} %>
+<% remote_form_for(@product,
+ :loading => "small_loading('product-description-form')",
+ :before => ("tinyMCE.triggerSave()" unless Rails.env == 'test'),
+ :update => 'product-description',
+ :url => {:controller => 'manage_products', :action => 'edit', :id => @product, :field => 'description'},
+ :html => {:id => 'product-description-form', :method => 'post'}) do |f| %>
+
+ <%= labelled_form_field(_('Description:'), f.text_area(:description, :rows => 15, :style => 'width: 90%;', :class => 'mceEditor')) %>
+ <% button_bar do %>
+ <%= submit_button :save, _('Save') %>
+ <%= cancel_edit_product_link(@product, 'description') %>
+ <% end %>
+
+<% end %>
diff --git a/app/views/manage_products/_edit_description.rhtml b/app/views/manage_products/_edit_description.rhtml
deleted file mode 100644
index c64ce92..0000000
--- a/app/views/manage_products/_edit_description.rhtml
+++ /dev/null
@@ -1,15 +0,0 @@
-<%= render :file => 'shared/tiny_mce', :locals => {:mode => 'simple'} %>
-<% remote_form_for(@product,
- :loading => "small_loading('product-description-form')",
- :before => ("tinyMCE.triggerSave()" unless Rails.env == 'test'),
- :update => 'product-description',
- :url => {:controller => 'manage_products', :action => 'edit', :id => @product, :field => 'description'},
- :html => {:id => 'product-description-form', :method => 'post'}) do |f| %>
-
- <%= labelled_form_field(_('Description:'), f.text_area(:description, :rows => 15, :style => 'width: 90%;', :class => 'mceEditor')) %>
- <% button_bar do %>
- <%= submit_button :save, _('Save') %>
- <%= cancel_edit_product_link(@product, 'description') %>
- <% end %>
-
-<% end %>
diff --git a/app/views/manage_products/_edit_image.html.erb b/app/views/manage_products/_edit_image.html.erb
new file mode 100644
index 0000000..d8c3338
--- /dev/null
+++ b/app/views/manage_products/_edit_image.html.erb
@@ -0,0 +1,26 @@
+
+ <%= image_tag (@product.reload.default_image('thumb')), :class => 'product-pic' %>
+
+
+<% form_for(:product, :url => { :controller => 'manage_products', :action => 'edit', :id => @product, :field => 'image' }, :html => { :method => 'post', :id => 'uploadForm', :multipart => true}) do |f| %>
+ <% f.fields_for :image_builder, @product.image do |i| %>
+ <%= i.file_field( :uploaded_data, { :size => 10 } ) %>
+ <%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %>
+ <% end %>
+
+ <%= submit_button 'save', _('Save') %>
+ <%= cancel_edit_product_link(@product, 'image') %>
+<% end %>
+
+
+
+<% if errors %>
+ <%= render_dialog_error_messages 'product' %>
+<% end %>
diff --git a/app/views/manage_products/_edit_image.rhtml b/app/views/manage_products/_edit_image.rhtml
deleted file mode 100644
index d8c3338..0000000
--- a/app/views/manage_products/_edit_image.rhtml
+++ /dev/null
@@ -1,26 +0,0 @@
-
- <%= image_tag (@product.reload.default_image('thumb')), :class => 'product-pic' %>
-
-
-<% form_for(:product, :url => { :controller => 'manage_products', :action => 'edit', :id => @product, :field => 'image' }, :html => { :method => 'post', :id => 'uploadForm', :multipart => true}) do |f| %>
- <% f.fields_for :image_builder, @product.image do |i| %>
- <%= i.file_field( :uploaded_data, { :size => 10 } ) %>
- <%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %>
- <% end %>
-
- <%= submit_button 'save', _('Save') %>
- <%= cancel_edit_product_link(@product, 'image') %>
-<% end %>
-
-
-
-<% if errors %>
- <%= render_dialog_error_messages 'product' %>
-<% end %>
diff --git a/app/views/manage_products/_edit_info.html.erb b/app/views/manage_products/_edit_info.html.erb
new file mode 100644
index 0000000..66caa94
--- /dev/null
+++ b/app/views/manage_products/_edit_info.html.erb
@@ -0,0 +1,63 @@
+<% if errors %>
+ <%= render_dialog_error_messages 'product' %>
+<% end %>
+
+<% remote_form_for(@product,
+ :loading => "small_loading('product-info-form')",
+ :update => 'product-info',
+ :url => {:controller => 'manage_products', :action => 'edit', :id => @product, :field => 'info'},
+ :html => {:id => 'product-info-form', :method => 'post'}) do |f| %>
+
+
+
+ <%= f.label :price, _('Price (%s)') % environment.currency_unit, :class => 'formlabel' %>
+ <%= f.text_field(:price, :value => @product.formatted_value(:price), :class => 'numbers-only') %>
+
+
+ <%= f.label :discount, _('Discount (%s)') % environment.currency_unit, :class => 'formlabel' %>
+ <%= f.text_field(:discount, :value => @product.formatted_value(:discount), :class => 'numbers-only', :title => _('If your product is on sale, fill this field with the discount value')) %>
+
+
+ <%= _('Available') %>
+ <%= labelled_radio_button( _('Yes'), 'product[available]', true, @product.available, :id => 'product_available') + labelled_radio_button( _('No'), 'product[available]', false, !@product.available) %>
+
+
+ <%= f.label :highlighted, _('Highlight this product?'), :class => 'formlabel' %>
+ <%= f.check_box(:highlighted) %>
+
+
+
+ <% if !environment.qualifiers.empty? %>
+
+
+ <%= _('Qualifier') %>
+ <%= _('Certifier') %>
+
+ <% @product.qualifiers.each_with_index do |qualifier, index| %>
+
+
+ <%= select_qualifiers(@product, qualifier.id) %>
+
+
+ <%= select_certifiers(qualifier, @product) + remove_qualifier_button %>
+
+
+ <% end %>
+
+ <%= button_to_function(
+ :add,
+ _('Add new qualifier'),
+ "new_qualifier_row('#product-qualifiers-list', '#{escape_javascript(select_qualifiers(@product))}', '#{escape_javascript(remove_qualifier_button)}')"
+ ) %>
+ <%= hidden_field_tag "product[qualifiers_list][nil]" %>
+ <% end %>
+
+ <%= hidden_field_tag 'info-bar-update-url', @product.price_composition_bar_display_url, :class => 'bar-update-url' %>
+
+ <% button_bar do %>
+ <%= submit_button :save, _('Save') %>
+ <%= cancel_edit_product_link(@product, 'info') %>
+ <% end %>
+<% end %>
+
+<%= render :partial => 'shared/numbers_only_javascript' %>
diff --git a/app/views/manage_products/_edit_info.rhtml b/app/views/manage_products/_edit_info.rhtml
deleted file mode 100644
index 66caa94..0000000
--- a/app/views/manage_products/_edit_info.rhtml
+++ /dev/null
@@ -1,63 +0,0 @@
-<% if errors %>
- <%= render_dialog_error_messages 'product' %>
-<% end %>
-
-<% remote_form_for(@product,
- :loading => "small_loading('product-info-form')",
- :update => 'product-info',
- :url => {:controller => 'manage_products', :action => 'edit', :id => @product, :field => 'info'},
- :html => {:id => 'product-info-form', :method => 'post'}) do |f| %>
-
-
-
- <%= f.label :price, _('Price (%s)') % environment.currency_unit, :class => 'formlabel' %>
- <%= f.text_field(:price, :value => @product.formatted_value(:price), :class => 'numbers-only') %>
-
-
- <%= f.label :discount, _('Discount (%s)') % environment.currency_unit, :class => 'formlabel' %>
- <%= f.text_field(:discount, :value => @product.formatted_value(:discount), :class => 'numbers-only', :title => _('If your product is on sale, fill this field with the discount value')) %>
-
-
- <%= _('Available') %>
- <%= labelled_radio_button( _('Yes'), 'product[available]', true, @product.available, :id => 'product_available') + labelled_radio_button( _('No'), 'product[available]', false, !@product.available) %>
-
-
- <%= f.label :highlighted, _('Highlight this product?'), :class => 'formlabel' %>
- <%= f.check_box(:highlighted) %>
-
-
-
- <% if !environment.qualifiers.empty? %>
-
-
- <%= _('Qualifier') %>
- <%= _('Certifier') %>
-
- <% @product.qualifiers.each_with_index do |qualifier, index| %>
-
-
- <%= select_qualifiers(@product, qualifier.id) %>
-
-
- <%= select_certifiers(qualifier, @product) + remove_qualifier_button %>
-
-
- <% end %>
-
- <%= button_to_function(
- :add,
- _('Add new qualifier'),
- "new_qualifier_row('#product-qualifiers-list', '#{escape_javascript(select_qualifiers(@product))}', '#{escape_javascript(remove_qualifier_button)}')"
- ) %>
- <%= hidden_field_tag "product[qualifiers_list][nil]" %>
- <% end %>
-
- <%= hidden_field_tag 'info-bar-update-url', @product.price_composition_bar_display_url, :class => 'bar-update-url' %>
-
- <% button_bar do %>
- <%= submit_button :save, _('Save') %>
- <%= cancel_edit_product_link(@product, 'info') %>
- <% end %>
-<% end %>
-
-<%= render :partial => 'shared/numbers_only_javascript' %>
diff --git a/app/views/manage_products/_edit_input.html.erb b/app/views/manage_products/_edit_input.html.erb
new file mode 100644
index 0000000..a349d43
--- /dev/null
+++ b/app/views/manage_products/_edit_input.html.erb
@@ -0,0 +1,43 @@
+<% form_for(@input, :url => {:controller => 'manage_products', :action => 'edit_input', :id => @input},
+ :html => {:method => 'post', :id => "edit-input-#{ @input.id }-form"}) do |f| %>
+
+ <%= hidden_field_tag 'input-bar-update-url', @input.product.price_composition_bar_display_url, :class => 'bar-update-url' %>
+ <%= hidden_field_tag 'inputs-cost-update-url', @input.product.inputs_cost_update_url %>
+
+
+
+ <%= f.label :amount_used, label_amount_used(@input), :class => 'formlabel' %>
+ <%= f.text_field(:amount_used, :value => @input.formatted_amount, :class => 'numbers-only amount-used') + select_unit(@input) %>
+
+
+ <%= f.label :price_per_unit, _('Price %s (%s)') % [display_price_by(@input.unit), environment.currency_unit], :class => 'formlabel' %>
+ <%= f.text_field(:price_per_unit, :value => @input.formatted_value(:price_per_unit), :class => 'numbers-only price-per-unit') %>
+
+
+ <%= _("This input or raw material inpact on the final price of the product?") %>
+
+ <%= radio_button :input, 'relevant_to_price', true %>
+ <%= _('Yes') %>
+ <%= radio_button :input, 'relevant_to_price', false %>
+ <%= _('No') %>
+
+
+
+ <%= _('Is it from solidarity economy?') %>
+
+ <%= radio_button :input, 'is_from_solidarity_economy', true %>
+ <%= _('Yes') %>
+ <%= radio_button :input, 'is_from_solidarity_economy', false %>
+ <%= _('No') %>
+
+
+
+
+ <%= submit_button :save, _('Save'), :title => _('Save changes of this input or raw material') %>
+ <%= button :cancel, _('Cancel'), '#', :class => 'cancel-edit-input', :id => "cancel-edit-input-#{@input.id}", :title => _('Cancel changes of this input or raw material') %>
+
+
+
+<% end %>
+
+<%= javascript_tag "edit_input_stuff(#{@input.id}, '#{environment.currency_separator}')" %>
diff --git a/app/views/manage_products/_edit_input.rhtml b/app/views/manage_products/_edit_input.rhtml
deleted file mode 100644
index a349d43..0000000
--- a/app/views/manage_products/_edit_input.rhtml
+++ /dev/null
@@ -1,43 +0,0 @@
-<% form_for(@input, :url => {:controller => 'manage_products', :action => 'edit_input', :id => @input},
- :html => {:method => 'post', :id => "edit-input-#{ @input.id }-form"}) do |f| %>
-
- <%= hidden_field_tag 'input-bar-update-url', @input.product.price_composition_bar_display_url, :class => 'bar-update-url' %>
- <%= hidden_field_tag 'inputs-cost-update-url', @input.product.inputs_cost_update_url %>
-
-
-
- <%= f.label :amount_used, label_amount_used(@input), :class => 'formlabel' %>
- <%= f.text_field(:amount_used, :value => @input.formatted_amount, :class => 'numbers-only amount-used') + select_unit(@input) %>
-
-
- <%= f.label :price_per_unit, _('Price %s (%s)') % [display_price_by(@input.unit), environment.currency_unit], :class => 'formlabel' %>
- <%= f.text_field(:price_per_unit, :value => @input.formatted_value(:price_per_unit), :class => 'numbers-only price-per-unit') %>
-
-
- <%= _("This input or raw material inpact on the final price of the product?") %>
-
- <%= radio_button :input, 'relevant_to_price', true %>
- <%= _('Yes') %>
- <%= radio_button :input, 'relevant_to_price', false %>
- <%= _('No') %>
-
-
-
- <%= _('Is it from solidarity economy?') %>
-
- <%= radio_button :input, 'is_from_solidarity_economy', true %>
- <%= _('Yes') %>
- <%= radio_button :input, 'is_from_solidarity_economy', false %>
- <%= _('No') %>
-
-
-
-
- <%= submit_button :save, _('Save'), :title => _('Save changes of this input or raw material') %>
- <%= button :cancel, _('Cancel'), '#', :class => 'cancel-edit-input', :id => "cancel-edit-input-#{@input.id}", :title => _('Cancel changes of this input or raw material') %>
-
-
-
-<% end %>
-
-<%= javascript_tag "edit_input_stuff(#{@input.id}, '#{environment.currency_separator}')" %>
diff --git a/app/views/manage_products/_edit_name.html.erb b/app/views/manage_products/_edit_name.html.erb
new file mode 100644
index 0000000..f73170f
--- /dev/null
+++ b/app/views/manage_products/_edit_name.html.erb
@@ -0,0 +1,21 @@
+<% remote_form_for(@product,
+ :loading => "small_loading('product-name-form')",
+ :update => 'product-name',
+ :url => {:controller => 'manage_products', :action => 'edit', :id => @product, :field => 'name'},
+ :html => {:method => 'post', :id => 'product-name-form'}) do |f| %>
+ <%= f.text_field(:name, :value => @product.name, :class => 'name_edition') %>
+ <%= select_unit(@product) %>
+
+ <% button_bar do %>
+ <%= submit_button :save, _('Save') %>
+ <%= cancel_edit_product_link(@product, 'name') %>
+ <% end %>
+<% end %>
+
+
+
+<% if errors %>
+ <%= render_dialog_error_messages 'product' %>
+<% end %>
diff --git a/app/views/manage_products/_edit_name.rhtml b/app/views/manage_products/_edit_name.rhtml
deleted file mode 100644
index f73170f..0000000
--- a/app/views/manage_products/_edit_name.rhtml
+++ /dev/null
@@ -1,21 +0,0 @@
-<% remote_form_for(@product,
- :loading => "small_loading('product-name-form')",
- :update => 'product-name',
- :url => {:controller => 'manage_products', :action => 'edit', :id => @product, :field => 'name'},
- :html => {:method => 'post', :id => 'product-name-form'}) do |f| %>
- <%= f.text_field(:name, :value => @product.name, :class => 'name_edition') %>
- <%= select_unit(@product) %>
-
- <% button_bar do %>
- <%= submit_button :save, _('Save') %>
- <%= cancel_edit_product_link(@product, 'name') %>
- <% end %>
-<% end %>
-
-
-
-<% if errors %>
- <%= render_dialog_error_messages 'product' %>
-<% end %>
diff --git a/app/views/manage_products/_edit_price_details.html.erb b/app/views/manage_products/_edit_price_details.html.erb
new file mode 100644
index 0000000..1b9141b
--- /dev/null
+++ b/app/views/manage_products/_edit_price_details.html.erb
@@ -0,0 +1,14 @@
+<% price_details.each do |price_detail| %>
+
+ <%= select_production_cost(@product, price_detail.production_cost_id) %>
+ <%= labelled_form_field(environment.currency_unit, text_field_tag('price_details[][price]', price_detail.formatted_value(:price), :class => 'numbers-only price-details-price')) %>
+
+ <%= link_to_remote(_('Remove'),
+ :update => "price-detail-#{price_detail.id}",
+ :complete => "calculateValuesForBar();",
+ :confirm => _('Are you sure that you want to remove this cost?'),
+ :url => { :action => 'remove_price_detail', :id => price_detail, :product => @product }) %>
+
+<% end %>
+
+<%= render :partial => 'shared/numbers_only_javascript' %>
diff --git a/app/views/manage_products/_edit_price_details.rhtml b/app/views/manage_products/_edit_price_details.rhtml
deleted file mode 100644
index 1b9141b..0000000
--- a/app/views/manage_products/_edit_price_details.rhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<% price_details.each do |price_detail| %>
-
- <%= select_production_cost(@product, price_detail.production_cost_id) %>
- <%= labelled_form_field(environment.currency_unit, text_field_tag('price_details[][price]', price_detail.formatted_value(:price), :class => 'numbers-only price-details-price')) %>
-
- <%= link_to_remote(_('Remove'),
- :update => "price-detail-#{price_detail.id}",
- :complete => "calculateValuesForBar();",
- :confirm => _('Are you sure that you want to remove this cost?'),
- :url => { :action => 'remove_price_detail', :id => price_detail, :product => @product }) %>
-
-<% end %>
-
-<%= render :partial => 'shared/numbers_only_javascript' %>
diff --git a/app/views/manage_products/_form.html.erb b/app/views/manage_products/_form.html.erb
new file mode 100644
index 0000000..211aec4
--- /dev/null
+++ b/app/views/manage_products/_form.html.erb
@@ -0,0 +1,17 @@
+<%= error_messages_for :product %>
+
+<% form_for :product, @product, :html => {:multipart => true }, :url => {:action => mode} do |f| %>
+ <%= required_fields_message %>
+
+ <%= display_form_field( _('Name:'), f.text_field(:name) ) %>
+ <%= display_form_field( _('Price:'), f.text_field(:price) ) %>
+ <%= display_form_field( _('Description:'), f.text_area(:description, :rows => 10, :class => 'mceEditor') ) %>
+ <%= labelled_form_field(f.check_box(:highlighted) + _('Highlight this product'),'') %>
+ <% f.fields_for :image_builder, @product.image do |i| %>
+ <%= file_field_or_thumbnail(_('Image:'), @product.image, i) %>
+ <% end %>
+
+ <% button_bar do %>
+ <%= submit_button('save', (mode == 'new' ? _('Create product') : _('Save changes')), :cancel => {:action => 'index'} ) %>
+ <% end %>
+<% end %>
diff --git a/app/views/manage_products/_form.rhtml b/app/views/manage_products/_form.rhtml
deleted file mode 100644
index 211aec4..0000000
--- a/app/views/manage_products/_form.rhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-<%= error_messages_for :product %>
-
-<% form_for :product, @product, :html => {:multipart => true }, :url => {:action => mode} do |f| %>
- <%= required_fields_message %>
-
- <%= display_form_field( _('Name:'), f.text_field(:name) ) %>
- <%= display_form_field( _('Price:'), f.text_field(:price) ) %>
- <%= display_form_field( _('Description:'), f.text_area(:description, :rows => 10, :class => 'mceEditor') ) %>
- <%= labelled_form_field(f.check_box(:highlighted) + _('Highlight this product'),'') %>
- <% f.fields_for :image_builder, @product.image do |i| %>
- <%= file_field_or_thumbnail(_('Image:'), @product.image, i) %>
- <% end %>
-
- <% button_bar do %>
- <%= submit_button('save', (mode == 'new' ? _('Create product') : _('Save changes')), :cancel => {:action => 'index'} ) %>
- <% end %>
-<% end %>
diff --git a/app/views/manage_products/_input.html.erb b/app/views/manage_products/_input.html.erb
new file mode 100644
index 0000000..1c0da71
--- /dev/null
+++ b/app/views/manage_products/_input.html.erb
@@ -0,0 +1,3 @@
+
+<%= render :partial => 'display_input', :locals =>{:input => input} %>
+
diff --git a/app/views/manage_products/_input.rhtml b/app/views/manage_products/_input.rhtml
deleted file mode 100644
index 1c0da71..0000000
--- a/app/views/manage_products/_input.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-<%= render :partial => 'display_input', :locals =>{:input => input} %>
-
diff --git a/app/views/manage_products/_manage_product_details.html.erb b/app/views/manage_products/_manage_product_details.html.erb
new file mode 100644
index 0000000..a588e9d
--- /dev/null
+++ b/app/views/manage_products/_manage_product_details.html.erb
@@ -0,0 +1,43 @@
+
+ <%= render :partial => 'price_composition_bar' %>
+
+
+<% form_tag({:action => 'manage_product_details'}, :method => 'post', :id => 'manage-product-details-form') do %>
+
+
+
+ <%= _('Inputs') %>
+
+ <%= float_to_currency(@product.inputs_cost) %>
+
+
+ <%= _('This value is composed by the total value of registered inputs') %>
+
+
+ <%= render :partial => 'edit_price_details', :locals => {:price_details => @product.price_details} %>
+
+
+
+ <%= hidden_field(:product, :inputs_cost) %>
+ <%= hidden_field(:product, :price) %>
+
+ <% button_bar do %>
+ <%= submit_button :save, _('Save'), :disabled => '', :class => 'disabled' %>
+ <%= button(:cancel, _('Cancel'), '#', :class => 'cancel-price-details', 'data-confirm' => _('If you leave, you will lose all unsaved information. Are you sure you want to quit?')) %>
+ <%= button(:add, _('New cost'), '#', :id => 'add-new-cost') %>
+
+ <% end %>
+
+<% end %>
+
+
+
+
+ <%= select_production_cost(@product) %>
+ <%= labelled_form_field(environment.currency_unit, text_field_tag('price_details[][price]', nil, :class => 'numbers-only price-details-price')) %>
+ <%= link_to(_('Cancel'), '#', {:class => 'cancel-new-cost'}) %>
+
+
+
+
+<%= render :partial => 'shared/numbers_only_javascript' %>
diff --git a/app/views/manage_products/_manage_product_details.rhtml b/app/views/manage_products/_manage_product_details.rhtml
deleted file mode 100644
index a588e9d..0000000
--- a/app/views/manage_products/_manage_product_details.rhtml
+++ /dev/null
@@ -1,43 +0,0 @@
-
- <%= render :partial => 'price_composition_bar' %>
-
-
-<% form_tag({:action => 'manage_product_details'}, :method => 'post', :id => 'manage-product-details-form') do %>
-
-
-
- <%= _('Inputs') %>
-
- <%= float_to_currency(@product.inputs_cost) %>
-
-
- <%= _('This value is composed by the total value of registered inputs') %>
-
-
- <%= render :partial => 'edit_price_details', :locals => {:price_details => @product.price_details} %>
-
-
-
- <%= hidden_field(:product, :inputs_cost) %>
- <%= hidden_field(:product, :price) %>
-
- <% button_bar do %>
- <%= submit_button :save, _('Save'), :disabled => '', :class => 'disabled' %>
- <%= button(:cancel, _('Cancel'), '#', :class => 'cancel-price-details', 'data-confirm' => _('If you leave, you will lose all unsaved information. Are you sure you want to quit?')) %>
- <%= button(:add, _('New cost'), '#', :id => 'add-new-cost') %>
-
- <% end %>
-
-<% end %>
-
-
-
-
- <%= select_production_cost(@product) %>
- <%= labelled_form_field(environment.currency_unit, text_field_tag('price_details[][price]', nil, :class => 'numbers-only price-details-price')) %>
- <%= link_to(_('Cancel'), '#', {:class => 'cancel-new-cost'}) %>
-
-
-
-
-<%= render :partial => 'shared/numbers_only_javascript' %>
diff --git a/app/views/manage_products/_price_composition_bar.html.erb b/app/views/manage_products/_price_composition_bar.html.erb
new file mode 100644
index 0000000..57f19e4
--- /dev/null
+++ b/app/views/manage_products/_price_composition_bar.html.erb
@@ -0,0 +1,22 @@
+<% javascript_tag do %>
+ var value = <%= @product.price_description_percentage %>;
+ var total_cost = <%= @product.total_production_cost %>;
+ var price = '<%= @product.formatted_value(:price) %>';
+ var described = false;
+ var currency_format = { separator : '<%= environment.currency_separator %>', delimiter : '<%= environment.currency_delimiter %>', unit : '<%= environment.currency_unit %>' };
+ if (<%= @product.price_described? %>) {
+ var described = true;
+ }
+ priceCompositionBar(value,described,total_cost,price);
+<% end %>
+
+
+
+
+
+ <%= price_composition_progressbar_text(@product) %>
+
+
+
' data-price-described-notice='<%= _("Congratulations! Now the price is open to the public") %>'>
+
+
diff --git a/app/views/manage_products/_price_composition_bar.rhtml b/app/views/manage_products/_price_composition_bar.rhtml
deleted file mode 100644
index 57f19e4..0000000
--- a/app/views/manage_products/_price_composition_bar.rhtml
+++ /dev/null
@@ -1,22 +0,0 @@
-<% javascript_tag do %>
- var value = <%= @product.price_description_percentage %>;
- var total_cost = <%= @product.total_production_cost %>;
- var price = '<%= @product.formatted_value(:price) %>';
- var described = false;
- var currency_format = { separator : '<%= environment.currency_separator %>', delimiter : '<%= environment.currency_delimiter %>', unit : '<%= environment.currency_unit %>' };
- if (<%= @product.price_described? %>) {
- var described = true;
- }
- priceCompositionBar(value,described,total_cost,price);
-<% end %>
-
-
-
-
-
- <%= price_composition_progressbar_text(@product) %>
-
-
-
' data-price-described-notice='<%= _("Congratulations! Now the price is open to the public") %>'>
-
-
diff --git a/app/views/manage_products/_price_details_button.html.erb b/app/views/manage_products/_price_details_button.html.erb
new file mode 100644
index 0000000..8ee8eaf
--- /dev/null
+++ b/app/views/manage_products/_price_details_button.html.erb
@@ -0,0 +1,10 @@
+<%= edit_ui_button(
+ _('Describe here the cost of production'),
+ {:action => 'manage_product_details', :id => @product.id},
+ :id => 'manage-product-details-button',
+ 'data-primary-icon' => 'ui-icon-pencil',
+ 'data-secondary-icon' => 'ui-icon-triangle-1-s',
+ :title => _('Describe details about how the price was defined')
+) %>
+<%= javascript_tag("render_jquery_ui_buttons('manage-product-details-button')") %>
+
diff --git a/app/views/manage_products/_price_details_button.rhtml b/app/views/manage_products/_price_details_button.rhtml
deleted file mode 100644
index 8ee8eaf..0000000
--- a/app/views/manage_products/_price_details_button.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<%= edit_ui_button(
- _('Describe here the cost of production'),
- {:action => 'manage_product_details', :id => @product.id},
- :id => 'manage-product-details-button',
- 'data-primary-icon' => 'ui-icon-pencil',
- 'data-secondary-icon' => 'ui-icon-triangle-1-s',
- :title => _('Describe details about how the price was defined')
-) %>
-<%= javascript_tag("render_jquery_ui_buttons('manage-product-details-button')") %>
-
diff --git a/app/views/manage_products/edit.html.erb b/app/views/manage_products/edit.html.erb
new file mode 100644
index 0000000..723e6d9
--- /dev/null
+++ b/app/views/manage_products/edit.html.erb
@@ -0,0 +1,3 @@
+ <%= _('Editing') %> <%= @product.name %>
+
+<%= render :partial => 'form', :locals => {:mode => 'edit'} %>
diff --git a/app/views/manage_products/edit.rhtml b/app/views/manage_products/edit.rhtml
deleted file mode 100644
index 723e6d9..0000000
--- a/app/views/manage_products/edit.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
- <%= _('Editing') %> <%= @product.name %>
-
-<%= render :partial => 'form', :locals => {:mode => 'edit'} %>
diff --git a/app/views/manage_products/edit_category.html.erb b/app/views/manage_products/edit_category.html.erb
new file mode 100644
index 0000000..1b12874
--- /dev/null
+++ b/app/views/manage_products/edit_category.html.erb
@@ -0,0 +1,33 @@
+
+ <%= hierarchy_category_navigation(@category, :make_links => false)%>
+
+
+
+
+
<%= @product.name %>
+
+
+
+ <% remote_form_for(@product,
+ :loading => "open_loading('#{ _('loading...') }')",
+ :update => "request_result_message",
+ :url => {:action => 'edit_category', :id => @product},
+ :html => {:method => 'post', :id => 'category_form'}) do |f| %>
+
+
<%= _('Edit category of this product:') %>
+
+ <%= categories_container(selects_for_all_ancestors(@category), hierarchy_category_navigation(@category, :make_links => true)) %>
+
+
+ <%= button(:back, _('Back to product'), :action => 'show', :id => @product) %>
+
+ <%= submit_button(:save, _('Save and continue'), :id => 'save_and_continue') %>
+
+ <%= ui_icon('ui-icon-alert') %>
+ <%= _('This category does not allow registration of products, select a more specific category') %>
+
+
+
+
+ <% end %>
+
diff --git a/app/views/manage_products/edit_category.rhtml b/app/views/manage_products/edit_category.rhtml
deleted file mode 100644
index 1b12874..0000000
--- a/app/views/manage_products/edit_category.rhtml
+++ /dev/null
@@ -1,33 +0,0 @@
-
- <%= hierarchy_category_navigation(@category, :make_links => false)%>
-
-
-
-
-
<%= @product.name %>
-
-
-
- <% remote_form_for(@product,
- :loading => "open_loading('#{ _('loading...') }')",
- :update => "request_result_message",
- :url => {:action => 'edit_category', :id => @product},
- :html => {:method => 'post', :id => 'category_form'}) do |f| %>
-
-
<%= _('Edit category of this product:') %>
-
- <%= categories_container(selects_for_all_ancestors(@category), hierarchy_category_navigation(@category, :make_links => true)) %>
-
-
- <%= button(:back, _('Back to product'), :action => 'show', :id => @product) %>
-
- <%= submit_button(:save, _('Save and continue'), :id => 'save_and_continue') %>
-
- <%= ui_icon('ui-icon-alert') %>
- <%= _('This category does not allow registration of products, select a more specific category') %>
-
-
-
-
- <% end %>
-
diff --git a/app/views/manage_products/index.html.erb b/app/views/manage_products/index.html.erb
new file mode 100644
index 0000000..df5bec0
--- /dev/null
+++ b/app/views/manage_products/index.html.erb
@@ -0,0 +1,30 @@
+ <%=_('Listing products and services') %>
+
+
+
+ <%= _('Product') %>
+ <%= _('Price') %>
+ <%= _('Actions') %>
+
+ <% if @products.empty? %>
+
+ <%= _('(no product registered yet)') %>
+
+ <% end %>
+ <% @products.each do |product| %>
+
+ <%= link_to product.name, :action => 'show', :id => product %>
+ <%= product.price %>
+
+ <%= button :delete, _('Remove'), {:action => 'destroy', :id => product}, :confirm => _('Are you sure you want to remove this product?') %>
+
+
+ <% end %>
+
+
+<%= pagination_links @products %>
+
+<% button_bar do %>
+ <%= button :add, _('New product or service'), :action => 'new' if @profile.create_product? %>
+ <%= button :back, _('Back'), { :controller => 'profile_editor', :profile => @profile.identifier, :action => 'index' } %>
+<% end %>
diff --git a/app/views/manage_products/index.rhtml b/app/views/manage_products/index.rhtml
deleted file mode 100644
index df5bec0..0000000
--- a/app/views/manage_products/index.rhtml
+++ /dev/null
@@ -1,30 +0,0 @@
- <%=_('Listing products and services') %>
-
-
-
- <%= _('Product') %>
- <%= _('Price') %>
- <%= _('Actions') %>
-
- <% if @products.empty? %>
-
- <%= _('(no product registered yet)') %>
-
- <% end %>
- <% @products.each do |product| %>
-
- <%= link_to product.name, :action => 'show', :id => product %>
- <%= product.price %>
-
- <%= button :delete, _('Remove'), {:action => 'destroy', :id => product}, :confirm => _('Are you sure you want to remove this product?') %>
-
-
- <% end %>
-
-
-<%= pagination_links @products %>
-
-<% button_bar do %>
- <%= button :add, _('New product or service'), :action => 'new' if @profile.create_product? %>
- <%= button :back, _('Back'), { :controller => 'profile_editor', :profile => @profile.identifier, :action => 'index' } %>
-<% end %>
diff --git a/app/views/manage_products/new.html.erb b/app/views/manage_products/new.html.erb
new file mode 100644
index 0000000..301ba33
--- /dev/null
+++ b/app/views/manage_products/new.html.erb
@@ -0,0 +1,30 @@
+<%= _('New product or service') %>
+
+
+
+<% remote_form_for :product, @product,
+ :loading => "open_loading('#{ _('loading...') }')",
+ :update => "request_result_message",
+ :url => {:action => 'new'},
+ :html => {:method => 'post', :id => 'category_form'} do |f| %>
+
+ <%= _('Select the category of the new product or service') %>
+
+ <%= categories_container(select_for_new_category(@categories, @level)) %>
+
+
+ <%= button :back, _('Back to the product listing'), :action => 'index' %>
+
+ <%= submit_button(:save, _('Save and continue'), :id => 'save_and_continue') %>
+
+ <%= ui_icon('ui-icon-alert') %>
+ <%= _('This category does not allow registration of products, select a more specific category') %>
+
+
+
+
+<% end %>
+
+<% javascript_tag do %>
+ toggleDisabled(<%= @category && @category.accept_products? ? 'true' : 'false' %>, $('save_and_continue'))
+<% end %>
diff --git a/app/views/manage_products/new.rhtml b/app/views/manage_products/new.rhtml
deleted file mode 100644
index 301ba33..0000000
--- a/app/views/manage_products/new.rhtml
+++ /dev/null
@@ -1,30 +0,0 @@
-<%= _('New product or service') %>
-
-
-
-<% remote_form_for :product, @product,
- :loading => "open_loading('#{ _('loading...') }')",
- :update => "request_result_message",
- :url => {:action => 'new'},
- :html => {:method => 'post', :id => 'category_form'} do |f| %>
-
- <%= _('Select the category of the new product or service') %>
-
- <%= categories_container(select_for_new_category(@categories, @level)) %>
-
-
- <%= button :back, _('Back to the product listing'), :action => 'index' %>
-
- <%= submit_button(:save, _('Save and continue'), :id => 'save_and_continue') %>
-
- <%= ui_icon('ui-icon-alert') %>
- <%= _('This category does not allow registration of products, select a more specific category') %>
-
-
-
-
-<% end %>
-
-<% javascript_tag do %>
- toggleDisabled(<%= @category && @category.accept_products? ? 'true' : 'false' %>, $('save_and_continue'))
-<% end %>
diff --git a/app/views/manage_products/show.html.erb b/app/views/manage_products/show.html.erb
new file mode 100644
index 0000000..f960ca3
--- /dev/null
+++ b/app/views/manage_products/show.html.erb
@@ -0,0 +1,59 @@
+
+ <%= render :partial => 'manage_products/display_category' %>
+
+
+
+
+
+ <%= render :partial => 'manage_products/display_name' %>
+
+
+
+
+ <%= render :partial => 'manage_products/display_image' %>
+
+
+
+ <%= render :partial => 'manage_products/display_info' %>
+
+
+
+
+
+ <% unless !@allowed_user && (@product.description.blank? && @product.inputs.empty? && !@product.price_described? ) %>
+
+
+
+ <%= render :partial => 'manage_products/display_description' %>
+
+
+ <%= render :partial => 'manage_products/display_inputs' %>
+
+ <% if @product.price_described? || @allowed_user %>
+
+ <%= render :partial => 'manage_products/display_price_details' %>
+ <%= render :partial => 'manage_products/price_details_button' %>
+
+ <% end %>
+
+ <% end %>
+
+
+
+<% button_bar do %>
+ <%= button :back, _('Back to the product listing'), :controller => 'catalog', :action => 'index' %>
+ <%= button :delete, _('Remove product or service'), {:action => 'destroy', :id => @product}, :class => 'requires-permission-manage_products', :style => 'display:none;' %>
+<% end %>
diff --git a/app/views/manage_products/show.rhtml b/app/views/manage_products/show.rhtml
deleted file mode 100644
index f960ca3..0000000
--- a/app/views/manage_products/show.rhtml
+++ /dev/null
@@ -1,59 +0,0 @@
-
- <%= render :partial => 'manage_products/display_category' %>
-
-
-
-
-
- <%= render :partial => 'manage_products/display_name' %>
-
-
-
-
- <%= render :partial => 'manage_products/display_image' %>
-
-
-
- <%= render :partial => 'manage_products/display_info' %>
-
-
-
-
-
- <% unless !@allowed_user && (@product.description.blank? && @product.inputs.empty? && !@product.price_described? ) %>
-
-
-
- <%= render :partial => 'manage_products/display_description' %>
-
-
- <%= render :partial => 'manage_products/display_inputs' %>
-
- <% if @product.price_described? || @allowed_user %>
-
- <%= render :partial => 'manage_products/display_price_details' %>
- <%= render :partial => 'manage_products/price_details_button' %>
-
- <% end %>
-
- <% end %>
-
-
-
-<% button_bar do %>
- <%= button :back, _('Back to the product listing'), :controller => 'catalog', :action => 'index' %>
- <%= button :delete, _('Remove product or service'), {:action => 'destroy', :id => @product}, :class => 'requires-permission-manage_products', :style => 'display:none;' %>
-<% end %>
diff --git a/app/views/map_balloon/product.html.erb b/app/views/map_balloon/product.html.erb
new file mode 100644
index 0000000..c3a2f1e
--- /dev/null
+++ b/app/views/map_balloon/product.html.erb
@@ -0,0 +1,3 @@
+
+ <%= render :partial => 'search/product', :locals => {:product => @product} %>
+
diff --git a/app/views/map_balloon/product.rhtml b/app/views/map_balloon/product.rhtml
deleted file mode 100644
index c3a2f1e..0000000
--- a/app/views/map_balloon/product.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- <%= render :partial => 'search/product', :locals => {:product => @product} %>
-
diff --git a/app/views/map_balloon/profile.html.erb b/app/views/map_balloon/profile.html.erb
new file mode 100644
index 0000000..0dff4d4
--- /dev/null
+++ b/app/views/map_balloon/profile.html.erb
@@ -0,0 +1,28 @@
+
+
+
+ <%= profile_image(@profile, :thumb) %>
+
+ <%= link_to(@profile.name, url_for(@profile.url)) %>
+ <% unless @profile.contact_email.nil? %>
+ <%= _('E-Mail: ') + @profile.contact_email %>
+ <% end %>
+ <% unless @profile.contact_phone.nil? %>
+ <%= _('Phone(s): ') + @profile.contact_phone %>
+ <% end %>
+ <% unless @profile.region.nil? %>
+ <%= _('Location: ') + @profile.region.name %>
+ <% end %>
+ <% unless @profile.address.nil? %>
+ <%= _('Address: ') + @profile.address %>
+ <% end %>
+ <% if @profile.respond_to?(:products) and !@profile.products.blank? %>
+ <%= _('Products/Services: ') + @profile.products.map{|i| link_to(i.name, :controller => 'manage_products', :profile => @profile.identifier, :action => 'show', :id => i.id)}.join(', ') %>
+ <% end %>
+ <% if @profile.respond_to?(:distance) and !@profile.distance.nil? %>
+ <%= _('Distance: ') + "%.2f%" % @profile.distance %>
+ <% end %>
+
+
+
+
diff --git a/app/views/map_balloon/profile.rhtml b/app/views/map_balloon/profile.rhtml
deleted file mode 100644
index 0dff4d4..0000000
--- a/app/views/map_balloon/profile.rhtml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- <%= profile_image(@profile, :thumb) %>
-
- <%= link_to(@profile.name, url_for(@profile.url)) %>
- <% unless @profile.contact_email.nil? %>
- <%= _('E-Mail: ') + @profile.contact_email %>
- <% end %>
- <% unless @profile.contact_phone.nil? %>
- <%= _('Phone(s): ') + @profile.contact_phone %>
- <% end %>
- <% unless @profile.region.nil? %>
- <%= _('Location: ') + @profile.region.name %>
- <% end %>
- <% unless @profile.address.nil? %>
- <%= _('Address: ') + @profile.address %>
- <% end %>
- <% if @profile.respond_to?(:products) and !@profile.products.blank? %>
- <%= _('Products/Services: ') + @profile.products.map{|i| link_to(i.name, :controller => 'manage_products', :profile => @profile.identifier, :action => 'show', :id => i.id)}.join(', ') %>
- <% end %>
- <% if @profile.respond_to?(:distance) and !@profile.distance.nil? %>
- <%= _('Distance: ') + "%.2f%" % @profile.distance %>
- <% end %>
-
-
-
-
diff --git a/app/views/maps/edit_location.html.erb b/app/views/maps/edit_location.html.erb
new file mode 100644
index 0000000..6f2f4dc
--- /dev/null
+++ b/app/views/maps/edit_location.html.erb
@@ -0,0 +1,33 @@
+<%= _('Location') %>
+
+ <%= flash[:error] %>
+
+
+<% form_for :profile_data, :url => {:action => 'edit_location'}, :html => {:id => 'location-form'} do |f| %>
+
+
+ <%= select_country _('Country'), 'profile_data', 'country', {:class => 'type-select'} %>
+ <%= labelled_form_field _('State'), f.text_field(:state) %>
+ <%= labelled_form_field _('City'), f.text_field(:city) %>
+ <%= labelled_form_field _('ZIP code'), text_field(:profile_data, :zip_code) %>
+ <%= labelled_form_field _('Address (street and number)'), text_field(:profile_data, :address) %>
+ <% button_bar do %>
+ <%= 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)") %>
+ <%= submit_button 'save', _('Save') %>
+ <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
+ <% end %>
+
+
+ <%= _('Drag the balloon to find the exact location.') %>
+
+
+
+ <%= f.hidden_field :lat %>
+ <%= f.hidden_field :lng %>
+
+<% end %>
+
+<%= content_tag('script', '', :src => "http://maps.googleapis.com/maps/api/js?sensor=false", :type => 'text/javascript') %>
+<%= content_tag('script', '', :src => url_for(:controller => :maps, :action => :google_map), :type => 'text/javascript') %>
diff --git a/app/views/maps/edit_location.rhtml b/app/views/maps/edit_location.rhtml
deleted file mode 100644
index 6f2f4dc..0000000
--- a/app/views/maps/edit_location.rhtml
+++ /dev/null
@@ -1,33 +0,0 @@
-<%= _('Location') %>
-
- <%= flash[:error] %>
-
-
-<% form_for :profile_data, :url => {:action => 'edit_location'}, :html => {:id => 'location-form'} do |f| %>
-
-
- <%= select_country _('Country'), 'profile_data', 'country', {:class => 'type-select'} %>
- <%= labelled_form_field _('State'), f.text_field(:state) %>
- <%= labelled_form_field _('City'), f.text_field(:city) %>
- <%= labelled_form_field _('ZIP code'), text_field(:profile_data, :zip_code) %>
- <%= labelled_form_field _('Address (street and number)'), text_field(:profile_data, :address) %>
- <% button_bar do %>
- <%= 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)") %>
- <%= submit_button 'save', _('Save') %>
- <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
- <% end %>
-
-
- <%= _('Drag the balloon to find the exact location.') %>
-
-
-
- <%= f.hidden_field :lat %>
- <%= f.hidden_field :lng %>
-
-<% end %>
-
-<%= content_tag('script', '', :src => "http://maps.googleapis.com/maps/api/js?sensor=false", :type => 'text/javascript') %>
-<%= content_tag('script', '', :src => url_for(:controller => :maps, :action => :google_map), :type => 'text/javascript') %>
diff --git a/app/views/memberships/index.html.erb b/app/views/memberships/index.html.erb
new file mode 100644
index 0000000..66aeeb6
--- /dev/null
+++ b/app/views/memberships/index.html.erb
@@ -0,0 +1,13 @@
+
+
+
<%= _('Manage my groups') %>
+
+<% button_bar do %>
+ <%= button(:add, __('Create a new community'), :controller => 'memberships', :action => 'new_community') %>
+ <%= button :add, __('Register a new enterprise'), :controller => 'enterprise_registration' if environment.enabled?('enterprise_registration') %>
+ <%= button :back, _('Go back'), :controller => 'profile_editor' %>
+<% end %>
+
+<%= render :partial => 'shared/list_groups', :locals => {:groups => @memberships} %>
+
+
diff --git a/app/views/memberships/index.rhtml b/app/views/memberships/index.rhtml
deleted file mode 100644
index 66aeeb6..0000000
--- a/app/views/memberships/index.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
<%= _('Manage my groups') %>
-
-<% button_bar do %>
- <%= button(:add, __('Create a new community'), :controller => 'memberships', :action => 'new_community') %>
- <%= button :add, __('Register a new enterprise'), :controller => 'enterprise_registration' if environment.enabled?('enterprise_registration') %>
- <%= button :back, _('Go back'), :controller => 'profile_editor' %>
-<% end %>
-
-<%= render :partial => 'shared/list_groups', :locals => {:groups => @memberships} %>
-
-
diff --git a/app/views/memberships/new_community.html.erb b/app/views/memberships/new_community.html.erb
new file mode 100644
index 0000000..d21aa42
--- /dev/null
+++ b/app/views/memberships/new_community.html.erb
@@ -0,0 +1,60 @@
+<%= __('Creating new community') %>
+
+<% if environment.enabled?('admin_must_approve_new_communities') %>
+
+ <%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%>
+
+<%end %>
+
+<%= error_messages_for :community %>
+
+
+
+<% labelled_form_for :community, @community, :html => { :multipart => true } do |f| %>
+
+ <%= required_fields_message %>
+
+ <%= required f.text_field(:name) %>
+
+ <% @plugins.dispatch(:new_community_hidden_fields).each do |field| %>
+ <% field.each do |key, value| %>
+ <%= f.hidden_field(key, :value => value) %>
+ <% end %>
+ <% end %>
+
+ <%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => 'community', :profile => @community } %>
+
+ <% f.fields_for :image_builder, @community.image do |i| %>
+ <%= file_field_or_thumbnail(_('Image:'), @community.image, i) %>
+ <% end %>
+
+
+ <%= _('New members must be approved:')%>
+
+
+
+
+ <%= template_options(Community, 'community')%>
+
+ <% button_bar do %>
+ <%= submit_button(:save, _('Create')) %>
+ <%= button(:cancel, _('Cancel'), :action => 'index') %>
+ <% end %>
+
+<% end %>
+
+
+
+
+
+
diff --git a/app/views/memberships/new_community.rhtml b/app/views/memberships/new_community.rhtml
deleted file mode 100644
index d21aa42..0000000
--- a/app/views/memberships/new_community.rhtml
+++ /dev/null
@@ -1,60 +0,0 @@
-<%= __('Creating new community') %>
-
-<% if environment.enabled?('admin_must_approve_new_communities') %>
-
- <%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%>
-
-<%end %>
-
-<%= error_messages_for :community %>
-
-
-
-<% labelled_form_for :community, @community, :html => { :multipart => true } do |f| %>
-
- <%= required_fields_message %>
-
- <%= required f.text_field(:name) %>
-
- <% @plugins.dispatch(:new_community_hidden_fields).each do |field| %>
- <% field.each do |key, value| %>
- <%= f.hidden_field(key, :value => value) %>
- <% end %>
- <% end %>
-
- <%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => 'community', :profile => @community } %>
-
- <% f.fields_for :image_builder, @community.image do |i| %>
- <%= file_field_or_thumbnail(_('Image:'), @community.image, i) %>
- <% end %>
-
-
- <%= _('New members must be approved:')%>
-
-
-
-
- <%= template_options(Community, 'community')%>
-
- <% button_bar do %>
- <%= submit_button(:save, _('Create')) %>
- <%= button(:cancel, _('Cancel'), :action => 'index') %>
- <% end %>
-
-<% end %>
-
-
-
-
-
-
diff --git a/app/views/pending_task_notifier/notification.html.erb b/app/views/pending_task_notifier/notification.html.erb
new file mode 100644
index 0000000..852e985
--- /dev/null
+++ b/app/views/pending_task_notifier/notification.html.erb
@@ -0,0 +1,25 @@
+<%= _("Dear %s") % @person.name %>,
+
+<%= _("You have %d pending task(s).") % @tasks.size %>
+
+<%= @tasks.map{|i| " * #{i.description}"}.join("\n") %>
+
+<%= _("Click in address below to process task(s):") %>
+
+<%= @url_for_pending_tasks %>
+<% @organizations_with_pending_tasks.each do |organization| %>
+<% pending_tasks = @person.pending_tasks_for_organization(organization) %>
+<%= _("%s has %d pending task(s).") % [organization.name, pending_tasks.size] %>
+
+<%= pending_tasks.map{|i| " * #{i.information}"}.join("\n") %>
+
+<%= _("Click in address below to process task(s):") %>
+
+<%= url_for(:host => @default_hostname, :controller => 'tasks', :profile => organization.identifier) %>
+<% end %>
+
+<%= _('Greetings,') %>
+
+--
+<%= _('%s team.') % @environment %>
+<%= @url %>
diff --git a/app/views/pending_task_notifier/notification.rhtml b/app/views/pending_task_notifier/notification.rhtml
deleted file mode 100644
index 852e985..0000000
--- a/app/views/pending_task_notifier/notification.rhtml
+++ /dev/null
@@ -1,25 +0,0 @@
-<%= _("Dear %s") % @person.name %>,
-
-<%= _("You have %d pending task(s).") % @tasks.size %>
-
-<%= @tasks.map{|i| " * #{i.description}"}.join("\n") %>
-
-<%= _("Click in address below to process task(s):") %>
-
-<%= @url_for_pending_tasks %>
-<% @organizations_with_pending_tasks.each do |organization| %>
-<% pending_tasks = @person.pending_tasks_for_organization(organization) %>
-<%= _("%s has %d pending task(s).") % [organization.name, pending_tasks.size] %>
-
-<%= pending_tasks.map{|i| " * #{i.information}"}.join("\n") %>
-
-<%= _("Click in address below to process task(s):") %>
-
-<%= url_for(:host => @default_hostname, :controller => 'tasks', :profile => organization.identifier) %>
-<% end %>
-
-<%= _('Greetings,') %>
-
---
-<%= _('%s team.') % @environment %>
-<%= @url %>
diff --git a/app/views/plugins/index.html.erb b/app/views/plugins/index.html.erb
new file mode 100644
index 0000000..8c4bc7d
--- /dev/null
+++ b/app/views/plugins/index.html.erb
@@ -0,0 +1,35 @@
+<%= _('Manage plugins') %>
+
+
+<%= _('Select which plugins you want to enable in your environment') %>
+
+
+<% labelled_form_for(:environment, @environment, :url => {:action => 'update'}) do |f| %>
+
+
+ <% @active_plugins.sort_by(&:plugin_name).each do |plugin| %>
+
+ <%= check_box_tag "environment[enabled_plugins][]", plugin, @environment.enabled_plugins.include?(plugin.to_s), :id => plugin.plugin_name %>
+
+ <%= hidden_field_tag('environment[enabled_plugins][]', '') %>
+ <%= plugin.plugin_name %>
+
+ <%= plugin.plugin_description %>
+ <% if plugin.has_admin_url? %>
+
+
+ <%= link_to(_('Configuration'), plugin.admin_url) %>
+ <% end %>
+
+
+ <% end %>
+
+
+
+ <% button_bar do %>
+ <%= submit_button('save', _('Save changes')) %>
+ <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
+ <% end %>
+
+
+<% end %>
diff --git a/app/views/plugins/index.rhtml b/app/views/plugins/index.rhtml
deleted file mode 100644
index 8c4bc7d..0000000
--- a/app/views/plugins/index.rhtml
+++ /dev/null
@@ -1,35 +0,0 @@
-<%= _('Manage plugins') %>
-
-
-<%= _('Select which plugins you want to enable in your environment') %>
-
-
-<% labelled_form_for(:environment, @environment, :url => {:action => 'update'}) do |f| %>
-
-
- <% @active_plugins.sort_by(&:plugin_name).each do |plugin| %>
-
- <%= check_box_tag "environment[enabled_plugins][]", plugin, @environment.enabled_plugins.include?(plugin.to_s), :id => plugin.plugin_name %>
-
- <%= hidden_field_tag('environment[enabled_plugins][]', '') %>
- <%= plugin.plugin_name %>
-
- <%= plugin.plugin_description %>
- <% if plugin.has_admin_url? %>
-
-
- <%= link_to(_('Configuration'), plugin.admin_url) %>
- <% end %>
-
-
- <% end %>
-
-
-
- <% button_bar do %>
- <%= submit_button('save', _('Save changes')) %>
- <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
- <% end %>
-
-
-<% end %>
diff --git a/app/views/profile/_add_member_in_community.html.erb b/app/views/profile/_add_member_in_community.html.erb
new file mode 100644
index 0000000..3cc3227
--- /dev/null
+++ b/app/views/profile/_add_member_in_community.html.erb
@@ -0,0 +1 @@
+<%= render :partial => 'default_activity', :locals => { :activity => activity, :tab_action => tab_action } %>
diff --git a/app/views/profile/_add_member_in_community.rhtml b/app/views/profile/_add_member_in_community.rhtml
deleted file mode 100644
index 3cc3227..0000000
--- a/app/views/profile/_add_member_in_community.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= render :partial => 'default_activity', :locals => { :activity => activity, :tab_action => tab_action } %>
diff --git a/app/views/profile/_comment.html.erb b/app/views/profile/_comment.html.erb
new file mode 100644
index 0000000..50a9b36
--- /dev/null
+++ b/app/views/profile/_comment.html.erb
@@ -0,0 +1,87 @@
+<% Comment %>
+<% Profile %>
+<% Person %>
+
+
+
+
+
+
+ <% unless comment.replies.blank? %>
+
+ <% end %>
+
+
+
diff --git a/app/views/profile/_comment.rhtml b/app/views/profile/_comment.rhtml
deleted file mode 100644
index 50a9b36..0000000
--- a/app/views/profile/_comment.rhtml
+++ /dev/null
@@ -1,87 +0,0 @@
-<% Comment %>
-<% Profile %>
-<% Person %>
-
-
-
-
-
-
- <% unless comment.replies.blank? %>
-
- <% end %>
-
-
-
diff --git a/app/views/profile/_common.html.erb b/app/views/profile/_common.html.erb
new file mode 100644
index 0000000..54efeca
--- /dev/null
+++ b/app/views/profile/_common.html.erb
@@ -0,0 +1,53 @@
+<% unless @action %>
+ <% cache_timeout(profile.cache_key + '-profile-general-info', 4.hours) do %>
+
+
+ <%= _('Content') %>
+
+
+
+ <% profile.blogs.each do |blog| %>
+
+ <%= blog.name + ':' %>
+
+ <%= link_to(n_('One post', '%{num} posts', blog.posts.published.count) % { :num => blog.posts.published.count }, blog.url) %>
+
+
+ <% end %>
+ <% profile.image_galleries.each do |gallery| %>
+
+ <%= gallery.name + ':' %>
+
+ <%= link_to(n_('One picture', '%{num} pictures', gallery.images.published.count) % { :num => gallery.images.published.count }, gallery.url) %>
+
+
+ <% end %>
+
+
+ <%= _('Events:') %>
+
+ <%= link_to profile.events.published.count, :controller => 'events', :action => 'events' %>
+
+
+
+
+ <%= _('Tags:') %>
+
+
+ <%= tag_cloud @tags, :id, { :action => 'tags' }, :max_size => 18, :min_size => 10%>
+
+
+
+ <% if !environment.enabled?('disable_categories') && !profile.interests.empty? %>
+
+ <%= _('Interests') %>
+
+ <% profile.interests.each do |item| %>
+
+
+ <%= link_to item.name, :controller => 'search', :action => 'category_index', :category_path => item.explode_path %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+<% end %>
diff --git a/app/views/profile/_common.rhtml b/app/views/profile/_common.rhtml
deleted file mode 100644
index 54efeca..0000000
--- a/app/views/profile/_common.rhtml
+++ /dev/null
@@ -1,53 +0,0 @@
-<% unless @action %>
- <% cache_timeout(profile.cache_key + '-profile-general-info', 4.hours) do %>
-
-
- <%= _('Content') %>
-
-
-
- <% profile.blogs.each do |blog| %>
-
- <%= blog.name + ':' %>
-
- <%= link_to(n_('One post', '%{num} posts', blog.posts.published.count) % { :num => blog.posts.published.count }, blog.url) %>
-
-
- <% end %>
- <% profile.image_galleries.each do |gallery| %>
-
- <%= gallery.name + ':' %>
-
- <%= link_to(n_('One picture', '%{num} pictures', gallery.images.published.count) % { :num => gallery.images.published.count }, gallery.url) %>
-
-
- <% end %>
-
-
- <%= _('Events:') %>
-
- <%= link_to profile.events.published.count, :controller => 'events', :action => 'events' %>
-
-
-
-
- <%= _('Tags:') %>
-
-
- <%= tag_cloud @tags, :id, { :action => 'tags' }, :max_size => 18, :min_size => 10%>
-
-
-
- <% if !environment.enabled?('disable_categories') && !profile.interests.empty? %>
-
- <%= _('Interests') %>
-
- <% profile.interests.each do |item| %>
-
-
- <%= link_to item.name, :controller => 'search', :action => 'category_index', :category_path => item.explode_path %>
-
- <% end %>
- <% end %>
- <% end %>
-<% end %>
diff --git a/app/views/profile/_create_article.html.erb b/app/views/profile/_create_article.html.erb
new file mode 100644
index 0000000..c955ac7
--- /dev/null
+++ b/app/views/profile/_create_article.html.erb
@@ -0,0 +1,22 @@
+
+ <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
+
+
+
+ <%= link_to activity.user.short_name(20), activity.user.url %>
+ <%= _("on community %s") % link_to(activity.target.profile.short_name(20), activity.target.profile.url) if activity.target.profile.is_a?(Community) %>
+
+
+
<%= link_to(activity.params['name'], activity.params['url']) %>
+
+ <%= image_tag(activity.params['first_image']) unless activity.params['first_image'].blank? %><%= strip_tags(truncate(activity.params['lead'], :length => 1000, :ommision => '...')).gsub(/(\xA0|\xC2|\s)+/, ' ').gsub(/^\s+/, '') %>
<%= link_to(_('See more'), activity.params['url']) unless activity.get_lead.blank? %>
+
+ <%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %>
+
<%= time_ago_as_sentence(activity.created_at) %>
+
+ <%= link_to s_('profile|Comment'), '#', { :class => 'focus-on-comment'} %>
+ <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :only_hide => true, :view => params[:view]).to_json, _('Are you sure you want to remove this activity and all its replies?').to_json]) if logged_in? && current_person == @profile %>
+
+
+
+<%= render :partial => 'profile_comments', :locals => { :activity => activity, :tab_action => tab_action } %>
diff --git a/app/views/profile/_create_article.rhtml b/app/views/profile/_create_article.rhtml
deleted file mode 100644
index c955ac7..0000000
--- a/app/views/profile/_create_article.rhtml
+++ /dev/null
@@ -1,22 +0,0 @@
-
- <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
-
-
-
- <%= link_to activity.user.short_name(20), activity.user.url %>
- <%= _("on community %s") % link_to(activity.target.profile.short_name(20), activity.target.profile.url) if activity.target.profile.is_a?(Community) %>
-
-
-
<%= link_to(activity.params['name'], activity.params['url']) %>
-
- <%= image_tag(activity.params['first_image']) unless activity.params['first_image'].blank? %><%= strip_tags(truncate(activity.params['lead'], :length => 1000, :ommision => '...')).gsub(/(\xA0|\xC2|\s)+/, ' ').gsub(/^\s+/, '') %>
<%= link_to(_('See more'), activity.params['url']) unless activity.get_lead.blank? %>
-
- <%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %>
-
<%= time_ago_as_sentence(activity.created_at) %>
-
- <%= link_to s_('profile|Comment'), '#', { :class => 'focus-on-comment'} %>
- <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :only_hide => true, :view => params[:view]).to_json, _('Are you sure you want to remove this activity and all its replies?').to_json]) if logged_in? && current_person == @profile %>
-
-
-
-<%= render :partial => 'profile_comments', :locals => { :activity => activity, :tab_action => tab_action } %>
diff --git a/app/views/profile/_default_activity.html.erb b/app/views/profile/_default_activity.html.erb
new file mode 100644
index 0000000..9f1be9c
--- /dev/null
+++ b/app/views/profile/_default_activity.html.erb
@@ -0,0 +1,13 @@
+
+ <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
+
+
+
<%= link_to activity.user.name, activity.user.url %> <%= describe activity %>
+
<%= time_ago_as_sentence(activity.created_at) %>
+
+ <%= link_to s_('profile|Comment'), '#', { :class => 'focus-on-comment'} %>
+ <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]).to_json, _('Are you sure you want to remove this activity and all its replies?').to_json]) if logged_in? && current_person == @profile %>
+
+
+
+<%= render :partial => 'profile_comments', :locals => { :activity => activity, :tab_action => tab_action } %>
diff --git a/app/views/profile/_default_activity.rhtml b/app/views/profile/_default_activity.rhtml
deleted file mode 100644
index 9f1be9c..0000000
--- a/app/views/profile/_default_activity.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-
- <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
-
-
-
<%= link_to activity.user.name, activity.user.url %> <%= describe activity %>
-
<%= time_ago_as_sentence(activity.created_at) %>
-
- <%= link_to s_('profile|Comment'), '#', { :class => 'focus-on-comment'} %>
- <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]).to_json, _('Are you sure you want to remove this activity and all its replies?').to_json]) if logged_in? && current_person == @profile %>
-
-
-
-<%= render :partial => 'profile_comments', :locals => { :activity => activity, :tab_action => tab_action } %>
diff --git a/app/views/profile/_join_community.html.erb b/app/views/profile/_join_community.html.erb
new file mode 120000
index 0000000..208830a
--- /dev/null
+++ b/app/views/profile/_join_community.html.erb
@@ -0,0 +1 @@
+_add_member_in_community.rhtml
\ No newline at end of file
diff --git a/app/views/profile/_join_community.rhtml b/app/views/profile/_join_community.rhtml
deleted file mode 120000
index 208830a..0000000
--- a/app/views/profile/_join_community.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-_add_member_in_community.rhtml
\ No newline at end of file
diff --git a/app/views/profile/_leave_comment_on_activity.html.erb b/app/views/profile/_leave_comment_on_activity.html.erb
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/views/profile/_leave_comment_on_activity.html.erb
diff --git a/app/views/profile/_leave_comment_on_activity.rhtml b/app/views/profile/_leave_comment_on_activity.rhtml
deleted file mode 100644
index e69de29..0000000
--- a/app/views/profile/_leave_comment_on_activity.rhtml
+++ /dev/null
diff --git a/app/views/profile/_leave_scrap.html.erb b/app/views/profile/_leave_scrap.html.erb
new file mode 100644
index 0000000..03aaec3
--- /dev/null
+++ b/app/views/profile/_leave_scrap.html.erb
@@ -0,0 +1,12 @@
+
+ <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
+
+
+
<%= link_to activity.user.name, activity.user.url %> <%= describe activity %>
+
<%= time_ago_as_sentence(activity.created_at) %>
+
+ <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]).to_json, _('Are you sure you want to remove this activity and all its replies?').to_json]) if logged_in? && current_person == @profile %>
+
+
+
+
diff --git a/app/views/profile/_leave_scrap.rhtml b/app/views/profile/_leave_scrap.rhtml
deleted file mode 100644
index 03aaec3..0000000
--- a/app/views/profile/_leave_scrap.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-
- <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
-
-
-
<%= link_to activity.user.name, activity.user.url %> <%= describe activity %>
-
<%= time_ago_as_sentence(activity.created_at) %>
-
- <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]).to_json, _('Are you sure you want to remove this activity and all its replies?').to_json]) if logged_in? && current_person == @profile %>
-
-
-
-
diff --git a/app/views/profile/_leave_scrap_to_self.html.erb b/app/views/profile/_leave_scrap_to_self.html.erb
new file mode 120000
index 0000000..56c0e42
--- /dev/null
+++ b/app/views/profile/_leave_scrap_to_self.html.erb
@@ -0,0 +1 @@
+_leave_scrap.rhtml
\ No newline at end of file
diff --git a/app/views/profile/_leave_scrap_to_self.rhtml b/app/views/profile/_leave_scrap_to_self.rhtml
deleted file mode 120000
index 56c0e42..0000000
--- a/app/views/profile/_leave_scrap_to_self.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-_leave_scrap.rhtml
\ No newline at end of file
diff --git a/app/views/profile/_new_friendship.html.erb b/app/views/profile/_new_friendship.html.erb
new file mode 120000
index 0000000..208830a
--- /dev/null
+++ b/app/views/profile/_new_friendship.html.erb
@@ -0,0 +1 @@
+_add_member_in_community.rhtml
\ No newline at end of file
diff --git a/app/views/profile/_new_friendship.rhtml b/app/views/profile/_new_friendship.rhtml
deleted file mode 120000
index 208830a..0000000
--- a/app/views/profile/_new_friendship.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-_add_member_in_community.rhtml
\ No newline at end of file
diff --git a/app/views/profile/_organization_profile.html.erb b/app/views/profile/_organization_profile.html.erb
new file mode 100644
index 0000000..1a9315b
--- /dev/null
+++ b/app/views/profile/_organization_profile.html.erb
@@ -0,0 +1,39 @@
+
+
+ <%= _('Basic information')%>
+
+
+
+ <%= _('Members') %>
+
+ <%= link_to profile.members_count, :controller => 'profile', :action => 'members' %>
+
+
+
+ <%= display_field(_('Type:'), profile, :privacy_setting, true) %>
+
+ <%= display_field(_('Location:'), profile, :location, true) %>
+
+
+ <%= _('Profile created at:') %>
+ <%= show_date(profile.created_at) %>
+
+
+ <% if profile.kind_of?(Enterprise) && !profile.environment.enabled?('disable_products_for_enterprises') %>
+
+
+
+ <%= link_to _('Products/Services'), :controller => 'catalog', :action => 'index' %>
+
+
+ <% end %>
+
+
+ <%= _('Administrators:') %>
+
+ <%= profile.admins.map { |admin| link_to(admin.short_name, admin.url)}.join(', ') %>
+
+
+
+ <%= render :partial => 'common' %>
+
diff --git a/app/views/profile/_organization_profile.rhtml b/app/views/profile/_organization_profile.rhtml
deleted file mode 100644
index 1a9315b..0000000
--- a/app/views/profile/_organization_profile.rhtml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- <%= _('Basic information')%>
-
-
-
- <%= _('Members') %>
-
- <%= link_to profile.members_count, :controller => 'profile', :action => 'members' %>
-
-
-
- <%= display_field(_('Type:'), profile, :privacy_setting, true) %>
-
- <%= display_field(_('Location:'), profile, :location, true) %>
-
-
- <%= _('Profile created at:') %>
- <%= show_date(profile.created_at) %>
-
-
- <% if profile.kind_of?(Enterprise) && !profile.environment.enabled?('disable_products_for_enterprises') %>
-
-
-
- <%= link_to _('Products/Services'), :controller => 'catalog', :action => 'index' %>
-
-
- <% end %>
-
-
- <%= _('Administrators:') %>
-
- <%= profile.admins.map { |admin| link_to(admin.short_name, admin.url)}.join(', ') %>
-
-
-
- <%= render :partial => 'common' %>
-
diff --git a/app/views/profile/_person_profile.html.erb b/app/views/profile/_person_profile.html.erb
new file mode 100644
index 0000000..9fac130
--- /dev/null
+++ b/app/views/profile/_person_profile.html.erb
@@ -0,0 +1,49 @@
+
+
+ <%= _('Basic information')%>
+
+ <%= display_field(_('Sex:'), profile, :sex) { |gender| { 'male' => _('Male'), 'female' => _('Female') }[gender] } %>
+ <%= display_field(_('Date of birth:'), profile, :birth_date) { |date| show_date(date) }%>
+ <%= display_field(_('Location:'), profile, :location, true) %>
+
+ <%= display_field(_('Type:'), profile, :privacy_setting, true) %>
+
+
+ <%= _('Profile created at:') %>
+ <%= show_date(profile.created_at) %>
+
+
+ <%= display_contact profile %>
+
+ <% cache_timeout(profile.relationships_cache_key, 4.hours) do %>
+ <%= display_work_info profile %>
+
+ <% if !environment.enabled?('disable_asset_enterprises') && !profile.enterprises.empty? %>
+
+ <%= __('Enterprises') %>
+
+ <% profile.enterprises.includes(:environment,:domains, :preferred_domain).each do |item| %>
+
+
+ <%= button 'menu-enterprise', item.name, item.url %>
+
+ <% end %>
+ <% end %>
+
+
+ <%= _('Network')%>
+
+
+ <%= __('Friends') + ':' %>
+ <%= link_to profile.friends.count, { :controller => 'profile', :action => 'friends' } %>
+
+
+ <%= __('Communities') + ':' %>
+ <%= link_to profile.communities.count, :controller => "profile", :action => 'communities' %>
+
+
+ <%= render :partial => 'common' %>
+
+ <% end %>
+
+
diff --git a/app/views/profile/_person_profile.rhtml b/app/views/profile/_person_profile.rhtml
deleted file mode 100644
index 9fac130..0000000
--- a/app/views/profile/_person_profile.rhtml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
- <%= _('Basic information')%>
-
- <%= display_field(_('Sex:'), profile, :sex) { |gender| { 'male' => _('Male'), 'female' => _('Female') }[gender] } %>
- <%= display_field(_('Date of birth:'), profile, :birth_date) { |date| show_date(date) }%>
- <%= display_field(_('Location:'), profile, :location, true) %>
-
- <%= display_field(_('Type:'), profile, :privacy_setting, true) %>
-
-
- <%= _('Profile created at:') %>
- <%= show_date(profile.created_at) %>
-
-
- <%= display_contact profile %>
-
- <% cache_timeout(profile.relationships_cache_key, 4.hours) do %>
- <%= display_work_info profile %>
-
- <% if !environment.enabled?('disable_asset_enterprises') && !profile.enterprises.empty? %>
-
- <%= __('Enterprises') %>
-
- <% profile.enterprises.includes(:environment,:domains, :preferred_domain).each do |item| %>
-
-
- <%= button 'menu-enterprise', item.name, item.url %>
-
- <% end %>
- <% end %>
-
-
- <%= _('Network')%>
-
-
- <%= __('Friends') + ':' %>
- <%= link_to profile.friends.count, { :controller => 'profile', :action => 'friends' } %>
-
-
- <%= __('Communities') + ':' %>
- <%= link_to profile.communities.count, :controller => "profile", :action => 'communities' %>
-
-
- <%= render :partial => 'common' %>
-
- <% end %>
-
-
diff --git a/app/views/profile/_private_profile.html.erb b/app/views/profile/_private_profile.html.erb
new file mode 100644
index 0000000..1d5cae3
--- /dev/null
+++ b/app/views/profile/_private_profile.html.erb
@@ -0,0 +1,17 @@
+
+ <%= profile_image(profile, :big) %>
+
+
+<%= @message %>
+<%= profile.description %>
+
+<% button_bar do %>
+ <% if @action == :join && logged_in? %>
+ <%= button(:add, content_tag('span', __('Join')), profile.join_url, :class => 'join-community', :title => _("Join community"), :style => 'position: relative;') %>
+ <% end %>
+ <% if @action == :add_friend && logged_in? && !user.already_request_friendship?(profile) %>
+ <%= button(:add, content_tag('span', __('Add friend')), profile.add_url, :class => 'add-friend', :title => _("Add friend"), :style => 'position: relative;') %>
+ <% end %>
+ <%= button :back, _('Go back'), :back %>
+ <%= button :home, _("Go to %s home page") % environment.name, :controller => 'home' %>
+<% end %>
diff --git a/app/views/profile/_private_profile.rhtml b/app/views/profile/_private_profile.rhtml
deleted file mode 100644
index 1d5cae3..0000000
--- a/app/views/profile/_private_profile.rhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-
- <%= profile_image(profile, :big) %>
-
-
-<%= @message %>
-<%= profile.description %>
-
-<% button_bar do %>
- <% if @action == :join && logged_in? %>
- <%= button(:add, content_tag('span', __('Join')), profile.join_url, :class => 'join-community', :title => _("Join community"), :style => 'position: relative;') %>
- <% end %>
- <% if @action == :add_friend && logged_in? && !user.already_request_friendship?(profile) %>
- <%= button(:add, content_tag('span', __('Add friend')), profile.add_url, :class => 'add-friend', :title => _("Add friend"), :style => 'position: relative;') %>
- <% end %>
- <%= button :back, _('Go back'), :back %>
- <%= button :home, _("Go to %s home page") % environment.name, :controller => 'home' %>
-<% end %>
diff --git a/app/views/profile/_profile.html.erb b/app/views/profile/_profile.html.erb
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/app/views/profile/_profile.html.erb
@@ -0,0 +1 @@
+
diff --git a/app/views/profile/_profile.rhtml b/app/views/profile/_profile.rhtml
deleted file mode 100644
index 8b13789..0000000
--- a/app/views/profile/_profile.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/app/views/profile/_profile_activities_list.html.erb b/app/views/profile/_profile_activities_list.html.erb
new file mode 100644
index 0000000..462cc1d
--- /dev/null
+++ b/app/views/profile/_profile_activities_list.html.erb
@@ -0,0 +1,16 @@
+<% unless activities.nil? %>
+ <% activities.each do |a| %>
+ <% activity = a.klass.constantize.find(a.id) %>
+ <% if activity.kind_of?(ActionTracker::Record) %>
+ <%= render :partial => 'profile_activity', :locals => { :activity => activity, :tab_action => 'wall' } if activity.visible? %>
+ <% else %>
+ <%= render :partial => 'profile_scrap', :locals => {:scrap => activity } %>
+ <% end %>
+ <% end %>
+<% end %>
+
+<% if activities.current_page < activities.total_pages %>
+
+ <%= button_to_remote :add, _('View more'), :url => {:action => 'view_more_activities', :page => (activities.current_page + 1)}, :update => "profile_activities_page_#{activities.current_page}" %>
+
+<% end %>
diff --git a/app/views/profile/_profile_activities_list.rhtml b/app/views/profile/_profile_activities_list.rhtml
deleted file mode 100644
index 462cc1d..0000000
--- a/app/views/profile/_profile_activities_list.rhtml
+++ /dev/null
@@ -1,16 +0,0 @@
-<% unless activities.nil? %>
- <% activities.each do |a| %>
- <% activity = a.klass.constantize.find(a.id) %>
- <% if activity.kind_of?(ActionTracker::Record) %>
- <%= render :partial => 'profile_activity', :locals => { :activity => activity, :tab_action => 'wall' } if activity.visible? %>
- <% else %>
- <%= render :partial => 'profile_scrap', :locals => {:scrap => activity } %>
- <% end %>
- <% end %>
-<% end %>
-
-<% if activities.current_page < activities.total_pages %>
-
- <%= button_to_remote :add, _('View more'), :url => {:action => 'view_more_activities', :page => (activities.current_page + 1)}, :update => "profile_activities_page_#{activities.current_page}" %>
-
-<% end %>
diff --git a/app/views/profile/_profile_activities_scraps.html.erb b/app/views/profile/_profile_activities_scraps.html.erb
new file mode 100644
index 0000000..538839a
--- /dev/null
+++ b/app/views/profile/_profile_activities_scraps.html.erb
@@ -0,0 +1,2 @@
+NÂO DEVE APARECER!!
+
diff --git a/app/views/profile/_profile_activities_scraps.rhtml b/app/views/profile/_profile_activities_scraps.rhtml
deleted file mode 100644
index 538839a..0000000
--- a/app/views/profile/_profile_activities_scraps.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-NÂO DEVE APARECER!!
-
diff --git a/app/views/profile/_profile_activity.html.erb b/app/views/profile/_profile_activity.html.erb
new file mode 100644
index 0000000..c0042d8
--- /dev/null
+++ b/app/views/profile/_profile_activity.html.erb
@@ -0,0 +1,4 @@
+
+ <%= render :partial => activity.verb, :locals => { :activity => activity, :tab_action => tab_action }%>
+
+
diff --git a/app/views/profile/_profile_activity.rhtml b/app/views/profile/_profile_activity.rhtml
deleted file mode 100644
index c0042d8..0000000
--- a/app/views/profile/_profile_activity.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-
- <%= render :partial => activity.verb, :locals => { :activity => activity, :tab_action => tab_action }%>
-
-
diff --git a/app/views/profile/_profile_comment_form.html.erb b/app/views/profile/_profile_comment_form.html.erb
new file mode 100644
index 0000000..b158ff2
--- /dev/null
+++ b/app/views/profile/_profile_comment_form.html.erb
@@ -0,0 +1,22 @@
+
diff --git a/app/views/profile/_profile_comment_form.rhtml b/app/views/profile/_profile_comment_form.rhtml
deleted file mode 100644
index b158ff2..0000000
--- a/app/views/profile/_profile_comment_form.rhtml
+++ /dev/null
@@ -1,22 +0,0 @@
-
diff --git a/app/views/profile/_profile_comments.html.erb b/app/views/profile/_profile_comments.html.erb
new file mode 100644
index 0000000..40496c7
--- /dev/null
+++ b/app/views/profile/_profile_comments.html.erb
@@ -0,0 +1,13 @@
+
+
+<% if activity.comments_count > 2 %>
+
+<% end %>
+
+
+
+<%= render :partial => 'profile_comment_form', :locals => { :activity => activity, :tab_action => tab_action } %>
diff --git a/app/views/profile/_profile_comments.rhtml b/app/views/profile/_profile_comments.rhtml
deleted file mode 100644
index 40496c7..0000000
--- a/app/views/profile/_profile_comments.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-<% if activity.comments_count > 2 %>
-
-<% end %>
-
-
-
-<%= render :partial => 'profile_comment_form', :locals => { :activity => activity, :tab_action => tab_action } %>
diff --git a/app/views/profile/_profile_network.html.erb b/app/views/profile/_profile_network.html.erb
new file mode 100644
index 0000000..99de5dd
--- /dev/null
+++ b/app/views/profile/_profile_network.html.erb
@@ -0,0 +1,4 @@
+<%= _("%s's network activity") % @profile.name %>
+
+ <%= render :partial => 'profile_network_activities', :locals => {:network_activities => @network_activities} %>
+
diff --git a/app/views/profile/_profile_network.rhtml b/app/views/profile/_profile_network.rhtml
deleted file mode 100644
index 99de5dd..0000000
--- a/app/views/profile/_profile_network.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<%= _("%s's network activity") % @profile.name %>
-
- <%= render :partial => 'profile_network_activities', :locals => {:network_activities => @network_activities} %>
-
diff --git a/app/views/profile/_profile_network_activities.html.erb b/app/views/profile/_profile_network_activities.html.erb
new file mode 100644
index 0000000..8399fb2
--- /dev/null
+++ b/app/views/profile/_profile_network_activities.html.erb
@@ -0,0 +1,8 @@
+<% network_activities.each do |activity| %>
+ <%= render :partial => 'profile_activity', :locals => { :activity => activity, :tab_action => 'network' } if activity.visible? %>
+<% end %>
+<% if network_activities.current_page < network_activities.total_pages %>
+
+ <%= button_to_remote :add, _('View more'), :url => {:action => 'view_more_network_activities', :page => (network_activities.current_page + 1)}, :update => "profile_network_activities_page_#{network_activities.current_page}" %>
+
+<% end %>
diff --git a/app/views/profile/_profile_network_activities.rhtml b/app/views/profile/_profile_network_activities.rhtml
deleted file mode 100644
index 8399fb2..0000000
--- a/app/views/profile/_profile_network_activities.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-<% network_activities.each do |activity| %>
- <%= render :partial => 'profile_activity', :locals => { :activity => activity, :tab_action => 'network' } if activity.visible? %>
-<% end %>
-<% if network_activities.current_page < network_activities.total_pages %>
-
- <%= button_to_remote :add, _('View more'), :url => {:action => 'view_more_network_activities', :page => (network_activities.current_page + 1)}, :update => "profile_network_activities_page_#{network_activities.current_page}" %>
-
-<% end %>
diff --git a/app/views/profile/_profile_scrap.html.erb b/app/views/profile/_profile_scrap.html.erb
new file mode 100644
index 0000000..670e33a
--- /dev/null
+++ b/app/views/profile/_profile_scrap.html.erb
@@ -0,0 +1,32 @@
+
+
+ <%= link_to(profile_image(scrap.sender, :minor), scrap.sender.url) %>
+
+
+
<%= link_to scrap.sender.name, scrap.sender.url %>
+
<%= txt2html scrap.content %>
+
<%= time_ago_as_sentence(scrap.created_at) %>
+
+ <% if logged_in? && current_person.follows?(scrap.sender) %>
+
+ <%= link_to_function s_('profile|Comment'), "hide_and_show(['#profile-wall-message-response-#{scrap.id}'],['#profile-wall-reply-#{scrap.id}', '#profile-wall-reply-form-#{scrap.id}']);$('reply_content_#{scrap.id}').value='';$('reply_content_#{scrap.id}').focus();return false", :class => "profile-send-reply" %>
+
+ <% end %>
+ <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_scrap, :scrap_id => scrap.id, :view => params[:view]).to_json, _('Are you sure you want to remove this scrap and all its replies?').to_json]) if logged_in? && user.can_control_scrap?(scrap) %>
+
+
+
+ <% if scrap.replies.count > 2 %>
+
+ <% end %>
+
+
+ <%= render :partial => 'profile_scrap_reply_form', :locals => { :scrap => scrap } %>
+
+
diff --git a/app/views/profile/_profile_scrap.rhtml b/app/views/profile/_profile_scrap.rhtml
deleted file mode 100644
index 670e33a..0000000
--- a/app/views/profile/_profile_scrap.rhtml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- <%= link_to(profile_image(scrap.sender, :minor), scrap.sender.url) %>
-
-
-
<%= link_to scrap.sender.name, scrap.sender.url %>
-
<%= txt2html scrap.content %>
-
<%= time_ago_as_sentence(scrap.created_at) %>
-
- <% if logged_in? && current_person.follows?(scrap.sender) %>
-
- <%= link_to_function s_('profile|Comment'), "hide_and_show(['#profile-wall-message-response-#{scrap.id}'],['#profile-wall-reply-#{scrap.id}', '#profile-wall-reply-form-#{scrap.id}']);$('reply_content_#{scrap.id}').value='';$('reply_content_#{scrap.id}').focus();return false", :class => "profile-send-reply" %>
-
- <% end %>
- <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_scrap, :scrap_id => scrap.id, :view => params[:view]).to_json, _('Are you sure you want to remove this scrap and all its replies?').to_json]) if logged_in? && user.can_control_scrap?(scrap) %>
-
-
-
- <% if scrap.replies.count > 2 %>
-
- <% end %>
-
-
- <%= render :partial => 'profile_scrap_reply_form', :locals => { :scrap => scrap } %>
-
-
diff --git a/app/views/profile/_profile_scrap_reply_form.html.erb b/app/views/profile/_profile_scrap_reply_form.html.erb
new file mode 100644
index 0000000..dcd13a6
--- /dev/null
+++ b/app/views/profile/_profile_scrap_reply_form.html.erb
@@ -0,0 +1,21 @@
+
diff --git a/app/views/profile/_profile_scrap_reply_form.rhtml b/app/views/profile/_profile_scrap_reply_form.rhtml
deleted file mode 100644
index dcd13a6..0000000
--- a/app/views/profile/_profile_scrap_reply_form.rhtml
+++ /dev/null
@@ -1,21 +0,0 @@
-
diff --git a/app/views/profile/_profile_scraps.html.erb b/app/views/profile/_profile_scraps.html.erb
new file mode 100644
index 0000000..e4630da
--- /dev/null
+++ b/app/views/profile/_profile_scraps.html.erb
@@ -0,0 +1 @@
+NÃO DEVE APARECER
diff --git a/app/views/profile/_profile_scraps.rhtml b/app/views/profile/_profile_scraps.rhtml
deleted file mode 100644
index e4630da..0000000
--- a/app/views/profile/_profile_scraps.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-NÃO DEVE APARECER
diff --git a/app/views/profile/_profile_wall.html.erb b/app/views/profile/_profile_wall.html.erb
new file mode 100644
index 0000000..f0601f9
--- /dev/null
+++ b/app/views/profile/_profile_wall.html.erb
@@ -0,0 +1,12 @@
+<%= _("%s's wall") % @profile.name %>
+
+ <%= flash[:error] %>
+ <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap', :tab_action => 'wall' }, :update => 'profile_activities', :success => "$('leave_scrap_content').value=''" do %>
+ <%= limited_text_area :scrap, :content, 420, 'leave_scrap_content', :cols => 50, :rows => 2 %>
+ <%= submit_button :new, _('Share') %>
+ <% end %>
+
+
+
+ <%= render :partial => 'profile_activities_list', :locals => {:activities => @activities} %>
+
diff --git a/app/views/profile/_profile_wall.rhtml b/app/views/profile/_profile_wall.rhtml
deleted file mode 100644
index f0601f9..0000000
--- a/app/views/profile/_profile_wall.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<%= _("%s's wall") % @profile.name %>
-
- <%= flash[:error] %>
- <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap', :tab_action => 'wall' }, :update => 'profile_activities', :success => "$('leave_scrap_content').value=''" do %>
- <%= limited_text_area :scrap, :content, 420, 'leave_scrap_content', :cols => 50, :rows => 2 %>
- <%= submit_button :new, _('Share') %>
- <% end %>
-
-
-
- <%= render :partial => 'profile_activities_list', :locals => {:activities => @activities} %>
-
diff --git a/app/views/profile/_update_article.html.erb b/app/views/profile/_update_article.html.erb
new file mode 100644
index 0000000..aec088a
--- /dev/null
+++ b/app/views/profile/_update_article.html.erb
@@ -0,0 +1 @@
+NAO É PRA APARECER
diff --git a/app/views/profile/_update_article.rhtml b/app/views/profile/_update_article.rhtml
deleted file mode 100644
index aec088a..0000000
--- a/app/views/profile/_update_article.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-NAO É PRA APARECER
diff --git a/app/views/profile/_upload_image.html.erb b/app/views/profile/_upload_image.html.erb
new file mode 100644
index 0000000..ab2e901
--- /dev/null
+++ b/app/views/profile/_upload_image.html.erb
@@ -0,0 +1,14 @@
+
+
+ <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
+
+
+
<%= link_to activity.user.name, activity.user.url %> <%= describe activity %>
+
<%= time_ago_as_sentence(activity.created_at) %>
+
+ <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]).to_json, _('Are you sure you want to remove this activity and all its replies?').to_json]) if logged_in? && current_person == @profile %>
+
+
+
+
+
diff --git a/app/views/profile/_upload_image.rhtml b/app/views/profile/_upload_image.rhtml
deleted file mode 100644
index ab2e901..0000000
--- a/app/views/profile/_upload_image.rhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
- <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
-
-
-
<%= link_to activity.user.name, activity.user.url %> <%= describe activity %>
-
<%= time_ago_as_sentence(activity.created_at) %>
-
- <%= link_to_function(_('Remove'), 'remove_item_wall(this, %s, %s, %s); return false ;' % ["'.profile-activity-item'", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]).to_json, _('Are you sure you want to remove this activity and all its replies?').to_json]) if logged_in? && current_person == @profile %>
-
-
-
-
-
diff --git a/app/views/profile/communities.html.erb b/app/views/profile/communities.html.erb
new file mode 100644
index 0000000..93feff4
--- /dev/null
+++ b/app/views/profile/communities.html.erb
@@ -0,0 +1,24 @@
+
+
+
<%= _("%s's communities") % profile.name %>
+
+<% cache_timeout(profile.communities_cache_key(params), 4.hour) do %>
+
+ <% @communities.each do |community| %>
+ <%= profile_image_link(community)%>
+ <% end %>
+
+
+
+<% end %>
+
+<% button_bar do %>
+ <%= button :back, _('Go back'), { :controller => 'profile' } %>
+ <%= button :add, _('Create a new community'),
+ :controller => 'memberships', :action => 'new_community' if logged_in? && user == profile %>
+<% end %>
+
+
+
diff --git a/app/views/profile/communities.rhtml b/app/views/profile/communities.rhtml
deleted file mode 100644
index 93feff4..0000000
--- a/app/views/profile/communities.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
<%= _("%s's communities") % profile.name %>
-
-<% cache_timeout(profile.communities_cache_key(params), 4.hour) do %>
-
- <% @communities.each do |community| %>
- <%= profile_image_link(community)%>
- <% end %>
-
-
-
-<% end %>
-
-<% button_bar do %>
- <%= button :back, _('Go back'), { :controller => 'profile' } %>
- <%= button :add, _('Create a new community'),
- :controller => 'memberships', :action => 'new_community' if logged_in? && user == profile %>
-<% end %>
-
-
-
diff --git a/app/views/profile/content_tagged.html.erb b/app/views/profile/content_tagged.html.erb
new file mode 100644
index 0000000..bde9e04
--- /dev/null
+++ b/app/views/profile/content_tagged.html.erb
@@ -0,0 +1,23 @@
+<% add_rss_feed_to_head(_("%s's contents tagged with \"%s\"") % [profile.name, @tag], tag_feed_path) %>
+
+<%= _('Content tagged with "%s"') % CGI.escapeHTML(@tag) %>
+
+
+<%= link_to image_tag('icons-mime/rss-feed.png', :alt => _('Feed for this tag'), :title => _('Feed for this tag')), tag_feed_path, :class => 'blog-feed-link'%>
+
+
+<% cache_timeout(@tag_cache_key, 4.hour) do %>
+
+
+ <% for doc in @tagged %>
+ <%= link_to doc.title, doc.url %>
+ <% end %>
+
+
+
+ <%= pagination_links @tagged, :param_name => 'npage' %>
+
+
+ <%= link_to _('See content tagged with "%s" in the entire site') % CGI.escapeHTML(@tag), :controller => 'search', :action => 'tag', :tag => @tag %>
+
+<% end %>
diff --git a/app/views/profile/content_tagged.rhtml b/app/views/profile/content_tagged.rhtml
deleted file mode 100644
index bde9e04..0000000
--- a/app/views/profile/content_tagged.rhtml
+++ /dev/null
@@ -1,23 +0,0 @@
-<% add_rss_feed_to_head(_("%s's contents tagged with \"%s\"") % [profile.name, @tag], tag_feed_path) %>
-
-<%= _('Content tagged with "%s"') % CGI.escapeHTML(@tag) %>
-
-
-<%= link_to image_tag('icons-mime/rss-feed.png', :alt => _('Feed for this tag'), :title => _('Feed for this tag')), tag_feed_path, :class => 'blog-feed-link'%>
-
-
-<% cache_timeout(@tag_cache_key, 4.hour) do %>
-
-
- <% for doc in @tagged %>
- <%= link_to doc.title, doc.url %>
- <% end %>
-
-
-
- <%= pagination_links @tagged, :param_name => 'npage' %>
-
-
- <%= link_to _('See content tagged with "%s" in the entire site') % CGI.escapeHTML(@tag), :controller => 'search', :action => 'tag', :tag => @tag %>
-
-<% end %>
diff --git a/app/views/profile/enterprises.html.erb b/app/views/profile/enterprises.html.erb
new file mode 100644
index 0000000..d292177
--- /dev/null
+++ b/app/views/profile/enterprises.html.erb
@@ -0,0 +1,17 @@
+
+
+
<%= __("%s's enterprises") % profile.name %>
+
+
+<% @enterprises.each do |enterprise| %>
+ <%= profile_image_link(enterprise)%>
+<% end %>
+
+
+<% button_bar do %>
+ <%= button :back, _('Go back'), { :controller => 'profile' } %>
+ <%= button :add, __('Register a new enterprise'), :controller => 'enterprise_registration' if logged_in? && environment.enabled?('enterprise_registration') %>
+<% end %>
+
+
+
diff --git a/app/views/profile/enterprises.rhtml b/app/views/profile/enterprises.rhtml
deleted file mode 100644
index d292177..0000000
--- a/app/views/profile/enterprises.rhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
<%= __("%s's enterprises") % profile.name %>
-
-
-<% @enterprises.each do |enterprise| %>
- <%= profile_image_link(enterprise)%>
-<% end %>
-
-
-<% button_bar do %>
- <%= button :back, _('Go back'), { :controller => 'profile' } %>
- <%= button :add, __('Register a new enterprise'), :controller => 'enterprise_registration' if logged_in? && environment.enabled?('enterprise_registration') %>
-<% end %>
-
-
-
diff --git a/app/views/profile/fans.html.erb b/app/views/profile/fans.html.erb
new file mode 100644
index 0000000..f634123
--- /dev/null
+++ b/app/views/profile/fans.html.erb
@@ -0,0 +1,16 @@
+
+
+
<%= __("%s's fans") % profile.name %>
+
+
+<% @fans.each do |person| %>
+ <%= profile_image_link(person)%>
+<% end %>
+
+
+<% button_bar do %>
+ <%= button :back, _('Go back'), { :controller => 'profile' }%>
+<% end %>
+
+
+
diff --git a/app/views/profile/fans.rhtml b/app/views/profile/fans.rhtml
deleted file mode 100644
index f634123..0000000
--- a/app/views/profile/fans.rhtml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
<%= __("%s's fans") % profile.name %>
-
-
-<% @fans.each do |person| %>
- <%= profile_image_link(person)%>
-<% end %>
-
-
-<% button_bar do %>
- <%= button :back, _('Go back'), { :controller => 'profile' }%>
-<% end %>
-
-
-
diff --git a/app/views/profile/favorite_enterprises.html.erb b/app/views/profile/favorite_enterprises.html.erb
new file mode 100644
index 0000000..6484312
--- /dev/null
+++ b/app/views/profile/favorite_enterprises.html.erb
@@ -0,0 +1,16 @@
+
+
+
<%= __("%s's favorite enterprises") % profile.name %>
+
+
+<% @favorite_enterprises.each do |enterprise| %>
+ <%= profile_image_link(enterprise)%>
+<% end %>
+
+
+<% button_bar do %>
+ <%= button :back, _('Go back'), { :controller => 'profile' }%>
+<% end %>
+
+
+
diff --git a/app/views/profile/favorite_enterprises.rhtml b/app/views/profile/favorite_enterprises.rhtml
deleted file mode 100644
index 6484312..0000000
--- a/app/views/profile/favorite_enterprises.rhtml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
<%= __("%s's favorite enterprises") % profile.name %>
-
-
-<% @favorite_enterprises.each do |enterprise| %>
- <%= profile_image_link(enterprise)%>
-<% end %>
-
-
-<% button_bar do %>
- <%= button :back, _('Go back'), { :controller => 'profile' }%>
-<% end %>
-
-
-
diff --git a/app/views/profile/friends.html.erb b/app/views/profile/friends.html.erb
new file mode 100644
index 0000000..1da9c59
--- /dev/null
+++ b/app/views/profile/friends.html.erb
@@ -0,0 +1,26 @@
+
+
+
<%= __("%s's friends") % profile.name %>
+
+<% cache_timeout(profile.friends_cache_key(params), 4.hours) do %>
+
+ <% @friends.each do |friend| %>
+ <%= profile_image_link(friend) %>
+ <% end%>
+
+
+
+<% end %>
+
+<% button_bar do %>
+ <%= button :back, _('Go back'), { :controller => 'profile' } %>
+ <% if user == profile %>
+ <%= button :edit, _('Manage my friends'), :controller => 'friends', :action => 'index', :profile => profile.identifier %>
+ <%= button(:search, _('Invite people from my e-mail contacts'), :controller => 'invite', :action => 'select_address_book') %>
+ <% end %>
+<% end %>
+
+
+
diff --git a/app/views/profile/friends.rhtml b/app/views/profile/friends.rhtml
deleted file mode 100644
index 1da9c59..0000000
--- a/app/views/profile/friends.rhtml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
<%= __("%s's friends") % profile.name %>
-
-<% cache_timeout(profile.friends_cache_key(params), 4.hours) do %>
-
- <% @friends.each do |friend| %>
- <%= profile_image_link(friend) %>
- <% end%>
-
-
-
-<% end %>
-
-<% button_bar do %>
- <%= button :back, _('Go back'), { :controller => 'profile' } %>
- <% if user == profile %>
- <%= button :edit, _('Manage my friends'), :controller => 'friends', :action => 'index', :profile => profile.identifier %>
- <%= button(:search, _('Invite people from my e-mail contacts'), :controller => 'invite', :action => 'select_address_book') %>
- <% end %>
-<% end %>
-
-
-
diff --git a/app/views/profile/index.html.erb b/app/views/profile/index.html.erb
new file mode 100644
index 0000000..2f70250
--- /dev/null
+++ b/app/views/profile/index.html.erb
@@ -0,0 +1,46 @@
+<%= render :partial => 'shared/disabled_enterprise' %>
+
+<%= h profile.name %>
+
+<% if @action %>
+ <%= render :partial => 'private_profile' %>
+<% else %>
+ <% unless profile.description.blank? %>
+
+ <%= profile.description %>
+
+ <% end %>
+
+ <%= render :partial => 'shared/profile_search_form' %>
+
+<% end %>
+
+<% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %>
+
+
+
+ <% plugins_tabs = @plugins.dispatch(:profile_tabs).
+ map { |tab| {:title => tab[:title], :id => tab[:id], :content => instance_eval(&tab[:content]), :start => tab[:title]} }%>
+
+ <% tabs = plugins_tabs.select { |tab| tab[:start] } %>
+
+ <% if @profile.organization? %>
+ <% tabs << {:title => _('Profile'), :id => 'organization-profile', :content => (render :partial => 'organization_profile')} %>
+ <% if logged_in? && current_person.follows?(@profile) %>
+ <% tabs << {:title => _('Wall'), :id => 'profile-wall', :content => (render :partial => 'profile_wall')} %>
+ <% end %>
+ <% elsif @profile.person? %>
+ <% tabs << {:title => _('Profile'), :id => 'person-profile', :content => (render :partial => 'person_profile')} %>
+ <% if logged_in? && current_person.follows?(@profile) %>
+ <% tabs << {:title => _('Wall'), :id => 'profile-wall', :content => (render :partial => 'profile_wall')} %>
+ <% tabs << {:title => _('Network'), :id => 'profile-network', :content => (render :partial => 'profile_network')} %>
+ <% end %>
+ <% end %>
+
+ <% tabs += plugins_tabs.select { |tab| !tab[:start] } %>
+
+ <%= render_tabs(tabs) %>
+
+
+
+<% end %>
diff --git a/app/views/profile/index.rhtml b/app/views/profile/index.rhtml
deleted file mode 100644
index 2f70250..0000000
--- a/app/views/profile/index.rhtml
+++ /dev/null
@@ -1,46 +0,0 @@
-<%= render :partial => 'shared/disabled_enterprise' %>
-
-<%= h profile.name %>
-
-<% if @action %>
- <%= render :partial => 'private_profile' %>
-<% else %>
- <% unless profile.description.blank? %>
-
- <%= profile.description %>
-
- <% end %>
-
- <%= render :partial => 'shared/profile_search_form' %>
-
-<% end %>
-
-<% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %>
-
-
-
- <% plugins_tabs = @plugins.dispatch(:profile_tabs).
- map { |tab| {:title => tab[:title], :id => tab[:id], :content => instance_eval(&tab[:content]), :start => tab[:title]} }%>
-
- <% tabs = plugins_tabs.select { |tab| tab[:start] } %>
-
- <% if @profile.organization? %>
- <% tabs << {:title => _('Profile'), :id => 'organization-profile', :content => (render :partial => 'organization_profile')} %>
- <% if logged_in? && current_person.follows?(@profile) %>
- <% tabs << {:title => _('Wall'), :id => 'profile-wall', :content => (render :partial => 'profile_wall')} %>
- <% end %>
- <% elsif @profile.person? %>
- <% tabs << {:title => _('Profile'), :id => 'person-profile', :content => (render :partial => 'person_profile')} %>
- <% if logged_in? && current_person.follows?(@profile) %>
- <% tabs << {:title => _('Wall'), :id => 'profile-wall', :content => (render :partial => 'profile_wall')} %>
- <% tabs << {:title => _('Network'), :id => 'profile-network', :content => (render :partial => 'profile_network')} %>
- <% end %>
- <% end %>
-
- <% tabs += plugins_tabs.select { |tab| !tab[:start] } %>
-
- <%= render_tabs(tabs) %>
-
-
-
-<% end %>
diff --git a/app/views/profile/join.html.erb b/app/views/profile/join.html.erb
new file mode 100644
index 0000000..1ad934d
--- /dev/null
+++ b/app/views/profile/join.html.erb
@@ -0,0 +1,16 @@
+<%= _('Joining %s') % profile.name %>
+
+
+<%= _('Are you sure you want to join %s?') % profile.name %>
+
+
+<% form_tag do %>
+ <%= hidden_field_tag('back_to', @back_to) %>
+ <%= hidden_field_tag(:confirmation, 1) %>
+ <%= submit_button(:ok, _("Yes, I want to join.") % profile.name) %>
+ <% if logged_in? && request.xhr? %>
+ <%= lightbox_close_button(_("No, I don't want")) %>
+ <% else %>
+ <%= button(:cancel, _("No, I don't want."), profile.url) %>
+ <% end %>
+<% end %>
diff --git a/app/views/profile/join.rhtml b/app/views/profile/join.rhtml
deleted file mode 100644
index 1ad934d..0000000
--- a/app/views/profile/join.rhtml
+++ /dev/null
@@ -1,16 +0,0 @@
-<%= _('Joining %s') % profile.name %>
-
-
-<%= _('Are you sure you want to join %s?') % profile.name %>
-
-
-<% form_tag do %>
- <%= hidden_field_tag('back_to', @back_to) %>
- <%= hidden_field_tag(:confirmation, 1) %>
- <%= submit_button(:ok, _("Yes, I want to join.") % profile.name) %>
- <% if logged_in? && request.xhr? %>
- <%= lightbox_close_button(_("No, I don't want")) %>
- <% else %>
- <%= button(:cancel, _("No, I don't want."), profile.url) %>
- <% end %>
-<% end %>
diff --git a/app/views/profile/leave.html.erb b/app/views/profile/leave.html.erb
new file mode 100644
index 0000000..45ffc59
--- /dev/null
+++ b/app/views/profile/leave.html.erb
@@ -0,0 +1,16 @@
+<%= _('Leaving %s') % profile.name %>
+
+
+<%= _('Are you sure you want to leave %s?') % profile.name %>
+
+
+<% form_tag do %>
+ <%= hidden_field_tag(:confirmation, 1) %>
+ <%= hidden_field_tag(:back_to, @back_to) %>
+ <%= submit_button(:ok, _("Yes, I want to leave.") % profile.name) %>
+ <% if logged_in? && request.xhr? %>
+ <%= lightbox_close_button(_("No, I don't want")) %>
+ <% else %>
+ <%= button(:cancel, _("No, I don't want."), profile.url) %>
+ <% end %>
+<% end %>
diff --git a/app/views/profile/leave.rhtml b/app/views/profile/leave.rhtml
deleted file mode 100644
index 45ffc59..0000000
--- a/app/views/profile/leave.rhtml
+++ /dev/null
@@ -1,16 +0,0 @@
-<%= _('Leaving %s') % profile.name %>
-
-
-<%= _('Are you sure you want to leave %s?') % profile.name %>
-
-
-<% form_tag do %>
- <%= hidden_field_tag(:confirmation, 1) %>
- <%= hidden_field_tag(:back_to, @back_to) %>
- <%= submit_button(:ok, _("Yes, I want to leave.") % profile.name) %>
- <% if logged_in? && request.xhr? %>
- <%= lightbox_close_button(_("No, I don't want")) %>
- <% else %>
- <%= button(:cancel, _("No, I don't want."), profile.url) %>
- <% end %>
-<% end %>
diff --git a/app/views/profile/members.html.erb b/app/views/profile/members.html.erb
new file mode 100644
index 0000000..3639c52
--- /dev/null
+++ b/app/views/profile/members.html.erb
@@ -0,0 +1,29 @@
+
+
+
<%= _("%s's members") % profile.name %>
+
+<% cache_timeout(profile.members_cache_key(params), 4.hours) do %>
+
+ <% @members.each do |member| %>
+ <%= profile_image_link(member) %>
+ <% end %>
+
+
+
+<% end %>
+
+<% button_bar do %>
+ <%= button :back, _('Go back'), { :controller => 'profile' } %>
+ <% if profile.community? and user %>
+ <% if user.has_permission?(:invite_members, profile) %>
+ <%= button :search, _('Invite your friends to join %s') % profile.name, :controller => 'invite', :action => 'select_address_book' %>
+ <% end %>
+ <% if user.has_permission?(:send_mail_to_members, profile) %>
+ <%= button :send, _('Send e-mail to members'), :controller => 'profile', :action => 'send_mail' %>
+ <% end %>
+ <% end %>
+<% end %>
+
+
diff --git a/app/views/profile/members.rhtml b/app/views/profile/members.rhtml
deleted file mode 100644
index 3639c52..0000000
--- a/app/views/profile/members.rhtml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
<%= _("%s's members") % profile.name %>
-
-<% cache_timeout(profile.members_cache_key(params), 4.hours) do %>
-
- <% @members.each do |member| %>
- <%= profile_image_link(member) %>
- <% end %>
-
-
-
-<% end %>
-
-<% button_bar do %>
- <%= button :back, _('Go back'), { :controller => 'profile' } %>
- <% if profile.community? and user %>
- <% if user.has_permission?(:invite_members, profile) %>
- <%= button :search, _('Invite your friends to join %s') % profile.name, :controller => 'invite', :action => 'select_address_book' %>
- <% end %>
- <% if user.has_permission?(:send_mail_to_members, profile) %>
- <%= button :send, _('Send e-mail to members'), :controller => 'profile', :action => 'send_mail' %>
- <% end %>
- <% end %>
-<% end %>
-
-
diff --git a/app/views/profile/send_mail.html.erb b/app/views/profile/send_mail.html.erb
new file mode 100644
index 0000000..185f7cd
--- /dev/null
+++ b/app/views/profile/send_mail.html.erb
@@ -0,0 +1,14 @@
+<%= h profile.short_name(50) %>
+
+<%= _('Send e-mail to members') %>
+
+<%= error_messages_for :mailing %>
+
+<%= render :file => 'shared/tiny_mce' %>
+
+<% form_for :mailing, :url => {:action => 'send_mail'}, :html => {:id => 'mailing-form'} do |f| %>
+ <%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %>
+ <%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'mceEditor')) %>
+ <%= submit_button(:send, _('Send')) %>
+ <%= button :cancel, _('Cancel e-mail'), :back %>
+<% end %>
diff --git a/app/views/profile/send_mail.rhtml b/app/views/profile/send_mail.rhtml
deleted file mode 100644
index 185f7cd..0000000
--- a/app/views/profile/send_mail.rhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<%= h profile.short_name(50) %>
-
-<%= _('Send e-mail to members') %>
-
-<%= error_messages_for :mailing %>
-
-<%= render :file => 'shared/tiny_mce' %>
-
-<% form_for :mailing, :url => {:action => 'send_mail'}, :html => {:id => 'mailing-form'} do |f| %>
- <%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %>
- <%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'mceEditor')) %>
- <%= submit_button(:send, _('Send')) %>
- <%= button :cancel, _('Cancel e-mail'), :back %>
-<% end %>
diff --git a/app/views/profile/sitemap.html.erb b/app/views/profile/sitemap.html.erb
new file mode 100644
index 0000000..0fcf974
--- /dev/null
+++ b/app/views/profile/sitemap.html.erb
@@ -0,0 +1,3 @@
+<%= _("%s: site map") % profile.name %>
+
+<%= list_articles(available_articles(@articles, user), false) %>
diff --git a/app/views/profile/sitemap.rhtml b/app/views/profile/sitemap.rhtml
deleted file mode 100644
index 0fcf974..0000000
--- a/app/views/profile/sitemap.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= _("%s: site map") % profile.name %>
-
-<%= list_articles(available_articles(@articles, user), false) %>
diff --git a/app/views/profile/tags.html.erb b/app/views/profile/tags.html.erb
new file mode 100644
index 0000000..cff2f92
--- /dev/null
+++ b/app/views/profile/tags.html.erb
@@ -0,0 +1,7 @@
+<%= _("%s's tags") % @profile.name %>
+
+
+<% cache_timeout(@tags_cache_key, 4.hour) do %>
+ <%= tag_cloud @tags, :id, { :action => :tags }, {:show_count => true} %>
+<% end %>
+
diff --git a/app/views/profile/tags.rhtml b/app/views/profile/tags.rhtml
deleted file mode 100644
index cff2f92..0000000
--- a/app/views/profile/tags.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= _("%s's tags") % @profile.name %>
-
-
-<% cache_timeout(@tags_cache_key, 4.hour) do %>
- <%= tag_cloud @tags, :id, { :action => :tags }, {:show_count => true} %>
-<% end %>
-
diff --git a/app/views/profile_editor/_organization.html.erb b/app/views/profile_editor/_organization.html.erb
new file mode 100644
index 0000000..9fedbd1
--- /dev/null
+++ b/app/views/profile_editor/_organization.html.erb
@@ -0,0 +1,67 @@
+<%= _('General information') %>
+
+ <%= required_fields_message %>
+
+ <%= required f.text_field(:name) %>
+
+ <%= @plugins.dispatch(:profile_info_extra_contents).collect { |content| instance_eval(&content) }.join("") %>
+
+<% if @environment.enabled?('enable_organization_url_change') %>
+
+<% end %>
+
+<% if @environment.enabled?('enable_organization_url_change') %>
+
+
+ <%= hidden_field_tag 'old_profile_identifier', @profile.identifier %>
+
+ <%= required labelled_form_field( _('Address'),
+ content_tag('code',
+ url_for(profile.url).gsub(/#{profile.identifier}$/, '') +
+ text_field(:profile_data, :identifier, :onchange => "warn_value_change()", :size => 25)
+ ) +
+ content_tag('div',
+ content_tag('strong', _('WARNING!')) + ' ' +
+ _("You are about to change the address, and this will break external links to the homepage or to content inside it. Do you really want to change?") +
+ content_tag('div',
+ button_to_function(:ok, _("Yes"), "confirm_change()") + ' ' +
+ button_to_function(:cancel, _('No'), 'no_change()')
+ ),
+ :id => 'identifier-change-confirmation',
+ :class => 'change-confirmation',
+ :style => 'display: none;'
+ )
+ )
+ %>
+
+<% end %>
+
+<%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => 'profile_data', :profile => @profile } %>
+
+<%= labelled_check_box(_('Enable "contact us"'), 'profile_data[enable_contact_us]', "1", @profile.enable_contact_us) if @profile.enterprise? %>
+
+<%= render :partial => 'moderation', :locals => { :profile => @profile } %>
diff --git a/app/views/profile_editor/_organization.rhtml b/app/views/profile_editor/_organization.rhtml
deleted file mode 100644
index 9fedbd1..0000000
--- a/app/views/profile_editor/_organization.rhtml
+++ /dev/null
@@ -1,67 +0,0 @@
-<%= _('General information') %>
-
- <%= required_fields_message %>
-
- <%= required f.text_field(:name) %>
-
- <%= @plugins.dispatch(:profile_info_extra_contents).collect { |content| instance_eval(&content) }.join("") %>
-
-<% if @environment.enabled?('enable_organization_url_change') %>
-
-<% end %>
-
-<% if @environment.enabled?('enable_organization_url_change') %>
-
-
- <%= hidden_field_tag 'old_profile_identifier', @profile.identifier %>
-
- <%= required labelled_form_field( _('Address'),
- content_tag('code',
- url_for(profile.url).gsub(/#{profile.identifier}$/, '') +
- text_field(:profile_data, :identifier, :onchange => "warn_value_change()", :size => 25)
- ) +
- content_tag('div',
- content_tag('strong', _('WARNING!')) + ' ' +
- _("You are about to change the address, and this will break external links to the homepage or to content inside it. Do you really want to change?") +
- content_tag('div',
- button_to_function(:ok, _("Yes"), "confirm_change()") + ' ' +
- button_to_function(:cancel, _('No'), 'no_change()')
- ),
- :id => 'identifier-change-confirmation',
- :class => 'change-confirmation',
- :style => 'display: none;'
- )
- )
- %>
-
-<% end %>
-
-<%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => 'profile_data', :profile => @profile } %>
-
-<%= labelled_check_box(_('Enable "contact us"'), 'profile_data[enable_contact_us]', "1", @profile.enable_contact_us) if @profile.enterprise? %>
-
-<%= render :partial => 'moderation', :locals => { :profile => @profile } %>
diff --git a/app/views/profile_editor/_pending_tasks.html.erb b/app/views/profile_editor/_pending_tasks.html.erb
new file mode 100644
index 0000000..9a13ee0
--- /dev/null
+++ b/app/views/profile_editor/_pending_tasks.html.erb
@@ -0,0 +1,11 @@
+<%= stylesheet_link_tag 'tasks' %>
+
+<% unless @pending_tasks.empty? %>
+
+
<%= _('You have pending requests') %>
+
+ <%= @pending_tasks.map {|task| content_tag('li', task_information(task))} %>
+
+ <%= button(:todo, _('Process requests'), :controller => 'tasks', :action => 'index') %>
+
+<% end %>
diff --git a/app/views/profile_editor/_pending_tasks.rhtml b/app/views/profile_editor/_pending_tasks.rhtml
deleted file mode 100644
index 9a13ee0..0000000
--- a/app/views/profile_editor/_pending_tasks.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= stylesheet_link_tag 'tasks' %>
-
-<% unless @pending_tasks.empty? %>
-
-
<%= _('You have pending requests') %>
-
- <%= @pending_tasks.map {|task| content_tag('li', task_information(task))} %>
-
- <%= button(:todo, _('Process requests'), :controller => 'tasks', :action => 'index') %>
-
-<% end %>
diff --git a/app/views/profile_editor/_person.html.erb b/app/views/profile_editor/_person.html.erb
new file mode 100644
index 0000000..fc50c35
--- /dev/null
+++ b/app/views/profile_editor/_person.html.erb
@@ -0,0 +1,21 @@
+<%= _('Personal information') %>
+
+ <%= required_fields_message %>
+
+
+ <%= required f.text_field(:name) %>
+
+ <%= unchangeable_privacy_field @profile %>
+
+
+
+
+ <%= required f.text_field(:email) %>
+
+ <%= profile_field_privacy_selector @profile, 'email' %>
+
+
+
+ <%= @plugins.dispatch(:profile_info_extra_contents).collect { |content| instance_eval(&content) }.join("") %>
+
+ <%= render :partial => 'person_form', :locals => {:f => f} %>
diff --git a/app/views/profile_editor/_person.rhtml b/app/views/profile_editor/_person.rhtml
deleted file mode 100644
index fc50c35..0000000
--- a/app/views/profile_editor/_person.rhtml
+++ /dev/null
@@ -1,21 +0,0 @@
-<%= _('Personal information') %>
-
- <%= required_fields_message %>
-
-
- <%= required f.text_field(:name) %>
-
- <%= unchangeable_privacy_field @profile %>
-
-
-
-
- <%= required f.text_field(:email) %>
-
- <%= profile_field_privacy_selector @profile, 'email' %>
-
-
-
- <%= @plugins.dispatch(:profile_info_extra_contents).collect { |content| instance_eval(&content) }.join("") %>
-
- <%= render :partial => 'person_form', :locals => {:f => f} %>
diff --git a/app/views/profile_editor/_person_form.html.erb b/app/views/profile_editor/_person_form.html.erb
new file mode 100644
index 0000000..d4844d1
--- /dev/null
+++ b/app/views/profile_editor/_person_form.html.erb
@@ -0,0 +1,61 @@
+<% @person ||= @profile %>
+
+<% optional_field(@person, 'nickname') do %>
+ <%= f.text_field(:nickname, :maxlength => 16, :size => 30, :rel => _('Nickname')) %>
+
+ <%= _('A short name by which you like to be known. Will be used in friends listings, community member listings etc.') %>
+
+<% end %>
+
+<%= optional_field(@person, 'description', f.text_area(:description, :rows => 5, :rel => _('Description'))) %>
+<%= optional_field(@person, 'preferred_domain', select_preferred_domain(:profile_data)) %>
+<%= optional_field(@person, 'contact_information', f.text_field(:contact_information, :rel => _('Contact information'))) %>
+<%= optional_field(@person, 'contact_phone', labelled_form_field(_('Home phone'), text_field(:profile_data, :contact_phone, :rel => _('Contact phone')))) %>
+<%= optional_field(@person, 'cell_phone', f.text_field(:cell_phone, :rel => _('Cell phone'))) %>
+<%= optional_field(@person, 'comercial_phone', f.text_field(:comercial_phone, :rel => _('Comercial phone'))) %>
+<%= optional_field(@person, 'sex', f.radio_group(:profile_data, :sex, [ ['male',_('Male')], ['female',_('Female')] ])) %>
+<%= optional_field(@person, 'birth_date', labelled_form_field(_('Birth date'), '' + pick_date(:profile_data, :birth_date, {:start_year => (Date.today.year - 100), :end_year => (Date.today.year - 5)}) + '
')) %>
+<%= optional_field(@person, 'nationality', f.text_field(:nationality, :rel => _('Nationality'))) %>
+<%= optional_field(@person, 'country', select_country(_('Country'), 'profile_data', 'country', {:class => 'type-select'})) %>
+<%= optional_field(@person, 'state', f.text_field(:state, :rel => _('State'))) %>
+<%= optional_field(@person, 'city', f.text_field(:city, :rel => _('City'))) %>
+<%= optional_field(@person, 'zip_code', labelled_form_field(_('ZIP code'), text_field(:profile_data, :zip_code, :rel => _('ZIP code')))) %>
+<%= optional_field(@person, 'address', labelled_form_field(_('Address (street and number)'), text_field(:profile_data, :address, :rel => _('Address')))) %>
+
+<% optional_field(@person, 'schooling') do %>
+
+<% end %>
+
+
+
+<%= optional_field(@person, 'formation', select_area(_('Education'), 'profile_data', 'formation', {:class => 'type-select-full-line'})) %>
+
+ >
+ <%= optional_field(@person, 'custom_formation', f.text_field(:custom_formation, :rel => _('Custom formation'))) %>
+
+<%= observe_field 'profile_data_formation', :function =>'toggle_text_field("profile_data_formation", "profile_data_custom_formation_span")' %>
+
+<%= optional_field(@person, 'area_of_study', select_area(_('Area of study'), 'profile_data', 'area_of_study', {:class => 'type-select-full-line'})) %>
+
+ >
+ <%= optional_field(@person, 'custom_area_of_study', f.text_field(:custom_area_of_study, :rel => _('Custom area of study'))) %>
+
+<%= observe_field 'profile_data_area_of_study', :function =>'toggle_text_field("profile_data_area_of_study", "profile_data_custom_area_of_study_span")' %>
+
+<%= optional_field(@person, 'professional_activity', f.text_field(:professional_activity, :rel => _('Professional activity'))) %>
+<%= optional_field(@person, 'organization', f.text_field(:organization, :rel => _('Organization'))) %>
+<%= optional_field(@person, 'organization_website', f.text_field(:organization_website, :rel => _('Organization website'))) %>
diff --git a/app/views/profile_editor/_person_form.rhtml b/app/views/profile_editor/_person_form.rhtml
deleted file mode 100644
index d4844d1..0000000
--- a/app/views/profile_editor/_person_form.rhtml
+++ /dev/null
@@ -1,61 +0,0 @@
-<% @person ||= @profile %>
-
-<% optional_field(@person, 'nickname') do %>
- <%= f.text_field(:nickname, :maxlength => 16, :size => 30, :rel => _('Nickname')) %>
-
- <%= _('A short name by which you like to be known. Will be used in friends listings, community member listings etc.') %>
-
-<% end %>
-
-<%= optional_field(@person, 'description', f.text_area(:description, :rows => 5, :rel => _('Description'))) %>
-<%= optional_field(@person, 'preferred_domain', select_preferred_domain(:profile_data)) %>
-<%= optional_field(@person, 'contact_information', f.text_field(:contact_information, :rel => _('Contact information'))) %>
-<%= optional_field(@person, 'contact_phone', labelled_form_field(_('Home phone'), text_field(:profile_data, :contact_phone, :rel => _('Contact phone')))) %>
-<%= optional_field(@person, 'cell_phone', f.text_field(:cell_phone, :rel => _('Cell phone'))) %>
-<%= optional_field(@person, 'comercial_phone', f.text_field(:comercial_phone, :rel => _('Comercial phone'))) %>
-<%= optional_field(@person, 'sex', f.radio_group(:profile_data, :sex, [ ['male',_('Male')], ['female',_('Female')] ])) %>
-<%= optional_field(@person, 'birth_date', labelled_form_field(_('Birth date'), '' + pick_date(:profile_data, :birth_date, {:start_year => (Date.today.year - 100), :end_year => (Date.today.year - 5)}) + '
')) %>
-<%= optional_field(@person, 'nationality', f.text_field(:nationality, :rel => _('Nationality'))) %>
-<%= optional_field(@person, 'country', select_country(_('Country'), 'profile_data', 'country', {:class => 'type-select'})) %>
-<%= optional_field(@person, 'state', f.text_field(:state, :rel => _('State'))) %>
-<%= optional_field(@person, 'city', f.text_field(:city, :rel => _('City'))) %>
-<%= optional_field(@person, 'zip_code', labelled_form_field(_('ZIP code'), text_field(:profile_data, :zip_code, :rel => _('ZIP code')))) %>
-<%= optional_field(@person, 'address', labelled_form_field(_('Address (street and number)'), text_field(:profile_data, :address, :rel => _('Address')))) %>
-
-<% optional_field(@person, 'schooling') do %>
-
-<% end %>
-
-
-
-<%= optional_field(@person, 'formation', select_area(_('Education'), 'profile_data', 'formation', {:class => 'type-select-full-line'})) %>
-
- >
- <%= optional_field(@person, 'custom_formation', f.text_field(:custom_formation, :rel => _('Custom formation'))) %>
-
-<%= observe_field 'profile_data_formation', :function =>'toggle_text_field("profile_data_formation", "profile_data_custom_formation_span")' %>
-
-<%= optional_field(@person, 'area_of_study', select_area(_('Area of study'), 'profile_data', 'area_of_study', {:class => 'type-select-full-line'})) %>
-
- >
- <%= optional_field(@person, 'custom_area_of_study', f.text_field(:custom_area_of_study, :rel => _('Custom area of study'))) %>
-
-<%= observe_field 'profile_data_area_of_study', :function =>'toggle_text_field("profile_data_area_of_study", "profile_data_custom_area_of_study_span")' %>
-
-<%= optional_field(@person, 'professional_activity', f.text_field(:professional_activity, :rel => _('Professional activity'))) %>
-<%= optional_field(@person, 'organization', f.text_field(:organization, :rel => _('Organization'))) %>
-<%= optional_field(@person, 'organization_website', f.text_field(:organization_website, :rel => _('Organization website'))) %>
diff --git a/app/views/profile_editor/destroy_profile.html.erb b/app/views/profile_editor/destroy_profile.html.erb
new file mode 100644
index 0000000..a79dee2
--- /dev/null
+++ b/app/views/profile_editor/destroy_profile.html.erb
@@ -0,0 +1,10 @@
+<%= _('Deleting profile %s') % profile.short_name(30) %>
+
+<%= _('Are you sure you want to delete this profile?') %>
+<%= _('You must be aware that all content of this profile (articles, events, files and pictures) will also be deleted.') %>
+
+<% button_bar do %>
+ <%= button(:remove, _('Yes, I am sure'), {:action => 'destroy_profile'}, :method => :post) %>
+ <%= button(:cancel, _('No, I gave up'), profile.url) %>
+<% end %>
+
diff --git a/app/views/profile_editor/destroy_profile.rhtml b/app/views/profile_editor/destroy_profile.rhtml
deleted file mode 100644
index a79dee2..0000000
--- a/app/views/profile_editor/destroy_profile.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<%= _('Deleting profile %s') % profile.short_name(30) %>
-
-<%= _('Are you sure you want to delete this profile?') %>
-<%= _('You must be aware that all content of this profile (articles, events, files and pictures) will also be deleted.') %>
-
-<% button_bar do %>
- <%= button(:remove, _('Yes, I am sure'), {:action => 'destroy_profile'}, :method => :post) %>
- <%= button(:cancel, _('No, I gave up'), profile.url) %>
-<% end %>
-
diff --git a/app/views/profile_editor/disable.html.erb b/app/views/profile_editor/disable.html.erb
new file mode 100644
index 0000000..effea8c
--- /dev/null
+++ b/app/views/profile_editor/disable.html.erb
@@ -0,0 +1,11 @@
+<%= __("Disabling '%s' enterprise") % @to_disable.name %>
+
+
+<%= _('Are you sure you want to disable %s?') % @to_disable.name %>
+
+
+<% form_tag do %>
+ <%= hidden_field_tag(:confirmation, 1) %>
+ <%= submit_button(:ok, _("Yes, I want to disable.")) %>
+ <%= button(:cancel, _("No, I don't want."), :action => 'index') %>
+<% end %>
diff --git a/app/views/profile_editor/disable.rhtml b/app/views/profile_editor/disable.rhtml
deleted file mode 100644
index effea8c..0000000
--- a/app/views/profile_editor/disable.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= __("Disabling '%s' enterprise") % @to_disable.name %>
-
-
-<%= _('Are you sure you want to disable %s?') % @to_disable.name %>
-
-
-<% form_tag do %>
- <%= hidden_field_tag(:confirmation, 1) %>
- <%= submit_button(:ok, _("Yes, I want to disable.")) %>
- <%= button(:cancel, _("No, I don't want."), :action => 'index') %>
-<% end %>
diff --git a/app/views/profile_editor/edit.html.erb b/app/views/profile_editor/edit.html.erb
new file mode 100644
index 0000000..5a074bd
--- /dev/null
+++ b/app/views/profile_editor/edit.html.erb
@@ -0,0 +1,76 @@
+<%= _('Profile settings for %s') % profile.name %>
+
+<%= error_messages_for :profile %>
+
+<% labelled_form_for :profile_data, @profile, :html => { :id => 'profile-data', :multipart => true } do |f| %>
+
+ <% if user.has_permission?('manage_environment_templates', profile.environment) %>
+
+ <%= labelled_check_box(_('This profile is a template'), 'profile_data[is_template]', true, @profile.is_template) %>
+
+ <% end %>
+
+ <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>
+
+
+
<%= _('Change picture') %>
+ <%= unchangeable_privacy_field @profile %>
+
+
+ <% f.fields_for :image_builder, @profile.image do |i| %>
+ <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %>
+ <% end %>
+
+
+ <%= _('Privacy options') %>
+
+ <% if profile.person? %>
+
+ <%= labelled_radio_button _('Public — show my contents to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
+
+
+ <%= labelled_radio_button _('Private — show my contents only to friends'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
+
+ <% else %>
+
+ <%= labelled_radio_button _('Public — show content of this group to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
+
+
+ <%= labelled_radio_button _('Private — show content of this group only to members'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
+
+ <% end %>
+
+ <% if environment.enabled?('allow_change_of_redirection_after_login') %>
+ <%= _('Page to redirect after login') %>
+ <%= select 'profile_data', 'redirection_after_login', Environment.login_redirection_options.map{|key,value|[value,key]}, { :selected => @profile.preferred_login_redirection} %>
+ <% end %>
+
+ <%= _('Translations') %>
+ <%= labelled_check_box(
+ _('Automaticaly redirect the visitor to the article translated to his/her language'),
+ 'profile_data[redirect_l10n]', true, @profile.redirect_l10n
+ )%>
+
+ <%=
+ @plugins.dispatch(:profile_editor_extras).each do |content|
+ content.respond_to?(:call) ? content.call : content
+ end.join("\n")
+ %>
+
+ <%= select_categories(:profile_data, _('Select the categories of your interest'), 2) %>
+
+ <% button_bar do %>
+ <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
+ <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
+ <% end %>
+
+ <% if user && user.has_permission?('destroy_profile', profile) %>
+ <% button_bar(:id => 'delete-profile') do %>
+ <%= button(:remove, _('Delete profile'), {:action => :destroy_profile}) %>
+ <% end %>
+ <% end %>
+
+
+<% end %>
+
+<%# = generate_form :info, @info, {...} %>
diff --git a/app/views/profile_editor/edit.rhtml b/app/views/profile_editor/edit.rhtml
deleted file mode 100644
index 5a074bd..0000000
--- a/app/views/profile_editor/edit.rhtml
+++ /dev/null
@@ -1,76 +0,0 @@
-<%= _('Profile settings for %s') % profile.name %>
-
-<%= error_messages_for :profile %>
-
-<% labelled_form_for :profile_data, @profile, :html => { :id => 'profile-data', :multipart => true } do |f| %>
-
- <% if user.has_permission?('manage_environment_templates', profile.environment) %>
-
- <%= labelled_check_box(_('This profile is a template'), 'profile_data[is_template]', true, @profile.is_template) %>
-
- <% end %>
-
- <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>
-
-
-
<%= _('Change picture') %>
- <%= unchangeable_privacy_field @profile %>
-
-
- <% f.fields_for :image_builder, @profile.image do |i| %>
- <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %>
- <% end %>
-
-
- <%= _('Privacy options') %>
-
- <% if profile.person? %>
-
- <%= labelled_radio_button _('Public — show my contents to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
-
-
- <%= labelled_radio_button _('Private — show my contents only to friends'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
-
- <% else %>
-
- <%= labelled_radio_button _('Public — show content of this group to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
-
-
- <%= labelled_radio_button _('Private — show content of this group only to members'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
-
- <% end %>
-
- <% if environment.enabled?('allow_change_of_redirection_after_login') %>
- <%= _('Page to redirect after login') %>
- <%= select 'profile_data', 'redirection_after_login', Environment.login_redirection_options.map{|key,value|[value,key]}, { :selected => @profile.preferred_login_redirection} %>
- <% end %>
-
- <%= _('Translations') %>
- <%= labelled_check_box(
- _('Automaticaly redirect the visitor to the article translated to his/her language'),
- 'profile_data[redirect_l10n]', true, @profile.redirect_l10n
- )%>
-
- <%=
- @plugins.dispatch(:profile_editor_extras).each do |content|
- content.respond_to?(:call) ? content.call : content
- end.join("\n")
- %>
-
- <%= select_categories(:profile_data, _('Select the categories of your interest'), 2) %>
-
- <% button_bar do %>
- <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %>
- <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
- <% end %>
-
- <% if user && user.has_permission?('destroy_profile', profile) %>
- <% button_bar(:id => 'delete-profile') do %>
- <%= button(:remove, _('Delete profile'), {:action => :destroy_profile}) %>
- <% end %>
- <% end %>
-
-
-<% end %>
-
-<%# = generate_form :info, @info, {...} %>
diff --git a/app/views/profile_editor/enable.html.erb b/app/views/profile_editor/enable.html.erb
new file mode 100644
index 0000000..497cb2f
--- /dev/null
+++ b/app/views/profile_editor/enable.html.erb
@@ -0,0 +1,11 @@
+<%= __("Enabling '%s' enterprise") % @to_enable.name %>
+
+
+<%= _('Are you sure you want to enable %s?') % @to_enable.name %>
+
+
+<% form_tag do %>
+ <%= hidden_field_tag(:confirmation, 1) %>
+ <%= submit_button(:ok, _("Yes, I want to enable.")) %>
+ <%= button(:cancel, _("No, I don't want."), :action => 'index') %>
+<% end %>
diff --git a/app/views/profile_editor/enable.rhtml b/app/views/profile_editor/enable.rhtml
deleted file mode 100644
index 497cb2f..0000000
--- a/app/views/profile_editor/enable.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= __("Enabling '%s' enterprise") % @to_enable.name %>
-
-
-<%= _('Are you sure you want to enable %s?') % @to_enable.name %>
-
-
-<% form_tag do %>
- <%= hidden_field_tag(:confirmation, 1) %>
- <%= submit_button(:ok, _("Yes, I want to enable.")) %>
- <%= button(:cancel, _("No, I don't want."), :action => 'index') %>
-<% end %>
diff --git a/app/views/profile_editor/header_footer.html.erb b/app/views/profile_editor/header_footer.html.erb
new file mode 100644
index 0000000..6ee70c7
--- /dev/null
+++ b/app/views/profile_editor/header_footer.html.erb
@@ -0,0 +1,32 @@
+<%= render :file => 'shared/tiny_mce' %>
+
+<%= _('Editing header and footer') %>
+
+<% form_tag do %>
+
+ <% if environment.enabled?('display_header_footer_explanation') %>
+
+ <%= _('Using the fields below you can customize the header and footer for your website:') %>
+
+ <%= _('On header, you can include a personalized banner by first adding in "Manage content", and then referencing it here. A good format is 468 X 60 pixels, PNG format.') %>
+ <%= _('On footer, you can include a slogan and your contact information etc.') %>
+
+
+ <%= _('See existing examples:') %>
+
+
+
+ <% end %>
+
<%= _('Content for header ') %>
+ <%= text_area_tag(:custom_header, @header, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %>
+
<%= _('Content for footer') %>
+ <%= text_area_tag(:custom_footer, @footer, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %>
+ <% button_bar do %>
+ <%= submit_button(:save, _('Save')) %>
+ <%= button(:cancel, _('Cancel'), :action => 'index') %>
+ <% end %>
+
+<% end %>
diff --git a/app/views/profile_editor/header_footer.rhtml b/app/views/profile_editor/header_footer.rhtml
deleted file mode 100644
index 6ee70c7..0000000
--- a/app/views/profile_editor/header_footer.rhtml
+++ /dev/null
@@ -1,32 +0,0 @@
-<%= render :file => 'shared/tiny_mce' %>
-
-<%= _('Editing header and footer') %>
-
-<% form_tag do %>
-
- <% if environment.enabled?('display_header_footer_explanation') %>
-
- <%= _('Using the fields below you can customize the header and footer for your website:') %>
-
- <%= _('On header, you can include a personalized banner by first adding in "Manage content", and then referencing it here. A good format is 468 X 60 pixels, PNG format.') %>
- <%= _('On footer, you can include a slogan and your contact information etc.') %>
-
-
- <%= _('See existing examples:') %>
-
-
-
- <% end %>
-
<%= _('Content for header ') %>
- <%= text_area_tag(:custom_header, @header, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %>
-
<%= _('Content for footer') %>
- <%= text_area_tag(:custom_footer, @footer, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %>
- <% button_bar do %>
- <%= submit_button(:save, _('Save')) %>
- <%= button(:cancel, _('Cancel'), :action => 'index') %>
- <% end %>
-
-<% end %>
diff --git a/app/views/profile_editor/index.html.erb b/app/views/profile_editor/index.html.erb
new file mode 100644
index 0000000..4044a64
--- /dev/null
+++ b/app/views/profile_editor/index.html.erb
@@ -0,0 +1,91 @@
+
+
+
+ <%= h profile.short_name %>
+
+ <%= _('Control Panel') %>
+
+
+<%= render :partial => 'pending_tasks' %>
+
+<% control_panel do %>
+
+ <%= control_panel_button(profile.control_panel_settings_button[:title],
+ profile.control_panel_settings_button[:icon],
+ :controller => 'profile_editor', :action => 'edit') %>
+
+ <%= control_panel_button(_('Location'), 'edit-location', :controller => 'maps', :action => 'edit_location') %>
+
+ <%= control_panel_button(_('Mail settings'), 'mail', :controller => 'mailconf') if profile.person? && MailConf.enabled? %>
+
+ <%= control_panel_button(_('Tasks'), 'todo', :controller => 'tasks', :action => 'index') %>
+
+ <%= control_panel_button(_('Edit sideboxes'), 'blocks', :controller => 'profile_design', :action => 'index') %>
+
+ <%= control_panel_button(_('Edit Appearance'), 'design-editor', :controller => 'themes', :action => 'index') %>
+
+ <%= control_panel_button(_('Edit Header and Footer'), 'header-and-footer', :controller => 'profile_editor', :action => 'header_footer') unless profile.enterprise? && environment.enabled?('disable_header_and_footer') && !user.is_admin?(environment) %>
+
+ <%= control_panel_button(_('Manage Content'), 'cms', :controller => 'cms') %>
+
+ <% unless profile.enterprise? %>
+ <%= case profile.blogs.count
+ when 0
+ control_panel_button(_('Create blog'), 'blog-disabled', :controller => 'cms', :action => 'new', :type => 'Blog')
+ when 1
+ control_panel_button(_('Configure blog'), 'blog', :controller => 'cms', :action => 'edit', :id => profile.blog)
+ else
+ control_panel_button(_('Configure blog'), 'blog', :controller => 'cms')
+ end %>
+ <% end %>
+
+ <%= control_panel_button(_('Change Password'), 'change-password', :controller => 'account', :action => 'change_password') if profile.person? %>
+
+ <%= control_panel_button(__('Manage friends'), 'friends', :controller => 'friends', :action => 'index') if profile.person? %>
+
+ <%= control_panel_button(_('Manage Members'), 'members', :controller => 'profile_members') if profile.organization? && user.has_permission?(:manage_memberships, profile) %>
+
+ <%= control_panel_button(_('Manage Products and Services'), 'products', :controller => 'manage_products') if profile.enterprise? && !environment.enabled?('disable_products_for_enterprises') %>
+
+ <% if !environment.enabled?('disable_asset_enterprises') %>
+ <% if profile.is_validation_entity? %>
+ <%= control_panel_button(__('Enterprise Validation'), 'validation', :controller => 'enterprise_validation') %>
+ <% end %>
+ <% if profile.person? %>
+ <%= control_panel_button(__('Favorite Enterprises'), 'favorites', :controller => 'favorite_enterprises') %>
+ <% end %>
+ <% end %>
+
+ <% if profile.enterprise? %>
+ <% if profile.enabled? %>
+ <%= control_panel_button(__('Disable'), 'disable', :action => 'disable') %>
+ <% else %>
+ <%= control_panel_button(__('Enable'), 'enable', :action => 'enable') %>
+ <% end %>
+ <% end %>
+
+ <%= control_panel_button(_('Manage my groups'), 'groups', :controller => 'memberships') if profile.person? %>
+
+ <%= control_panel_button(_('Manage SPAM'), 'manage-spam', :controller => 'spam', :action => 'index') %>
+
+ <% @plugins.dispatch(:control_panel_buttons).each do |button| %>
+ <%= control_panel_button(button[:title], button[:icon], button[:url]) %>
+ <% end %>
+
+<% end %>
+
+ <% if profile.person? && environment.enabled?('enterprise_activation') %>
+
+
+ <% form_tag({:controller => 'account', :action => 'activation_question'}, {:method => 'get'}) do %>
+
<%= __('Activate your enterprise') %>
+
<%= __("If you received a letter with information about your enterprise activation, add here the activation code that was sent.") %>
+
<%= environment.help_message_to_add_enterprise %>
+ <%= labelled_form_field(__('Enterprise activation code') + ': ', text_field_tag('enterprise_code')) %>
+ <%= submit_button(:ok, _('Activate')) %>
+ <% end %>
+
+
+ <% end %>
+
+
diff --git a/app/views/profile_editor/index.rhtml b/app/views/profile_editor/index.rhtml
deleted file mode 100644
index 4044a64..0000000
--- a/app/views/profile_editor/index.rhtml
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
- <%= h profile.short_name %>
-
- <%= _('Control Panel') %>
-
-
-<%= render :partial => 'pending_tasks' %>
-
-<% control_panel do %>
-
- <%= control_panel_button(profile.control_panel_settings_button[:title],
- profile.control_panel_settings_button[:icon],
- :controller => 'profile_editor', :action => 'edit') %>
-
- <%= control_panel_button(_('Location'), 'edit-location', :controller => 'maps', :action => 'edit_location') %>
-
- <%= control_panel_button(_('Mail settings'), 'mail', :controller => 'mailconf') if profile.person? && MailConf.enabled? %>
-
- <%= control_panel_button(_('Tasks'), 'todo', :controller => 'tasks', :action => 'index') %>
-
- <%= control_panel_button(_('Edit sideboxes'), 'blocks', :controller => 'profile_design', :action => 'index') %>
-
- <%= control_panel_button(_('Edit Appearance'), 'design-editor', :controller => 'themes', :action => 'index') %>
-
- <%= control_panel_button(_('Edit Header and Footer'), 'header-and-footer', :controller => 'profile_editor', :action => 'header_footer') unless profile.enterprise? && environment.enabled?('disable_header_and_footer') && !user.is_admin?(environment) %>
-
- <%= control_panel_button(_('Manage Content'), 'cms', :controller => 'cms') %>
-
- <% unless profile.enterprise? %>
- <%= case profile.blogs.count
- when 0
- control_panel_button(_('Create blog'), 'blog-disabled', :controller => 'cms', :action => 'new', :type => 'Blog')
- when 1
- control_panel_button(_('Configure blog'), 'blog', :controller => 'cms', :action => 'edit', :id => profile.blog)
- else
- control_panel_button(_('Configure blog'), 'blog', :controller => 'cms')
- end %>
- <% end %>
-
- <%= control_panel_button(_('Change Password'), 'change-password', :controller => 'account', :action => 'change_password') if profile.person? %>
-
- <%= control_panel_button(__('Manage friends'), 'friends', :controller => 'friends', :action => 'index') if profile.person? %>
-
- <%= control_panel_button(_('Manage Members'), 'members', :controller => 'profile_members') if profile.organization? && user.has_permission?(:manage_memberships, profile) %>
-
- <%= control_panel_button(_('Manage Products and Services'), 'products', :controller => 'manage_products') if profile.enterprise? && !environment.enabled?('disable_products_for_enterprises') %>
-
- <% if !environment.enabled?('disable_asset_enterprises') %>
- <% if profile.is_validation_entity? %>
- <%= control_panel_button(__('Enterprise Validation'), 'validation', :controller => 'enterprise_validation') %>
- <% end %>
- <% if profile.person? %>
- <%= control_panel_button(__('Favorite Enterprises'), 'favorites', :controller => 'favorite_enterprises') %>
- <% end %>
- <% end %>
-
- <% if profile.enterprise? %>
- <% if profile.enabled? %>
- <%= control_panel_button(__('Disable'), 'disable', :action => 'disable') %>
- <% else %>
- <%= control_panel_button(__('Enable'), 'enable', :action => 'enable') %>
- <% end %>
- <% end %>
-
- <%= control_panel_button(_('Manage my groups'), 'groups', :controller => 'memberships') if profile.person? %>
-
- <%= control_panel_button(_('Manage SPAM'), 'manage-spam', :controller => 'spam', :action => 'index') %>
-
- <% @plugins.dispatch(:control_panel_buttons).each do |button| %>
- <%= control_panel_button(button[:title], button[:icon], button[:url]) %>
- <% end %>
-
-<% end %>
-
- <% if profile.person? && environment.enabled?('enterprise_activation') %>
-
-
- <% form_tag({:controller => 'account', :action => 'activation_question'}, {:method => 'get'}) do %>
-
<%= __('Activate your enterprise') %>
-
<%= __("If you received a letter with information about your enterprise activation, add here the activation code that was sent.") %>
-
<%= environment.help_message_to_add_enterprise %>
- <%= labelled_form_field(__('Enterprise activation code') + ': ', text_field_tag('enterprise_code')) %>
- <%= submit_button(:ok, _('Activate')) %>
- <% end %>
-
-
- <% end %>
-
-
diff --git a/app/views/profile_members/_add_admins.html.erb b/app/views/profile_members/_add_admins.html.erb
new file mode 100644
index 0000000..c89eece
--- /dev/null
+++ b/app/views/profile_members/_add_admins.html.erb
@@ -0,0 +1,30 @@
+<%= _('Add admins to %s') % profile.name %>
+
+<% form_remote_tag :url => {:action => 'find_users', :profile => profile.identifier, :scope => 'new_admins'}, :update => 'users-list', :loading => '$("users-list").addClassName("loading")', :complete => '$("users-list").removeClassName("loading")' do %>
+ <%= text_field_tag('query', '', :autocomplete => 'off') %>
+ <%= submit_tag(_('Search')) %>
+<% end %>
+
+<%= observe_field('query', :url => {:action => 'find_users', :profile => profile.identifier, :scope => 'new_admins'}, :update => 'users-list', :frequency => 1, :with => 'query', :condition => '$("query").value.length > 2', :loading => '$("users-list").addClassName("loading")', :complete => '$("users-list").removeClassName("loading")') %>
+<%= observe_field('query', :frequency => 1, :condition => '$("query").value.length <= 2', :function => '$("users-list").update($("empty-query").innerHTML)') %>
+
+
+ <%= render :partial => 'find_users' %>
+
+
+
+ <%= render :partial => 'find_users' %>
+
+
+
+ <%= render :partial => 'members_list' %>
+
+<%= drop_receiving_element('members-list',
+ :url => {:action => 'add_admin', :profile => profile.identifier, :leaving_admin => @person},
+ :before => '$("tr-" + element.id).hide()',
+ :loading => '$("members-list").addClassName("loading")',
+ :update => 'members-list',
+ :success => '$("tr-" + element.id).hide(); $(element.id).show();',
+ :complete => '$("members-list").removeClassName("loading")') %>
+
+
diff --git a/app/views/profile_members/_add_admins.rhtml b/app/views/profile_members/_add_admins.rhtml
deleted file mode 100644
index c89eece..0000000
--- a/app/views/profile_members/_add_admins.rhtml
+++ /dev/null
@@ -1,30 +0,0 @@
-<%= _('Add admins to %s') % profile.name %>
-
-<% form_remote_tag :url => {:action => 'find_users', :profile => profile.identifier, :scope => 'new_admins'}, :update => 'users-list', :loading => '$("users-list").addClassName("loading")', :complete => '$("users-list").removeClassName("loading")' do %>
- <%= text_field_tag('query', '', :autocomplete => 'off') %>
- <%= submit_tag(_('Search')) %>
-<% end %>
-
-<%= observe_field('query', :url => {:action => 'find_users', :profile => profile.identifier, :scope => 'new_admins'}, :update => 'users-list', :frequency => 1, :with => 'query', :condition => '$("query").value.length > 2', :loading => '$("users-list").addClassName("loading")', :complete => '$("users-list").removeClassName("loading")') %>
-<%= observe_field('query', :frequency => 1, :condition => '$("query").value.length <= 2', :function => '$("users-list").update($("empty-query").innerHTML)') %>
-
-
- <%= render :partial => 'find_users' %>
-
-
-
- <%= render :partial => 'find_users' %>
-
-
-
- <%= render :partial => 'members_list' %>
-
-<%= drop_receiving_element('members-list',
- :url => {:action => 'add_admin', :profile => profile.identifier, :leaving_admin => @person},
- :before => '$("tr-" + element.id).hide()',
- :loading => '$("members-list").addClassName("loading")',
- :update => 'members-list',
- :success => '$("tr-" + element.id).hide(); $(element.id).show();',
- :complete => '$("members-list").removeClassName("loading")') %>
-
-
diff --git a/app/views/profile_members/_index_buttons.html.erb b/app/views/profile_members/_index_buttons.html.erb
new file mode 100644
index 0000000..1e12ad3
--- /dev/null
+++ b/app/views/profile_members/_index_buttons.html.erb
@@ -0,0 +1,13 @@
+<% button_bar do %>
+ <%= button :back, _('Back'), :controller => 'profile_editor' %>
+ <%= button :add, _('Add members'), :action => 'add_members' if profile.enterprise? %>
+ <% if profile.community? and user.has_permission?(:invite_members, profile) %>
+ <%= button :search, _('Invite your friends to join %s') % profile.short_name, :controller => 'invite', :action => 'select_address_book' %>
+ <% end %>
+ <% if profile.community? and user.has_permission?(:send_mail_to_members, profile) %>
+ <%= button :send, _('Send e-mail to members'), :controller => 'profile', :action => 'send_mail' %>
+ <% end %>
+ <% @plugins.dispatch(:manage_members_extra_buttons).each do |plugin_button| %>
+ <%= button plugin_button[:icon], plugin_button[:title], plugin_button[:url] %>
+ <% end %>
+<% end %>
diff --git a/app/views/profile_members/_index_buttons.rhtml b/app/views/profile_members/_index_buttons.rhtml
deleted file mode 100644
index 1e12ad3..0000000
--- a/app/views/profile_members/_index_buttons.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<% button_bar do %>
- <%= button :back, _('Back'), :controller => 'profile_editor' %>
- <%= button :add, _('Add members'), :action => 'add_members' if profile.enterprise? %>
- <% if profile.community? and user.has_permission?(:invite_members, profile) %>
- <%= button :search, _('Invite your friends to join %s') % profile.short_name, :controller => 'invite', :action => 'select_address_book' %>
- <% end %>
- <% if profile.community? and user.has_permission?(:send_mail_to_members, profile) %>
- <%= button :send, _('Send e-mail to members'), :controller => 'profile', :action => 'send_mail' %>
- <% end %>
- <% @plugins.dispatch(:manage_members_extra_buttons).each do |plugin_button| %>
- <%= button plugin_button[:icon], plugin_button[:title], plugin_button[:url] %>
- <% end %>
-<% end %>
diff --git a/app/views/profile_members/_members_list.html.erb b/app/views/profile_members/_members_list.html.erb
new file mode 100644
index 0000000..b63b25c
--- /dev/null
+++ b/app/views/profile_members/_members_list.html.erb
@@ -0,0 +1,28 @@
+<% collection = @collection == :profile_admins ? profile.admins : profile.members %>
+<% title = @title ? @title : _('Current members') %>
+<% remove_action = @remove_action ? @remove_action : {:action => 'unassociate'} %>
+
+<%= title %>
+
+
+
+ <%= _('Member') %>
+ <%= _('Actions') %>
+
+ <% collection.each do |m| %>
+
+ <%= link_to_profile m.short_name, m.identifier, :title => m.name %>
+
+
+ <%= button_without_text :edit, _('Edit'), :action => 'change_role', :id => m %>
+ <%= button_to_remote_without_text(:remove, _('Remove'),
+ :update => 'members-list',
+ :loading => '$("members-list").addClassName("loading")',
+ :success => "$('tr-#{m.identifier}').show()",
+ :complete => '$("members-list").removeClassName("loading")',
+ :url => { :id => m }.merge(remove_action)) if m != user %>
+
+
+
+ <% end %>
+
diff --git a/app/views/profile_members/_members_list.rhtml b/app/views/profile_members/_members_list.rhtml
deleted file mode 100644
index b63b25c..0000000
--- a/app/views/profile_members/_members_list.rhtml
+++ /dev/null
@@ -1,28 +0,0 @@
-<% collection = @collection == :profile_admins ? profile.admins : profile.members %>
-<% title = @title ? @title : _('Current members') %>
-<% remove_action = @remove_action ? @remove_action : {:action => 'unassociate'} %>
-
-<%= title %>
-
-
-
- <%= _('Member') %>
- <%= _('Actions') %>
-
- <% collection.each do |m| %>
-
- <%= link_to_profile m.short_name, m.identifier, :title => m.name %>
-
-
- <%= button_without_text :edit, _('Edit'), :action => 'change_role', :id => m %>
- <%= button_to_remote_without_text(:remove, _('Remove'),
- :update => 'members-list',
- :loading => '$("members-list").addClassName("loading")',
- :success => "$('tr-#{m.identifier}').show()",
- :complete => '$("members-list").removeClassName("loading")',
- :url => { :id => m }.merge(remove_action)) if m != user %>
-
-
-
- <% end %>
-
diff --git a/app/views/profile_members/add_admin.html.erb b/app/views/profile_members/add_admin.html.erb
new file mode 120000
index 0000000..12e1b0b
--- /dev/null
+++ b/app/views/profile_members/add_admin.html.erb
@@ -0,0 +1 @@
+_members_list.rhtml
\ No newline at end of file
diff --git a/app/views/profile_members/add_admin.rhtml b/app/views/profile_members/add_admin.rhtml
deleted file mode 120000
index 12e1b0b..0000000
--- a/app/views/profile_members/add_admin.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-_members_list.rhtml
\ No newline at end of file
diff --git a/app/views/profile_members/add_member.html.erb b/app/views/profile_members/add_member.html.erb
new file mode 120000
index 0000000..12e1b0b
--- /dev/null
+++ b/app/views/profile_members/add_member.html.erb
@@ -0,0 +1 @@
+_members_list.rhtml
\ No newline at end of file
diff --git a/app/views/profile_members/add_member.rhtml b/app/views/profile_members/add_member.rhtml
deleted file mode 120000
index 12e1b0b..0000000
--- a/app/views/profile_members/add_member.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-_members_list.rhtml
\ No newline at end of file
diff --git a/app/views/profile_members/add_members.html.erb b/app/views/profile_members/add_members.html.erb
new file mode 100644
index 0000000..6c33eaf
--- /dev/null
+++ b/app/views/profile_members/add_members.html.erb
@@ -0,0 +1,3 @@
+<%= _('Add members to %s') % profile.name %>
+
+<%= render :partial => 'manage_roles', :locals => {:from => 'add_members'} %>
diff --git a/app/views/profile_members/add_members.rhtml b/app/views/profile_members/add_members.rhtml
deleted file mode 100644
index 6c33eaf..0000000
--- a/app/views/profile_members/add_members.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= _('Add members to %s') % profile.name %>
-
-<%= render :partial => 'manage_roles', :locals => {:from => 'add_members'} %>
diff --git a/app/views/profile_members/affiliate.html.erb b/app/views/profile_members/affiliate.html.erb
new file mode 100644
index 0000000..d6aa01a
--- /dev/null
+++ b/app/views/profile_members/affiliate.html.erb
@@ -0,0 +1,9 @@
+ <%= @member.name %>
+
+<% 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 %>
+ <%= submit_button('affiliate', _('Affiliate'), :cancel => {:action => 'index'}) %>
+ <% end %>
+<% end %>
diff --git a/app/views/profile_members/affiliate.rhtml b/app/views/profile_members/affiliate.rhtml
deleted file mode 100644
index d6aa01a..0000000
--- a/app/views/profile_members/affiliate.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
- <%= @member.name %>
-
-<% 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 %>
- <%= submit_button('affiliate', _('Affiliate'), :cancel => {:action => 'index'}) %>
- <% end %>
-<% end %>
diff --git a/app/views/profile_members/change_role.html.erb b/app/views/profile_members/change_role.html.erb
new file mode 100644
index 0000000..8efe363
--- /dev/null
+++ b/app/views/profile_members/change_role.html.erb
@@ -0,0 +1,19 @@
+ <%= _('Changing role of %s') % @member.name %>
+
+<% labelled_form_for :member, @member, :url => {:action => 'update_roles'} do |f| %>
+
+ <%= _('Roles:') %>
+ <% @roles.each do |r| %>
+ <%= labelled_check_box(r.name, 'roles[]', r.id, @associations.map(&:role).include?(r) ) %>
+
+ <% r.permissions.each do |p| %>
+ <%= permission_name(p) %>
+ <% end %>
+
+ <% end %>
+ <%= hidden_field_tag 'person', @member.id %>
+
+ <% button_bar do %>
+ <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %>
+ <% end %>
+<% end %>
diff --git a/app/views/profile_members/change_role.rhtml b/app/views/profile_members/change_role.rhtml
deleted file mode 100644
index 8efe363..0000000
--- a/app/views/profile_members/change_role.rhtml
+++ /dev/null
@@ -1,19 +0,0 @@
- <%= _('Changing role of %s') % @member.name %>
-
-<% labelled_form_for :member, @member, :url => {:action => 'update_roles'} do |f| %>
-
- <%= _('Roles:') %>
- <% @roles.each do |r| %>
- <%= labelled_check_box(r.name, 'roles[]', r.id, @associations.map(&:role).include?(r) ) %>
-
- <% r.permissions.each do |p| %>
- <%= permission_name(p) %>
- <% end %>
-
- <% end %>
- <%= hidden_field_tag 'person', @member.id %>
-
- <% button_bar do %>
- <%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %>
- <% end %>
-<% end %>
diff --git a/app/views/profile_members/index.html.erb b/app/views/profile_members/index.html.erb
new file mode 100644
index 0000000..62b7b77
--- /dev/null
+++ b/app/views/profile_members/index.html.erb
@@ -0,0 +1,9 @@
+<%= h profile.short_name(50) %>
+
+<%= render :partial => 'index_buttons' %>
+
+
+ <%= render :partial => 'members_list' %>
+
+
+<%= render :partial => 'index_buttons' %>
diff --git a/app/views/profile_members/index.rhtml b/app/views/profile_members/index.rhtml
deleted file mode 100644
index 62b7b77..0000000
--- a/app/views/profile_members/index.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= h profile.short_name(50) %>
-
-<%= render :partial => 'index_buttons' %>
-
-
- <%= render :partial => 'members_list' %>
-
-
-<%= render :partial => 'index_buttons' %>
diff --git a/app/views/profile_members/last_admin.html.erb b/app/views/profile_members/last_admin.html.erb
new file mode 100644
index 0000000..680ed60
--- /dev/null
+++ b/app/views/profile_members/last_admin.html.erb
@@ -0,0 +1,8 @@
+<%= _('Last administrator leaving %s') % profile.name %>
+
+
+ <%= _('Since you are the last administrator, you must choose at least one member to administer this community.') % profile.name %>
+
+
+<%= render :partial => 'manage_roles', :locals => {:from => 'last_admin'} %>
+
diff --git a/app/views/profile_members/last_admin.rhtml b/app/views/profile_members/last_admin.rhtml
deleted file mode 100644
index 680ed60..0000000
--- a/app/views/profile_members/last_admin.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-<%= _('Last administrator leaving %s') % profile.name %>
-
-
- <%= _('Since you are the last administrator, you must choose at least one member to administer this community.') % profile.name %>
-
-
-<%= render :partial => 'manage_roles', :locals => {:from => 'last_admin'} %>
-
diff --git a/app/views/profile_members/remove_admin.html.erb b/app/views/profile_members/remove_admin.html.erb
new file mode 120000
index 0000000..12e1b0b
--- /dev/null
+++ b/app/views/profile_members/remove_admin.html.erb
@@ -0,0 +1 @@
+_members_list.rhtml
\ No newline at end of file
diff --git a/app/views/profile_members/remove_admin.rhtml b/app/views/profile_members/remove_admin.rhtml
deleted file mode 120000
index 12e1b0b..0000000
--- a/app/views/profile_members/remove_admin.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-_members_list.rhtml
\ No newline at end of file
diff --git a/app/views/profile_members/unassociate.html.erb b/app/views/profile_members/unassociate.html.erb
new file mode 120000
index 0000000..12e1b0b
--- /dev/null
+++ b/app/views/profile_members/unassociate.html.erb
@@ -0,0 +1 @@
+_members_list.rhtml
\ No newline at end of file
diff --git a/app/views/profile_members/unassociate.rhtml b/app/views/profile_members/unassociate.rhtml
deleted file mode 120000
index 12e1b0b..0000000
--- a/app/views/profile_members/unassociate.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-_members_list.rhtml
\ No newline at end of file
diff --git a/app/views/profile_search/_article.html.erb b/app/views/profile_search/_article.html.erb
new file mode 100644
index 0000000..8f46328
--- /dev/null
+++ b/app/views/profile_search/_article.html.erb
@@ -0,0 +1,5 @@
+
+ <%= link_to article.title, article.view_url, :class => 'result-title' %>
+ <%= link_to article.short_lead, article.url, {:class => 'article-details'} %>
+ <%= link_to url_for(article.url), article.url, :class => 'article-url' %>
+
diff --git a/app/views/profile_search/_article.rhtml b/app/views/profile_search/_article.rhtml
deleted file mode 100644
index 8f46328..0000000
--- a/app/views/profile_search/_article.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-
- <%= link_to article.title, article.view_url, :class => 'result-title' %>
- <%= link_to article.short_lead, article.url, {:class => 'article-details'} %>
- <%= link_to url_for(article.url), article.url, :class => 'article-url' %>
-
diff --git a/app/views/profile_search/_folder.html.erb b/app/views/profile_search/_folder.html.erb
new file mode 100644
index 0000000..03f1395
--- /dev/null
+++ b/app/views/profile_search/_folder.html.erb
@@ -0,0 +1,5 @@
+
+ <%= link_to article.title, article.view_url, :class => 'result-title' %>
+ <%= link_to article.body.to_s, article.url, {:class => 'article-details'} %>
+ <%= link_to url_for(article.url), article.url, :class => 'article-url' %>
+
diff --git a/app/views/profile_search/_folder.rhtml b/app/views/profile_search/_folder.rhtml
deleted file mode 100644
index 03f1395..0000000
--- a/app/views/profile_search/_folder.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-
- <%= link_to article.title, article.view_url, :class => 'result-title' %>
- <%= link_to article.body.to_s, article.url, {:class => 'article-details'} %>
- <%= link_to url_for(article.url), article.url, :class => 'article-url' %>
-
diff --git a/app/views/profile_search/_uploaded_file.html.erb b/app/views/profile_search/_uploaded_file.html.erb
new file mode 100644
index 0000000..b0cb1d6
--- /dev/null
+++ b/app/views/profile_search/_uploaded_file.html.erb
@@ -0,0 +1,11 @@
+<% if article.image? %>
+
+ <%= link_to image_tag(article.public_filename(:thumb), :alt => article.abstract, :title => article.abstract), article.view_url, :class => 'article-details' %>
+
+<% else %>
+
+ <%= link_to article.title, article.view_url, :class => 'result-title' %>
+ <%= link_to article.title, article.short_lead, :class => 'article-details' %>
+ <%= link_to url_for(article.url), article.url, :class => 'article-url' %>
+
+<% end %>
diff --git a/app/views/profile_search/_uploaded_file.rhtml b/app/views/profile_search/_uploaded_file.rhtml
deleted file mode 100644
index b0cb1d6..0000000
--- a/app/views/profile_search/_uploaded_file.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<% if article.image? %>
-
- <%= link_to image_tag(article.public_filename(:thumb), :alt => article.abstract, :title => article.abstract), article.view_url, :class => 'article-details' %>
-
-<% else %>
-
- <%= link_to article.title, article.view_url, :class => 'result-title' %>
- <%= link_to article.title, article.short_lead, :class => 'article-details' %>
- <%= link_to url_for(article.url), article.url, :class => 'article-url' %>
-
-<% end %>
diff --git a/app/views/profile_search/index.html.erb b/app/views/profile_search/index.html.erb
new file mode 100644
index 0000000..4d50023
--- /dev/null
+++ b/app/views/profile_search/index.html.erb
@@ -0,0 +1,19 @@
+
+
<%= _("Search on %s's profile") % profile.short_name %>
+
+ <%= render :partial => 'shared/profile_search_form' %>
+
+ <% if @results %>
+
+ <%= _("%s results found") % @results.total_entries %>
+
+
+
+ <% @results.sort_by { |r| r.is_image? ? 0 : 1}.each do |result| %>
+ <%= render :partial => partial_for_class(result.class), :locals => { :article => result } %>
+ <% end %>
+
+
+ <%= pagination_links @results %>
+ <% end %>
+
diff --git a/app/views/profile_search/index.rhtml b/app/views/profile_search/index.rhtml
deleted file mode 100644
index 4d50023..0000000
--- a/app/views/profile_search/index.rhtml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
<%= _("Search on %s's profile") % profile.short_name %>
-
- <%= render :partial => 'shared/profile_search_form' %>
-
- <% if @results %>
-
- <%= _("%s results found") % @results.total_entries %>
-
-
-
- <% @results.sort_by { |r| r.is_image? ? 0 : 1}.each do |result| %>
- <%= render :partial => partial_for_class(result.class), :locals => { :article => result } %>
- <% end %>
-
-
- <%= pagination_links @results %>
- <% end %>
-
diff --git a/app/views/region_validators/_region.html.erb b/app/views/region_validators/_region.html.erb
new file mode 100644
index 0000000..16ee9b7
--- /dev/null
+++ b/app/views/region_validators/_region.html.erb
@@ -0,0 +1,14 @@
+
+
+
+ <%= link_to region.name, :action => 'region', :id => region %>
+
<%= n_('1 validator', '%{num} validators.', region.validators.size) % { :num => region.validators.size } %>
+ <% unless region.children.empty? %>
+
+ <%= render :partial => 'region', :collection => region.children %>
+
+ <% end %>
+
+
+
+
diff --git a/app/views/region_validators/_region.rhtml b/app/views/region_validators/_region.rhtml
deleted file mode 100644
index 16ee9b7..0000000
--- a/app/views/region_validators/_region.rhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- <%= link_to region.name, :action => 'region', :id => region %>
-
<%= n_('1 validator', '%{num} validators.', region.validators.size) % { :num => region.validators.size } %>
- <% unless region.children.empty? %>
-
- <%= render :partial => 'region', :collection => region.children %>
-
- <% end %>
-
-
-
-
diff --git a/app/views/region_validators/_search.html.erb b/app/views/region_validators/_search.html.erb
new file mode 100644
index 0000000..649df23
--- /dev/null
+++ b/app/views/region_validators/_search.html.erb
@@ -0,0 +1,15 @@
+<% if @search %>
+
+ <% for item in @search %>
+
+ <%= item.name %>
+ <% form_tag :action => 'add', :id => @region do %>
+ <%= hidden_field_tag :validator_id, item.id %>
+ <% button_bar do %>
+ <%= submit_button('add', _('Add')) %>
+ <% end %>
+ <% end %>
+
+ <% end %>
+
+<% end %>
diff --git a/app/views/region_validators/_search.rhtml b/app/views/region_validators/_search.rhtml
deleted file mode 100644
index 649df23..0000000
--- a/app/views/region_validators/_search.rhtml
+++ /dev/null
@@ -1,15 +0,0 @@
-<% if @search %>
-
- <% for item in @search %>
-
- <%= item.name %>
- <% form_tag :action => 'add', :id => @region do %>
- <%= hidden_field_tag :validator_id, item.id %>
- <% button_bar do %>
- <%= submit_button('add', _('Add')) %>
- <% end %>
- <% end %>
-
- <% end %>
-
-<% end %>
diff --git a/app/views/region_validators/index.html.erb b/app/views/region_validators/index.html.erb
new file mode 100644
index 0000000..06a055a
--- /dev/null
+++ b/app/views/region_validators/index.html.erb
@@ -0,0 +1,5 @@
+<%= _('Validators by Region') %>
+
+
+ <%= render :partial => 'region', :collection => @regions %>
+
diff --git a/app/views/region_validators/index.rhtml b/app/views/region_validators/index.rhtml
deleted file mode 100644
index 06a055a..0000000
--- a/app/views/region_validators/index.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= _('Validators by Region') %>
-
-
- <%= render :partial => 'region', :collection => @regions %>
-
diff --git a/app/views/region_validators/region.html.erb b/app/views/region_validators/region.html.erb
new file mode 100644
index 0000000..464dcea
--- /dev/null
+++ b/app/views/region_validators/region.html.erb
@@ -0,0 +1,31 @@
+<%= _('Validators for region %s') % @region.name %>
+
+<%= _('Current validators') %>
+
+
+ <% for validator in @region.validators %>
+
+ <%= link_to_homepage validator.name, validator.identifier %>
+ <%= link_to _('Remove validation rights'), { :action => 'remove', :id => @region.id, :validator_id => validator }, :method => 'post' %>
+
+ <% end %>
+
+
+<%= _('Add new validators') %>
+
+
+<%= help _('First search organizations by their name, then use the buttons in the search result to add them as validators for this region. ') %>
+
+
+<% form_tag({}, { :method => 'get' }) do %>
+ <%= text_field_tag :search, nil, :id => 'search_validator' %>
+ <% button_bar do %>
+ <%= submit_button('search', _('Search')) %>
+ <% end %>
+<% end %>
+
+<%= observe_field 'search_validator', :url => { :action => 'search', :id => @region.id }, :with => 'search', :frequency => 1, :update => 'search_results' %>
+
+
+ <%= render :partial => 'search' %>
+
diff --git a/app/views/region_validators/region.rhtml b/app/views/region_validators/region.rhtml
deleted file mode 100644
index 464dcea..0000000
--- a/app/views/region_validators/region.rhtml
+++ /dev/null
@@ -1,31 +0,0 @@
-<%= _('Validators for region %s') % @region.name %>
-
-<%= _('Current validators') %>
-
-
- <% for validator in @region.validators %>
-
- <%= link_to_homepage validator.name, validator.identifier %>
- <%= link_to _('Remove validation rights'), { :action => 'remove', :id => @region.id, :validator_id => validator }, :method => 'post' %>
-
- <% end %>
-
-
-<%= _('Add new validators') %>
-
-
-<%= help _('First search organizations by their name, then use the buttons in the search result to add them as validators for this region. ') %>
-
-
-<% form_tag({}, { :method => 'get' }) do %>
- <%= text_field_tag :search, nil, :id => 'search_validator' %>
- <% button_bar do %>
- <%= submit_button('search', _('Search')) %>
- <% end %>
-<% end %>
-
-<%= observe_field 'search_validator', :url => { :action => 'search', :id => @region.id }, :with => 'search', :frequency => 1, :update => 'search_results' %>
-
-
- <%= render :partial => 'search' %>
-
diff --git a/app/views/role/_form.html.erb b/app/views/role/_form.html.erb
new file mode 100644
index 0000000..0570578
--- /dev/null
+++ b/app/views/role/_form.html.erb
@@ -0,0 +1,18 @@
+<%= error_messages_for :role %>
+
+<% labelled_form_for :role, role, :url => (mode == :edit) ? {:action => 'update', :id => role} : {:action => 'create'} do |f| %>
+
+ <%= required_fields_message %>
+
+ <%= required f.text_field(:name) %>
+
+ <%= _('Permissions:') %>
+ <% permissions.keys.each do |p| %>
+ <%= check_box_tag("role[permissions][]", p, role.has_permission?(p), { :id => p }) %>
+ <%= content_tag(:label, permission_name(p), { :for => p }) %>
+ <% end %>
+
+ <% button_bar do %>
+ <%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %>
+ <% end %>
+<% end %>
diff --git a/app/views/role/_form.rhtml b/app/views/role/_form.rhtml
deleted file mode 100644
index 0570578..0000000
--- a/app/views/role/_form.rhtml
+++ /dev/null
@@ -1,18 +0,0 @@
-<%= error_messages_for :role %>
-
-<% labelled_form_for :role, role, :url => (mode == :edit) ? {:action => 'update', :id => role} : {:action => 'create'} do |f| %>
-
- <%= required_fields_message %>
-
- <%= required f.text_field(:name) %>
-
-
<%= _('Permissions:') %>
- <% permissions.keys.each do |p| %>
- <%= check_box_tag("role[permissions][]", p, role.has_permission?(p), { :id => p }) %>
- <%= content_tag(:label, permission_name(p), { :for => p }) %>
- <% end %>
-
- <% button_bar do %>
- <%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %>
- <% end %>
-<% end %>
diff --git a/app/views/role/edit.html.erb b/app/views/role/edit.html.erb
new file mode 100644
index 0000000..a8ff970
--- /dev/null
+++ b/app/views/role/edit.html.erb
@@ -0,0 +1,3 @@
+
<%= _("Editing #{@role.name}") %>
+
+<%= render :partial => 'form', :locals => { :mode => :edit, :role => @role, :permissions => ActiveRecord::Base::PERMISSIONS[@role.kind] } %>
diff --git a/app/views/role/edit.rhtml b/app/views/role/edit.rhtml
deleted file mode 100644
index a8ff970..0000000
--- a/app/views/role/edit.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
- <%= _("Editing #{@role.name}") %>
-
-<%= render :partial => 'form', :locals => { :mode => :edit, :role => @role, :permissions => ActiveRecord::Base::PERMISSIONS[@role.kind] } %>
diff --git a/app/views/role/index.html.erb b/app/views/role/index.html.erb
new file mode 100644
index 0000000..ee77070
--- /dev/null
+++ b/app/views/role/index.html.erb
@@ -0,0 +1,23 @@
+<%= _('Manage user roles') %>
+
+
+
+ <%= _('Role') %>
+ <%= _('Actions') %>
+
+ <% @roles.each do |role| %>
+
+
+ <%= link_to role.name, :action => 'show', :id => role %>
+
+
+ <%= button_without_text :edit, _('Edit'), :action => 'edit', :id => role %>
+
+
+ <% end %>
+
+
+<% 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/index.rhtml b/app/views/role/index.rhtml
deleted file mode 100644
index ee77070..0000000
--- a/app/views/role/index.rhtml
+++ /dev/null
@@ -1,23 +0,0 @@
-<%= _('Manage user roles') %>
-
-
-
- <%= _('Role') %>
- <%= _('Actions') %>
-
- <% @roles.each do |role| %>
-
-
- <%= link_to role.name, :action => 'show', :id => role %>
-
-
- <%= button_without_text :edit, _('Edit'), :action => 'edit', :id => role %>
-
-
- <% end %>
-
-
-<% 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/new.html.erb b/app/views/role/new.html.erb
new file mode 100644
index 0000000..38c32d7
--- /dev/null
+++ b/app/views/role/new.html.erb
@@ -0,0 +1,3 @@
+ <%= _("Create a new role") %>
+
+<%= render :partial => 'form', :locals => { :mode => :create, :role => @role, :permissions => ActiveRecord::Base::PERMISSIONS[@role.kind] } %>
diff --git a/app/views/role/new.rhtml b/app/views/role/new.rhtml
deleted file mode 100644
index 38c32d7..0000000
--- a/app/views/role/new.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
- <%= _("Create a new role") %>
-
-<%= render :partial => 'form', :locals => { :mode => :create, :role => @role, :permissions => ActiveRecord::Base::PERMISSIONS[@role.kind] } %>
diff --git a/app/views/role/show.html.erb b/app/views/role/show.html.erb
new file mode 100644
index 0000000..97da59e
--- /dev/null
+++ b/app/views/role/show.html.erb
@@ -0,0 +1,13 @@
+ <%= _(@role.name) %>
+
+ <%= _('Permissions') %>
+
+ <% @role.permissions.each do |p| %>
+ <%= permission_name(p) %>
+ <% end %>
+
+
+<% button_bar do %>
+ <%= button :edit, _('Edit'), :action => 'edit', :id => @role %>
+ <%= button :back, _('Back to roles management'), :action => 'index' %>
+<% end %>
diff --git a/app/views/role/show.rhtml b/app/views/role/show.rhtml
deleted file mode 100644
index 97da59e..0000000
--- a/app/views/role/show.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
- <%= _(@role.name) %>
-
- <%= _('Permissions') %>
-
- <% @role.permissions.each do |p| %>
- <%= permission_name(p) %>
- <% end %>
-
-
-<% button_bar do %>
- <%= button :edit, _('Edit'), :action => 'edit', :id => @role %>
- <%= button :back, _('Back to roles management'), :action => 'index' %>
-<% end %>
diff --git a/app/views/scrap/notifier/mail.html.erb b/app/views/scrap/notifier/mail.html.erb
new file mode 100644
index 0000000..ec88a61
--- /dev/null
+++ b/app/views/scrap/notifier/mail.html.erb
@@ -0,0 +1,16 @@
+<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
+
+<%= word_wrap(_('%{sender} (%{sender_link}) has left the following scrap for you:') % { :sender => @sender, :sender_link => url_for(@sender_link) }) %>
+
+-------------------------------------------------------------------------------
+<%= word_wrap(@scrap_content) %>
+-------------------------------------------------------------------------------
+
+<%= _('View this scrap on the wall') %>:
+<%= url_for @wall_url %>
+
+<%= _("Greetings,") %>
+
+--
+<%= _('%s team.') % @environment %>
+<%= url_for @url %>
diff --git a/app/views/scrap/notifier/mail.rhtml b/app/views/scrap/notifier/mail.rhtml
deleted file mode 100644
index ec88a61..0000000
--- a/app/views/scrap/notifier/mail.rhtml
+++ /dev/null
@@ -1,16 +0,0 @@
-<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
-
-<%= word_wrap(_('%{sender} (%{sender_link}) has left the following scrap for you:') % { :sender => @sender, :sender_link => url_for(@sender_link) }) %>
-
--------------------------------------------------------------------------------
-<%= word_wrap(@scrap_content) %>
--------------------------------------------------------------------------------
-
-<%= _('View this scrap on the wall') %>:
-<%= url_for @wall_url %>
-
-<%= _("Greetings,") %>
-
---
-<%= _('%s team.') % @environment %>
-<%= url_for @url %>
diff --git a/app/views/search/_article.html.erb b/app/views/search/_article.html.erb
new file mode 100644
index 0000000..25c2a41
--- /dev/null
+++ b/app/views/search/_article.html.erb
@@ -0,0 +1,12 @@
+
+ <%= link_to(article.title, article.url, :class => "search-result-title") %>
+
+ <%= render :partial => 'image', :object => article %>
+
+
+ <%= render :partial => 'article_common', :object => article %>
+
+ <%= render :partial => 'article_last_change', :object => article %>
+
+
+
diff --git a/app/views/search/_article.rhtml b/app/views/search/_article.rhtml
deleted file mode 100644
index 25c2a41..0000000
--- a/app/views/search/_article.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-
- <%= link_to(article.title, article.url, :class => "search-result-title") %>
-
- <%= render :partial => 'image', :object => article %>
-
-
- <%= render :partial => 'article_common', :object => article %>
-
- <%= render :partial => 'article_last_change', :object => article %>
-
-
-
diff --git a/app/views/search/_article_author.html.erb b/app/views/search/_article_author.html.erb
new file mode 100644
index 0000000..9e9b1f6
--- /dev/null
+++ b/app/views/search/_article_author.html.erb
@@ -0,0 +1,8 @@
+<% article = article_author %>
+
+
+ <%= _("Author") %>
+
+ <%= link_to_profile article.profile.name, article.profile.identifier %>
+
+
diff --git a/app/views/search/_article_author.rhtml b/app/views/search/_article_author.rhtml
deleted file mode 100644
index 9e9b1f6..0000000
--- a/app/views/search/_article_author.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-<% article = article_author %>
-
-
- <%= _("Author") %>
-
- <%= link_to_profile article.profile.name, article.profile.identifier %>
-
-
diff --git a/app/views/search/_article_categories.html.erb b/app/views/search/_article_categories.html.erb
new file mode 100644
index 0000000..325f971
--- /dev/null
+++ b/app/views/search/_article_categories.html.erb
@@ -0,0 +1,9 @@
+
+ <%= _('Categories') %>
+ ">
+ <% article_categories.each do |category| %>
+ <%= link_to_category category, false, :class => "search-article-category" %>
+ <% end %>
+ <%= _('None') if article_categories.empty? %>
+
+
diff --git a/app/views/search/_article_categories.rhtml b/app/views/search/_article_categories.rhtml
deleted file mode 100644
index 325f971..0000000
--- a/app/views/search/_article_categories.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- <%= _('Categories') %>
- ">
- <% article_categories.each do |category| %>
- <%= link_to_category category, false, :class => "search-article-category" %>
- <% end %>
- <%= _('None') if article_categories.empty? %>
-
-
diff --git a/app/views/search/_article_common.html.erb b/app/views/search/_article_common.html.erb
new file mode 100644
index 0000000..43e2a5f
--- /dev/null
+++ b/app/views/search/_article_common.html.erb
@@ -0,0 +1,7 @@
+<% article = article_common %>
+<% show_description = true if show_description.nil? %>
+
+<%= render :partial => 'article_author', :object => article %>
+<%= render :partial => 'article_description', :object => article if show_description %>
+<%= render :partial => 'article_tags', :object => article.tags %>
+<%= render :partial => 'article_categories', :object => article.categories %>
diff --git a/app/views/search/_article_common.rhtml b/app/views/search/_article_common.rhtml
deleted file mode 100644
index 43e2a5f..0000000
--- a/app/views/search/_article_common.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<% article = article_common %>
-<% show_description = true if show_description.nil? %>
-
-<%= render :partial => 'article_author', :object => article %>
-<%= render :partial => 'article_description', :object => article if show_description %>
-<%= render :partial => 'article_tags', :object => article.tags %>
-<%= render :partial => 'article_categories', :object => article.categories %>
diff --git a/app/views/search/_article_description.html.erb b/app/views/search/_article_description.html.erb
new file mode 100644
index 0000000..cec29d1
--- /dev/null
+++ b/app/views/search/_article_description.html.erb
@@ -0,0 +1,15 @@
+<% article = article_description %>
+
+
+ <%= _("Description") %>
+
+ <% if !article.body.blank? %>
+ <% description = strip_tags(article.body.to_s) %>
+ <% description.gsub!(/\s{2,}/, ' ') %>
+ <% description = excerpt(description, description.first(3), 200) %>
+
+ <%= description %>
+ <% else %>
+ <%= _('None') %>
+ <% end %>
+
diff --git a/app/views/search/_article_description.rhtml b/app/views/search/_article_description.rhtml
deleted file mode 100644
index cec29d1..0000000
--- a/app/views/search/_article_description.rhtml
+++ /dev/null
@@ -1,15 +0,0 @@
-<% article = article_description %>
-
-
- <%= _("Description") %>
-
- <% if !article.body.blank? %>
- <% description = strip_tags(article.body.to_s) %>
- <% description.gsub!(/\s{2,}/, ' ') %>
- <% description = excerpt(description, description.first(3), 200) %>
-
- <%= description %>
- <% else %>
- <%= _('None') %>
- <% end %>
-
diff --git a/app/views/search/_article_last_change.html.erb b/app/views/search/_article_last_change.html.erb
new file mode 100644
index 0000000..d0203a3
--- /dev/null
+++ b/app/views/search/_article_last_change.html.erb
@@ -0,0 +1,10 @@
+<% article = article_last_change %>
+
+
+ <% if article.last_changed_by and article.last_changed_by != article.profile %>
+ <%= _('by %{name} at %{date}') % {:name => link_to(article.last_changed_by.name, article.last_changed_by.url),
+ :date => show_date(article.updated_at) } %>
+ <% else %>
+ <%= _('Last update: %s.') % show_date(article.updated_at) %>
+ <% end %>
+
diff --git a/app/views/search/_article_last_change.rhtml b/app/views/search/_article_last_change.rhtml
deleted file mode 100644
index d0203a3..0000000
--- a/app/views/search/_article_last_change.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<% article = article_last_change %>
-
-
- <% if article.last_changed_by and article.last_changed_by != article.profile %>
- <%= _('by %{name} at %{date}') % {:name => link_to(article.last_changed_by.name, article.last_changed_by.url),
- :date => show_date(article.updated_at) } %>
- <% else %>
- <%= _('Last update: %s.') % show_date(article.updated_at) %>
- <% end %>
-
diff --git a/app/views/search/_article_tags.html.erb b/app/views/search/_article_tags.html.erb
new file mode 100644
index 0000000..25f5c5e
--- /dev/null
+++ b/app/views/search/_article_tags.html.erb
@@ -0,0 +1,9 @@
+
+ <%= _('Tags') %>
+ ">
+ <% article_tags.each do |tag| %>
+ <%= link_to_tag tag, :class => "search-article-tag" %>
+ <% end %>
+ <%= _('None') if article_tags.empty? %>
+
+
diff --git a/app/views/search/_article_tags.rhtml b/app/views/search/_article_tags.rhtml
deleted file mode 100644
index 25f5c5e..0000000
--- a/app/views/search/_article_tags.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- <%= _('Tags') %>
- ">
- <% article_tags.each do |tag| %>
- <%= link_to_tag tag, :class => "search-article-tag" %>
- <% end %>
- <%= _('None') if article_tags.empty? %>
-
-
diff --git a/app/views/search/_blog.html.erb b/app/views/search/_blog.html.erb
new file mode 100644
index 0000000..e96a519
--- /dev/null
+++ b/app/views/search/_blog.html.erb
@@ -0,0 +1,24 @@
+
+ <%= link_to blog.title, blog.view_url, :class => 'search-result-title' %>
+
+ <%= render :partial => 'image', :object => blog %>
+
+
+
+ <%= _("Last posts") %>
+
+ <% r = blog.children.find(:all, :order => :updated_at, :conditions => ['type != ?', 'RssFeed']).last(3) %>
+ ">
+ <% r.each do |a| %>
+ <%= link_to a.title, a.view_url, :class => 'search-blog-sample-item '+icon_for_article(a) %>
+ <% end %>
+ <%= _('None') if r.empty? %>
+
+
+
+ <%= render :partial => 'article_common', :object => blog %>
+
+ <%= render :partial => 'article_last_change', :object => blog %>
+
+
+
diff --git a/app/views/search/_blog.rhtml b/app/views/search/_blog.rhtml
deleted file mode 100644
index e96a519..0000000
--- a/app/views/search/_blog.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-
- <%= link_to blog.title, blog.view_url, :class => 'search-result-title' %>
-
- <%= render :partial => 'image', :object => blog %>
-
-
-
- <%= _("Last posts") %>
-
- <% r = blog.children.find(:all, :order => :updated_at, :conditions => ['type != ?', 'RssFeed']).last(3) %>
- ">
- <% r.each do |a| %>
- <%= link_to a.title, a.view_url, :class => 'search-blog-sample-item '+icon_for_article(a) %>
- <% end %>
- <%= _('None') if r.empty? %>
-
-
-
- <%= render :partial => 'article_common', :object => blog %>
-
- <%= render :partial => 'article_last_change', :object => blog %>
-
-
-
diff --git a/app/views/search/_comment.html.erb b/app/views/search/_comment.html.erb
new file mode 100644
index 0000000..1cacab1
--- /dev/null
+++ b/app/views/search/_comment.html.erb
@@ -0,0 +1,23 @@
+
+ <%- if comment.author -%>
+ <%= link_to content_tag( 'span', comment.author.name() ), comment.author.url,
+ :class => 'comment-picture',
+ :style => 'background-image:url(%s)' % profile_icon(comment.author, :icon)
+ %>
+ <%- else -%>
+ <%# unauthenticated user: display gravatar icon %>
+ <%= content_tag 'span', ' ',
+ :class => 'comment-picture',
+ :style => 'background-image:url(%s)' % str_gravatar_url_for( comment.email, :size => 20 )
+ %>
+ <%- end %>
+ <%= link_to(comment.title, comment.url) %>
+
+ <%= _('by %{author} on "%{article}"') % {
+ :comment => link_to(comment.title, comment.url),
+ :article => link_to(comment.article.title, comment.article.url),
+ :author => comment.author_name } %>
+
+
+
+
diff --git a/app/views/search/_comment.rhtml b/app/views/search/_comment.rhtml
deleted file mode 100644
index 1cacab1..0000000
--- a/app/views/search/_comment.rhtml
+++ /dev/null
@@ -1,23 +0,0 @@
-
- <%- if comment.author -%>
- <%= link_to content_tag( 'span', comment.author.name() ), comment.author.url,
- :class => 'comment-picture',
- :style => 'background-image:url(%s)' % profile_icon(comment.author, :icon)
- %>
- <%- else -%>
- <%# unauthenticated user: display gravatar icon %>
- <%= content_tag 'span', ' ',
- :class => 'comment-picture',
- :style => 'background-image:url(%s)' % str_gravatar_url_for( comment.email, :size => 20 )
- %>
- <%- end %>
- <%= link_to(comment.title, comment.url) %>
-
- <%= _('by %{author} on "%{article}"') % {
- :comment => link_to(comment.title, comment.url),
- :article => link_to(comment.article.title, comment.article.url),
- :author => comment.author_name } %>
-
-
-
-
diff --git a/app/views/search/_content.html.erb b/app/views/search/_content.html.erb
new file mode 120000
index 0000000..54e6981
--- /dev/null
+++ b/app/views/search/_content.html.erb
@@ -0,0 +1 @@
+_article.rhtml
\ No newline at end of file
diff --git a/app/views/search/_content.rhtml b/app/views/search/_content.rhtml
deleted file mode 120000
index 54e6981..0000000
--- a/app/views/search/_content.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-_article.rhtml
\ No newline at end of file
diff --git a/app/views/search/_display_results.html.erb b/app/views/search/_display_results.html.erb
new file mode 100644
index 0000000..47c930d
--- /dev/null
+++ b/app/views/search/_display_results.html.erb
@@ -0,0 +1,40 @@
+
+ <% @order.each do |name| %>
+ <% results = @results[name] %>
+ <% empty = results.nil? || results.empty? %>
+
+
">
+ <% if not empty %>
+ <% partial = partial_for_class(results.first.class.class_name.constantize) %>
+
+ <% if multiple_search? %>
+
<%= @names[name] %>
+ <% if results.total_entries > SearchController::MULTIPLE_SEARCH_LIMIT %>
+ <%= link_to(_('see all (%d)') % results.total_entries, params.merge(:action => name), :class => 'see-more' ) %>
+ <% end %>
+ <% end %>
+
+
+
+ <% results.each do |hit| %>
+ <%= render :partial => partial_for_class(hit.class), :object => hit %>
+ <% end %>
+
+
+ <% else %>
+ <% if multiple_search? %>
+
<%= @names[name] %>
+ <% end %>
+
+
+ <% end %>
+
+ <% end %>
+
+
+
+ <%= add_zoom_to_images %>
+
+
diff --git a/app/views/search/_display_results.rhtml b/app/views/search/_display_results.rhtml
deleted file mode 100644
index 47c930d..0000000
--- a/app/views/search/_display_results.rhtml
+++ /dev/null
@@ -1,40 +0,0 @@
-
- <% @order.each do |name| %>
- <% results = @results[name] %>
- <% empty = results.nil? || results.empty? %>
-
-
">
- <% if not empty %>
- <% partial = partial_for_class(results.first.class.class_name.constantize) %>
-
- <% if multiple_search? %>
-
<%= @names[name] %>
- <% if results.total_entries > SearchController::MULTIPLE_SEARCH_LIMIT %>
- <%= link_to(_('see all (%d)') % results.total_entries, params.merge(:action => name), :class => 'see-more' ) %>
- <% end %>
- <% end %>
-
-
-
- <% results.each do |hit| %>
- <%= render :partial => partial_for_class(hit.class), :object => hit %>
- <% end %>
-
-
- <% else %>
- <% if multiple_search? %>
-
<%= @names[name] %>
- <% end %>
-
-
- <% end %>
-
- <% end %>
-
-
-
- <%= add_zoom_to_images %>
-
-
diff --git a/app/views/search/_enterprise_homepage.html.erb b/app/views/search/_enterprise_homepage.html.erb
new file mode 100644
index 0000000..3944a20
--- /dev/null
+++ b/app/views/search/_enterprise_homepage.html.erb
@@ -0,0 +1 @@
+<%= render :partial => 'text_article', :object => enterprise_homepage %>
diff --git a/app/views/search/_enterprise_homepage.rhtml b/app/views/search/_enterprise_homepage.rhtml
deleted file mode 100644
index 3944a20..0000000
--- a/app/views/search/_enterprise_homepage.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= render :partial => 'text_article', :object => enterprise_homepage %>
diff --git a/app/views/search/_event.html.erb b/app/views/search/_event.html.erb
new file mode 100644
index 0000000..eacbf2e
--- /dev/null
+++ b/app/views/search/_event.html.erb
@@ -0,0 +1,25 @@
+
+<%= link_to(event.title, event.url, :class => "search-result-title") %>
+
+ <%= render :partial => 'image', :object => event %>
+
+
+ <% if event.start_date %>
+
+ <%= _('Start date') %>
+ <%= event.start_date %>
+
+ <% end %>
+ <% if event.end_date %>
+
+ <%= _('End date') %>
+ <%= event.end_date %>
+
+ <% end %>
+
+ <%= render :partial => 'article_common', :object => event %>
+
+<%= render :partial => 'article_last_change', :object => event %>
+
+
+
diff --git a/app/views/search/_event.rhtml b/app/views/search/_event.rhtml
deleted file mode 100644
index eacbf2e..0000000
--- a/app/views/search/_event.rhtml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-<%= link_to(event.title, event.url, :class => "search-result-title") %>
-
- <%= render :partial => 'image', :object => event %>
-
-
- <% if event.start_date %>
-
- <%= _('Start date') %>
- <%= event.start_date %>
-
- <% end %>
- <% if event.end_date %>
-
- <%= _('End date') %>
- <%= event.end_date %>
-
- <% end %>
-
- <%= render :partial => 'article_common', :object => event %>
-
-<%= render :partial => 'article_last_change', :object => event %>
-
-
-
diff --git a/app/views/search/_facets_menu.html.erb b/app/views/search/_facets_menu.html.erb
new file mode 100644
index 0000000..1893876
--- /dev/null
+++ b/app/views/search/_facets_menu.html.erb
@@ -0,0 +1,36 @@
+<% less_options_limit = 8 %>
+
+
diff --git a/app/views/search/_facets_menu.rhtml b/app/views/search/_facets_menu.rhtml
deleted file mode 100644
index 1893876..0000000
--- a/app/views/search/_facets_menu.rhtml
+++ /dev/null
@@ -1,36 +0,0 @@
-<% less_options_limit = 8 %>
-
-
diff --git a/app/views/search/_facets_unselect_menu.html.erb b/app/views/search/_facets_unselect_menu.html.erb
new file mode 100644
index 0000000..db1393b
--- /dev/null
+++ b/app/views/search/_facets_unselect_menu.html.erb
@@ -0,0 +1,6 @@
+
+ <% if params[:facet] and params[:facet].count > 0 %>
+ <%= _("Applied filters") %>
+ <%= facet_selecteds_html_for(environment, asset_class(@asset), params) %>
+ <% end %>
+
diff --git a/app/views/search/_facets_unselect_menu.rhtml b/app/views/search/_facets_unselect_menu.rhtml
deleted file mode 100644
index db1393b..0000000
--- a/app/views/search/_facets_unselect_menu.rhtml
+++ /dev/null
@@ -1,6 +0,0 @@
-
- <% if params[:facet] and params[:facet].count > 0 %>
- <%= _("Applied filters") %>
- <%= facet_selecteds_html_for(environment, asset_class(@asset), params) %>
- <% end %>
-
diff --git a/app/views/search/_folder.html.erb b/app/views/search/_folder.html.erb
new file mode 100644
index 0000000..a322481
--- /dev/null
+++ b/app/views/search/_folder.html.erb
@@ -0,0 +1,24 @@
+
+ <%= link_to folder.title, folder.view_url, :class => 'search-result-title' %>
+
+ <%= render :partial => 'image', :object => folder %>
+
+
+
+ <%= _("Last items") %>
+
+ <% r = folder.children.last(3) %>
+ ">
+ <% r.each do |a| %>
+ <%= link_to a.title, a.view_url, :class => 'search-folder-sample-item '+icon_for_article(a) %>
+ <% end %>
+ <%= _('None') if r.empty? %>
+
+
+
+ <%= render :partial => 'article_common', :object => folder %>
+
+ <%= render :partial => 'article_last_change', :object => folder %>
+
+
+
diff --git a/app/views/search/_folder.rhtml b/app/views/search/_folder.rhtml
deleted file mode 100644
index a322481..0000000
--- a/app/views/search/_folder.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-
- <%= link_to folder.title, folder.view_url, :class => 'search-result-title' %>
-
- <%= render :partial => 'image', :object => folder %>
-
-
-
- <%= _("Last items") %>
-
- <% r = folder.children.last(3) %>
- ">
- <% r.each do |a| %>
- <%= link_to a.title, a.view_url, :class => 'search-folder-sample-item '+icon_for_article(a) %>
- <% end %>
- <%= _('None') if r.empty? %>
-
-
-
- <%= render :partial => 'article_common', :object => folder %>
-
- <%= render :partial => 'article_last_change', :object => folder %>
-
-
-
diff --git a/app/views/search/_forum.html.erb b/app/views/search/_forum.html.erb
new file mode 100644
index 0000000..54df4a2
--- /dev/null
+++ b/app/views/search/_forum.html.erb
@@ -0,0 +1,24 @@
+
+ <%= link_to forum.title, forum.view_url, :class => 'search-result-title' %>
+
+ <%= render :partial => 'image', :object => forum %>
+
+
+
+ <%= _("Last topics") %>
+
+ <% r = forum.children.find(:all, :order => :updated_at, :conditions => ['type != ?', 'RssFeed']).last(3) %>
+ ">
+ <% r.each do |a| %>
+ <%= link_to a.title, a.view_url, :class => 'search-forum-sample-item '+icon_for_article(a) %>
+ <% end %>
+ <%= _('None') if r.empty? %>
+
+
+
+ <%= render :partial => 'article_common', :object => forum %>
+
+ <%= render :partial => 'article_last_change', :object => forum %>
+
+
+
diff --git a/app/views/search/_forum.rhtml b/app/views/search/_forum.rhtml
deleted file mode 100644
index 54df4a2..0000000
--- a/app/views/search/_forum.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-
- <%= link_to forum.title, forum.view_url, :class => 'search-result-title' %>
-
- <%= render :partial => 'image', :object => forum %>
-
-
-
- <%= _("Last topics") %>
-
- <% r = forum.children.find(:all, :order => :updated_at, :conditions => ['type != ?', 'RssFeed']).last(3) %>
- ">
- <% r.each do |a| %>
- <%= link_to a.title, a.view_url, :class => 'search-forum-sample-item '+icon_for_article(a) %>
- <% end %>
- <%= _('None') if r.empty? %>
-
-
-
- <%= render :partial => 'article_common', :object => forum %>
-
- <%= render :partial => 'article_last_change', :object => forum %>
-
-
-
diff --git a/app/views/search/_gallery.html.erb b/app/views/search/_gallery.html.erb
new file mode 100644
index 0000000..28e2e66
--- /dev/null
+++ b/app/views/search/_gallery.html.erb
@@ -0,0 +1,13 @@
+
+ <%= link_to gallery.title, gallery.view_url, :class => 'search-result-title' %>
+
+ <%= render :partial => 'image', :object => gallery %>
+
+
+ <%= render :partial => 'article_common', :object => gallery %>
+
+ <%= render :partial => 'article_last_change', :object => gallery %>
+
+
+
+
diff --git a/app/views/search/_gallery.rhtml b/app/views/search/_gallery.rhtml
deleted file mode 100644
index 28e2e66..0000000
--- a/app/views/search/_gallery.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-
- <%= link_to gallery.title, gallery.view_url, :class => 'search-result-title' %>
-
- <%= render :partial => 'image', :object => gallery %>
-
-
- <%= render :partial => 'article_common', :object => gallery %>
-
- <%= render :partial => 'article_last_change', :object => gallery %>
-
-
-
-
diff --git a/app/views/search/_google_maps.html.erb b/app/views/search/_google_maps.html.erb
new file mode 100644
index 0000000..a105be5
--- /dev/null
+++ b/app/views/search/_google_maps.html.erb
@@ -0,0 +1,26 @@
+
+
+
+<%= content_tag('script', '', :src => "http://maps.google.com/maps/api/js?sensor=true", :type => 'text/javascript') %>
+<%= javascript_include_tag('google_maps') %>
+
+<%
+ icon = default_or_themed_icon("/images/icons-map/enterprise.png")
+%>
+
+
diff --git a/app/views/search/_google_maps.rhtml b/app/views/search/_google_maps.rhtml
deleted file mode 100644
index a105be5..0000000
--- a/app/views/search/_google_maps.rhtml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-<%= content_tag('script', '', :src => "http://maps.google.com/maps/api/js?sensor=true", :type => 'text/javascript') %>
-<%= javascript_include_tag('google_maps') %>
-
-<%
- icon = default_or_themed_icon("/images/icons-map/enterprise.png")
-%>
-
-
diff --git a/app/views/search/_image.html.erb b/app/views/search/_image.html.erb
new file mode 100644
index 0000000..be85c67
--- /dev/null
+++ b/app/views/search/_image.html.erb
@@ -0,0 +1,52 @@
+
+
+ <% if image.is_a? UploadedFile and image.filename %>
+ <% extension = image.extension %>
+ <% if ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'svg'].include? extension %>
+ <%= link_to '', image.view_url, :class => "search-image-pic", :style => 'background-image: url(%s)'% image.public_filename(:thumb) %>
+ <% if image.width && image.height %>
+ <% javascript_tag do %>
+ image = jQuery('script').last().parent().find('.search-image-pic');
+ des_width = parseInt(image.css('width'));
+ des_height = parseInt(image.css('height'));
+
+ width = <%= image.width %>;
+ height = <%= image.height %>;
+ scale_factor = width > height ? des_width/width : des_height/height;
+
+ image.css({'width' : scale_factor*width +'px', 'height' : scale_factor*height+'px'});
+ <% end %>
+ <% end %>
+ <% elsif ['pdf'].include? extension %>
+ <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-pdf' %>
+ <% elsif ['doc', 'docx', 'odt', 'rtf', 'txt', 'html', 'htm'].include? extension %>
+ <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-vnd-oasis-opendocument-text' %>
+ <% elsif ['xls', 'xlsx', 'ods', 'csv', 'tsv', 'tab'].include? extension %>
+ <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-vnd-oasis-opendocument-spreadsheet' %>
+ <% end %>
+ <% elsif image.is_a? Gallery %>
+
+ <% r = image.children.find(:all, :order => :updated_at, :conditions => ['type = ?', 'UploadedFile']).last(3) %>
+ <% if r.length > 0 %>
+ <% r.each do |i| %>
+ <%= link_to '', i.view_url, :class => "search-image-pic", :style => 'background-image: url(%s)'% i.public_filename(:thumb) %>
+ <% end %>
+ <% else %>
+
<%= _('No image') %>
+ <% end %>
+
+ <% elsif image.is_a? Product %>
+ <% if image.image %>
+
+ <%= link_to '', product_path(image), :class => "search-image-pic",
+ :style => 'background-image: url(%s)'% image.default_image(:thumb) %>
+ <%= link_to content_tag(:span, _('Zoom in')), image.image.public_filename,
+ :class => 'zoomify-image' %>
+
+ <% else %>
+
<%= _('No image') %>
+ <% end %>
+ <% else %>
+
+ <% end %>
+
diff --git a/app/views/search/_image.rhtml b/app/views/search/_image.rhtml
deleted file mode 100644
index be85c67..0000000
--- a/app/views/search/_image.rhtml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
- <% if image.is_a? UploadedFile and image.filename %>
- <% extension = image.extension %>
- <% if ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'svg'].include? extension %>
- <%= link_to '', image.view_url, :class => "search-image-pic", :style => 'background-image: url(%s)'% image.public_filename(:thumb) %>
- <% if image.width && image.height %>
- <% javascript_tag do %>
- image = jQuery('script').last().parent().find('.search-image-pic');
- des_width = parseInt(image.css('width'));
- des_height = parseInt(image.css('height'));
-
- width = <%= image.width %>;
- height = <%= image.height %>;
- scale_factor = width > height ? des_width/width : des_height/height;
-
- image.css({'width' : scale_factor*width +'px', 'height' : scale_factor*height+'px'});
- <% end %>
- <% end %>
- <% elsif ['pdf'].include? extension %>
- <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-pdf' %>
- <% elsif ['doc', 'docx', 'odt', 'rtf', 'txt', 'html', 'htm'].include? extension %>
- <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-vnd-oasis-opendocument-text' %>
- <% elsif ['xls', 'xlsx', 'ods', 'csv', 'tsv', 'tab'].include? extension %>
- <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-vnd-oasis-opendocument-spreadsheet' %>
- <% end %>
- <% elsif image.is_a? Gallery %>
-
- <% r = image.children.find(:all, :order => :updated_at, :conditions => ['type = ?', 'UploadedFile']).last(3) %>
- <% if r.length > 0 %>
- <% r.each do |i| %>
- <%= link_to '', i.view_url, :class => "search-image-pic", :style => 'background-image: url(%s)'% i.public_filename(:thumb) %>
- <% end %>
- <% else %>
-
<%= _('No image') %>
- <% end %>
-
- <% elsif image.is_a? Product %>
- <% if image.image %>
-
- <%= link_to '', product_path(image), :class => "search-image-pic",
- :style => 'background-image: url(%s)'% image.default_image(:thumb) %>
- <%= link_to content_tag(:span, _('Zoom in')), image.image.public_filename,
- :class => 'zoomify-image' %>
-
- <% else %>
-
<%= _('No image') %>
- <% end %>
- <% else %>
-
- <% end %>
-
diff --git a/app/views/search/_product.html.erb b/app/views/search/_product.html.erb
new file mode 100644
index 0000000..0a73f7b
--- /dev/null
+++ b/app/views/search/_product.html.erb
@@ -0,0 +1,85 @@
+<% extra_content = @plugins.dispatch(:asset_product_extras, product, product.enterprise).collect { |content| instance_eval(&content) } %>
+<% extra_properties = @plugins.dispatch(:asset_product_properties, product)%>
+
+
+
+
+ <%= render :partial => 'search/image', :object => product %>
+
+ <% if product.available %>
+ <% if product.price && product.price > 0 %>
+ <% has_discount = product.discount && product.discount > 0 %>
+ <% if product.price %>
+
<%=_("from") if has_discount %> <%= price_span(product.price, :class => "search-product-price " + (has_discount ? 'with-discount' : '')) %>
+ <% if has_discount %>
+
<%=_("by")%> <%= price_span(product.price_with_discount, :class => "search-product-price") %>
+ <% end %>
+ <% if product.unit %>
+
<%= _('/') %> <%= product.unit.name %>
+ <% end %>
+ <% end %>
+
+ <% end %>
+ <% else %>
+
<%= _('Not available') %>
+ <% end %>
+
+
+
+ <%= link_to_product product, :class => 'search-result-title' %>
+
+ <%= _('Supplier') %> <%= link_to_homepage(product.enterprise.name, product.enterprise.identifier) %>
+
+
+ <% if product.description %>
+ <% desc_stripped = strip_tags(product.description) %>
+ <%= _('Description') %> <%= excerpt(desc_stripped, desc_stripped.first(3), 300) %>
+ <% end %>
+
+
+
+
+ <% if product.enterprise.region %>
+ <%= _('City') %>
+ <%= city_with_state(product.enterprise.region) %>
+ <% end %>
+
+
+ <% if product.product_qualifiers.count > 0 %>
+ <%= _('Qualifiers') %>
+ <% product.product_qualifiers.each do |pq| %>
+ <% if pq.qualifier %>
+ <%= pq.qualifier.name + (pq.certifier.nil? ? _(";") : '') %>
+ <% end %>
+ <% if pq.certifier %>
+ <%= _('cert. ') + pq.certifier.name + _(";") %>
+ <% end %>
+ <% end %>
+ <% end %>
+
+
+
+
+
+ <%= extra_content.join('\n') %>
+ <% extra_properties.each do |property| %>
+ <%= property[:name] + ': ' + instance_eval(&property[:content]) %>
+ <% end %>
+
+
diff --git a/app/views/search/_product.rhtml b/app/views/search/_product.rhtml
deleted file mode 100644
index 0a73f7b..0000000
--- a/app/views/search/_product.rhtml
+++ /dev/null
@@ -1,85 +0,0 @@
-<% extra_content = @plugins.dispatch(:asset_product_extras, product, product.enterprise).collect { |content| instance_eval(&content) } %>
-<% extra_properties = @plugins.dispatch(:asset_product_properties, product)%>
-
-
-
-
- <%= render :partial => 'search/image', :object => product %>
-
- <% if product.available %>
- <% if product.price && product.price > 0 %>
- <% has_discount = product.discount && product.discount > 0 %>
- <% if product.price %>
-
<%=_("from") if has_discount %> <%= price_span(product.price, :class => "search-product-price " + (has_discount ? 'with-discount' : '')) %>
- <% if has_discount %>
-
<%=_("by")%> <%= price_span(product.price_with_discount, :class => "search-product-price") %>
- <% end %>
- <% if product.unit %>
-
<%= _('/') %> <%= product.unit.name %>
- <% end %>
- <% end %>
-
- <% end %>
- <% else %>
-
<%= _('Not available') %>
- <% end %>
-
-
-
- <%= link_to_product product, :class => 'search-result-title' %>
-
- <%= _('Supplier') %> <%= link_to_homepage(product.enterprise.name, product.enterprise.identifier) %>
-
-
- <% if product.description %>
- <% desc_stripped = strip_tags(product.description) %>
- <%= _('Description') %> <%= excerpt(desc_stripped, desc_stripped.first(3), 300) %>
- <% end %>
-
-
-
-
- <% if product.enterprise.region %>
- <%= _('City') %>
- <%= city_with_state(product.enterprise.region) %>
- <% end %>
-
-
- <% if product.product_qualifiers.count > 0 %>
- <%= _('Qualifiers') %>
- <% product.product_qualifiers.each do |pq| %>
- <% if pq.qualifier %>
- <%= pq.qualifier.name + (pq.certifier.nil? ? _(";") : '') %>
- <% end %>
- <% if pq.certifier %>
- <%= _('cert. ') + pq.certifier.name + _(";") %>
- <% end %>
- <% end %>
- <% end %>
-
-
-
-
-
- <%= extra_content.join('\n') %>
- <% extra_properties.each do |property| %>
- <%= property[:name] + ': ' + instance_eval(&property[:content]) %>
- <% end %>
-
-
diff --git a/app/views/search/_profile.html.erb b/app/views/search/_profile.html.erb
new file mode 100644
index 0000000..c0daf94
--- /dev/null
+++ b/app/views/search/_profile.html.erb
@@ -0,0 +1,42 @@
+
+<% if @empty_query or multiple_search? or !profile.enterprise? %>
+ <%= profile_image_link profile, :portrait, 'div',
+ @filter == 'more_recent' ? profile.send(@filter + '_label') + show_date(profile.created_at) : profile.send(@filter + '_label') %>
+<% else %>
+
+
+ <%= profile_image_link profile, :portrait, 'div' %>
+
+
+ <%= link_to_homepage(profile.name, profile.identifier, :class => "search-result-title") %>
+
+ <% if profile.description %>
+ <% body_stripped = strip_tags(profile.description) %>
+ <% elsif profile.home_page and profile.home_page.body %>
+ <% body_stripped = strip_tags(profile.home_page.body) %>
+ <% end %>
+ <%= excerpt(body_stripped, body_stripped.first(3), 200) if body_stripped %>
+
+
+ <%= _("City") %>
+ <% if profile.region %>
+ <%= city_with_state(profile.region) %>
+ <% end %>
+
+
+
+ <% profile.top_level_categorization.each do |parent, children| %>
+
+ <%= parent.name %>
+
+ <%= children.collect(&:name).join(', ') %>
+
+
+ <% end %>
+
+
+
+
+
+<% end %>
+
diff --git a/app/views/search/_profile.rhtml b/app/views/search/_profile.rhtml
deleted file mode 100644
index c0daf94..0000000
--- a/app/views/search/_profile.rhtml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-<% if @empty_query or multiple_search? or !profile.enterprise? %>
- <%= profile_image_link profile, :portrait, 'div',
- @filter == 'more_recent' ? profile.send(@filter + '_label') + show_date(profile.created_at) : profile.send(@filter + '_label') %>
-<% else %>
-
-
- <%= profile_image_link profile, :portrait, 'div' %>
-
-
- <%= link_to_homepage(profile.name, profile.identifier, :class => "search-result-title") %>
-
- <% if profile.description %>
- <% body_stripped = strip_tags(profile.description) %>
- <% elsif profile.home_page and profile.home_page.body %>
- <% body_stripped = strip_tags(profile.home_page.body) %>
- <% end %>
- <%= excerpt(body_stripped, body_stripped.first(3), 200) if body_stripped %>
-
-
- <%= _("City") %>
- <% if profile.region %>
- <%= city_with_state(profile.region) %>
- <% end %>
-
-
-
- <% profile.top_level_categorization.each do |parent, children| %>
-
- <%= parent.name %>
-
- <%= children.collect(&:name).join(', ') %>
-
-
- <% end %>
-
-
-
-
-
-<% end %>
-
diff --git a/app/views/search/_results_header.html.erb b/app/views/search/_results_header.html.erb
new file mode 100644
index 0000000..3449eba
--- /dev/null
+++ b/app/views/search/_results_header.html.erb
@@ -0,0 +1,21 @@
+
diff --git a/app/views/search/_results_header.rhtml b/app/views/search/_results_header.rhtml
deleted file mode 100644
index 3449eba..0000000
--- a/app/views/search/_results_header.rhtml
+++ /dev/null
@@ -1,21 +0,0 @@
-
diff --git a/app/views/search/_search_form.html.erb b/app/views/search/_search_form.html.erb
new file mode 100644
index 0000000..e298996
--- /dev/null
+++ b/app/views/search/_search_form.html.erb
@@ -0,0 +1,37 @@
+
diff --git a/app/views/search/_search_form.rhtml b/app/views/search/_search_form.rhtml
deleted file mode 100644
index e298996..0000000
--- a/app/views/search/_search_form.rhtml
+++ /dev/null
@@ -1,37 +0,0 @@
-
diff --git a/app/views/search/_sellers_form.html.erb b/app/views/search/_sellers_form.html.erb
new file mode 100644
index 0000000..c21b293
--- /dev/null
+++ b/app/views/search/_sellers_form.html.erb
@@ -0,0 +1,24 @@
+<%= title %>
+
+<% form_tag({:controller => 'search', :action => 'assets'}, {:method => 'get'}) do %>
+
+ <%= _('Search in:') %>
+
+ <%= labelled_radio_button __('Enterprises'), 'asset', 'enterprises', true %>
+ <%= labelled_radio_button _('Products'), 'asset', 'products', false %>
+
+
+
+
+ <%= select_city(true) %>
+
+
+
+ <%= labelled_select(_('Distance:'), 'radius', :first, :last, nil, [15, 30, 50, 100, 150, 200, 300, 400, 500, 1000].map{|n|[n, n.to_s + 'km']}) %>
+
+
+
+ <%= submit_tag _('Search'), :class => 'button with-text icon-search' %>
+
+
+<% end %>
diff --git a/app/views/search/_sellers_form.rhtml b/app/views/search/_sellers_form.rhtml
deleted file mode 100644
index c21b293..0000000
--- a/app/views/search/_sellers_form.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-<%= title %>
-
-<% form_tag({:controller => 'search', :action => 'assets'}, {:method => 'get'}) do %>
-
- <%= _('Search in:') %>
-
- <%= labelled_radio_button __('Enterprises'), 'asset', 'enterprises', true %>
- <%= labelled_radio_button _('Products'), 'asset', 'products', false %>
-
-
-
-
- <%= select_city(true) %>
-
-
-
- <%= labelled_select(_('Distance:'), 'radius', :first, :last, nil, [15, 30, 50, 100, 150, 200, 300, 400, 500, 1000].map{|n|[n, n.to_s + 'km']}) %>
-
-
-
- <%= submit_tag _('Search'), :class => 'button with-text icon-search' %>
-
-
-<% end %>
diff --git a/app/views/search/_text_article.html.erb b/app/views/search/_text_article.html.erb
new file mode 100644
index 0000000..0f1b746
--- /dev/null
+++ b/app/views/search/_text_article.html.erb
@@ -0,0 +1,13 @@
+
+ <%= link_to(text_article.title, text_article.url, :class => "search-result-title") %>
+
+
+ <%= render :partial => 'image', :object => text_article %>
+
+
+ <%= render :partial => 'article_common', :object => text_article %>
+
+ <%= render :partial => 'article_last_change', :object => text_article %>
+
+
+
diff --git a/app/views/search/_text_article.rhtml b/app/views/search/_text_article.rhtml
deleted file mode 100644
index 0f1b746..0000000
--- a/app/views/search/_text_article.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-
- <%= link_to(text_article.title, text_article.url, :class => "search-result-title") %>
-
-
- <%= render :partial => 'image', :object => text_article %>
-
-
- <%= render :partial => 'article_common', :object => text_article %>
-
- <%= render :partial => 'article_last_change', :object => text_article %>
-
-
-
diff --git a/app/views/search/_uploaded_file.html.erb b/app/views/search/_uploaded_file.html.erb
new file mode 100644
index 0000000..b8aa1d4
--- /dev/null
+++ b/app/views/search/_uploaded_file.html.erb
@@ -0,0 +1,25 @@
+
+ <%= link_to uploaded_file.filename, uploaded_file.view_url, :class => 'search-result-title' %>
+
+
+ <%= render :partial => 'image', :object => uploaded_file %>
+
+
+
+ <%= render :partial => 'article_author', :object => uploaded_file %>
+ <%= render :partial => 'article_description', :object => uploaded_file %>
+
+ <% if uploaded_file.parent and uploaded_file.parent.published? %>
+
+ <%= uploaded_file.parent.gallery? ? _("Gallery") : _("Folder") %>
+ <%= link_to uploaded_file.parent.name, uploaded_file.parent.url %>
+
+ <% end %>
+
+ <%= render :partial => 'article_tags', :object => uploaded_file.tags %>
+ <%= render :partial => 'article_categories', :object => uploaded_file.categories %>
+
+ <%= render :partial => 'article_last_change', :object => uploaded_file %>
+
+
+
diff --git a/app/views/search/_uploaded_file.rhtml b/app/views/search/_uploaded_file.rhtml
deleted file mode 100644
index b8aa1d4..0000000
--- a/app/views/search/_uploaded_file.rhtml
+++ /dev/null
@@ -1,25 +0,0 @@
-
- <%= link_to uploaded_file.filename, uploaded_file.view_url, :class => 'search-result-title' %>
-
-
- <%= render :partial => 'image', :object => uploaded_file %>
-
-
-
- <%= render :partial => 'article_author', :object => uploaded_file %>
- <%= render :partial => 'article_description', :object => uploaded_file %>
-
- <% if uploaded_file.parent and uploaded_file.parent.published? %>
-
- <%= uploaded_file.parent.gallery? ? _("Gallery") : _("Folder") %>
- <%= link_to uploaded_file.parent.name, uploaded_file.parent.url %>
-
- <% end %>
-
- <%= render :partial => 'article_tags', :object => uploaded_file.tags %>
- <%= render :partial => 'article_categories', :object => uploaded_file.categories %>
-
- <%= render :partial => 'article_last_change', :object => uploaded_file %>
-
-
-
diff --git a/app/views/search/articles.html.erb b/app/views/search/articles.html.erb
new file mode 100644
index 0000000..ee20056
--- /dev/null
+++ b/app/views/search/articles.html.erb
@@ -0,0 +1,17 @@
+<%= search_page_title( @titles[:articles], @category ) %>
+
+
+ <% if !@empty_query %>
+ <%= facets_menu(:articles, @facets) %>
+ <% end %>
+
+
+
+ <%= render :partial => 'search_form', :locals => { :hint => _('Type the title, author or content desired') } %>
+ <%= render :partial => 'results_header' %>
+
+ <%= display_results %>
+ <%= pagination_links @results[:articles] %>
+
+
+
diff --git a/app/views/search/articles.rhtml b/app/views/search/articles.rhtml
deleted file mode 100644
index ee20056..0000000
--- a/app/views/search/articles.rhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-<%= search_page_title( @titles[:articles], @category ) %>
-
-
- <% if !@empty_query %>
- <%= facets_menu(:articles, @facets) %>
- <% end %>
-
-
-
- <%= render :partial => 'search_form', :locals => { :hint => _('Type the title, author or content desired') } %>
- <%= render :partial => 'results_header' %>
-
- <%= display_results %>
- <%= pagination_links @results[:articles] %>
-
-
-
diff --git a/app/views/search/category_index.html.erb b/app/views/search/category_index.html.erb
new file mode 120000
index 0000000..3dd5e55
--- /dev/null
+++ b/app/views/search/category_index.html.erb
@@ -0,0 +1 @@
+index.rhtml
\ No newline at end of file
diff --git a/app/views/search/category_index.rhtml b/app/views/search/category_index.rhtml
deleted file mode 120000
index 3dd5e55..0000000
--- a/app/views/search/category_index.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-index.rhtml
\ No newline at end of file
diff --git a/app/views/search/communities.html.erb b/app/views/search/communities.html.erb
new file mode 100644
index 0000000..4566cf5
--- /dev/null
+++ b/app/views/search/communities.html.erb
@@ -0,0 +1,25 @@
+<%= search_page_title( @titles[:communities], @category ) %>
+
+
+ <% if logged_in? %>
+ <% button_bar do %>
+ <%# FIXME shouldn't the user create the community in the current environment instead of going to its home environment? %>
+ <%= button(:add, __('New community'), user.url.merge(:controller => 'memberships', :action => 'new_community', :profile => user.identifier)) %>
+ <% end %>
+ <% end %>
+
+ <% if !@empty_query %>
+ <%= facets_menu(:communities, @facets) %>
+ <% end %>
+
+
+
+ <%= render :partial => 'search_form', :locals => { :hint => _("Type words about the community you're looking for") } %>
+ <%= render :partial => 'results_header' %>
+
+ <%= display_results %>
+ <%= pagination_links @results.values.first %>
+
+
+
+
diff --git a/app/views/search/communities.rhtml b/app/views/search/communities.rhtml
deleted file mode 100644
index 4566cf5..0000000
--- a/app/views/search/communities.rhtml
+++ /dev/null
@@ -1,25 +0,0 @@
-<%= search_page_title( @titles[:communities], @category ) %>
-
-
- <% if logged_in? %>
- <% button_bar do %>
- <%# FIXME shouldn't the user create the community in the current environment instead of going to its home environment? %>
- <%= button(:add, __('New community'), user.url.merge(:controller => 'memberships', :action => 'new_community', :profile => user.identifier)) %>
- <% end %>
- <% end %>
-
- <% if !@empty_query %>
- <%= facets_menu(:communities, @facets) %>
- <% end %>
-
-
-
- <%= render :partial => 'search_form', :locals => { :hint => _("Type words about the community you're looking for") } %>
- <%= render :partial => 'results_header' %>
-
- <%= display_results %>
- <%= pagination_links @results.values.first %>
-
-
-
-
diff --git a/app/views/search/contents.html.erb b/app/views/search/contents.html.erb
new file mode 120000
index 0000000..3015e62
--- /dev/null
+++ b/app/views/search/contents.html.erb
@@ -0,0 +1 @@
+articles.rhtml
\ No newline at end of file
diff --git a/app/views/search/contents.rhtml b/app/views/search/contents.rhtml
deleted file mode 120000
index 3015e62..0000000
--- a/app/views/search/contents.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-articles.rhtml
\ No newline at end of file
diff --git a/app/views/search/enterprises.html.erb b/app/views/search/enterprises.html.erb
new file mode 100644
index 0000000..e8bfedf
--- /dev/null
+++ b/app/views/search/enterprises.html.erb
@@ -0,0 +1,28 @@
+<%= search_page_title( @titles[:enterprises], @category ) %>
+
+
+ <% if logged_in? && environment.enabled?('enterprise_registration') %>
+ <% button_bar do %>
+ <%= button(:add, __('New enterprise'), {:controller => 'enterprise_registration'}) %>
+ <% end %>
+ <% end %>
+
+ <% if !@empty_query %>
+ <% button_bar do %>
+ <%= display_map_list_button %>
+ <% end %>
+ <%= facets_menu(:enterprises, @facets) %>
+ <% end %>
+
+
+
+ <%= render :partial => 'search_form', :locals => { :hint => _("Type words about the enterprise you're looking for") } %>
+ <%= render :partial => 'results_header' %>
+
+ <%= display_results(true) %>
+ <% if params[:display] != 'map' %>
+ <%= pagination_links @results[:enterprises] %>
+ <% end %>
+
+
+
diff --git a/app/views/search/enterprises.rhtml b/app/views/search/enterprises.rhtml
deleted file mode 100644
index e8bfedf..0000000
--- a/app/views/search/enterprises.rhtml
+++ /dev/null
@@ -1,28 +0,0 @@
-<%= search_page_title( @titles[:enterprises], @category ) %>
-
-
- <% if logged_in? && environment.enabled?('enterprise_registration') %>
- <% button_bar do %>
- <%= button(:add, __('New enterprise'), {:controller => 'enterprise_registration'}) %>
- <% end %>
- <% end %>
-
- <% if !@empty_query %>
- <% button_bar do %>
- <%= display_map_list_button %>
- <% end %>
- <%= facets_menu(:enterprises, @facets) %>
- <% end %>
-
-
-
- <%= render :partial => 'search_form', :locals => { :hint => _("Type words about the enterprise you're looking for") } %>
- <%= render :partial => 'results_header' %>
-
- <%= display_results(true) %>
- <% if params[:display] != 'map' %>
- <%= pagination_links @results[:enterprises] %>
- <% end %>
-
-
-
diff --git a/app/views/search/events.html.erb b/app/views/search/events.html.erb
new file mode 100644
index 0000000..133ae77
--- /dev/null
+++ b/app/views/search/events.html.erb
@@ -0,0 +1,3 @@
+<%= search_page_title( Environment.default.name + "'s " + @titles[:events], @category ) %>
+
+<%= render :partial => 'events/agenda' %>
diff --git a/app/views/search/events.rhtml b/app/views/search/events.rhtml
deleted file mode 100644
index 133ae77..0000000
--- a/app/views/search/events.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= search_page_title( Environment.default.name + "'s " + @titles[:events], @category ) %>
-
-<%= render :partial => 'events/agenda' %>
diff --git a/app/views/search/facets_browse.html.erb b/app/views/search/facets_browse.html.erb
new file mode 100644
index 0000000..7178788
--- /dev/null
+++ b/app/views/search/facets_browse.html.erb
@@ -0,0 +1,8 @@
+<% results = @asset_class.map_facet_results(@facet, params[:facet], @facets, @all_facets) %>
+
+<% array = [] %>
+<% @asset_class.facet_result_sort(@facet, results, :alphabetically).each do |id, label, count| %>
+ <% array << {:id => id, :name => facet_link_html(@facet, params.merge(:controller => 'search', :action => @asset), id, label, count)} %>
+<% end %>
+
+<%= facet_javascript('facet-input-'+@facet[:id].to_s, @facet, array) %>
diff --git a/app/views/search/facets_browse.rhtml b/app/views/search/facets_browse.rhtml
deleted file mode 100644
index 7178788..0000000
--- a/app/views/search/facets_browse.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-<% results = @asset_class.map_facet_results(@facet, params[:facet], @facets, @all_facets) %>
-
-<% array = [] %>
-<% @asset_class.facet_result_sort(@facet, results, :alphabetically).each do |id, label, count| %>
- <% array << {:id => id, :name => facet_link_html(@facet, params.merge(:controller => 'search', :action => @asset), id, label, count)} %>
-<% end %>
-
-<%= facet_javascript('facet-input-'+@facet[:id].to_s, @facet, array) %>
diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb
new file mode 100644
index 0000000..7b2ee19
--- /dev/null
+++ b/app/views/search/index.html.erb
@@ -0,0 +1,29 @@
+">
+
+ <% if @category %>
+
<%= image_tag(@category.image.public_filename(:thumb), :id => 'category-image') if @category.image %>
+ <% end %>
+
+ <%= search_page_title(_('Search Results'), @category) %>
+ <%= render :partial => 'search_form', :locals => { :hint => '' } %>
+ <%= category_context(@category, params) %>
+ <%= display_results %>
+
+
+ <% if @category %>
+
<%= _('Sub-categories') %>
+ <% if @category.children.empty? %>
+
<%= _('No sub-categories') %>
+ <% else %>
+
+ <% @category.children.each do |c| %>
+ <%= link_to_category c, false %>
+ <% end %>
+
+ <% end %>
+ <% end %>
+
+
+
+
+
diff --git a/app/views/search/index.rhtml b/app/views/search/index.rhtml
deleted file mode 100644
index 7b2ee19..0000000
--- a/app/views/search/index.rhtml
+++ /dev/null
@@ -1,29 +0,0 @@
-">
-
- <% if @category %>
-
<%= image_tag(@category.image.public_filename(:thumb), :id => 'category-image') if @category.image %>
- <% end %>
-
- <%= search_page_title(_('Search Results'), @category) %>
- <%= render :partial => 'search_form', :locals => { :hint => '' } %>
- <%= category_context(@category, params) %>
- <%= display_results %>
-
-
- <% if @category %>
-
<%= _('Sub-categories') %>
- <% if @category.children.empty? %>
-
<%= _('No sub-categories') %>
- <% else %>
-
- <% @category.children.each do |c| %>
- <%= link_to_category c, false %>
- <% end %>
-
- <% end %>
- <% end %>
-
-
-
-
-
diff --git a/app/views/search/people.html.erb b/app/views/search/people.html.erb
new file mode 100644
index 0000000..adb29fd
--- /dev/null
+++ b/app/views/search/people.html.erb
@@ -0,0 +1,19 @@
+<%= search_page_title( @titles[:people], @category ) %>
+
+
+ <% if !@empty_query %>
+ <%= facets_menu(:people, @facets) %>
+ <% end %>
+
+
+
+ <%= render :partial => 'search_form', :locals => { :hint => _("Type words about the person you're looking for") } %>
+ <%= render :partial => 'results_header' %>
+
+ <%= display_results %>
+ <% if params[:display] != 'map' %>
+ <%= pagination_links @results.values.first %>
+ <% end %>
+
+
+
diff --git a/app/views/search/people.rhtml b/app/views/search/people.rhtml
deleted file mode 100644
index adb29fd..0000000
--- a/app/views/search/people.rhtml
+++ /dev/null
@@ -1,19 +0,0 @@
-<%= search_page_title( @titles[:people], @category ) %>
-
-
- <% if !@empty_query %>
- <%= facets_menu(:people, @facets) %>
- <% end %>
-
-
-
- <%= render :partial => 'search_form', :locals => { :hint => _("Type words about the person you're looking for") } %>
- <%= render :partial => 'results_header' %>
-
- <%= display_results %>
- <% if params[:display] != 'map' %>
- <%= pagination_links @results.values.first %>
- <% end %>
-
-
-
diff --git a/app/views/search/products.html.erb b/app/views/search/products.html.erb
new file mode 100644
index 0000000..74e8f02
--- /dev/null
+++ b/app/views/search/products.html.erb
@@ -0,0 +1,26 @@
+<%= search_page_title( @titles[:products], @category ) %>
+
+
+ <% if !@empty_query %>
+ <% button_bar do %>
+ <%= display_map_list_button %>
+<% end %>
+ <%= facets_menu(:products, @facets) %>
+<% end %>
+
+
+
+ <%= render :partial => 'search_form', :locals => { :hint => _('Type the product, service, city or qualifier desired') } %>
+ <%= render :partial => 'results_header' %>
+
+ <%= display_results(true) %>
+ <% if !@one_page and params[:display] != 'map' %>
+ <%= pagination_links @results[:products] %>
+<% end %>
+
+
+<% javascript_tag do %>
+ jQuery('.search-product-price-details').altBeautify();
+<% end %>
+
+
diff --git a/app/views/search/products.rhtml b/app/views/search/products.rhtml
deleted file mode 100644
index 74e8f02..0000000
--- a/app/views/search/products.rhtml
+++ /dev/null
@@ -1,26 +0,0 @@
-<%= search_page_title( @titles[:products], @category ) %>
-
-
- <% if !@empty_query %>
- <% button_bar do %>
- <%= display_map_list_button %>
-<% end %>
- <%= facets_menu(:products, @facets) %>
-<% end %>
-
-
-
- <%= render :partial => 'search_form', :locals => { :hint => _('Type the product, service, city or qualifier desired') } %>
- <%= render :partial => 'results_header' %>
-
- <%= display_results(true) %>
- <% if !@one_page and params[:display] != 'map' %>
- <%= pagination_links @results[:products] %>
-<% end %>
-
-
-<% javascript_tag do %>
- jQuery('.search-product-price-details').altBeautify();
-<% end %>
-
-
diff --git a/app/views/search/tag.html.erb b/app/views/search/tag.html.erb
new file mode 100644
index 0000000..2540146
--- /dev/null
+++ b/app/views/search/tag.html.erb
@@ -0,0 +1,13 @@
+
+ <%= _('Tagged with "%s"') % content_tag('code', @tag) %>
+
+
+<% button_bar do %>
+ <%= button('back', _('Back to tag cloud'), :action => 'tags') %>
+<% end %>
+
+<% cache_timeout(@tag_cache_key, 4.hour) do %>
+ <%= display_results %>
+
+
+<% end %>
diff --git a/app/views/search/tag.rhtml b/app/views/search/tag.rhtml
deleted file mode 100644
index 2540146..0000000
--- a/app/views/search/tag.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-
- <%= _('Tagged with "%s"') % content_tag('code', @tag) %>
-
-
-<% button_bar do %>
- <%= button('back', _('Back to tag cloud'), :action => 'tags') %>
-<% end %>
-
-<% cache_timeout(@tag_cache_key, 4.hour) do %>
- <%= display_results %>
-
-
-<% end %>
diff --git a/app/views/search/tags.html.erb b/app/views/search/tags.html.erb
new file mode 100644
index 0000000..03b2995
--- /dev/null
+++ b/app/views/search/tags.html.erb
@@ -0,0 +1,7 @@
+<%= _('Tag cloud') %>
+
+
+<% cache_timeout(@tags_cache_key, 4.hour) do %>
+ <%= tag_cloud @tags, :tag, {:action => 'tag'}, {:show_count => true} %>
+<% end %>
+
diff --git a/app/views/search/tags.rhtml b/app/views/search/tags.rhtml
deleted file mode 100644
index 03b2995..0000000
--- a/app/views/search/tags.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= _('Tag cloud') %>
-
-
-<% cache_timeout(@tags_cache_key, 4.hour) do %>
- <%= tag_cloud @tags, :tag, {:action => 'tag'}, {:show_count => true} %>
-<% end %>
-
diff --git a/app/views/shared/_change_image.html.erb b/app/views/shared/_change_image.html.erb
new file mode 100644
index 0000000..3298b12
--- /dev/null
+++ b/app/views/shared/_change_image.html.erb
@@ -0,0 +1,5 @@
+ <%= i.file_field( :uploaded_data, { :onchange => 'updateImg(this.value)' } ) %>
+ <%= link_to_function(_('Cancel'), nil, :id => 'cancel-change-image-link', :class => 'button icon-cancel with-text', :style => 'display: none') do |page|
+ page['change-image-link'].show
+ page['change-image'].replace_html ''
+ end %>
diff --git a/app/views/shared/_change_image.rhtml b/app/views/shared/_change_image.rhtml
deleted file mode 100644
index 3298b12..0000000
--- a/app/views/shared/_change_image.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
- <%= i.file_field( :uploaded_data, { :onchange => 'updateImg(this.value)' } ) %>
- <%= link_to_function(_('Cancel'), nil, :id => 'cancel-change-image-link', :class => 'button icon-cancel with-text', :style => 'display: none') do |page|
- page['change-image-link'].show
- page['change-image'].replace_html ''
- end %>
diff --git a/app/views/shared/_dialog_error_messages.html.erb b/app/views/shared/_dialog_error_messages.html.erb
new file mode 100644
index 0000000..8774086
--- /dev/null
+++ b/app/views/shared/_dialog_error_messages.html.erb
@@ -0,0 +1,12 @@
+<% javascript_tag do %>
+ close_loading()
+ jQuery('#errorExplanation h2').hide()
+ jQuery('#errorExplanation p').hide()
+ jQuery('#errorExplanation').dialog({
+ modal: true,
+ width: 600,
+ resizable: false,
+ title: "<%= ui_icon('ui-icon-alert') %>Ops…",
+ });
+<% end %>
+<%= error_messages_for object_name %>
diff --git a/app/views/shared/_dialog_error_messages.rhtml b/app/views/shared/_dialog_error_messages.rhtml
deleted file mode 100644
index 8774086..0000000
--- a/app/views/shared/_dialog_error_messages.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<% javascript_tag do %>
- close_loading()
- jQuery('#errorExplanation h2').hide()
- jQuery('#errorExplanation p').hide()
- jQuery('#errorExplanation').dialog({
- modal: true,
- width: 600,
- resizable: false,
- title: "<%= ui_icon('ui-icon-alert') %>Ops…",
- });
-<% end %>
-<%= error_messages_for object_name %>
diff --git a/app/views/shared/_disabled_enterprise.html.erb b/app/views/shared/_disabled_enterprise.html.erb
new file mode 100644
index 0000000..aa6f177
--- /dev/null
+++ b/app/views/shared/_disabled_enterprise.html.erb
@@ -0,0 +1,10 @@
+<% if profile.enterprise? && !profile.enabled? && !profile.blocks.select {|b| b.class == DisabledEnterpriseMessageBlock}.any? %>
+
+ <%= environment.message_for_disabled_enterprise %>
+ <% if profile.blocked? && user && user.is_admin?(profile.environment) %>
+
+ <%= button :lock, _('Unblock'), {:controller => 'profile', :action => 'unblock'} %>
+
+ <% end %>
+
+<% end %>
diff --git a/app/views/shared/_disabled_enterprise.rhtml b/app/views/shared/_disabled_enterprise.rhtml
deleted file mode 100644
index aa6f177..0000000
--- a/app/views/shared/_disabled_enterprise.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<% if profile.enterprise? && !profile.enabled? && !profile.blocks.select {|b| b.class == DisabledEnterpriseMessageBlock}.any? %>
-
- <%= environment.message_for_disabled_enterprise %>
- <% if profile.blocked? && user && user.is_admin?(profile.environment) %>
-
- <%= button :lock, _('Unblock'), {:controller => 'profile', :action => 'unblock'} %>
-
- <% end %>
-
-<% end %>
diff --git a/app/views/shared/_lead_and_body.html.erb b/app/views/shared/_lead_and_body.html.erb
new file mode 100644
index 0000000..ad5ed41
--- /dev/null
+++ b/app/views/shared/_lead_and_body.html.erb
@@ -0,0 +1,29 @@
+<% object ||= :article %>
+<% abstract_label ||= 'Lead' %>
+<% abstract_method ||= :abstract %>
+<% body_label ||= 'Text' %>
+<% body_method ||= :body %>
+<% editor_type = defined?(tiny_mce) && tiny_mce ? 'mceEditor' : '' %>
+<% lead_id ||= 0%>
+<% f ||= false%>
+
+
+<%= button :add, _("Lead"), '#', :class => "lead-button", :article_id => "#article-lead-"+lead_id.to_s, :style => "margin-left: 0px;" %>
+<%= _('Used when a short version of your text is needed.') %>
+
+
+ <% if f %>
+ <%= labelled_form_field(_(abstract_label), f.text_area(abstract_method, :style => 'width: 98%; height: 200px;', :class => editor_type)) %>
+ <% else %>
+ <%= labelled_form_field(_(abstract_label), text_area(object, abstract_method, :style => 'width: 98%; height: 200px;', :class => editor_type)) %>
+ <% end %>
+
+
+ <% if f %>
+ <%= labelled_form_field(_(body_label), f.text_area(body_method, :style => 'width: 98%; height: 400px;', :class => editor_type)) %>
+ <% else %>
+ <%= labelled_form_field(_(body_label), text_area(object, body_method, :style => 'width: 98%; height: 400px;', :class => editor_type)) %>
+ <% end %>
+
+
+<%= javascript_include_tag 'article'%>
diff --git a/app/views/shared/_lead_and_body.rhtml b/app/views/shared/_lead_and_body.rhtml
deleted file mode 100644
index ad5ed41..0000000
--- a/app/views/shared/_lead_and_body.rhtml
+++ /dev/null
@@ -1,29 +0,0 @@
-<% object ||= :article %>
-<% abstract_label ||= 'Lead' %>
-<% abstract_method ||= :abstract %>
-<% body_label ||= 'Text' %>
-<% body_method ||= :body %>
-<% editor_type = defined?(tiny_mce) && tiny_mce ? 'mceEditor' : '' %>
-<% lead_id ||= 0%>
-<% f ||= false%>
-
-
-<%= button :add, _("Lead"), '#', :class => "lead-button", :article_id => "#article-lead-"+lead_id.to_s, :style => "margin-left: 0px;" %>
-<%= _('Used when a short version of your text is needed.') %>
-
-
- <% if f %>
- <%= labelled_form_field(_(abstract_label), f.text_area(abstract_method, :style => 'width: 98%; height: 200px;', :class => editor_type)) %>
- <% else %>
- <%= labelled_form_field(_(abstract_label), text_area(object, abstract_method, :style => 'width: 98%; height: 200px;', :class => editor_type)) %>
- <% end %>
-
-
- <% if f %>
- <%= labelled_form_field(_(body_label), f.text_area(body_method, :style => 'width: 98%; height: 400px;', :class => editor_type)) %>
- <% else %>
- <%= labelled_form_field(_(body_label), text_area(object, body_method, :style => 'width: 98%; height: 400px;', :class => editor_type)) %>
- <% end %>
-
-
-<%= javascript_include_tag 'article'%>
diff --git a/app/views/shared/_manage_enterprises.html.erb b/app/views/shared/_manage_enterprises.html.erb
new file mode 100644
index 0000000..5e4a895
--- /dev/null
+++ b/app/views/shared/_manage_enterprises.html.erb
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/app/views/shared/_manage_enterprises.rhtml b/app/views/shared/_manage_enterprises.rhtml
deleted file mode 100644
index 5e4a895..0000000
--- a/app/views/shared/_manage_enterprises.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
diff --git a/app/views/shared/_numbers_only_javascript.html.erb b/app/views/shared/_numbers_only_javascript.html.erb
new file mode 100644
index 0000000..6d77641
--- /dev/null
+++ b/app/views/shared/_numbers_only_javascript.html.erb
@@ -0,0 +1,6 @@
+<% javascript_tag do %>
+ jQuery(".numbers-only").keypress(function(event) {
+ var separator = "<%= environment.currency_separator %>"
+ return numbersonly(event, separator)
+ });
+<% end %>
diff --git a/app/views/shared/_numbers_only_javascript.rhtml b/app/views/shared/_numbers_only_javascript.rhtml
deleted file mode 100644
index 6d77641..0000000
--- a/app/views/shared/_numbers_only_javascript.rhtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<% javascript_tag do %>
- jQuery(".numbers-only").keypress(function(event) {
- var separator = "<%= environment.currency_separator %>"
- return numbersonly(event, separator)
- });
-<% end %>
diff --git a/app/views/shared/_organization_custom_fields.html.erb b/app/views/shared/_organization_custom_fields.html.erb
new file mode 100644
index 0000000..893a666
--- /dev/null
+++ b/app/views/shared/_organization_custom_fields.html.erb
@@ -0,0 +1,29 @@
+<%= optional_field(profile, 'display_name', f.text_field(:display_name)) %>
+<% if profile.enterprise? %>
+ <%= optional_field(profile, 'business_name', f.text_field(:business_name)) %>
+<% end %>
+<%= optional_field(profile, 'description', f.text_area(:description, :rows => 5)) %>
+<%= optional_field(profile, 'contact_person', f.text_field(:contact_person)) %>
+<%= optional_field(profile, 'contact_email', f.text_field(:contact_email)) %>
+<%= optional_field(profile, 'contact_phone', f.text_field(:contact_phone)) %>
+<%= optional_field(profile, 'legal_form', f.text_field(:legal_form)) %>
+<%= optional_field(profile, 'economic_activity', f.text_field(:economic_activity)) %>
+<%= optional_field(profile, 'management_information', f.text_area(:management_information, :rows => 5)) %>
+<%= optional_field(profile, 'address', labelled_form_field(_('Address (street and number)'), text_field(object_name, :address))) %>
+<%= optional_field(profile, 'zip_code', labelled_form_field(_('ZIP code'), text_field(object_name, :zip_code))) %>
+<%= optional_field(profile, 'city', f.text_field(:city)) %>
+<%= optional_field(profile, 'state', f.text_field(:state)) %>
+<%= optional_field(profile, 'country', select_country(_('Country'), object_name, 'country', {:class => 'type-select'})) %>
+<%= optional_field(profile, 'tag_list', f.text_field(:tag_list)) %>
+
+<% if profile.community? %>
+ <%= optional_field(profile, 'language', f.text_field(:language)) %>
+<% end %>
+
+<% if profile.enterprise? %>
+ <%= optional_field(profile, 'organization_website', f.text_field(:organization_website)) %>
+ <%= optional_field(profile, 'historic_and_current_context', f.text_area(:historic_and_current_context, :rows => 5)) %>
+ <%= optional_field(profile, 'activities_short_description', f.text_area(:activities_short_description, :rows => 5)) %>
+ <%= optional_field(profile, 'acronym', f.text_field(:acronym)) %>
+ <%= optional_field(profile, 'foundation_year', f.text_field(:foundation_year)) %>
+<% end %>
diff --git a/app/views/shared/_organization_custom_fields.rhtml b/app/views/shared/_organization_custom_fields.rhtml
deleted file mode 100644
index 893a666..0000000
--- a/app/views/shared/_organization_custom_fields.rhtml
+++ /dev/null
@@ -1,29 +0,0 @@
-<%= optional_field(profile, 'display_name', f.text_field(:display_name)) %>
-<% if profile.enterprise? %>
- <%= optional_field(profile, 'business_name', f.text_field(:business_name)) %>
-<% end %>
-<%= optional_field(profile, 'description', f.text_area(:description, :rows => 5)) %>
-<%= optional_field(profile, 'contact_person', f.text_field(:contact_person)) %>
-<%= optional_field(profile, 'contact_email', f.text_field(:contact_email)) %>
-<%= optional_field(profile, 'contact_phone', f.text_field(:contact_phone)) %>
-<%= optional_field(profile, 'legal_form', f.text_field(:legal_form)) %>
-<%= optional_field(profile, 'economic_activity', f.text_field(:economic_activity)) %>
-<%= optional_field(profile, 'management_information', f.text_area(:management_information, :rows => 5)) %>
-<%= optional_field(profile, 'address', labelled_form_field(_('Address (street and number)'), text_field(object_name, :address))) %>
-<%= optional_field(profile, 'zip_code', labelled_form_field(_('ZIP code'), text_field(object_name, :zip_code))) %>
-<%= optional_field(profile, 'city', f.text_field(:city)) %>
-<%= optional_field(profile, 'state', f.text_field(:state)) %>
-<%= optional_field(profile, 'country', select_country(_('Country'), object_name, 'country', {:class => 'type-select'})) %>
-<%= optional_field(profile, 'tag_list', f.text_field(:tag_list)) %>
-
-<% if profile.community? %>
- <%= optional_field(profile, 'language', f.text_field(:language)) %>
-<% end %>
-
-<% if profile.enterprise? %>
- <%= optional_field(profile, 'organization_website', f.text_field(:organization_website)) %>
- <%= optional_field(profile, 'historic_and_current_context', f.text_area(:historic_and_current_context, :rows => 5)) %>
- <%= optional_field(profile, 'activities_short_description', f.text_area(:activities_short_description, :rows => 5)) %>
- <%= optional_field(profile, 'acronym', f.text_field(:acronym)) %>
- <%= optional_field(profile, 'foundation_year', f.text_field(:foundation_year)) %>
-<% end %>
diff --git a/app/views/shared/_profile_search_form.html.erb b/app/views/shared/_profile_search_form.html.erb
new file mode 100644
index 0000000..9823e4e
--- /dev/null
+++ b/app/views/shared/_profile_search_form.html.erb
@@ -0,0 +1,12 @@
+<% form_tag( { :controller => 'profile_search', :profile => profile.identifier}, :method => 'get', :class => 'search_form' ) do %>
+
+
+ <%= text_field_tag 'q', @q, :title => _("Find in %s's content") % profile.short_name %>
+
+ <%= submit_button(:search, _('Search')) %>
+
+ <%= labelled_radio_button profile.short_name, 'where', 'profile', true, :title => _("Find in %s's content") % profile.short_name %>
+ <%= labelled_radio_button _('General'), 'where', 'environment', false, :title => _("Search all content") %>
+
+
+<% end %>
diff --git a/app/views/shared/_profile_search_form.rhtml b/app/views/shared/_profile_search_form.rhtml
deleted file mode 100644
index 9823e4e..0000000
--- a/app/views/shared/_profile_search_form.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<% form_tag( { :controller => 'profile_search', :profile => profile.identifier}, :method => 'get', :class => 'search_form' ) do %>
-
-
- <%= text_field_tag 'q', @q, :title => _("Find in %s's content") % profile.short_name %>
-
- <%= submit_button(:search, _('Search')) %>
-
- <%= labelled_radio_button profile.short_name, 'where', 'profile', true, :title => _("Find in %s's content") % profile.short_name %>
- <%= labelled_radio_button _('General'), 'where', 'environment', false, :title => _("Search all content") %>
-
-
-<% end %>
diff --git a/app/views/shared/_redirect_via_javascript.html.erb b/app/views/shared/_redirect_via_javascript.html.erb
new file mode 100644
index 0000000..6ded388
--- /dev/null
+++ b/app/views/shared/_redirect_via_javascript.html.erb
@@ -0,0 +1,4 @@
+<% javascript_tag do %>
+ update_loading('<%= _('redirecting...') %>')
+ redirect_to('<%= url %>')
+<% end %>
diff --git a/app/views/shared/_redirect_via_javascript.rhtml b/app/views/shared/_redirect_via_javascript.rhtml
deleted file mode 100644
index 6ded388..0000000
--- a/app/views/shared/_redirect_via_javascript.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<% javascript_tag do %>
- update_loading('<%= _('redirecting...') %>')
- redirect_to('<%= url %>')
-<% end %>
diff --git a/app/views/shared/_select_categories.html.erb b/app/views/shared/_select_categories.html.erb
new file mode 100644
index 0000000..6da992e
--- /dev/null
+++ b/app/views/shared/_select_categories.html.erb
@@ -0,0 +1,46 @@
+
+<% if !@current_category.nil? %>
+
<%= _('Current category:') %>
+ <%= hidden_field_tag "#{object_name}[#{object_name}_category_id]", @current_category.id unless multiple %>
+ <%
+ categories = [@current_category]
+ categories.push(@current_category) while @current_category = @current_category.parent
+ %>
+ <%= categories.compact.reverse.map{|i|
+ link_to_remote(i.name,
+ :update => "select-categories",
+ :url => { :action => 'update_categories', :category_id => i.id, :id => @object },
+ :loaded => visual_effect(:highlight, "select-categories"),
+ :class => 'select-current-category-link')}.join(' → ')
+ %>
+
+ <%= button_to_function_without_text(:save, _('Save'), nil, :id => 'save-category-button') do |page|
+ page.insert_html :bottom, 'selected-categories', content_tag('li', categories.first.full_name +
+ hidden_field_tag("#{object_name}[category_ids][]", categories.first.id) +
+ button_to_function_without_text(:cancel, _('Remove'), nil, :id => "remove-selected-category-#{categories.first.id}-button") {|page| page["selected-category-#{categories.first.id}"].remove}, :id => "selected-category-#{categories.first.id}")
+ end if multiple %>
+ <%= button_to_remote_without_text(:cancel, _('Cancel'),
+ { :update => "select-categories",
+ :url => { :action => 'update_categories', :id => @object },
+ :loaded => visual_effect(:highlight, "select-categories")
+ },
+ :id => 'cancel-category-button') %>
+
+<% else %>
+ <%= _('Select a category:') %>
+<% end %>
+
+<% if !@categories.empty? %>
+ <%= _('Categories:') %>
+ <% @categories.select{|i| !@object.respond_to?(:accept_category?) || @object.accept_category?(i)}.each do |category| %>
+ <%= link_to_remote category.name,
+ { :update => "select-categories",
+ :url => { :action => "update_categories", :category_id => category.id, :id => @object},
+ :loaded => visual_effect(:highlight, "select-categories")
+ },
+ :class => 'select-subcategory-link',
+ :id => "select-category-#{category.id}-link"
+ %>
+ <% end %>
+<% end %>
+
diff --git a/app/views/shared/_select_categories.rhtml b/app/views/shared/_select_categories.rhtml
deleted file mode 100644
index 6da992e..0000000
--- a/app/views/shared/_select_categories.rhtml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-<% if !@current_category.nil? %>
-
<%= _('Current category:') %>
- <%= hidden_field_tag "#{object_name}[#{object_name}_category_id]", @current_category.id unless multiple %>
- <%
- categories = [@current_category]
- categories.push(@current_category) while @current_category = @current_category.parent
- %>
- <%= categories.compact.reverse.map{|i|
- link_to_remote(i.name,
- :update => "select-categories",
- :url => { :action => 'update_categories', :category_id => i.id, :id => @object },
- :loaded => visual_effect(:highlight, "select-categories"),
- :class => 'select-current-category-link')}.join(' → ')
- %>
-
- <%= button_to_function_without_text(:save, _('Save'), nil, :id => 'save-category-button') do |page|
- page.insert_html :bottom, 'selected-categories', content_tag('li', categories.first.full_name +
- hidden_field_tag("#{object_name}[category_ids][]", categories.first.id) +
- button_to_function_without_text(:cancel, _('Remove'), nil, :id => "remove-selected-category-#{categories.first.id}-button") {|page| page["selected-category-#{categories.first.id}"].remove}, :id => "selected-category-#{categories.first.id}")
- end if multiple %>
- <%= button_to_remote_without_text(:cancel, _('Cancel'),
- { :update => "select-categories",
- :url => { :action => 'update_categories', :id => @object },
- :loaded => visual_effect(:highlight, "select-categories")
- },
- :id => 'cancel-category-button') %>
-
-<% else %>
- <%= _('Select a category:') %>
-<% end %>
-
-<% if !@categories.empty? %>
- <%= _('Categories:') %>
- <% @categories.select{|i| !@object.respond_to?(:accept_category?) || @object.accept_category?(i)}.each do |category| %>
- <%= link_to_remote category.name,
- { :update => "select-categories",
- :url => { :action => "update_categories", :category_id => category.id, :id => @object},
- :loaded => visual_effect(:highlight, "select-categories")
- },
- :class => 'select-subcategory-link',
- :id => "select-category-#{category.id}-link"
- %>
- <% end %>
-<% end %>
-
diff --git a/app/views/shared/_show_thumbnail.html.erb b/app/views/shared/_show_thumbnail.html.erb
new file mode 100644
index 0000000..a4f05e6
--- /dev/null
+++ b/app/views/shared/_show_thumbnail.html.erb
@@ -0,0 +1,11 @@
+ <%= image_tag(image.public_filename(:thumb)) %>
+
+
+
+ <%= link_to_function(_('Change image'), nil, :id => 'change-image-link', :class => 'button icon-photos with-text') do |page|
+ page['change-image'].replace_html :partial => 'shared/change_image', :locals => { :i => i, :image => image }
+ page['change-image-link'].hide
+ page['cancel-change-image-link'].show
+ end %>
+
+
diff --git a/app/views/shared/_show_thumbnail.rhtml b/app/views/shared/_show_thumbnail.rhtml
deleted file mode 100644
index a4f05e6..0000000
--- a/app/views/shared/_show_thumbnail.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
- <%= image_tag(image.public_filename(:thumb)) %>
-
-
-
- <%= link_to_function(_('Change image'), nil, :id => 'change-image-link', :class => 'button icon-photos with-text') do |page|
- page['change-image'].replace_html :partial => 'shared/change_image', :locals => { :i => i, :image => image }
- page['change-image-link'].hide
- page['cancel-change-image-link'].show
- end %>
-
-
diff --git a/app/views/shared/access_denied.html.erb b/app/views/shared/access_denied.html.erb
new file mode 100644
index 0000000..0d3a084
--- /dev/null
+++ b/app/views/shared/access_denied.html.erb
@@ -0,0 +1,18 @@
+
+
+
<%= @title || _('Access denied') %>
+
+ <% unless @message.nil? %>
+
<%= @message %>
+ <% else %>
+
<%= _('You are not allowed to view this page.') %>
+
<%= _("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 :back, _('Go back'), :back %>
+ <%= button :home, _('Go to the site home page'), :controller => 'home' %>
+ <% end %>
+
+
+
diff --git a/app/views/shared/access_denied.rhtml b/app/views/shared/access_denied.rhtml
deleted file mode 100644
index 0d3a084..0000000
--- a/app/views/shared/access_denied.rhtml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
<%= @title || _('Access denied') %>
-
- <% unless @message.nil? %>
-
<%= @message %>
- <% else %>
-
<%= _('You are not allowed to view this page.') %>
-
<%= _("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 :back, _('Go back'), :back %>
- <%= button :home, _('Go to the site home page'), :controller => 'home' %>
- <% end %>
-
-
-
diff --git a/app/views/shared/articles_list.html.erb b/app/views/shared/articles_list.html.erb
new file mode 100644
index 0000000..089a36d
--- /dev/null
+++ b/app/views/shared/articles_list.html.erb
@@ -0,0 +1,14 @@
+
+
+
+ <%= _('Title') %>
+ <%= _('Last update') %>
+
+ <% articles.each do |article| %>
+ <% if article.display_to?(user) %>
+ <%= display_article_in_listing(article, recursive, 0) %>
+ <% end %>
+ <% end %>
+
+
+<%= pagination_links(articles, {:param_name => 'npage', :page_links => true}) %>
diff --git a/app/views/shared/articles_list.rhtml b/app/views/shared/articles_list.rhtml
deleted file mode 100644
index 089a36d..0000000
--- a/app/views/shared/articles_list.rhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- <%= _('Title') %>
- <%= _('Last update') %>
-
- <% articles.each do |article| %>
- <% if article.display_to?(user) %>
- <%= display_article_in_listing(article, recursive, 0) %>
- <% end %>
- <% end %>
-
-
-<%= pagination_links(articles, {:param_name => 'npage', :page_links => true}) %>
diff --git a/app/views/shared/assets_menu.html.erb b/app/views/shared/assets_menu.html.erb
new file mode 100644
index 0000000..52c45ee
--- /dev/null
+++ b/app/views/shared/assets_menu.html.erb
@@ -0,0 +1,9 @@
+
diff --git a/app/views/shared/assets_menu.rhtml b/app/views/shared/assets_menu.rhtml
deleted file mode 100644
index 52c45ee..0000000
--- a/app/views/shared/assets_menu.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/app/views/shared/block.html.erb b/app/views/shared/block.html.erb
new file mode 100644
index 0000000..1964b48
--- /dev/null
+++ b/app/views/shared/block.html.erb
@@ -0,0 +1,7 @@
+<% if block.cacheable? && use_cache %>
+ <% cache_timeout(block.cache_key(language), block.timeout) do %>
+ <%= display_block_content(block, user, main_content) %>
+ <% end %>
+<% else %>
+ <%= display_block_content(block, user, main_content) %>
+<% end %>
diff --git a/app/views/shared/block.rhtml b/app/views/shared/block.rhtml
deleted file mode 100644
index 1964b48..0000000
--- a/app/views/shared/block.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<% if block.cacheable? && use_cache %>
- <% cache_timeout(block.cache_key(language), block.timeout) do %>
- <%= display_block_content(block, user, main_content) %>
- <% end %>
-<% else %>
- <%= display_block_content(block, user, main_content) %>
-<% end %>
diff --git a/app/views/shared/categories_menu.html.erb b/app/views/shared/categories_menu.html.erb
new file mode 100644
index 0000000..763190f
--- /dev/null
+++ b/app/views/shared/categories_menu.html.erb
@@ -0,0 +1,12 @@
+
diff --git a/app/views/shared/categories_menu.rhtml b/app/views/shared/categories_menu.rhtml
deleted file mode 100644
index 763190f..0000000
--- a/app/views/shared/categories_menu.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/app/views/shared/codepress.html.erb b/app/views/shared/codepress.html.erb
new file mode 100644
index 0000000..ac6ee22
--- /dev/null
+++ b/app/views/shared/codepress.html.erb
@@ -0,0 +1 @@
+<%= javascript_include_tag 'codepress/codepress' %>
diff --git a/app/views/shared/codepress.rhtml b/app/views/shared/codepress.rhtml
deleted file mode 100644
index ac6ee22..0000000
--- a/app/views/shared/codepress.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= javascript_include_tag 'codepress/codepress' %>
diff --git a/app/views/shared/logged_in/xmpp_chat.html.erb b/app/views/shared/logged_in/xmpp_chat.html.erb
new file mode 100644
index 0000000..7463bd3
--- /dev/null
+++ b/app/views/shared/logged_in/xmpp_chat.html.erb
@@ -0,0 +1,11 @@
+
+
+
+
+
<%= _('None of your friends is online at the moment') %>
+
+
+
+
+
+
diff --git a/app/views/shared/logged_in/xmpp_chat.rhtml b/app/views/shared/logged_in/xmpp_chat.rhtml
deleted file mode 100644
index 7463bd3..0000000
--- a/app/views/shared/logged_in/xmpp_chat.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
<%= _('None of your friends is online at the moment') %>
-
-
-
-
-
-
diff --git a/app/views/shared/noosfero_layout_features.html.erb b/app/views/shared/noosfero_layout_features.html.erb
new file mode 100644
index 0000000..f12fb02
--- /dev/null
+++ b/app/views/shared/noosfero_layout_features.html.erb
@@ -0,0 +1,3 @@
+ <% if is_testing_theme %>
+ <%= render :file => 'shared/theme_test_panel' %>
+ <% end %>
diff --git a/app/views/shared/noosfero_layout_features.rhtml b/app/views/shared/noosfero_layout_features.rhtml
deleted file mode 100644
index f12fb02..0000000
--- a/app/views/shared/noosfero_layout_features.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
- <% if is_testing_theme %>
- <%= render :file => 'shared/theme_test_panel' %>
- <% end %>
diff --git a/app/views/shared/not_found.html.erb b/app/views/shared/not_found.html.erb
new file mode 100644
index 0000000..6edbe37
--- /dev/null
+++ b/app/views/shared/not_found.html.erb
@@ -0,0 +1,11 @@
+
+
<%= _('There is no such page: %s') % (content_tag('tt', @path)) %>
+
+ <%= _('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 :back, _('Go back'), :back %>
+ <%= button :home, _('Go to the home page'), '/' %>
+ <% end %>
+
diff --git a/app/views/shared/not_found.rhtml b/app/views/shared/not_found.rhtml
deleted file mode 100644
index 6edbe37..0000000
--- a/app/views/shared/not_found.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
<%= _('There is no such page: %s') % (content_tag('tt', @path)) %>
-
- <%= _('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 :back, _('Go back'), :back %>
- <%= button :home, _('Go to the home page'), '/' %>
- <% end %>
-
diff --git a/app/views/shared/product/_qualifiers.html.erb b/app/views/shared/product/_qualifiers.html.erb
new file mode 100644
index 0000000..8ed9885
--- /dev/null
+++ b/app/views/shared/product/_qualifiers.html.erb
@@ -0,0 +1,10 @@
+<% product.product_qualifiers.each do |pq| %>
+ <% if pq.qualifier %>
+ <%= pq.qualifier.name + (pq.certifier.nil? ? _(";") : '') %>
+ <% end %>
+ <% if pq.certifier %>
+ <%= _('cert. ') + pq.certifier.name + _(";") %>
+ <% end %>
+
+
+<% end %>
diff --git a/app/views/shared/product/_qualifiers.rhtml b/app/views/shared/product/_qualifiers.rhtml
deleted file mode 100644
index 8ed9885..0000000
--- a/app/views/shared/product/_qualifiers.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<% product.product_qualifiers.each do |pq| %>
- <% if pq.qualifier %>
- <%= pq.qualifier.name + (pq.certifier.nil? ? _(";") : '') %>
- <% end %>
- <% if pq.certifier %>
- <%= _('cert. ') + pq.certifier.name + _(";") %>
- <% end %>
-
-
-<% end %>
diff --git a/app/views/shared/profile_actions/xmpp_chat.html.erb b/app/views/shared/profile_actions/xmpp_chat.html.erb
new file mode 100644
index 0000000..88a659b
--- /dev/null
+++ b/app/views/shared/profile_actions/xmpp_chat.html.erb
@@ -0,0 +1,5 @@
+<% if profile.members.include?(user) %>
+
+ <%= button_to_function(:chat, _('Enter chat room'), "open_chat_window(this, '##{profile.full_jid}')") %>
+
+<% end %>
diff --git a/app/views/shared/profile_actions/xmpp_chat.rhtml b/app/views/shared/profile_actions/xmpp_chat.rhtml
deleted file mode 100644
index 88a659b..0000000
--- a/app/views/shared/profile_actions/xmpp_chat.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<% if profile.members.include?(user) %>
-
- <%= button_to_function(:chat, _('Enter chat room'), "open_chat_window(this, '##{profile.full_jid}')") %>
-
-<% end %>
diff --git a/app/views/shared/theme_test_panel.html.erb b/app/views/shared/theme_test_panel.html.erb
new file mode 100644
index 0000000..d198822
--- /dev/null
+++ b/app/views/shared/theme_test_panel.html.erb
@@ -0,0 +1,13 @@
+
+
+ <%= _('Testing theme "%s"') % current_theme %>
+
+
+
<%= _('You can move this window away to have a better visualization of specific parts of screen.') %>
+
+ <% button_bar do %>
+ <%= button(:ok, _('Finished testing'), :controller => 'themes', :profile => theme_owner, :action => 'stop_test', :id => current_theme) %>
+ <%= button(:edit, _('Edit theme'), :controller => 'themes', :profile => theme_owner, :action => 'edit', :id => current_theme) %>
+ <% end %>
+
+<%= draggable_element('theme-test-panel') %>
diff --git a/app/views/shared/theme_test_panel.rhtml b/app/views/shared/theme_test_panel.rhtml
deleted file mode 100644
index d198822..0000000
--- a/app/views/shared/theme_test_panel.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
- <%= _('Testing theme "%s"') % current_theme %>
-
-
-
<%= _('You can move this window away to have a better visualization of specific parts of screen.') %>
-
- <% button_bar do %>
- <%= button(:ok, _('Finished testing'), :controller => 'themes', :profile => theme_owner, :action => 'stop_test', :id => current_theme) %>
- <%= button(:edit, _('Edit theme'), :controller => 'themes', :profile => theme_owner, :action => 'edit', :id => current_theme) %>
- <% end %>
-
-<%= draggable_element('theme-test-panel') %>
diff --git a/app/views/shared/tiny_mce.html.erb b/app/views/shared/tiny_mce.html.erb
new file mode 100644
index 0000000..80e0cf0
--- /dev/null
+++ b/app/views/shared/tiny_mce.html.erb
@@ -0,0 +1,58 @@
+<%= javascript_include_tag 'tinymce/jscripts/tiny_mce/tiny_mce.js' %>
+
diff --git a/app/views/shared/tiny_mce.rhtml b/app/views/shared/tiny_mce.rhtml
deleted file mode 100644
index 80e0cf0..0000000
--- a/app/views/shared/tiny_mce.rhtml
+++ /dev/null
@@ -1,58 +0,0 @@
-<%= javascript_include_tag 'tinymce/jscripts/tiny_mce/tiny_mce.js' %>
-
diff --git a/app/views/shared/user_menu.html.erb b/app/views/shared/user_menu.html.erb
new file mode 100644
index 0000000..4ed6547
--- /dev/null
+++ b/app/views/shared/user_menu.html.erb
@@ -0,0 +1,72 @@
+
diff --git a/app/views/shared/user_menu.rhtml b/app/views/shared/user_menu.rhtml
deleted file mode 100644
index 4ed6547..0000000
--- a/app/views/shared/user_menu.rhtml
+++ /dev/null
@@ -1,72 +0,0 @@
-
diff --git a/app/views/shared/usermenu/xmpp_chat.html.erb b/app/views/shared/usermenu/xmpp_chat.html.erb
new file mode 100644
index 0000000..05f7776
--- /dev/null
+++ b/app/views/shared/usermenu/xmpp_chat.html.erb
@@ -0,0 +1 @@
+<%= link_to('' + _('Open chat') +' ', '#', :id => 'openchat', :onclick => 'open_chat_window(this)') %>
diff --git a/app/views/shared/usermenu/xmpp_chat.rhtml b/app/views/shared/usermenu/xmpp_chat.rhtml
deleted file mode 100644
index 05f7776..0000000
--- a/app/views/shared/usermenu/xmpp_chat.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= link_to('' + _('Open chat') +' ', '#', :id => 'openchat', :onclick => 'open_chat_window(this)') %>
diff --git a/app/views/spam/index.html.erb b/app/views/spam/index.html.erb
new file mode 100644
index 0000000..eae44dc
--- /dev/null
+++ b/app/views/spam/index.html.erb
@@ -0,0 +1,20 @@
+<%= _('Manage SPAM') %>
+
+<% button_bar do %>
+ <%= button :back, _('Back to control panel'), :controller => :profile_editor %>
+<% end %>
+
+<%# FIXME should not need to replicate the article structure like this to be able to use the same formatting as the comments listing %>
+
+
+
+
+<%= pagination_links @spam %>
+
+<% button_bar do %>
+ <%= button :back, _('Back to control panel'), :controller => :profile_editor %>
+<% end %>
diff --git a/app/views/spam/index.rhtml b/app/views/spam/index.rhtml
deleted file mode 100644
index eae44dc..0000000
--- a/app/views/spam/index.rhtml
+++ /dev/null
@@ -1,20 +0,0 @@
-<%= _('Manage SPAM') %>
-
-<% button_bar do %>
- <%= button :back, _('Back to control panel'), :controller => :profile_editor %>
-<% end %>
-
-<%# FIXME should not need to replicate the article structure like this to be able to use the same formatting as the comments listing %>
-
-
-
-
-<%= pagination_links @spam %>
-
-<% button_bar do %>
- <%= button :back, _('Back to control panel'), :controller => :profile_editor %>
-<% end %>
diff --git a/app/views/task_mailer/invitation_notification.html.erb b/app/views/task_mailer/invitation_notification.html.erb
new file mode 100644
index 0000000..17a3d7c
--- /dev/null
+++ b/app/views/task_mailer/invitation_notification.html.erb
@@ -0,0 +1 @@
+<%= @message %>
\ No newline at end of file
diff --git a/app/views/task_mailer/invitation_notification.rhtml b/app/views/task_mailer/invitation_notification.rhtml
deleted file mode 100644
index 17a3d7c..0000000
--- a/app/views/task_mailer/invitation_notification.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= @message %>
\ No newline at end of file
diff --git a/app/views/task_mailer/target_notification.html.erb b/app/views/task_mailer/target_notification.html.erb
new file mode 100644
index 0000000..b85dcd8
--- /dev/null
+++ b/app/views/task_mailer/target_notification.html.erb
@@ -0,0 +1,10 @@
+<%= _('Hello %s,') % @target %>
+
+<%= word_wrap(@message) %>
+
+<%= word_wrap(_('Access your list of tasks or your control panel to see this and other pending actions that need your attention.')) %>
+<%= @tasks_url %>
+
+--
+<%= _('%s team.') % @environment %>
+<%= @url %>
diff --git a/app/views/task_mailer/target_notification.rhtml b/app/views/task_mailer/target_notification.rhtml
deleted file mode 100644
index b85dcd8..0000000
--- a/app/views/task_mailer/target_notification.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<%= _('Hello %s,') % @target %>
-
-<%= word_wrap(@message) %>
-
-<%= word_wrap(_('Access your list of tasks or your control panel to see this and other pending actions that need your attention.')) %>
-<%= @tasks_url %>
-
---
-<%= _('%s team.') % @environment %>
-<%= @url %>
diff --git a/app/views/task_mailer/task_activated.text.plain.html.erb b/app/views/task_mailer/task_activated.text.plain.html.erb
new file mode 120000
index 0000000..44721c9
--- /dev/null
+++ b/app/views/task_mailer/task_activated.text.plain.html.erb
@@ -0,0 +1 @@
+task_cancelled.text.plain.rhtml
\ No newline at end of file
diff --git a/app/views/task_mailer/task_activated.text.plain.rhtml b/app/views/task_mailer/task_activated.text.plain.rhtml
deleted file mode 120000
index 44721c9..0000000
--- a/app/views/task_mailer/task_activated.text.plain.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-task_cancelled.text.plain.rhtml
\ No newline at end of file
diff --git a/app/views/task_mailer/task_cancelled.text.plain.html.erb b/app/views/task_mailer/task_cancelled.text.plain.html.erb
new file mode 100644
index 0000000..9f74c43
--- /dev/null
+++ b/app/views/task_mailer/task_cancelled.text.plain.html.erb
@@ -0,0 +1,9 @@
+<%= _('Dear %s,') % @requestor %>
+
+<%= word_wrap(@message) %>
+
+<%= _('Greetings,') %>
+
+--
+<%= _('%s team.') % @environment %>
+<%= @url %>
diff --git a/app/views/task_mailer/task_cancelled.text.plain.rhtml b/app/views/task_mailer/task_cancelled.text.plain.rhtml
deleted file mode 100644
index 9f74c43..0000000
--- a/app/views/task_mailer/task_cancelled.text.plain.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= _('Dear %s,') % @requestor %>
-
-<%= word_wrap(@message) %>
-
-<%= _('Greetings,') %>
-
---
-<%= _('%s team.') % @environment %>
-<%= @url %>
diff --git a/app/views/task_mailer/task_created.text.plain.html.erb b/app/views/task_mailer/task_created.text.plain.html.erb
new file mode 120000
index 0000000..44721c9
--- /dev/null
+++ b/app/views/task_mailer/task_created.text.plain.html.erb
@@ -0,0 +1 @@
+task_cancelled.text.plain.rhtml
\ No newline at end of file
diff --git a/app/views/task_mailer/task_created.text.plain.rhtml b/app/views/task_mailer/task_created.text.plain.rhtml
deleted file mode 120000
index 44721c9..0000000
--- a/app/views/task_mailer/task_created.text.plain.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-task_cancelled.text.plain.rhtml
\ No newline at end of file
diff --git a/app/views/task_mailer/task_finished.text.plain.html.erb b/app/views/task_mailer/task_finished.text.plain.html.erb
new file mode 120000
index 0000000..44721c9
--- /dev/null
+++ b/app/views/task_mailer/task_finished.text.plain.html.erb
@@ -0,0 +1 @@
+task_cancelled.text.plain.rhtml
\ No newline at end of file
diff --git a/app/views/task_mailer/task_finished.text.plain.rhtml b/app/views/task_mailer/task_finished.text.plain.rhtml
deleted file mode 120000
index 44721c9..0000000
--- a/app/views/task_mailer/task_finished.text.plain.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-task_cancelled.text.plain.rhtml
\ No newline at end of file
diff --git a/app/views/tasks/_abuse_complaint_accept_details.html.erb b/app/views/tasks/_abuse_complaint_accept_details.html.erb
new file mode 100644
index 0000000..0f678fa
--- /dev/null
+++ b/app/views/tasks/_abuse_complaint_accept_details.html.erb
@@ -0,0 +1,28 @@
+
+<% task.abuse_reports.each do |abuse_report| %>
+
+
"<%= abuse_report.reason %>"
+
<%= _('Reported by %{reporter} %{time}.') % {:reporter => abuse_report.reporter.name, :time => time_ago_as_sentence(abuse_report.created_at) }%>
+ <% if !abuse_report.content.blank? %>
+
<%=_('View details')%>
+
class="abuse-report-details">
+ <%= abuse_report.content %>
+
+ <% end %>
+
+ --
+
+
+<% end %>
+
+
diff --git a/app/views/tasks/_abuse_complaint_accept_details.rhtml b/app/views/tasks/_abuse_complaint_accept_details.rhtml
deleted file mode 100644
index 0f678fa..0000000
--- a/app/views/tasks/_abuse_complaint_accept_details.rhtml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-<% task.abuse_reports.each do |abuse_report| %>
-
-
"<%= abuse_report.reason %>"
-
<%= _('Reported by %{reporter} %{time}.') % {:reporter => abuse_report.reporter.name, :time => time_ago_as_sentence(abuse_report.created_at) }%>
- <% if !abuse_report.content.blank? %>
-
<%=_('View details')%>
-
class="abuse-report-details">
- <%= abuse_report.content %>
-
- <% end %>
-
- --
-
-
-<% end %>
-
-
diff --git a/app/views/tasks/_abuse_complaint_reject_details.html.erb b/app/views/tasks/_abuse_complaint_reject_details.html.erb
new file mode 100644
index 0000000..33b814f
--- /dev/null
+++ b/app/views/tasks/_abuse_complaint_reject_details.html.erb
@@ -0,0 +1,10 @@
+
diff --git a/app/views/tasks/_abuse_complaint_reject_details.rhtml b/app/views/tasks/_abuse_complaint_reject_details.rhtml
deleted file mode 100644
index 33b814f..0000000
--- a/app/views/tasks/_abuse_complaint_reject_details.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/app/views/tasks/_add_friend_accept_details.html.erb b/app/views/tasks/_add_friend_accept_details.html.erb
new file mode 100644
index 0000000..68745c7
--- /dev/null
+++ b/app/views/tasks/_add_friend_accept_details.html.erb
@@ -0,0 +1,8 @@
+<%=_('Classify your new friend:') +
+text_field_with_local_autocomplete("tasks[#{task.id}][task][group_for_friend]",
+ task.target.suggested_friend_groups,
+ {:id => "field-group-for-friend-#{task.id}", :maxlength => 150})
+%>
+
+ <%=_('Suggestions: %s') % task.target.suggested_friend_groups.join(', ') %>
+
diff --git a/app/views/tasks/_add_friend_accept_details.rhtml b/app/views/tasks/_add_friend_accept_details.rhtml
deleted file mode 100644
index 68745c7..0000000
--- a/app/views/tasks/_add_friend_accept_details.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-<%=_('Classify your new friend:') +
-text_field_with_local_autocomplete("tasks[#{task.id}][task][group_for_friend]",
- task.target.suggested_friend_groups,
- {:id => "field-group-for-friend-#{task.id}", :maxlength => 150})
-%>
-
- <%=_('Suggestions: %s') % task.target.suggested_friend_groups.join(', ') %>
-
diff --git a/app/views/tasks/_add_member_accept_details.html.erb b/app/views/tasks/_add_member_accept_details.html.erb
new file mode 100644
index 0000000..71e5cee
--- /dev/null
+++ b/app/views/tasks/_add_member_accept_details.html.erb
@@ -0,0 +1,8 @@
+<%= content = _("Roles:")+" "
+roles = Profile::Roles.organization_member_roles(task.target.environment.id)
+roles.each do |role|
+ content += labelled_check_box(role.name, "tasks[#{task.id}][task][roles][]", role.id, false)+" "
+end
+content_tag('p', content, :class => 'member-classify-suggestion')
+%>
+
diff --git a/app/views/tasks/_add_member_accept_details.rhtml b/app/views/tasks/_add_member_accept_details.rhtml
deleted file mode 100644
index 71e5cee..0000000
--- a/app/views/tasks/_add_member_accept_details.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-<%= content = _("Roles:")+" "
-roles = Profile::Roles.organization_member_roles(task.target.environment.id)
-roles.each do |role|
- content += labelled_check_box(role.name, "tasks[#{task.id}][task][roles][]", role.id, false)+" "
-end
-content_tag('p', content, :class => 'member-classify-suggestion')
-%>
-
diff --git a/app/views/tasks/_approve_article_accept_details.html.erb b/app/views/tasks/_approve_article_accept_details.html.erb
new file mode 100644
index 0000000..fd35293
--- /dev/null
+++ b/app/views/tasks/_approve_article_accept_details.html.erb
@@ -0,0 +1,11 @@
+<%= render :file => 'shared/tiny_mce' %>
+
+<%= labelled_form_field(_('Name for publishing'), f.text_field(:name)) %>
+<%= select_profile_folder(_('Select the folder where the article must be published'), "tasks[#{task.id}][task][article_parent_id]", task.target) %>
+<%= labelled_form_field(_('Highlight this article'), f.check_box(:highlighted)) %>
+
+<% tiny = task.article && task.article.tiny_mce? ? {:tiny_mce => true} : {} %>
+<%= render :partial => 'shared/lead_and_body', :locals => {:lead_id => task.id, :f => f}.merge(tiny)%>
+
+<%= labelled_form_field _('Comment for author'), f.text_field(:closing_statment, :style => 'width: 488px;') %>
+
diff --git a/app/views/tasks/_approve_article_accept_details.rhtml b/app/views/tasks/_approve_article_accept_details.rhtml
deleted file mode 100644
index fd35293..0000000
--- a/app/views/tasks/_approve_article_accept_details.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= render :file => 'shared/tiny_mce' %>
-
-<%= labelled_form_field(_('Name for publishing'), f.text_field(:name)) %>
-<%= select_profile_folder(_('Select the folder where the article must be published'), "tasks[#{task.id}][task][article_parent_id]", task.target) %>
-<%= labelled_form_field(_('Highlight this article'), f.check_box(:highlighted)) %>
-
-<% tiny = task.article && task.article.tiny_mce? ? {:tiny_mce => true} : {} %>
-<%= render :partial => 'shared/lead_and_body', :locals => {:lead_id => task.id, :f => f}.merge(tiny)%>
-
-<%= labelled_form_field _('Comment for author'), f.text_field(:closing_statment, :style => 'width: 488px;') %>
-
diff --git a/app/views/tasks/_create_enterprise_reject_details.html.erb b/app/views/tasks/_create_enterprise_reject_details.html.erb
new file mode 100644
index 0000000..3dde979
--- /dev/null
+++ b/app/views/tasks/_create_enterprise_reject_details.html.erb
@@ -0,0 +1,2 @@
+<%= required labelled_form_field(_('Rejection explanation'), f.text_area(:reject_explanation, :rows => 5)) %>
+
diff --git a/app/views/tasks/_create_enterprise_reject_details.rhtml b/app/views/tasks/_create_enterprise_reject_details.rhtml
deleted file mode 100644
index 3dde979..0000000
--- a/app/views/tasks/_create_enterprise_reject_details.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= required labelled_form_field(_('Rejection explanation'), f.text_area(:reject_explanation, :rows => 5)) %>
-
diff --git a/app/views/tasks/_invite_friend_accept_details.html.erb b/app/views/tasks/_invite_friend_accept_details.html.erb
new file mode 120000
index 0000000..b688e0c
--- /dev/null
+++ b/app/views/tasks/_invite_friend_accept_details.html.erb
@@ -0,0 +1 @@
+_add_friend_accept_details.rhtml
\ No newline at end of file
diff --git a/app/views/tasks/_invite_friend_accept_details.rhtml b/app/views/tasks/_invite_friend_accept_details.rhtml
deleted file mode 120000
index b688e0c..0000000
--- a/app/views/tasks/_invite_friend_accept_details.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-_add_friend_accept_details.rhtml
\ No newline at end of file
diff --git a/app/views/tasks/_suggest_article_accept_details.html.erb b/app/views/tasks/_suggest_article_accept_details.html.erb
new file mode 100644
index 0000000..759e165
--- /dev/null
+++ b/app/views/tasks/_suggest_article_accept_details.html.erb
@@ -0,0 +1,12 @@
+<%= render :file => 'shared/tiny_mce' %>
+
+<%= labelled_form_field(_("Sent by: "), f.text_field(:name)) %>
+<%= label_tag(_("Email: %s") % task.email) %>
+<%= required labelled_form_field(_('Title'), f.text_field(:article_name, :size => 50)) %>
+<%= labelled_form_field(_('Source'), f.text_field(:source_name)) %>
+<%= labelled_form_field(_("Source URL"), f.text_field(:source)) %>
+
+<%= select_profile_folder(_('Select the folder where the article must be published'), "tasks[#{task.id}][task][article_parent_id]", task.target) %>
+<%= labelled_form_field(_('Highlight this article'), f.check_box(:highlighted)) %>
+
+<%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true, :f => f, :abstract_method => 'article_abstract', :body_method => 'article_body', :lead_id => task.id} %>
diff --git a/app/views/tasks/_suggest_article_accept_details.rhtml b/app/views/tasks/_suggest_article_accept_details.rhtml
deleted file mode 100644
index 759e165..0000000
--- a/app/views/tasks/_suggest_article_accept_details.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<%= render :file => 'shared/tiny_mce' %>
-
-<%= labelled_form_field(_("Sent by: "), f.text_field(:name)) %>
-<%= label_tag(_("Email: %s") % task.email) %>
-<%= required labelled_form_field(_('Title'), f.text_field(:article_name, :size => 50)) %>
-<%= labelled_form_field(_('Source'), f.text_field(:source_name)) %>
-<%= labelled_form_field(_("Source URL"), f.text_field(:source)) %>
-
-<%= select_profile_folder(_('Select the folder where the article must be published'), "tasks[#{task.id}][task][article_parent_id]", task.target) %>
-<%= labelled_form_field(_('Highlight this article'), f.check_box(:highlighted)) %>
-
-<%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true, :f => f, :abstract_method => 'article_abstract', :body_method => 'article_body', :lead_id => task.id} %>
diff --git a/app/views/tasks/_task.html.erb b/app/views/tasks/_task.html.erb
new file mode 100644
index 0000000..1ee6fac
--- /dev/null
+++ b/app/views/tasks/_task.html.erb
@@ -0,0 +1,64 @@
+
+
+
+ <%
+ icon_info = task.icon
+ if icon_info[:type] == :profile_image
+ icon = profile_image(icon_info[:profile], :minor)
+ elsif icon_info[:type] == :defined_image
+ icon = "
"
+ end
+ %>
+ <%=
+ if icon_info[:url]
+ link_to(icon, icon_info[:url])
+ else
+ icon
+ end
+ %>
+
+
+
+
+ <%=
+ labelled_radio_button(_("Accept"), "tasks[#{task.id}][decision]", 'finish', task.default_decision == 'accept',
+ :id => "decision-finish-#{task.id}",
+ :class => 'task_accept_radio',
+ :disabled => task.accept_disabled?,
+ :task_id => "#{task.id}") +
+ labelled_radio_button(_("Reject"), "tasks[#{task.id}][decision]", 'cancel', task.default_decision == 'reject',
+ :id => "decision-cancel-#{task.id}",
+ :class => 'task_reject_radio',
+ :disabled => task.reject_disabled?,
+ :task_id => "#{task.id}") +
+ labelled_radio_button(_("Skip"), "tasks[#{task.id}][decision]", 'skip', task.default_decision == 'skip',
+ :id => "decision-skip-#{task.id}",
+ :class => 'task_skip_radio',
+ :disabled => task.skip_disabled?,
+ :task_id => "#{task.id}")
+ %>
+
+
+
+ <%= task.title %>
+
+
+
+ <%= task_information(task) %>
+
+
+ <% fields_for "tasks[#{task.id}][task]", task do |f| %>
+ <% if task.accept_details %>
+
+ <%= render :partial => partial_for_class(task.class, :accept_details), :locals => {:task => task, :f => f} %>
+
+ <% end %>
+
+ <% if task.reject_details %>
+
+ <%= render :partial => partial_for_class(task.class, :reject_details), :locals => {:task => task, :f => f} %>
+
+ <% end %>
+ <% end %>
+
+
diff --git a/app/views/tasks/_task.rhtml b/app/views/tasks/_task.rhtml
deleted file mode 100644
index 1ee6fac..0000000
--- a/app/views/tasks/_task.rhtml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
- <%
- icon_info = task.icon
- if icon_info[:type] == :profile_image
- icon = profile_image(icon_info[:profile], :minor)
- elsif icon_info[:type] == :defined_image
- icon = "
"
- end
- %>
- <%=
- if icon_info[:url]
- link_to(icon, icon_info[:url])
- else
- icon
- end
- %>
-
-
-
-
- <%=
- labelled_radio_button(_("Accept"), "tasks[#{task.id}][decision]", 'finish', task.default_decision == 'accept',
- :id => "decision-finish-#{task.id}",
- :class => 'task_accept_radio',
- :disabled => task.accept_disabled?,
- :task_id => "#{task.id}") +
- labelled_radio_button(_("Reject"), "tasks[#{task.id}][decision]", 'cancel', task.default_decision == 'reject',
- :id => "decision-cancel-#{task.id}",
- :class => 'task_reject_radio',
- :disabled => task.reject_disabled?,
- :task_id => "#{task.id}") +
- labelled_radio_button(_("Skip"), "tasks[#{task.id}][decision]", 'skip', task.default_decision == 'skip',
- :id => "decision-skip-#{task.id}",
- :class => 'task_skip_radio',
- :disabled => task.skip_disabled?,
- :task_id => "#{task.id}")
- %>
-
-
-
- <%= task.title %>
-
-
-
- <%= task_information(task) %>
-
-
- <% fields_for "tasks[#{task.id}][task]", task do |f| %>
- <% if task.accept_details %>
-
- <%= render :partial => partial_for_class(task.class, :accept_details), :locals => {:task => task, :f => f} %>
-
- <% end %>
-
- <% if task.reject_details %>
-
- <%= render :partial => partial_for_class(task.class, :reject_details), :locals => {:task => task, :f => f} %>
-
- <% end %>
- <% end %>
-
-
diff --git a/app/views/tasks/_task_reject_details.html.erb b/app/views/tasks/_task_reject_details.html.erb
new file mode 100644
index 0000000..13bc80c
--- /dev/null
+++ b/app/views/tasks/_task_reject_details.html.erb
@@ -0,0 +1 @@
+<%= labelled_form_field(_('Rejection explanation'), f.text_area(:reject_explanation, :rows => 5)) %>
diff --git a/app/views/tasks/_task_reject_details.rhtml b/app/views/tasks/_task_reject_details.rhtml
deleted file mode 100644
index 13bc80c..0000000
--- a/app/views/tasks/_task_reject_details.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= labelled_form_field(_('Rejection explanation'), f.text_area(:reject_explanation, :rows => 5)) %>
diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb
new file mode 100644
index 0000000..7572a0e
--- /dev/null
+++ b/app/views/tasks/index.html.erb
@@ -0,0 +1,69 @@
+<%= stylesheet_link_tag 'tasks' %>
+
+<%= _("%s's pending tasks") % profile.name %>
+
+
+<% type_collection = [[nil, _('All')]] %>
+<% type_collection += Task.all_types.sort_by {|klass| klass.constantize.new.title}.map{|s| [s, s.constantize.new.title] } %>
+
+
+
+<% if !@failed.blank? %>
+
+ <% @failed.each do |error, tasks_descriptions|%>
+
<%= error %>
+
<%=_("This error happened with the following tasks: ")%>
+
+ <% tasks_descriptions.each do |description| %>
+ <%= description %>
+ <% end %>
+
+ <% end %>
+
+<% end %>
+
+<% if @tasks.empty? %>
+
+ <%= labelled_select(_('Filter')+': ', :filter_type, :first, :last, @filter, type_collection, :onchange => 'document.location.href = "?filter_type="+this.value')%>
+
+ <%= _('No pending tasks for %s') % profile.name %>
+<% else %>
+ <% form_tag :action => 'close' do%>
+ <% button_bar do %>
+ <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
+ <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
+ <%= submit_button :save, _("Apply!") %>
+ <%= button(:edit, _('View processed tasks'), :action => 'processed') %>
+ <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
+ <% end %>
+
+
+
+ <%= labelled_select(_('Filter')+': ', :filter_type, :first, :last, @filter, type_collection, :onchange => 'document.location.href = "?filter_type="+this.value')%>
+
+
+ <%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "up-set-all-tasks-to") %>
+
+ <% @tasks.each do |task| %>
+ <%= render :partial => 'task', :locals => { :task => task } %>
+ <% end %>
+
+ <%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "down-set-all-tasks-to") %>
+
+
+
+ <%= pagination_links(@tasks)%>
+
+ <% button_bar do %>
+ <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
+ <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
+ <%= submit_button :save, _("Apply!") %>
+ <%= button(:edit, _('View processed tasks'), :action => 'processed') %>
+ <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
+ <% end %>
+ <% end %>
+<% end %>
+
+
+
+<%= javascript_include_tag 'tasks' %>
diff --git a/app/views/tasks/index.rhtml b/app/views/tasks/index.rhtml
deleted file mode 100644
index 7572a0e..0000000
--- a/app/views/tasks/index.rhtml
+++ /dev/null
@@ -1,69 +0,0 @@
-<%= stylesheet_link_tag 'tasks' %>
-
-<%= _("%s's pending tasks") % profile.name %>
-
-
-<% type_collection = [[nil, _('All')]] %>
-<% type_collection += Task.all_types.sort_by {|klass| klass.constantize.new.title}.map{|s| [s, s.constantize.new.title] } %>
-
-
-
-<% if !@failed.blank? %>
-
- <% @failed.each do |error, tasks_descriptions|%>
-
<%= error %>
-
<%=_("This error happened with the following tasks: ")%>
-
- <% tasks_descriptions.each do |description| %>
- <%= description %>
- <% end %>
-
- <% end %>
-
-<% end %>
-
-<% if @tasks.empty? %>
-
- <%= labelled_select(_('Filter')+': ', :filter_type, :first, :last, @filter, type_collection, :onchange => 'document.location.href = "?filter_type="+this.value')%>
-
- <%= _('No pending tasks for %s') % profile.name %>
-<% else %>
- <% form_tag :action => 'close' do%>
- <% button_bar do %>
- <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
- <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
- <%= submit_button :save, _("Apply!") %>
- <%= button(:edit, _('View processed tasks'), :action => 'processed') %>
- <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
- <% end %>
-
-
-
- <%= labelled_select(_('Filter')+': ', :filter_type, :first, :last, @filter, type_collection, :onchange => 'document.location.href = "?filter_type="+this.value')%>
-
-
- <%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "up-set-all-tasks-to") %>
-
- <% @tasks.each do |task| %>
- <%= render :partial => 'task', :locals => { :task => task } %>
- <% end %>
-
- <%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "down-set-all-tasks-to") %>
-
-
-
- <%= pagination_links(@tasks)%>
-
- <% button_bar do %>
- <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
- <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
- <%= submit_button :save, _("Apply!") %>
- <%= button(:edit, _('View processed tasks'), :action => 'processed') %>
- <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
- <% end %>
- <% end %>
-<% end %>
-
-
-
-<%= javascript_include_tag 'tasks' %>
diff --git a/app/views/tasks/list_requested.html.erb b/app/views/tasks/list_requested.html.erb
new file mode 100644
index 0000000..8b4070f
--- /dev/null
+++ b/app/views/tasks/list_requested.html.erb
@@ -0,0 +1,18 @@
+<%= _('Tasks that I requested') %>
+
+
+ <% @tasks.each do |task| %>
+
+ <%= task.respond_to?(:title) ? link_to( task.title, :action => 'ticket_details', :id => task.id) : task.information %>
+
+ <%= _('Created:') + ' ' + show_date(task.created_at) %>
+
+ <%= _('Status:') + ' ' + task.status.to_s %>
+
+
+ <% end %>
+
+
+<% button_bar do %>
+ <%= button :back, _('Back'), :action => 'index' %>
+<% end %>
diff --git a/app/views/tasks/list_requested.rhtml b/app/views/tasks/list_requested.rhtml
deleted file mode 100644
index 8b4070f..0000000
--- a/app/views/tasks/list_requested.rhtml
+++ /dev/null
@@ -1,18 +0,0 @@
-<%= _('Tasks that I requested') %>
-
-
- <% @tasks.each do |task| %>
-
- <%= task.respond_to?(:title) ? link_to( task.title, :action => 'ticket_details', :id => task.id) : task.information %>
-
- <%= _('Created:') + ' ' + show_date(task.created_at) %>
-
- <%= _('Status:') + ' ' + task.status.to_s %>
-
-
- <% end %>
-
-
-<% 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
new file mode 100644
index 0000000..ac2a634
--- /dev/null
+++ b/app/views/tasks/new.html.erb
@@ -0,0 +1,17 @@
+<%= @ticket.target ? _('New request for %s') % @ticket.target.name : _('New request') %>
+
+<%# FIXME: put style in css %>
+<% labelled_form_for :ticket, @ticket do |f| %>
+ <% if @ticket.target %>
+ <%= f.hidden_field :target_id %>
+ <% else %>
+ <%= display_form_field( _('To: '), f.select(:target_id, profile.friends.map{|p|[p.name, p.id]})) %>
+ <% end %>
+ <%= hidden_field_tag 'ticket[target_type]', 'Profile' %>
+ <%= f.text_field :title, :style => 'width:80%;' %>
+ <%= f.text_area :message, :style => 'height:200px; width:80%;' %>
+
+ <% button_bar do %>
+ <%= submit_button(:ok, _('Send'), :cancel => {:action => 'index'}) %>
+ <% end %>
+<% end %>
diff --git a/app/views/tasks/new.rhtml b/app/views/tasks/new.rhtml
deleted file mode 100644
index ac2a634..0000000
--- a/app/views/tasks/new.rhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-<%= @ticket.target ? _('New request for %s') % @ticket.target.name : _('New request') %>
-
-<%# FIXME: put style in css %>
-<% labelled_form_for :ticket, @ticket do |f| %>
- <% if @ticket.target %>
- <%= f.hidden_field :target_id %>
- <% else %>
- <%= display_form_field( _('To: '), f.select(:target_id, profile.friends.map{|p|[p.name, p.id]})) %>
- <% end %>
- <%= hidden_field_tag 'ticket[target_type]', 'Profile' %>
- <%= f.text_field :title, :style => 'width:80%;' %>
- <%= f.text_area :message, :style => 'height:200px; width:80%;' %>
-
- <% 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
new file mode 100644
index 0000000..b76fac6
--- /dev/null
+++ b/app/views/tasks/processed.html.erb
@@ -0,0 +1,24 @@
+<%= _("%s's processed tasks") % profile.name %>
+
+
+<% if @tasks.empty? %>
+ <%= _('No processed tasks.') %>
+<% else %>
+
+ <% @tasks.each do |item| %>
+
+ <%= task_information(item) %>
+
+ <%= _('Created:') +' '+ show_date(item.created_at) %>
+
+ <%= _('Processed:') +' '+ show_date(item.end_date) %>
+
+
+ <% end %>
+
+<% end %>
+
+
+<% button_bar do %>
+ <%= button(:back, _('Back'), :action => 'index') %>
+<% end %>
diff --git a/app/views/tasks/processed.rhtml b/app/views/tasks/processed.rhtml
deleted file mode 100644
index b76fac6..0000000
--- a/app/views/tasks/processed.rhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-<%= _("%s's processed tasks") % profile.name %>
-
-
-<% if @tasks.empty? %>
- <%= _('No processed tasks.') %>
-<% else %>
-
- <% @tasks.each do |item| %>
-
- <%= task_information(item) %>
-
- <%= _('Created:') +' '+ show_date(item.created_at) %>
-
- <%= _('Processed:') +' '+ show_date(item.end_date) %>
-
-
- <% end %>
-
-<% end %>
-
-
-<% 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
new file mode 100644
index 0000000..9376731
--- /dev/null
+++ b/app/views/tasks/ticket_details.html.erb
@@ -0,0 +1,19 @@
+<%= _('Ticket: %s') % @ticket.name %>
+
+ <%= _('Created at %s by %s') % [@ticket.created_at.to_date, link_to(@ticket.requestor.name, @ticket.requestor.url)] %>
+ <%= _('Owner: %s') % link_to(@ticket.target.name, @ticket.target.url) %>
+
+
+<%= _('Status: %s') % gettext(Task::Status.names[@ticket.status]) %>
+
+
+
<%= _('Description: %s') % @ticket.description %>
+
+
+<% if @ticket.closing_statment %>
+ <%= _('Closing statement: %s') % @ticket.closing_statment %>
+<% end %>
+
+<% button_bar do %>
+ <%= button :back, _('Back'), :action => 'index' %>
+<% end %>
diff --git a/app/views/tasks/ticket_details.rhtml b/app/views/tasks/ticket_details.rhtml
deleted file mode 100644
index 9376731..0000000
--- a/app/views/tasks/ticket_details.rhtml
+++ /dev/null
@@ -1,19 +0,0 @@
-<%= _('Ticket: %s') % @ticket.name %>
-
- <%= _('Created at %s by %s') % [@ticket.created_at.to_date, link_to(@ticket.requestor.name, @ticket.requestor.url)] %>
- <%= _('Owner: %s') % link_to(@ticket.target.name, @ticket.target.url) %>
-
-
-<%= _('Status: %s') % gettext(Task::Status.names[@ticket.status]) %>
-
-
-
<%= _('Description: %s') % @ticket.description %>
-
-
-<% if @ticket.closing_statment %>
- <%= _('Closing statement: %s') % @ticket.closing_statment %>
-<% end %>
-
-<% button_bar do %>
- <%= button :back, _('Back'), :action => 'index' %>
-<% end %>
diff --git a/app/views/themes/add_css.html.erb b/app/views/themes/add_css.html.erb
new file mode 100644
index 0000000..0517856
--- /dev/null
+++ b/app/views/themes/add_css.html.erb
@@ -0,0 +1,11 @@
+<%= _('Add a CSS file') %>
+
+<% form_tag do %>
+ <%= labelled_form_field(_('File name'), text_field_tag('css')) %>
+
+ <% button_bar do %>
+ <%= submit_button(:add, _('Add')) %>
+ <%= lightbox_close_button(_('Cancel')) %>
+ <% end %>
+
+<% end %>
diff --git a/app/views/themes/add_css.rhtml b/app/views/themes/add_css.rhtml
deleted file mode 100644
index 0517856..0000000
--- a/app/views/themes/add_css.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= _('Add a CSS file') %>
-
-<% form_tag do %>
- <%= labelled_form_field(_('File name'), text_field_tag('css')) %>
-
- <% button_bar do %>
- <%= submit_button(:add, _('Add')) %>
- <%= lightbox_close_button(_('Cancel')) %>
- <% end %>
-
-<% end %>
diff --git a/app/views/themes/add_image.html.erb b/app/views/themes/add_image.html.erb
new file mode 100644
index 0000000..0a31980
--- /dev/null
+++ b/app/views/themes/add_image.html.erb
@@ -0,0 +1,6 @@
+<% form_tag({:action => 'add_image', :id => @theme.id}, :multipart => true) do %>
+ <%= labelled_form_field(_('Choose the image file'), file_field_tag(:image)) %>
+ <% button_bar do %>
+ <%= submit_button(:add, _('Add image')) %>
+ <% end %>
+<% end %>
diff --git a/app/views/themes/add_image.rhtml b/app/views/themes/add_image.rhtml
deleted file mode 100644
index 0a31980..0000000
--- a/app/views/themes/add_image.rhtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<% form_tag({:action => 'add_image', :id => @theme.id}, :multipart => true) do %>
- <%= labelled_form_field(_('Choose the image file'), file_field_tag(:image)) %>
- <% button_bar do %>
- <%= submit_button(:add, _('Add image')) %>
- <% end %>
-<% end %>
diff --git a/app/views/themes/css_editor.html.erb b/app/views/themes/css_editor.html.erb
new file mode 100644
index 0000000..0f84624
--- /dev/null
+++ b/app/views/themes/css_editor.html.erb
@@ -0,0 +1,13 @@
+<%= _('CSS code: "%s"') % @css %>
+
+<% form_tag({:action => 'update_css', :id => @theme.id }, :name => 'csscode_form') do %>
+ <%= hidden_field_tag('css', @css) %>
+ <%= text_area_tag('csscode', @code, :id => "codepressWindow", :class => 'codepress css') %>
+ <% button_bar do %>
+ <%= submit_button(:save, _('Save')) %>
+ <% end %>
+<% end %>
+
+
+
+
diff --git a/app/views/themes/css_editor.rhtml b/app/views/themes/css_editor.rhtml
deleted file mode 100644
index 0f84624..0000000
--- a/app/views/themes/css_editor.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<%= _('CSS code: "%s"') % @css %>
-
-<% form_tag({:action => 'update_css', :id => @theme.id }, :name => 'csscode_form') do %>
- <%= hidden_field_tag('css', @css) %>
- <%= text_area_tag('csscode', @code, :id => "codepressWindow", :class => 'codepress css') %>
- <% button_bar do %>
- <%= submit_button(:save, _('Save')) %>
- <% end %>
-<% end %>
-
-
-
-
diff --git a/app/views/themes/edit.html.erb b/app/views/themes/edit.html.erb
new file mode 100644
index 0000000..b282c99
--- /dev/null
+++ b/app/views/themes/edit.html.erb
@@ -0,0 +1,41 @@
+
+
+
+
+
<%= _('CSS files') %>
+
+ <% for css in @css_files %>
+ <%= link_to_remote(css, :url => { :action => 'css_editor', :id => @theme.id, :css => css }, :update => { :success => 'css-code' }) %>
+ <% end %>
+
+ <% button_bar do %>
+ <%= lightbox_button(:add, _('New CSS'), :action => 'add_css', :id => @theme.id) %>
+ <% end %>
+
+
+
+
<%= _('Images') %>
+
+ <% for image in @image_files %>
+ <%= image_tag("/user_themes/#{@theme.id}/images/#{image}") %>
+ <% end %>
+
+ <% button_bar do %>
+ <%= lightbox_button(:add, _('Add image'), :action => 'add_image', :id => @theme.id) %>
+ <% end %>
+
+
+
+
+ <%= _('Select a CSS file to edit') %>
+
+
+
+<%# javascript_include_tag 'codepress/codepress' %>
diff --git a/app/views/themes/edit.rhtml b/app/views/themes/edit.rhtml
deleted file mode 100644
index b282c99..0000000
--- a/app/views/themes/edit.rhtml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
<%= _('CSS files') %>
-
- <% for css in @css_files %>
- <%= link_to_remote(css, :url => { :action => 'css_editor', :id => @theme.id, :css => css }, :update => { :success => 'css-code' }) %>
- <% end %>
-
- <% button_bar do %>
- <%= lightbox_button(:add, _('New CSS'), :action => 'add_css', :id => @theme.id) %>
- <% end %>
-
-
-
-
<%= _('Images') %>
-
- <% for image in @image_files %>
- <%= image_tag("/user_themes/#{@theme.id}/images/#{image}") %>
- <% end %>
-
- <% button_bar do %>
- <%= lightbox_button(:add, _('Add image'), :action => 'add_image', :id => @theme.id) %>
- <% end %>
-
-
-
-
- <%= _('Select a CSS file to edit') %>
-
-
-
-<%# javascript_include_tag 'codepress/codepress' %>
diff --git a/app/views/themes/index.html.erb b/app/views/themes/index.html.erb
new file mode 100644
index 0000000..38c1327
--- /dev/null
+++ b/app/views/themes/index.html.erb
@@ -0,0 +1,120 @@
+<%= _('Editing Appearance') %>
+
+
+
+
<%= _('Select template') %>
+
+<% for templates in @layout_templates.in_groups_of(3) %>
+
+ <% for template in templates %><%=
+ if template
+ base_content = image_tag(
+ "/designs/templates/#{template.id}/thumbnail.png",
+ :alt => _('The "%s" template')) +
+ '
' +
+ content_tag('strong', template.id, :class => 'name') +
+ ' '
+
+ if @current_template == template.id # selected
+ content_tag( 'div',
+ base_content + content_tag('big', _('(current)') ) +'
',
+ :class => 'template-opt list-opt selected')
+ else # Not selected
+ link_to(
+ base_content +'
',
+ { :action => 'set_layout_template', :id => template.id },
+ :class => 'template-opt list-opt')
+ end
+
+ end
+ %><% end %>
+
+<% end %>
+
+
+
+
+<% if !@themes.empty? %>
+
+
+
<%= _('Select theme') %>
+<%= button :home, _('Use the default theme'), { :action => 'unset'}, :method => 'post', :confirm => _('Are you sure you want to use the environment default theme?') %>
+
+<% for themes in @themes.in_groups_of(3) %>
+
+ <% for theme in themes %><%=
+ if theme
+
+ base_content = image_tag(
+ "/designs/themes/#{theme.id}/preview.png",
+ :alt => (_('The "%s" theme.') % theme.name)) +
+ '
' +
+ content_tag('strong', theme.name, :class => 'name') +
+ ' '
+
+ if theme.id == @current_theme # selected
+ content_tag( 'div',
+ base_content + content_tag('big', _('(current)') ) +'
',
+ :class => 'theme-opt list-opt selected')
+ else # Not selected
+ link_to(
+ base_content + '
',
+ { :action => 'set', :id => theme.id },
+ :class => 'theme-opt list-opt')
+ end
+
+ end
+ %><% end %>
+
+<% end %>
+
+
+<% end %>
+
+
+
+<% if environment.enabled?('user_themes') %>
+
+
+
<%= _('My themes') %>
+
+ <% for themes in profile.themes.in_groups_of(3) %>
+
+ <% for theme in themes %><%=
+ if theme
+
+ selected = theme.id == @current_theme
+ sel_html = selected ?
+ content_tag('big', _('(current)') ) :
+ link_to(_('Use this theme'), :action => 'set', :id => theme.id)
+
+ content_tag( 'div',
+ image_tag(
+ '/images/icons-app/design-editor.png',
+ :alt => (_('The "%s" theme.') % theme.name)) +
+ '
' +
+ content_tag('strong', theme.name, :class => 'name') +
+ ' '+ sel_html +' ' +
+ link_to(_('Edit this theme'), :action => 'edit', :id => theme.id) +
+ ' ' +
+ link_to(_('Test this theme'), :action => 'start_test', :id => theme.id) +
+ '
',
+ :class => 'theme-opt list-opt' + (selected ? ' selected' : '')
+ )
+
+ end
+ %><% end %>
+
+ <% end %>
+
+
+<% end %>
+
+
+
+<% button_bar do %>
+ <% if environment.enabled?('user_themes') %>
+ <%= lightbox_button(:add, _('New theme ...'), :action => 'new') %>
+ <% end %>
+ <%= button(:back, _('Back'), :controller => 'profile_editor', :action => 'index') %>
+<% end %>
diff --git a/app/views/themes/index.rhtml b/app/views/themes/index.rhtml
deleted file mode 100644
index 38c1327..0000000
--- a/app/views/themes/index.rhtml
+++ /dev/null
@@ -1,120 +0,0 @@
-<%= _('Editing Appearance') %>
-
-
-
-
<%= _('Select template') %>
-
-<% for templates in @layout_templates.in_groups_of(3) %>
-
- <% for template in templates %><%=
- if template
- base_content = image_tag(
- "/designs/templates/#{template.id}/thumbnail.png",
- :alt => _('The "%s" template')) +
- '
' +
- content_tag('strong', template.id, :class => 'name') +
- ' '
-
- if @current_template == template.id # selected
- content_tag( 'div',
- base_content + content_tag('big', _('(current)') ) +'
',
- :class => 'template-opt list-opt selected')
- else # Not selected
- link_to(
- base_content +'
',
- { :action => 'set_layout_template', :id => template.id },
- :class => 'template-opt list-opt')
- end
-
- end
- %><% end %>
-
-<% end %>
-
-
-
-
-<% if !@themes.empty? %>
-
-
-
<%= _('Select theme') %>
-<%= button :home, _('Use the default theme'), { :action => 'unset'}, :method => 'post', :confirm => _('Are you sure you want to use the environment default theme?') %>
-
-<% for themes in @themes.in_groups_of(3) %>
-
- <% for theme in themes %><%=
- if theme
-
- base_content = image_tag(
- "/designs/themes/#{theme.id}/preview.png",
- :alt => (_('The "%s" theme.') % theme.name)) +
- '
' +
- content_tag('strong', theme.name, :class => 'name') +
- ' '
-
- if theme.id == @current_theme # selected
- content_tag( 'div',
- base_content + content_tag('big', _('(current)') ) +'
',
- :class => 'theme-opt list-opt selected')
- else # Not selected
- link_to(
- base_content + '
',
- { :action => 'set', :id => theme.id },
- :class => 'theme-opt list-opt')
- end
-
- end
- %><% end %>
-
-<% end %>
-
-
-<% end %>
-
-
-
-<% if environment.enabled?('user_themes') %>
-
-
-
<%= _('My themes') %>
-
- <% for themes in profile.themes.in_groups_of(3) %>
-
- <% for theme in themes %><%=
- if theme
-
- selected = theme.id == @current_theme
- sel_html = selected ?
- content_tag('big', _('(current)') ) :
- link_to(_('Use this theme'), :action => 'set', :id => theme.id)
-
- content_tag( 'div',
- image_tag(
- '/images/icons-app/design-editor.png',
- :alt => (_('The "%s" theme.') % theme.name)) +
- '
' +
- content_tag('strong', theme.name, :class => 'name') +
- ' '+ sel_html +' ' +
- link_to(_('Edit this theme'), :action => 'edit', :id => theme.id) +
- ' ' +
- link_to(_('Test this theme'), :action => 'start_test', :id => theme.id) +
- '
',
- :class => 'theme-opt list-opt' + (selected ? ' selected' : '')
- )
-
- end
- %><% end %>
-
- <% end %>
-
-
-<% end %>
-
-
-
-<% button_bar do %>
- <% if environment.enabled?('user_themes') %>
- <%= lightbox_button(:add, _('New theme ...'), :action => 'new') %>
- <% end %>
- <%= button(:back, _('Back'), :controller => 'profile_editor', :action => 'index') %>
-<% end %>
diff --git a/app/views/themes/new.html.erb b/app/views/themes/new.html.erb
new file mode 100644
index 0000000..fb77600
--- /dev/null
+++ b/app/views/themes/new.html.erb
@@ -0,0 +1,10 @@
+<%= _('Create new theme') %>
+
+<% form_tag(:action => 'new') do %>
+
+ <%= labelled_form_field(_('Name of the new theme:'), text_field_tag(:name)) %>
+
+ <% button_bar do %>
+ <%= submit_button(:save, _('Create')) %>
+ <% end %>
+<% end %>
diff --git a/app/views/themes/new.rhtml b/app/views/themes/new.rhtml
deleted file mode 100644
index fb77600..0000000
--- a/app/views/themes/new.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<%= _('Create new theme') %>
-
-<% form_tag(:action => 'new') do %>
-
- <%= labelled_form_field(_('Name of the new theme:'), text_field_tag(:name)) %>
-
- <% button_bar do %>
- <%= submit_button(:save, _('Create')) %>
- <% end %>
-<% end %>
diff --git a/app/views/user/mailer/activation_code.html.erb b/app/views/user/mailer/activation_code.html.erb
new file mode 100644
index 0000000..3f35a3c
--- /dev/null
+++ b/app/views/user/mailer/activation_code.html.erb
@@ -0,0 +1,9 @@
+<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
+
+<%= word_wrap(_('Welcome to %{environment}! To activate your account, follow the link: %{activation_url}') % { :environment => @environment, :activation_url => @url + url_for(:controller => :account, :action => :activate, :activation_code => @activation_code) }) %>
+
+<%= _("Greetings,") %>
+
+--
+<%= _('%s team.') % @environment %>
+<%= url_for @url %>
diff --git a/app/views/user/mailer/activation_code.rhtml b/app/views/user/mailer/activation_code.rhtml
deleted file mode 100644
index 3f35a3c..0000000
--- a/app/views/user/mailer/activation_code.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
-
-<%= word_wrap(_('Welcome to %{environment}! To activate your account, follow the link: %{activation_url}') % { :environment => @environment, :activation_url => @url + url_for(:controller => :account, :action => :activate, :activation_code => @activation_code) }) %>
-
-<%= _("Greetings,") %>
-
---
-<%= _('%s team.') % @environment %>
-<%= url_for @url %>
diff --git a/app/views/user/mailer/activation_email_notify.html.erb b/app/views/user/mailer/activation_email_notify.html.erb
new file mode 100644
index 0000000..07a60aa
--- /dev/null
+++ b/app/views/user/mailer/activation_email_notify.html.erb
@@ -0,0 +1,12 @@
+<%= _('Hello %s,') % @name %>
+
+<%= _('Your email %s was just activated.') % [@email] %>
+
+<%= _('You can access your e-mail from anywhere, using the following address:') %>
+<%= @webmail %>
+
+<%= _('Greetings,') %>
+
+--
+<%= _('%s team.') % @environment %>
+<%= @url %>
diff --git a/app/views/user/mailer/activation_email_notify.rhtml b/app/views/user/mailer/activation_email_notify.rhtml
deleted file mode 100644
index 07a60aa..0000000
--- a/app/views/user/mailer/activation_email_notify.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<%= _('Hello %s,') % @name %>
-
-<%= _('Your email %s was just activated.') % [@email] %>
-
-<%= _('You can access your e-mail from anywhere, using the following address:') %>
-<%= @webmail %>
-
-<%= _('Greetings,') %>
-
---
-<%= _('%s team.') % @environment %>
-<%= @url %>
diff --git a/app/views/user/mailer/signup_welcome_email.html.erb b/app/views/user/mailer/signup_welcome_email.html.erb
new file mode 100644
index 0000000..6982a56
--- /dev/null
+++ b/app/views/user/mailer/signup_welcome_email.html.erb
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+ <%= word_wrap @body %>
+
+
diff --git a/app/views/user/mailer/signup_welcome_email.rhtml b/app/views/user/mailer/signup_welcome_email.rhtml
deleted file mode 100644
index 6982a56..0000000
--- a/app/views/user/mailer/signup_welcome_email.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
- <%= word_wrap @body %>
-
-
diff --git a/app/views/users/_user_csv.html.erb b/app/views/users/_user_csv.html.erb
new file mode 100644
index 0000000..4c52a09
--- /dev/null
+++ b/app/views/users/_user_csv.html.erb
@@ -0,0 +1 @@
+<%= user_csv.name %>;<%= user_csv.email %>
diff --git a/app/views/users/_user_csv.rhtml b/app/views/users/_user_csv.rhtml
deleted file mode 100644
index 4c52a09..0000000
--- a/app/views/users/_user_csv.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= user_csv.name %>;<%= user_csv.email %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
new file mode 100644
index 0000000..f40f241
--- /dev/null
+++ b/app/views/users/index.html.erb
@@ -0,0 +1,16 @@
+<%= _('Manage users') %>
+
+
+
+ <%= _('Download users list') %>:
+ <%= link_to '[CSV]', :format => 'csv' %>
+ <%= link_to '[XML]', :format => 'xml' %>
+
+
+ <%= link_to _('Send e-mail to users'), :action => 'send_mail' %>
+
+
+
+<% button_bar do %>
+ <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
+<% end %>
diff --git a/app/views/users/index.rhtml b/app/views/users/index.rhtml
deleted file mode 100644
index f40f241..0000000
--- a/app/views/users/index.rhtml
+++ /dev/null
@@ -1,16 +0,0 @@
-<%= _('Manage users') %>
-
-
-
- <%= _('Download users list') %>:
- <%= link_to '[CSV]', :format => 'csv' %>
- <%= link_to '[XML]', :format => 'xml' %>
-
-
- <%= link_to _('Send e-mail to users'), :action => 'send_mail' %>
-
-
-
-<% button_bar do %>
- <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
-<% end %>
diff --git a/app/views/users/index_csv.html.erb b/app/views/users/index_csv.html.erb
new file mode 100644
index 0000000..b956088
--- /dev/null
+++ b/app/views/users/index_csv.html.erb
@@ -0,0 +1,2 @@
+<%= _('name') %>;<%= _('email') %>
+<%= render :partial => 'user_csv', :collection => @users %>
diff --git a/app/views/users/index_csv.rhtml b/app/views/users/index_csv.rhtml
deleted file mode 100644
index b956088..0000000
--- a/app/views/users/index_csv.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= _('name') %>;<%= _('email') %>
-<%= render :partial => 'user_csv', :collection => @users %>
diff --git a/app/views/users/send_mail.html.erb b/app/views/users/send_mail.html.erb
new file mode 100644
index 0000000..1879b79
--- /dev/null
+++ b/app/views/users/send_mail.html.erb
@@ -0,0 +1,12 @@
+<%= _('Send e-mail to users') %>
+
+<%= error_messages_for :mailing %>
+
+<%= render :file => 'shared/tiny_mce' %>
+
+<% form_for :mailing, :url => {:action => 'send_mail', :host => @environment.default_hostname} do |f| %>
+ <%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %>
+ <%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'mceEditor')) %>
+ <%= submit_button(:send, _('Send')) %>
+ <%= button :cancel, _('Cancel e-mail'), :controller => 'users' %>
+<% end %>
diff --git a/app/views/users/send_mail.rhtml b/app/views/users/send_mail.rhtml
deleted file mode 100644
index 1879b79..0000000
--- a/app/views/users/send_mail.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<%= _('Send e-mail to users') %>
-
-<%= error_messages_for :mailing %>
-
-<%= render :file => 'shared/tiny_mce' %>
-
-<% form_for :mailing, :url => {:action => 'send_mail', :host => @environment.default_hostname} do |f| %>
- <%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %>
- <%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'mceEditor')) %>
- <%= submit_button(:send, _('Send')) %>
- <%= button :cancel, _('Cancel e-mail'), :controller => 'users' %>
-<% end %>
--
libgit2 0.21.2
<%= comment.title.blank? && ' ' || comment.title %>
+