diff --git a/app/controllers/public/profile_controller.rb b/app/controllers/public/profile_controller.rb index 740eb49..5914680 100644 --- a/app/controllers/public/profile_controller.rb +++ b/app/controllers/public/profile_controller.rb @@ -1,9 +1,9 @@ class ProfileController < PublicController needs_profile - before_filter :check_access_to_profile, :except => [:join, :refuse_join, :refuse_for_now, :index] + before_filter :check_access_to_profile, :except => [:join, :index] before_filter :store_before_join, :only => [:join] - before_filter :login_required, :only => [:join, :refuse_join, :leave, :unblock] + before_filter :login_required, :only => [:join, :leave, :unblock] helper TagsHelper @@ -112,20 +112,6 @@ class ProfileController < PublicController end end - def refuse_join - p = current_user.person - p.refused_communities << profile - p.save - redirect_to profile.url - end - - def refuse_for_now - session[:no_asking] ||= [] - session[:no_asking].shift if session[:no_asking].size >= 10 - session[:no_asking] << profile.id - render :text => '', :layout => false - end - def unblock if current_user.person.is_admin?(profile.environment) profile.unblock diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ab927dc..d7437f8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -939,20 +939,6 @@ module ApplicationHelper end end - def ask_to_join? - return if !environment.enabled?(:join_community_popup) - return if params[:action] == 'join' - return unless profile && profile.kind_of?(Community) - if (session[:no_asking] && session[:no_asking].include?(profile.id)) - return false - end - if logged_in? - user.ask_to_join?(profile) - else - true - end - end - def icon_theme_stylesheet_path theme_path = "/designs/icons/#{environment.icon_theme}/style.css" if File.exists?(File.join(RAILS_ROOT, 'public', theme_path)) diff --git a/app/models/environment.rb b/app/models/environment.rb index 1ae4c7d..0d49f3e 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -93,7 +93,6 @@ class Environment < ActiveRecord::Base 'disable_contact_person' => _('Disable contact for people'), 'disable_contact_community' => _('Disable contact for groups/communities'), 'enterprise_registration' => __('Enterprise registration'), - 'join_community_popup' => _('Ask users to join a group/community with a popup'), 'enterprise_activation' => __('Enable activation of enterprises'), 'wysiwyg_editor_for_environment_home' => _('Use WYSIWYG editor to edit environment home page'), diff --git a/app/views/blocks/profile_info_actions/community.rhtml b/app/views/blocks/profile_info_actions/community.rhtml index ae2e44e..9782f6b 100644 --- a/app/views/blocks/profile_info_actions/community.rhtml +++ b/app/views/blocks/profile_info_actions/community.rhtml @@ -19,5 +19,11 @@ <% end %> + <% else %> + +